GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — quickview quickview
Martijn Dashorst edited this page
This library contains repeaters which support partial updates in ajax use case. QuickView is a wicket component(RepeatingView) , it lets you add or remove the rows without the need to re-render the whole repeater again in ajax use cases.the way of using QuickView is almost like DataView. QuickGridView renders items in rows and columns in table/grid format. It also lets you add or remove the rows without the need to re-render the whole repeater again in ajax use cases. The way of using QuickGridView is almost like GridView. Include in your maven project Why is it useful? The repeaters wicket have like DataView are amazing but they can't be partially updated with ajax so you can't basically render new rows unless you add parent to AjaxRequestTarget(which will cause re-rendering of the whole repeater) or say if you remove a row you can only show your change to user by adding parent to AjaxRequestTarget,this can work in some scenarios but it might not be acceptable at places where performance is the concern ,you just don't want to retrieve the whole data again and then render all of that again.not good at server side,not good at client/user side. QuickView solves this problem for almost all of these scenarios,it can just render new row(s) in the end or at the start without the need to re-render the whole of repeater depending on where you want to add the new rows,similarly you can remove the row(s).the way of using quickview is exactly like DataView in fact by default quickview works fine in case of paging (ie. in case where whole View is rendered). QuickView by default uses DefaultQuickReuseStrategy(which implements IQuickReuseStrategy). see examles to see the use of different strategies and how they are used. **Please note IQuickReuseStrategy is replacement for Reuse constant used in earlier versions ** Add new row in QuickView complete example for the same is provided in the examples provided in the package the above code might look very familiar to you,using quickview looks exactly like a dataview . in ajaxlink's onclick you create a new item by just using quickview.addNewItems(newObject). adding the item to quickview also means a new row/item will be rendered.there is no need to add quickview'parent to the ajaxlink in above code and you should also NOT do that as it will mean the whole quickview is rendered again which is what you don't want in current case. Add new row in QuickGridView complete example for the same is provided in the examples provided in the package AjaxItemsNavigator. It is also provided in the package,it is a navigator which creates new rows on click.It works like what you see in social networking applications,click on a link more to get more feeds/updates .the way to use it is very simple. just enough to use AjaxItemsNavigator ,create a quickview and pass to it and that's it. AjaxItemsNavigator with QuickGridView just enough to use AjaxItemsNavigator with QuickGridView,create a QuickGridView and pass to it and that's it. complete example for the same is provided in the examples provided in the package AjaxPageScrollEventBehavior it's an AjaxEventBehavior which fires an event when scroll-bar of Page is moved to the bottom else it just ignores the "scroll" events.when you implement onScroll just call the behavior's addItemsForNextPage(quickview) and new rows will be created when scroll event is fired.Add this behavior to the Page for example. complete example for the same is provided in the examples provided with quickview's package AjaxComponentScrollEventBehavior it's an AjaxEventBehavior which fires an event when scroll-bar of quickview's parent is moved to the bottom else it just ignores the "scroll" events.when you implement onScroll just call the behavior's addItemsForNextPage(quickview) and new rows will be created when scroll event is fired.Add this behavior to quickview's parent. for example. complete example for the same is provided in the examples provided with quickview's package Quickview works well with PagingNavigator or AjaxPagingNavigator for example to use with AjaxPagingNavigator there is nothing new to explain ,just create quickview and pass it on to the navigator like you do with dataview. complete example for the same is provided in the examples provided with quickview's package Please note the idea/inspiration to write quickview came from Igor Vaynberg's article http://wicketinaction.com/2008/10/repainting-only-newly-created-repeater-items-via-ajax/ Clone this wiki locally |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |