Hey thanks, Really appreciate it. Cheers, Dragan Sahpaski
On Thu, Jul 7, 2011 at 2:50 AM, Taha Hafeez <[email protected]>wrote: > Hi Dragan, > > It looks great !! > > regards > Taha > > On Thu, Jul 7, 2011 at 5:49 AM, Jonathan Barker < > [email protected] > > wrote: > > > Dragan, > > > > Nice work. I look forward to inclusion in the core. > > > > I'm not sure if this will help in your grid enhancements, or just muddy > the > > waters, but.... > > > > a) Do you always want the grids to be bookmarkable, or only on demand? > > Looking at Google Maps, for example, the basic map page is not > > bookmarkable, but there is a Link option that includes all of the > location > > and scaling information to allow you to email someone a link to generate > > what you are looking at. > > > > b) The grid is a specific component, but in general, you are trying to > > capture page state. For things like entity ids, we use activation > context. > > But let's say we have an expandable tree, or a page with multiple > sections > > with adjustable borders, or a grid. Could there be a general-purpose > > strategy for handling cases like this, so a grid, or tree, or whatever > can > > "plug in" to this standard method of capturing a page's display state? > > > > Regards, > > > > Jonathan > > > > > > > > > > > 2. Grid Enhancements - Making pagination and Sorting Bookmarkable (see > > > demo<http://dragansah.com/contextmenu/dropdownmenuexamples> > > > page) > > > - This is achieved by modifying the existing > > > GridColumns< > > > > > > http://code.google.com/a/apache-extras.org/p/right-click-menu-gsoc2011/source/browse/trunk/contextmenu/src/main/java/org/apache/tapestry5/contextmenu/components/GridColumns.java > > > >and > > > GridPager< > > > > > > http://code.google.com/a/apache-extras.org/p/right-click-menu-gsoc2011/source/browse/trunk/contextmenu/src/main/java/org/apache/tapestry5/contextmenu/components/GridPager.java > > > > > > > (see > > > line 141) components with just a few lines of code, combined with > mixins > > > for > > > the actual URL manipulation (bookmarking). > > > - The main issue why I had to modify GridPager and GridColumns is > because > > > they don't keep (off course) the URL parameters (request parameters) > for > > > the > > > links for the sort columns (in GridColumns) and for the links in the > page > > > numbers (in Grid Pager). The added LOC are just to keep those > parameters > > > for > > > their action and sort events. This approach obviously needs rethinking. > > One > > > solution I could think of is decorating the links but this happens in > > pages > > > not components, so I would have to add advice to all pages (tried that > > also > > > and it worked), but it seems like just too much overhead. > > > > > > - Another idea is to just make a redirect on setupRender on the grid's > > > mixins to put the parameters in the url. This is the simplest solution > > and > > > it would also work if the grid is sorted in code (not by clicking the > > > columns), but a redirect is another request. IDK if this can lead to > > usage > > > problems. Advice please :) > > > > > > - So. All Work is done in the 2 mixins > > > ColumnsSort.java< > > > > > > http://code.google.com/a/apache-extras.org/p/right-click-menu-gsoc2011/source/browse/trunk/contextmenu/src/main/java/org/apache/tapestry5/contextmenu/mixins/ColumnsSort.java > > > > > > > (for > > > Grid Columns) and > > > CurrentPageURL.java< > > > > > > http://code.google.com/a/apache-extras.org/p/right-click-menu-gsoc2011/source/browse/trunk/contextmenu/src/main/java/org/apache/tapestry5/contextmenu/mixins/CurrentPageURL.java > > > > > > > (for > > > GridPager) that catch the sort and action events and add parameters and > > > also > > > read parameters from the Request to adjust column sorting and > pagination. > > I > > > supose this is quite ok. But the main issue remains. > > > "How to keep the request parameters for the links produced by GridPager > > and > > > GridColumns?" > > > > > > > > > -- > > Jonathan Barker > > ITStrategic > > >
