Update ListView with Ajax, performance.

classic Classic list List threaded Threaded
23 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Update ListView with Ajax, performance.

Raul
Hello, I need to implement a component that can display a list of users from a ListView, at the end of the list you should see a link to "see more users." What I need is to update the list of users displayed but without rendering at all in ListView again. Because right now I use a AjaxLink that updates the entire ListView container, but when many users are penalized performance and gives a sense of slowness. Anyone know if you can implement some of this functionality with wicket.

Reply | Threaded
Open this post in threaded view
|

Re: Update ListView with Ajax, performance.

Nick Pratt
Id use one of various Javascript libs to implement this sort of
functionality - I think select2 and datatables would both work for such a
list (I think they both support infinite scrolling lists) that only
render/send a page of information at a time. There's a wicket-select2
library, but its fairly minimal in nature - you'll need to understand the
JS docs to get anywhere with it. I think there's a Wicket lib for
Datatables, but I dont know its maintenance status.  There are countless
other JS libraries to do this as well.

Nick


On Fri, Apr 12, 2013 at 4:05 PM, Raul <[hidden email]> wrote:

> Hello, I need to implement a component that can display a list of users
> from
> a ListView, at the end of the list you should see a link to "see more
> users." What I need is to update the list of users displayed but without
> rendering at all in ListView again. Because right now I use a AjaxLink that
> updates the entire ListView container, but when many users are penalized
> performance and gives a sense of slowness. Anyone know if you can implement
> some of this functionality with wicket.
>
>
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Update-ListView-with-Ajax-performance-tp4657948.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Update ListView with Ajax, performance.

Alexey Mukas
In reply to this post by Raul
If the list is relatively small (say 20-30 items) then it's better to pull it entirely to the clientside. Show first N items use js in the bottom link to show next items without a call to the server.
see this solution http://stackoverflow.com/questions/10944304/hiding-list-items-with-a-show-more-button 
Reply | Threaded
Open this post in threaded view
|

Re: Update ListView with Ajax, performance.

Raul
Nick, I sensed that the solution was going to use Javascript, my question was if there was any easier than the framework could provide. Select2 prove.

Alexy single client solution does not help me as I have a large volume of data.

Regards and thanks for the guidance.
Reply | Threaded
Open this post in threaded view
|

Re: Update ListView with Ajax, performance.

Nick Pratt
I guess you could build something with just the core framework, but I think
it would be a lot clunkier than one of the libs - for instance, on the
client side JS libs, you get events that can trigger Ajax callbacks to load
the next set of data while the user is scrolling through the list - since
its async, its much smoother and a better experience.

Ive used (and am using in a current project) both select2 and datatables.
 While the initial learning curve is reasonable with both libs (you're not
likely to be able to avoid writing your own JS init/config for these
components), they are stable, and work very well.

N


On Fri, Apr 12, 2013 at 4:36 PM, Raul <[hidden email]> wrote:

> Nick, I sensed that the solution was going to use Javascript, my question
> was
> if there was any easier than the framework could provide. Select2 prove.
>
> Alexy single client solution does not help me as I have a large volume of
> data.
>
> Regards and thanks for the guidance.
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Update-ListView-with-Ajax-performance-tp4657948p4657951.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Update ListView with Ajax, performance.

Martin Grigorov-4
In reply to this post by Raul
Hi,

I have done something like this before.
I used a <table> in my case but you can use another HTML element.
The initial layout is:
-table
--tbody
---tr
---tr
....
---tr
--tbody (id + style=display:none)
--tfoot
---tr
----a (Show more link)

i.e. the first tbody shows the items, the second tbody is a placeholder and
the tfoot has the 'show' link
When the link is clicked the server returns markup like:
--tbody
---tr
---tr
....
---tr
--tbody (id + style=display:none)

which replaces the placeholder tbody.
When there are no more entries the last Ajax response also hides the tfoot.


On Fri, Apr 12, 2013 at 11:36 PM, Raul <[hidden email]> wrote:

> Nick, I sensed that the solution was going to use Javascript, my question
> was
> if there was any easier than the framework could provide. Select2 prove.
>
> Alexy single client solution does not help me as I have a large volume of
> data.
>
> Regards and thanks for the guidance.
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Update-ListView-with-Ajax-performance-tp4657948p4657951.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>


--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com <http://jweekend.com/>
Reply | Threaded
Open this post in threaded view
|

Re: Update ListView with Ajax, performance.

vineetsemwal
In reply to this post by Raul
hi,
if you can change repeater,try using QuickView instead of ListView ,it
supports the functionality you are asking.. ,way of using is like DataView
,project is here https://github.com/vineetsemwal/quickview


On Sat, Apr 13, 2013 at 1:35 AM, Raul <[hidden email]> wrote:

> Hello, I need to implement a component that can display a list of users
> from
> a ListView, at the end of the list you should see a link to "see more
> users." What I need is to update the list of users displayed but without
> rendering at all in ListView again. Because right now I use a AjaxLink that
> updates the entire ListView container, but when many users are penalized
> performance and gives a sense of slowness. Anyone know if you can implement
> some of this functionality with wicket.
>
>
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Update-ListView-with-Ajax-performance-tp4657948.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>


--
regards,

Vineet Semwal
Reply | Threaded
Open this post in threaded view
|

Re: Update ListView with Ajax, performance.

vineetsemwal
forgot to write there is  AjaxItemsNavigator in the package which on click
adds new rows for QuickView, you can use or extend it or write your own
depending on your usecase,see examples..


On Sat, Apr 13, 2013 at 12:39 PM, vineet semwal <[hidden email]>wrote:

> hi,
> if you can change repeater,try using QuickView instead of ListView ,it
> supports the functionality you are asking.. ,way of using is like DataView
> ,project is here https://github.com/vineetsemwal/quickview
>
>
> On Sat, Apr 13, 2013 at 1:35 AM, Raul <[hidden email]> wrote:
>
>> Hello, I need to implement a component that can display a list of users
>> from
>> a ListView, at the end of the list you should see a link to "see more
>> users." What I need is to update the list of users displayed but without
>> rendering at all in ListView again. Because right now I use a AjaxLink
>> that
>> updates the entire ListView container, but when many users are penalized
>> performance and gives a sense of slowness. Anyone know if you can
>> implement
>> some of this functionality with wicket.
>>
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://apache-wicket.1842946.n4.nabble.com/Update-ListView-with-Ajax-performance-tp4657948.html
>> Sent from the Users forum mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>>
>
>
> --
> regards,
>
> Vineet Semwal
>



--
regards,

Vineet Semwal
Reply | Threaded
Open this post in threaded view
|

Re: Update ListView with Ajax, performance.

Raul
QuickView The project looks great, but I want to try, why not stay at maven central repository?. It is very cumbersome installation is proposed. Https://github.com/vineetsemwal/quickview/wiki
Reply | Threaded
Open this post in threaded view
|

Re: Update ListView with Ajax, performance.

vineetsemwal
sorry,i did't want to do effort of publishing in maven central repository
.., currently a user has to build and install on his machine either by
doing
a)git clone and then a mvn install
or b) he has to grab a release release tag from
https://github.com/vineetsemwal/quickview/tags ,decompress it,step into it
and then  mvn install ,same as he does in his maven project ,a part from
that there is no difference after installing quicvkiew , specify dependency
in your project and use it ..


On Sat, Apr 13, 2013 at 3:19 PM, Raul <[hidden email]> wrote:

> QuickView The project looks great, but I want to try, why not stay at maven
> central repository?. It is very cumbersome installation is proposed.
> Https://github.com/vineetsemwal/quickview/wiki
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Update-ListView-with-Ajax-performance-tp4657948p4657958.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>


--
regards,

Vineet Semwal
Reply | Threaded
Open this post in threaded view
|

Re: Update ListView with Ajax, performance.

Raul
This post was updated on .
In reply to this post by Raul
vineetsemwal I tried the project and give you my congratulations, it's just what I need, but it would be ideal that was included as an extension of the core wicket.
Reply | Threaded
Open this post in threaded view
|

Re: Update ListView with Ajax, performance.

vineetsemwal
i am glad the project is useful for you.. ,thanks for the feedback :-)
i think it's too new to move into wicket-extension ,also i think core and
extension should be kept small..


On Sat, Apr 13, 2013 at 4:23 PM, Raul <[hidden email]> wrote:

> I tried the project and give you my congratulations, it's just what I need,
> but it would be ideal that was included as an extension of the core wicket.
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Update-ListView-with-Ajax-performance-tp4657948p4657961.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>


--
regards,

Vineet Semwal
Reply | Threaded
Open this post in threaded view
|

Re: Update ListView with Ajax, performance.

Raul
I think the functionality that gives your project is essential to many Web projects, and in many companies there is a policy not to use third party libraries that can not be maintained or updated in the future. I therefore believe that the number of components "official" Wicket, should increase in the future, for the framework to do its job better, which is to "provide web development"
Reply | Threaded
Open this post in threaded view
|

Re: Update ListView with Ajax, performance.

vineetsemwal
i am not a core dev. , wicket core devs can only decide what can be moved
in ;)


On Sat, Apr 13, 2013 at 6:23 PM, Raul <[hidden email]> wrote:

> I think the functionality that gives your project is essential to many Web
> projects, and in many companies there is a policy not to use third party
> libraries that can not be maintained or updated in the future. I therefore
> believe that the number of components "official" Wicket, should increase in
> the future, for the framework to do its job better, which is to "provide
> web
> development"
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Update-ListView-with-Ajax-performance-tp4657948p4657963.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>


--
regards,

Vineet Semwal
Reply | Threaded
Open this post in threaded view
|

Re: Update ListView with Ajax, performance.

Raul
Hi, vineetsemwal, I think I found a bug in the project developed, having several QuickView, inside a ListView or DataView, errors occur. I recreated the error in your project, simply. Within RowNavigationPage class, I added a ListView with a list of three items and each item I have added the QuickView. Seemore Pressing the first time works fine, but if you hit the other QuickView see, does not display correctly.
Reply | Threaded
Open this post in threaded view
|

Re: Update ListView with Ajax, performance.

Raul
Exactly the error occurs when you click on the above item, item affects the bottom, but not vice versa.
Reply | Threaded
Open this post in threaded view
|

Re: Update ListView with Ajax, performance.

vineetsemwal
hi,
i am making a guess now ,i think you are having this problem ,there is one
limitation of quickview in cases where you want to update without rendering
the whole quickview .that limitation is the quickview immediate parent can
have one child (which is quickview ofcourse) .this limitation is only for
the immediate parent and if you give quickview a dedicated parent/container
,your problem will go away ...
this check is also made in ajaxitemsnavigator and gives you an expectation
explaining the problem and in older versions it was in quickview itself ,i
somehow removed it while refactoring sometime ago ..,i will add it back
later.

please also create quickstart ie. small project which reproduces the bug
and add it here ,i will check it out.,thanks !



On Mon, Apr 15, 2013 at 5:03 PM, Raul <[hidden email]> wrote:

> Exactly the error occurs when you click on the above item, item affects the
> bottom, but not vice versa.
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Update-ListView-with-Ajax-performance-tp4657948p4657984.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>


--
regards,

Vineet Semwal
Reply | Threaded
Open this post in threaded view
|

Re: Update ListView with Ajax, performance.

vineetsemwal
or upload it somewhere else and give a url here from where it can be
downloaded,sometimes here the attached files don't go through..
or  just mail your project at [hidden email]


On Mon, Apr 15, 2013 at 5:31 PM, vineet semwal <[hidden email]>wrote:

> hi,
> i am making a guess now ,i think you are having this problem ,there is one
> limitation of quickview in cases where you want to update without rendering
> the whole quickview .that limitation is the quickview immediate parent can
> have one child (which is quickview ofcourse) .this limitation is only for
> the immediate parent and if you give quickview a dedicated parent/container
> ,your problem will go away ...
> this check is also made in ajaxitemsnavigator and gives you an expectation
> explaining the problem and in older versions it was in quickview itself ,i
> somehow removed it while refactoring sometime ago ..,i will add it back
> later.
>
> please also create quickstart ie. small project which reproduces the bug
> and add it here ,i will check it out.,thanks !
>
>
>
> On Mon, Apr 15, 2013 at 5:03 PM, Raul <[hidden email]> wrote:
>
>> Exactly the error occurs when you click on the above item, item affects
>> the
>> bottom, but not vice versa.
>>
>>
>>
>> --
>> View this message in context:
>> http://apache-wicket.1842946.n4.nabble.com/Update-ListView-with-Ajax-performance-tp4657948p4657984.html
>> Sent from the Users forum mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>>
>
>
> --
> regards,
>
> Vineet Semwal
>



--
regards,

Vineet Semwal
Reply | Threaded
Open this post in threaded view
|

Re: Update ListView with Ajax, performance.

vineet semwal
sorry i made a typo in one of the post ..
 i wrote gives you an expectation
what i meant was gives you an *exception* :-)


On Mon, Apr 15, 2013 at 5:39 PM, vineet semwal <[hidden email]>wrote:

> or upload it somewhere else and give a url here from where it can be
> downloaded,sometimes here the attached files don't go through..
> or  just mail your project at [hidden email]
>
>
> On Mon, Apr 15, 2013 at 5:31 PM, vineet semwal <[hidden email]
> >wrote:
>
> > hi,
> > i am making a guess now ,i think you are having this problem ,there is
> one
> > limitation of quickview in cases where you want to update without
> rendering
> > the whole quickview .that limitation is the quickview immediate parent
> can
> > have one child (which is quickview ofcourse) .this limitation is only for
> > the immediate parent and if you give quickview a dedicated
> parent/container
> > ,your problem will go away ...
> > this check is also made in ajaxitemsnavigator and gives you an
> expectation
> > explaining the problem and in older versions it was in quickview itself
> ,i
> > somehow removed it while refactoring sometime ago ..,i will add it back
> > later.
> >
> > please also create quickstart ie. small project which reproduces the bug
> > and add it here ,i will check it out.,thanks !
> >
> >
> >
> > On Mon, Apr 15, 2013 at 5:03 PM, Raul <[hidden email]> wrote:
> >
> >> Exactly the error occurs when you click on the above item, item affects
> >> the
> >> bottom, but not vice versa.
> >>
> >>
> >>
> >> --
> >> View this message in context:
> >>
> http://apache-wicket.1842946.n4.nabble.com/Update-ListView-with-Ajax-performance-tp4657948p4657984.html
> >> Sent from the Users forum mailing list archive at Nabble.com.
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: [hidden email]
> >> For additional commands, e-mail: [hidden email]
> >>
> >>
> >
> >
> > --
> > regards,
> >
> > Vineet Semwal
> >
>
>
>
> --
> regards,
>
> Vineet Semwal
>



--
thank you,

regards,
Vineet Semwal
Reply | Threaded
Open this post in threaded view
|

Re: Update ListView with Ajax, performance.

Raul
http://ul.to/847ee7uh

From his example I just changed the RowsNavigatorPage
12