FilterToolbar with composite PK problem
Hi, I have an entity which has composite primary key with two fields. I need to use one of them to filter. In this case I need to fill this field everytime (though I want to filter another field or fields). If I don't fill this field then I get 'Filter field is required' message. So the question is how to solve this problem ? Should I create some helper class with limited number of fields ? Thnx, Sandor -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/FilterToolbar-with-composite-PK-problem-tp4665751.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: FilterToolbar with composite PK problem
Hi, Here is my entity's PK. In my DataTable I added one field of PK to filter on. columns.add(new TextFilteredPropertyColumnHrpBbstorzs, Number,String(new ResourceModel(beosztottakform.torzsszam), HrpBbstorzsPK.torzsszam, HrpBbstorzsPK.torzsszam)); If this field is part of filterform then I have to fill it when I need to filter something. If I don'n fill this field (but others) then when I click on Filter button I get this field is required. In my case my DataTable's model and FilterForm model are the same. I created a helper class for filtering and that works fine but I don't want to duplicate my entities just for filtering purpose. So I don't think my problem related the bug you've mentioned but I will have a try with 6.16 after it will be released. Thnx., Sandor -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/FilterToolbar-with-composite-PK-problem-tp4665751p4665780.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: FilterToolbar with composite PK problem
Hi, I don't understand what exactly is the problem you face. Is https://issues.apache.org/jira/browse/WICKET-5573 somehow related ? Martin Grigorov Wicket Training and Consulting On Fri, May 9, 2014 at 1:54 PM, Sandor Feher sfe...@bluesystem.hu wrote: Hi, I have an entity which has composite primary key with two fields. I need to use one of them to filter. In this case I need to fill this field everytime (though I want to filter another field or fields). If I don't fill this field then I get 'Filter field is required' message. So the question is how to solve this problem ? Should I create some helper class with limited number of fields ? Thnx, Sandor -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/FilterToolbar-with-composite-PK-problem-tp4665751.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: DataTable's FilterToolbar generics broken
Confused I am not :) Let me give you three examples... I. filtering with a subset of properties This is a class that worked perfectly in 1.4.19: public class CustomersDataProvider extends HibernateDataProviderCustomer implements IFilterStateLocatorCustomerFilter { @SuppressWarnings(unused) public static class CustomerFilter implements Serializable { private Stringname; private Stringnip; public String getName() { return name; } public void setName( String name ) { this.name = name; } public String getNip() { return nip; } public void setNip( String nip ) { this.nip = nip; } } private CustomerFilterfilter= new CustomerFilter(); public CustomersDataProvider() { super( Customer.class ); setSort(name, true ); } @Override public CustomerFilter getFilterState() { return filter; } @Override public void setFilterState( CustomerFilter state ) { filter = (CustomerFilter) state; } @Override public IModelCustomer model( Customer object ) { return new CustomerModel( object ); } @Override protected void filter( Criteria c ) { CriteriaHelper.ilike(c, name, filter.getName() ); CriteriaHelper.ilike(c, nip, filter.getNip() ); } } why? Customer is a class with lots of properties. I am unable to provide proper filtering for all properties so I create a CustomerFilter having only two properties: name and nip. This way I am stating to other developers that my IDataProvider filters by two properties only. II. filtering date properties Let's have a Sale entity with date property. Dates are usually filtered by date ranges. So in filter I need startDate and finishDate with two inputs rather than one (Sale.date). It is impossible if the filter does not differ from base collection type. with wicket 1.4.19 it was: @Getter @Setter public class SaleFilter implements Serializable { private DatedateFrom; private DatedateTo; private StringcustomerName; private Stringdescription; private Statusstatus; private GroupingModegroupingMode; } class SalesDataProvider extends HibernateDataProviderSale implements IFilterStateLocatorSaleFilter { private SaleFilterfilter= new SaleFilter(); private final LongcustomerId; public SalesDataProvider( Long customerId ) { super( Sale.class ); this.customerId = customerId; setSort(date, false ); } @Override protected Criteria setupCriteria( Session session ) { Criteria c = super.setupCriteria( session ); c.createAlias(customer, customer ); return c; } @Override protected void filter( Criteria c ) { if ( customerId != null ) c.add( Restrictions.eq( customer.id, customerId ) ); else if ( !StringUtils.isBlank( filter.getCustomerName() ) ) CriteriaHelper.ilike(c, customer.name, filter.getCustomerName() ); CriteriaHelper.dateFilter(c, date, filter.getDateFrom(), filter.getDateTo() ); CriteriaHelper.ilike(c, description, filter.getDescription() ); if ( filter.getStatus() != null ) c.add( Restrictions.eq( status, filter.getStatus() ) ); if ( filter.getGroupingMode() != null ) c.add( Restrictions.eq( groupingMode, filter.getGroupingMode() ) ); } @Override public IModelSale model( Sale object ) { return new SaleModel( object ); } @Override public SaleFilter getFilterState() { return filter; } @Override public void setFilterState( SaleFilter state ) { this.filter = state; } } III. filtering with a superset of properties Lets design a data provider for Order. How would you create a filter for orders containing a selected product? Probably so: @Getter @Setter public class OrderFilter implements Serializable { private Date creationStartDate; private Date creationFinishDate; private String customerName; private Long selectedProductId; } In this case the filter contains MORE properties than the actual Order itself. -- Leszek Gawron
Re: DataTable's FilterToolbar generics broken
I think you're confused. If you want to filter a collection based on type T, then your filter your extend T. The idea here is that your model object type for the filter is the same as that retrieved by the data provider. As such you can have a POJO of the same type T on which you apply the filtering. Otherwise what would you filter the collection based on? There will be no standard, will there? ~ Thank you, Paul Bors On Sat, Apr 26, 2014 at 9:39 AM, Leszek Gawron lgaw...@apache.org wrote: I started migrating my code from wicket 1.4.19 to 6. Finally ! :) I found a FilterToolbar bug: Once you were able to create DataTableUser wrapped inside of FilterFormUserFilterDto currently FilterToolbar requires you for those two types to be identical: public T, S FilterToolbar(final DataTableT, S table, final FilterFormT form, final IFilterStateLocatorT stateLocator) It looks like commit 9b3f9ca1df064fe9c6fde64ccc37fecc504b09a6 introduced a bug long time ago and it carried on: - public T FilterToolbar(final DataTable? table, final FilterFormT form, + public T FilterToolbar(final DataTableT table, final FilterFormT form, FilterToolbar constructor should state: public T, F, S FilterToolbar(final DataTableT, S table, final FilterFormF form, final IFilterStateLocatorF stateLocator) cheers. -- Leszek Gawron - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
DataTable's FilterToolbar generics broken
I started migrating my code from wicket 1.4.19 to 6. Finally ! :) I found a FilterToolbar bug: Once you were able to create DataTableUser wrapped inside of FilterFormUserFilterDto currently FilterToolbar requires you for those two types to be identical: public T, S FilterToolbar(final DataTableT, S table, final FilterFormT form, final IFilterStateLocatorT stateLocator) It looks like commit 9b3f9ca1df064fe9c6fde64ccc37fecc504b09a6 introduced a bug long time ago and it carried on: - public T FilterToolbar(final DataTable? table, final FilterFormT form, + public T FilterToolbar(final DataTableT table, final FilterFormT form, FilterToolbar constructor should state: public T, F, S FilterToolbar(final DataTableT, S table, final FilterFormF form, final IFilterStateLocatorF stateLocator) cheers. -- Leszek Gawron - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
wicket 6 and FilterToolbar
Hey folks, i am currently trying to use a FilterToolbar with a DataTable (wicket 6). Everything works fine without the FilterToolbar (the filering of course not), if the FilterToolbar is added via dataTable.add(new FilterToolbar(dataTable, form, dataProvider)); wicket throws the following exception: Last cause: The component(s) below failed to render. Possible reasons could be that: 1) you have added a component in code but forgot to reference it in the markup (thus the component will never be rendered), 2) if your components were added in a parent container then make sure the markup for the child container includes them in wicket:extend. 1. [FilterToolbar [Component id = 5]] 2. [ListView [Component id = filters]] 3. [ListItem [Component id = 0]] 4. [NoFilter [Component id = filter]] ... Do i have to add something else to get the FilterToolbar working? While using other toolbars (NavigationToolbar, HeaderToolbar) there is no need to adjust anything else than simple add them to the DataTable. Best regards marcel - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket 6 and FilterToolbar
Hi Marcel, adding a FilterForm/FilterToolbar to the DataTablePage in wicket-examples works fine here. Time to create a quickstart? Sven On 06/06/2013 12:47 PM, Marcel Hoerr wrote: Hey folks, i am currently trying to use a FilterToolbar with a DataTable (wicket 6). Everything works fine without the FilterToolbar (the filering of course not), if the FilterToolbar is added via dataTable.add(new FilterToolbar(dataTable, form, dataProvider)); wicket throws the following exception: Last cause: The component(s) below failed to render. Possible reasons could be that: 1) you have added a component in code but forgot to reference it in the markup (thus the component will never be rendered), 2) if your components were added in a parent container then make sure the markup for the child container includes them in wicket:extend. 1. [FilterToolbar [Component id = 5]] 2. [ListView [Component id = filters]] 3. [ListItem [Component id = 0]] 4. [NoFilter [Component id = filter]] ... Do i have to add something else to get the FilterToolbar working? While using other toolbars (NavigationToolbar, HeaderToolbar) there is no need to adjust anything else than simple add them to the DataTable. Best regards marcel - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Re: DataTable and FilterToolbar
I am having same problem with many textfields including TextFilter on FilterToolBar within a form. Could you please post your solution? Many thanks, -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/DataTable-Multiple-Filter-and-OrderSubmittingLink-tp3520329p4446496.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Re: DataTable and FilterToolbar
To follow up that old post of mine, the solution is of course to add a default button, and if we don't have one, but need one, we make it invisible: -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/DataTable-Multiple-Filter-and-OrderSubmittingLink-tp3520329p4160454.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Re: DataTable and FilterToolbar
there is a GoAndClearFilter which can submit the search form afair Yes, but that ons is meant for use within a form, as you write, but not within a FilterToolbar embedded in a DataTable. Or how would you use it / where would you put in a FilterToolbar ? (The FilterToolbar is below the column headers, and potentially has a filter component (text input, dropdown, ...) per column, so there is no room for a clear and go filter)... Thanks, Tom. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Re: DataTable and FilterToolbar
it is meant to go into one of the columns. usually there is an action column and this filter is meant to go with that column. if you do not have such, simply replicate the functionality - you have the source. -igor On Tue, May 17, 2011 at 11:34 AM, Tom Eicher r...@teicher.net wrote: there is a GoAndClearFilter which can submit the search form afair Yes, but that ons is meant for use within a form, as you write, but not within a FilterToolbar embedded in a DataTable. Or how would you use it / where would you put in a FilterToolbar ? (The FilterToolbar is below the column headers, and potentially has a filter component (text input, dropdown, ...) per column, so there is no room for a clear and go filter)... Thanks, Tom. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
DataTable and FilterToolbar
Hi, I guess no reply means it's not a simple FAQ ;-) So to start it easy: If I have a DataTable, with a FilterToolbar, and a TextFilteredPropertyColumn, how is the TextFilteredPropertyColumn supposed to submit, i.e. apply it's input for filtering. Pressing ENTER will only work if there is not other text input on the form / on the page. Cheers, Tom. Tom Eicher schrieb: Hello, (I have been unable to locate a current and working wicketstuff mailing list, so I am sending to wicket mailing list instead. I searched for quite some time. This is really confusing with the old SF list still accepting subscribe requests etc etc) We are using wicket, wicketstuff and a colletion of wicket best pratices found on the net. Thus, we use DataTable with sorting and filtering. This works great, but I noticed a few days ago, that as soon as you have 2 or more TextFilteredPropertyColumn in your FilterToolbar, the browser will not submit the form upon pressing enter. Of course this is standard behaviour for a browser, but there must be a solution for this situation, must it not ? I found the Form.setDefaultButton(), but this requires an explicit (and visible) defaultSubmittingComponent, which I don't have or want. I also found the GoFilter / GoAndClearFilter, but these seem to me to be for usage within a form, but not within a DataTable FilterToolbar. (potentially, every column is occupied by a filter - where would I put the GoFilter ?) To submit the filters, probably some JavaScript magic is required, BUT - the Javascript is (already) in the Form.appendDefaultButtonField() / .onComponentTagBody(), at least partially, is it not ? To make it worse, we have a SubmittingOrderByLink as found on the net, which has another funky javascript submit magic like protected final String getTriggerJavaScript() { if (getForm() != null) { // find the root form - the one we are really going to submit Form? root = getForm().getRootForm(); StringBuffer sb = new StringBuffer(100); sb.append(var e=document.getElementById('); sb.append(root.getHiddenFieldId()); sb.append('); e.name=\'); sb.append(getInputName()); sb.append('; e.value='x';); sb.append(var f=document.getElementById('); sb.append(root.getMarkupId()); sb.append(');); if (getForm() != root) { sb.append(var ff=document.getElementById('); sb.append(getForm().getMarkupId()); sb.append(');); } else { sb.append(var ff=f;); } sb.append(if (ff.onsubmit != undefined) { if (ff.onsubmit()==false) return false; }); sb.append(f.submit();e.value='';e.name='';return false;); return sb.toString(); } else { return null; } } Actually, I should not add a 3rd magic submit solution to the page, should I ? I'm not happy with all that, and very confused. I hope you can point me in the right direction. Thanks in advance, Cheers, Tom. PS: I could not find a single place of Documentation for DataTable related. If there were a definite correct place in the wiki, I would add some findings and examples later... - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: DataTable and FilterToolbar
there is a GoAndClearFilter which can submit the search form afair -igor On Mon, May 16, 2011 at 12:55 PM, Tom Eicher r...@teicher.net wrote: Hi, I guess no reply means it's not a simple FAQ ;-) So to start it easy: If I have a DataTable, with a FilterToolbar, and a TextFilteredPropertyColumn, how is the TextFilteredPropertyColumn supposed to submit, i.e. apply it's input for filtering. Pressing ENTER will only work if there is not other text input on the form / on the page. Cheers, Tom. Tom Eicher schrieb: Hello, (I have been unable to locate a current and working wicketstuff mailing list, so I am sending to wicket mailing list instead. I searched for quite some time. This is really confusing with the old SF list still accepting subscribe requests etc etc) We are using wicket, wicketstuff and a colletion of wicket best pratices found on the net. Thus, we use DataTable with sorting and filtering. This works great, but I noticed a few days ago, that as soon as you have 2 or more TextFilteredPropertyColumn in your FilterToolbar, the browser will not submit the form upon pressing enter. Of course this is standard behaviour for a browser, but there must be a solution for this situation, must it not ? I found the Form.setDefaultButton(), but this requires an explicit (and visible) defaultSubmittingComponent, which I don't have or want. I also found the GoFilter / GoAndClearFilter, but these seem to me to be for usage within a form, but not within a DataTable FilterToolbar. (potentially, every column is occupied by a filter - where would I put the GoFilter ?) To submit the filters, probably some JavaScript magic is required, BUT - the Javascript is (already) in the Form.appendDefaultButtonField() / .onComponentTagBody(), at least partially, is it not ? To make it worse, we have a SubmittingOrderByLink as found on the net, which has another funky javascript submit magic like protected final String getTriggerJavaScript() { if (getForm() != null) { // find the root form - the one we are really going to submit Form? root = getForm().getRootForm(); StringBuffer sb = new StringBuffer(100); sb.append(var e=document.getElementById('); sb.append(root.getHiddenFieldId()); sb.append('); e.name=\'); sb.append(getInputName()); sb.append('; e.value='x';); sb.append(var f=document.getElementById('); sb.append(root.getMarkupId()); sb.append(');); if (getForm() != root) { sb.append(var ff=document.getElementById('); sb.append(getForm().getMarkupId()); sb.append(');); } else { sb.append(var ff=f;); } sb.append(if (ff.onsubmit != undefined) { if (ff.onsubmit()==false) return false; }); sb.append(f.submit();e.value='';e.name='';return false;); return sb.toString(); } else { return null; } } Actually, I should not add a 3rd magic submit solution to the page, should I ? I'm not happy with all that, and very confused. I hope you can point me in the right direction. Thanks in advance, Cheers, Tom. PS: I could not find a single place of Documentation for DataTable related. If there were a definite correct place in the wiki, I would add some findings and examples later... - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Datatable filterToolbar TextField
Hi; My Datatable works and I put FilterToolbar on it. When i enter some values in FilterToolbar 's TextField and press enter, FilterForm's onsubmit() doesn't triggered Has anyone encountered this problem before ? Thanks. -- *Altuğ* ** http://www.kodcu.com
FilterToolbar doesn't consider IStyledColumn
I was just wondering, why the FilterToolbar component does not consider IStyledColumn, unlike HeaderToolbar. In my opinion, its a very simple, but effective key feature that should be provided by any datatable component. Solved it by creating my own FilterToolbar and taking some stuff from HeaderToolbar. But since I had to fork the code because all the magic happens in the constructor, I dont think thats a good way to go. Is there a reason why it is how it is, or is it just missing some wicketness? nao sleep i - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: FilterToolbar doesn't consider IStyledColumn
On Mon, Dec 20, 2010 at 12:30 AM, Benedikt Schlegel codecab.dri...@googlemail.com wrote: I was just wondering, why the FilterToolbar component does not consider IStyledColumn, unlike HeaderToolbar. In my opinion, its a very simple, but effective key feature that should be provided by any datatable component. Solved it by creating my own FilterToolbar and taking some stuff from HeaderToolbar. But since I had to fork the code because all the magic happens in the constructor, I dont think thats a good way to go. Is there a reason why it is how it is, or is it just missing some wicketness? Haven't looked at it, but I suspect from your description that it could just be improved. Please submit an issue, preferably with a quickstart to demonstrate it and your patch to improve it. -- Jeremy Thomerson http://wickettraining.com Need a CMS for Wicket? Use Brix! http://brixcms.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
FilterToolbar
Hello I wonder why FilterToolbar requires IFilterStateLocator? It already requres FilterForm which has method #getStateLocator and there no another constructor for 4.13. FilterForm can not be instantiated without locator for Exception in nested class. If you forget: public FilterToolbar(final DataTable? table, final FilterForm form, final IFilterStateLocator stateLocator) So, what is the profit in this? Why can't we just have Locator from the form? -- Best regards Alex - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Question about FilterForm and without FilterToolbar
Hello everybody, I am trying to use the FilterForm with TextFilter ChoiceFilter but *without *FilterToolbar because I use DataView and FilterToolbar waiting a DataTable. I can't use a DataTable because I am not use a IColumn because my columns are bizarres (see attach). The problem is that : it's not possible to use FilterForm without FilterToolbar because the FilterToolbar add the javascript function on the header to manage the focus cursor on the page and the filterForm add javascript to execute function of FilterToolbar. I think it's should be better if it's FilterForm that add javascript function rather than FilterToolbar. And a other think : I think the function _filter_focus_restore of FilterForm component need to be execute when dom is ready. Best regards -- Olivier Dutrieux Etudes et Projets Informatiques (Tél : 31 62) - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Question about FilterForm and without FilterToolbar
why dont you just roll your own components that do what you want. as you have already observed filterform and *Filter components are made to work together. -igor On Tue, Jun 9, 2009 at 3:39 AM, Dutrieux Olivierolivier.dutri...@pasteur.fr wrote: Hello everybody, I am trying to use the FilterForm with TextFilter ChoiceFilter but without FilterToolbar because I use DataView and FilterToolbar waiting a DataTable. I can't use a DataTable because I am not use a IColumn because my columns are bizarres (see attach). The problem is that : it's not possible to use FilterForm without FilterToolbar because the FilterToolbar add the javascript function on the header to manage the focus cursor on the page and the filterForm add javascript to execute function of FilterToolbar. I think it's should be better if it's FilterForm that add javascript function rather than FilterToolbar. And a other think : I think the function _filter_focus_restore of FilterForm component need to be execute when dom is ready. Best regards -- Olivier Dutrieux Etudes et Projets Informatiques (Tél : 31 62) - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ChoiceFilteredPropertyColumn and FilterToolbar examples
I found what I did wrong. I tried to let the filter-state be a Publisher as well. That should have been a BookListData object. The filterstate object should be the same type of object as the table contains, so you can filter on all variables. I hadn't understood that yet. Thanks for the help anyway! Regards, Linda Jeremy Thomerson wrote: Shouldn't the line below have name rather than publisher? I haven't used this filtered thing in a while, but from your error, that's what it sounds like the problem is. You're passing it a Publisher, and it's saying that it doesn't have a publisher field on it - because you told it to use the publisher field. -- Jeremy Thomerson http://www.wickettraining.com On Fri, May 1, 2009 at 2:31 AM, Linda van der Pal lvd...@heritageagenturen.nl wrote: columns[3] = new ChoiceFilteredPropertyColumn(new ModelString(Publisher), name, publisher, createPublisherModel()); - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.325 / Virus Database: 270.12.16/2094 - Release Date: 05/03/09 16:51:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ChoiceFilteredPropertyColumn and FilterToolbar examples
Could anybody tell me what I'm doing wrong? My code compiles just fine, but I get a runtime exception saying that the Publisher class doesn't have a publisher attribute. (Which is correct, it has a name and an id attribute.) What should I change to make it get name from Publisher instead? (Or get publisher from BookListData?) Here's the HTML: html xmlns:wicket wicket:panel form wicket:id=filterform table wicket:id=datatable /table /form /wicket:panel /html And here's the Java code: BookListProvider booklistProvider = new BookListProvider(); AjaxFallbackDefaultDataTable? table = new AjaxFallbackDefaultDataTable(datatable, createColumns(), booklistProvider, 10); FilterForm form = new FilterForm(filterform, booklistProvider); table.addBottomToolbar(new FilterToolbar(table, form, booklistProvider)); add(form); form.add(table); private IColumn?[] createColumns() { IColumn?[] columns = new IColumn[6]; columns[0] = new PropertyColumnString(new ModelString(ISBN), isbn, isbn); columns[1] = new PropertyColumnString(new ModelString(Title), title, title); columns[2] = new PropertyColumnArrayListAuthor(new ModelString(Author), authors); columns[3] = new ChoiceFilteredPropertyColumn(new ModelString(Publisher), name, publisher, createPublisherModel()); columns[4] = new PropertyColumnSubgenre(new ModelString(Subgenre), subgenre, subgenre); columns[5] = new PropertyColumnLanguage(new ModelString(Language), language, language); return columns; } private IModelListPublisher createPublisherModel() { IModelListPublisher publisherModel = new LoadableDetachableModelListPublisher() { private static final long serialVersionUID = 1L; @Override protected ListPublisher load() { ListPublisher publishers = null; DataRetriever dataRetriever = null; try { dataRetriever = new DataRetriever(); publishers = dataRetriever.fetchPublishers(); } catch (Exception e) { error(abbreviated error handling); } return publishers; } }; return publisherModel; } public class BookListProvider extends SortableDataProviderBookListData implements IFilterStateLocator { private final transient ListBookListData list; private Publisher publisherFilter = new Publisher(); ... } Linda van der Pal wrote: Are there any good examples out there that show how to use ChoiceFilteredPropertyColumn and FilterToolbar? I've already looked at wicket-phonebook, ut for some reason the FilterToolbar they use doesn't require the FilterForm as an argument, whereas that is required. They probably use an older version of Wicket, as I'm using 1.4-rc2. Regards, Linda - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ChoiceFilteredPropertyColumn and FilterToolbar examples
Hmm, maybe I can phrase that question simpler. If I have a table that shows BookListItems, which have a Publisher as one of their attributes and I want to be able to filter on the publisher, what should be passed on to the ChoiceFilteredPropertyColumn as the fourth parameter? (IModelList? extends Y filterChoices) Regards, Linda Linda van der Pal wrote: Could anybody tell me what I'm doing wrong? My code compiles just fine, but I get a runtime exception saying that the Publisher class doesn't have a publisher attribute. (Which is correct, it has a name and an id attribute.) What should I change to make it get name from Publisher instead? (Or get publisher from BookListData?) Here's the HTML: html xmlns:wicket wicket:panel form wicket:id=filterform table wicket:id=datatable /table /form /wicket:panel /html And here's the Java code: BookListProvider booklistProvider = new BookListProvider(); AjaxFallbackDefaultDataTable? table = new AjaxFallbackDefaultDataTable(datatable, createColumns(), booklistProvider, 10); FilterForm form = new FilterForm(filterform, booklistProvider); table.addBottomToolbar(new FilterToolbar(table, form, booklistProvider)); add(form); form.add(table); private IColumn?[] createColumns() { IColumn?[] columns = new IColumn[6]; columns[0] = new PropertyColumnString(new ModelString(ISBN), isbn, isbn); columns[1] = new PropertyColumnString(new ModelString(Title), title, title); columns[2] = new PropertyColumnArrayListAuthor(new ModelString(Author), authors); columns[3] = new ChoiceFilteredPropertyColumn(new ModelString(Publisher), name, publisher, createPublisherModel()); columns[4] = new PropertyColumnSubgenre(new ModelString(Subgenre), subgenre, subgenre); columns[5] = new PropertyColumnLanguage(new ModelString(Language), language, language); return columns; } private IModelListPublisher createPublisherModel() { IModelListPublisher publisherModel = new LoadableDetachableModelListPublisher() { private static final long serialVersionUID = 1L; @Override protected ListPublisher load() { ListPublisher publishers = null; DataRetriever dataRetriever = null; try { dataRetriever = new DataRetriever(); publishers = dataRetriever.fetchPublishers(); } catch (Exception e) { error(abbreviated error handling); } return publishers; } }; return publisherModel; } public class BookListProvider extends SortableDataProviderBookListData implements IFilterStateLocator { private final transient ListBookListData list; private Publisher publisherFilter = new Publisher(); ... } Linda van der Pal wrote: Are there any good examples out there that show how to use ChoiceFilteredPropertyColumn and FilterToolbar? I've already looked at wicket-phonebook, ut for some reason the FilterToolbar they use doesn't require the FilterForm as an argument, whereas that is required. They probably use an older version of Wicket, as I'm using 1.4-rc2. Regards, Linda - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ChoiceFilteredPropertyColumn and FilterToolbar examples
Shouldn't the line below have name rather than publisher? I haven't used this filtered thing in a while, but from your error, that's what it sounds like the problem is. You're passing it a Publisher, and it's saying that it doesn't have a publisher field on it - because you told it to use the publisher field. -- Jeremy Thomerson http://www.wickettraining.com On Fri, May 1, 2009 at 2:31 AM, Linda van der Pal lvd...@heritageagenturen.nl wrote: columns[3] = new ChoiceFilteredPropertyColumn(new ModelString(Publisher), name, publisher, createPublisherModel()); - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
ChoiceFilteredPropertyColumn and FilterToolbar examples
Are there any good examples out there that show how to use ChoiceFilteredPropertyColumn and FilterToolbar? I've already looked at wicket-phonebook, ut for some reason the FilterToolbar they use doesn't require the FilterForm as an argument, whereas that is required. They probably use an older version of Wicket, as I'm using 1.4-rc2. Regards, Linda - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket-phonebook problem with cleaning fields in FilterToolbar
Can you show what did you change in your code that it start to work? Best regards Łukasz Lipkaa 2008/8/21 Kai Mutz [EMAIL PROTECTED] Clear button of FilterForm is set as defaultFormProcessing false by default. Change it to true. See http://www.nabble.com/Problems-with-clearing-of-filter-form-td16098239.html# a16129385http://www.nabble.com/Problems-with-clearing-of-filter-form-td16098239.html#a16129385 Lukasz Lipka mailto:[EMAIL PROTECTED] wrote: Hi, I looked into wicket-phonebook application and base on this I want to create very simple application to only display some data from database, with possibility of filtering of information. Almost every thing work perfect:) but one element is not working is clean button. I thought that GoAndClearFilter will automatically clean the fields in table.addTopToolbar(new FilterToolbar(table, form, dataProvider)); Now I try to find what is going on after clicking on clean in may case it's work exactly like go. I hope that somebody give me some advice how to make cleaning of filtering fileds. First I was using wicket 1.3.3 now I switch to 1.4-SNAPSHOT, but id didn't change anything. I would be thankful for any help. My code bellow: public class TabIndeksSortablePanel extends Panel { public TabIndeksSortablePanel(String id) { super(id); init(); } private void init() { final IndeksDataProvider dataProvider = new IndeksDataProvider(); IColumn[] columns = createColumns(); final DefaultDataTable table = new DefaultDataTable(datatable, Arrays.asList(columns), dataProvider, 10); // create the form used to contain all filter components final FilterForm form = new FilterForm(filter-form, dataProvider) { private static final long serialVersionUID = 1L; @Override protected void onSubmit() { table.setCurrentPage(0); } }; table.addTopToolbar(new FilterToolbar(table, form, dataProvider)); form.add(table); add(form); } private IColumn[] createColumns(){ IColumn[] columns = new IColumn[10]; columns[0] = createColumn(symbol, symbol, symbol); columns[1] = createColumn(nazwa1, nazwa1, nazwa1); columns[2] = new ChoiceFilteredPropertyColumn(new ResourceModel(jm), jm, jm, new LoadableDetachableModel() { @Override protected Object load() { ListString list = getIndeksDao().findJM(); list.add(0,); return list; } }); columns[3] = createColumn(cena_zbyt, cena_zbyt, cena_zbyt); columns[4] = createColumn(symb_wo, symb_wo, symb_wo); columns[5] = createColumn(proc_vat, proc_vat, proc_vat); columns[6] = createColumn(kat_vat, kat_vat, kat_vat); columns[7] = createColumn(mar_zbyt, mar_zbyt, mar_zbyt); columns[8] = createColumn(data_wpr, data_wpr, data_wpr); columns[9] = createActionsColumn(); return columns; } private TextFilteredPropertyColumn createColumn(String key, String sortProperty, String propertyExpression) { return new TextFilteredPropertyColumn(new ResourceModel(key), sortProperty, propertyExpression); } /** * Create a composite column extending FilteredAbstractColumn. This column * adds a UserActionsPanel as its cell contents. It also provides the * go-and-clear filter control panel. */ private FilteredAbstractColumn createActionsColumn() { // getString(actions) return new FilteredAbstractColumn(new Model(actions)) { // return the go-and-clear filter for the filter toolbar public Component getFilter(String componentId, FilterForm form) { // FIXME zmienic Model na ResourceModel return new GoAndClearFilter(componentId, form, new ResourceModel(filter), new ResourceModel(clear)); } // add the UserActionsPanel to the cell item public void populateItem(Item cellItem, String componentId, IModel model) { cellItem.add(new UserActionsPanel(componentId, model
RE: Wicket-phonebook problem with cleaning fields in FilterToolbar
Lukasz Lipka mailto:[EMAIL PROTECTED] wrote: Can you show what did you change in your code that it start to work? Just clear.setDefaultFormProcessing(true); But this seems to be fixed in newer versions. So I have no clue what's the problem. Sorry, Kai - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Wicket-phonebook problem with cleaning fields in FilterToolbar
Hi, I looked into wicket-phonebook application and base on this I want to create very simple application to only display some data from database, with possibility of filtering of information. Almost every thing work perfect:) but one element is not working is clean button. I thought that GoAndClearFilter will automatically clean the fields in table.addTopToolbar(new FilterToolbar(table, form, dataProvider)); Now I try to find what is going on after clicking on clean in may case it's work exactly like go. I hope that somebody give me some advice how to make cleaning of filtering fileds. First I was using wicket 1.3.3 now I switch to 1.4-SNAPSHOT, but id didn't change anything. I would be thankful for any help. My code bellow: public class TabIndeksSortablePanel extends Panel { public TabIndeksSortablePanel(String id) { super(id); init(); } private void init() { final IndeksDataProvider dataProvider = new IndeksDataProvider(); IColumn[] columns = createColumns(); final DefaultDataTable table = new DefaultDataTable(datatable, Arrays.asList(columns), dataProvider, 10); // create the form used to contain all filter components final FilterForm form = new FilterForm(filter-form, dataProvider) { private static final long serialVersionUID = 1L; @Override protected void onSubmit() { table.setCurrentPage(0); } }; table.addTopToolbar(new FilterToolbar(table, form, dataProvider)); form.add(table); add(form); } private IColumn[] createColumns(){ IColumn[] columns = new IColumn[10]; columns[0] = createColumn(symbol, symbol, symbol); columns[1] = createColumn(nazwa1, nazwa1, nazwa1); columns[2] = new ChoiceFilteredPropertyColumn(new ResourceModel(jm), jm, jm, new LoadableDetachableModel() { @Override protected Object load() { ListString list = getIndeksDao().findJM(); list.add(0,); return list; } }); columns[3] = createColumn(cena_zbyt, cena_zbyt, cena_zbyt); columns[4] = createColumn(symb_wo, symb_wo, symb_wo); columns[5] = createColumn(proc_vat, proc_vat, proc_vat); columns[6] = createColumn(kat_vat, kat_vat, kat_vat); columns[7] = createColumn(mar_zbyt, mar_zbyt, mar_zbyt); columns[8] = createColumn(data_wpr, data_wpr, data_wpr); columns[9] = createActionsColumn(); return columns; } private TextFilteredPropertyColumn createColumn(String key, String sortProperty, String propertyExpression) { return new TextFilteredPropertyColumn(new ResourceModel(key), sortProperty, propertyExpression); } /** * Create a composite column extending FilteredAbstractColumn. This column * adds a UserActionsPanel as its cell contents. It also provides the * go-and-clear filter control panel. */ private FilteredAbstractColumn createActionsColumn() { // getString(actions) return new FilteredAbstractColumn(new Model(actions)) { // return the go-and-clear filter for the filter toolbar public Component getFilter(String componentId, FilterForm form) { // FIXME zmienic Model na ResourceModel return new GoAndClearFilter(componentId, form, new ResourceModel(filter), new ResourceModel(clear)); } // add the UserActionsPanel to the cell item public void populateItem(Item cellItem, String componentId, IModel model) { cellItem.add(new UserActionsPanel(componentId, model)); } }; } /** * Provides a composite User Actions panel for the Actions column. * * @author igor */ private static class UserActionsPanel extends Panel { public UserActionsPanel(String id, IModel indeksModel) { super(id); } } /** * */ private static final long serialVersionUID = 1L
Re: Wicket-phonebook problem with cleaning fields in FilterToolbar
hi, thanks for answer , but I looked into 1.4Snaphot wicket source code and it's look correct, but it doesn't work in my case. Did you change something more ? public GoAndClearFilter(String id, FilterForm form, IModelString goModel, IModelString clearModel) { super(id, goModel); originalState = Objects.cloneModel(form.getDefaultModelObject()); clear = new Button(clear, clearModel) { private static final long serialVersionUID = 1L; @Override public void onSubmit() { onClearSubmit(this); } }; clear.setDefaultFormProcessing(true); add(clear); } Best regards Łukasz Lipka 2008/8/21 Kai Mutz [EMAIL PROTECTED] Clear button of FilterForm is set as defaultFormProcessing false by default. Change it to true. See http://www.nabble.com/Problems-with-clearing-of-filter-form-td16098239.html# a16129385http://www.nabble.com/Problems-with-clearing-of-filter-form-td16098239.html#a16129385 Lukasz Lipka mailto:[EMAIL PROTECTED] wrote: Hi, I looked into wicket-phonebook application and base on this I want to create very simple application to only display some data from database, with possibility of filtering of information. Almost every thing work perfect:) but one element is not working is clean button. I thought that GoAndClearFilter will automatically clean the fields in table.addTopToolbar(new FilterToolbar(table, form, dataProvider)); Now I try to find what is going on after clicking on clean in may case it's work exactly like go. I hope that somebody give me some advice how to make cleaning of filtering fileds. First I was using wicket 1.3.3 now I switch to 1.4-SNAPSHOT, but id didn't change anything. I would be thankful for any help. My code bellow: public class TabIndeksSortablePanel extends Panel { public TabIndeksSortablePanel(String id) { super(id); init(); } private void init() { final IndeksDataProvider dataProvider = new IndeksDataProvider(); IColumn[] columns = createColumns(); final DefaultDataTable table = new DefaultDataTable(datatable, Arrays.asList(columns), dataProvider, 10); // create the form used to contain all filter components final FilterForm form = new FilterForm(filter-form, dataProvider) { private static final long serialVersionUID = 1L; @Override protected void onSubmit() { table.setCurrentPage(0); } }; table.addTopToolbar(new FilterToolbar(table, form, dataProvider)); form.add(table); add(form); } private IColumn[] createColumns(){ IColumn[] columns = new IColumn[10]; columns[0] = createColumn(symbol, symbol, symbol); columns[1] = createColumn(nazwa1, nazwa1, nazwa1); columns[2] = new ChoiceFilteredPropertyColumn(new ResourceModel(jm), jm, jm, new LoadableDetachableModel() { @Override protected Object load() { ListString list = getIndeksDao().findJM(); list.add(0,); return list; } }); columns[3] = createColumn(cena_zbyt, cena_zbyt, cena_zbyt); columns[4] = createColumn(symb_wo, symb_wo, symb_wo); columns[5] = createColumn(proc_vat, proc_vat, proc_vat); columns[6] = createColumn(kat_vat, kat_vat, kat_vat); columns[7] = createColumn(mar_zbyt, mar_zbyt, mar_zbyt); columns[8] = createColumn(data_wpr, data_wpr, data_wpr); columns[9] = createActionsColumn(); return columns; } private TextFilteredPropertyColumn createColumn(String key, String sortProperty, String propertyExpression) { return new TextFilteredPropertyColumn(new ResourceModel(key), sortProperty, propertyExpression); } /** * Create a composite column extending FilteredAbstractColumn. This column * adds a UserActionsPanel as its cell contents. It also provides the * go-and-clear filter control panel. */ private FilteredAbstractColumn createActionsColumn() { // getString(actions) return new FilteredAbstractColumn(new Model(actions)) { // return the go-and-clear filter for the filter toolbar public Component getFilter
Re: FilterToolbar API Changes
I have following related problem with wicket-phonebook and FilterToolbar API Change: When I hit back button and then try to sort using column names in the Actions header of the table, I receive: WicketMessage: Error attaching this container for rendering: [MarkupContainer [Component id = users, page = com.revedex.shop.web.page.ListContactsPage, path = 20:filter-form:users.DefaultDataTable, isVisible = true, isVersioned = true]] Root cause: java.lang.NullPointerException at org.apache.wicket.markup.repeater.data.DataViewBase$ModelIterator.hasNext(DataViewBase.java:121) at org.apache.wicket.markup.repeater.AbstractPageableView$CappedIteratorAdapter.hasNext(AbstractPageableView.java:371) at org.apache.wicket.markup.repeater.DefaultItemReuseStrategy$1.hasNext(DefaultItemReuseStrategy.java:65) etc... How to fix this and still have 'back-button' supported? I have not observed the problem in 1.2.6. Many thanks, Pavol UPBrandon wrote: That worked perfectly. Thanks for the point in the right direction. For anyone looking for information on a similar problem, a change in Wicket-Extensions 1.3 beta 4 requires users to pass a FilterForm to a FilterToolbar when it is constructed. If your table already uses components like a CheckGroup, your DataTable should already be wrapped in a Form of some sort. Simply changing that Form to a FilterForm will allow you to use that form for both a CheckGroup and the FilterToolbar. But be aware that you will now have to manually add a focus-tracker and focus-restore component to your markup. The corresponding objects are added on the Java side by the FilterToolbar. An example, can be found at https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicket-phonebook/src/java/wicket/contrib/phonebook/web/page/ListContactsPage.html Martijn Dashorst wrote: Check it out from subversion, then you are sure you have the latest (though it may still be a bit out of date). https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicket-phonebook/ Martijn On 10/23/07, UPBrandon [EMAIL PROTECTED] wrote: Do you have an address for that? I downloaded what I thought was the latest version from http://wicketstuff.org/confluence/display/STUFFWIKI/wicket-phonebook yesterday but it appears to be using an older version of Wicket-Extensions. The page I was focusing on, ListContactsPage, uses the older (now missing) constructor that takes a DataTable and SortableDataProvider as parameters. Is a newer version available somewhere else online? -Brandon igor.vaynberg wrote: see wicket-phonebook in wicket-stuff -igor On 10/23/07, UPBrandon [EMAIL PROTECTED] wrote: Could somebody please explain the Wicket-Extensions 1.3 beta 4 API changes for the FilterToolbar? I have looked everywhere for information and a working example but can't seem to find any. I found a mailing list conversation about the reasoning for the change but nothing that helps me get things up and running again. From what I gather, instead of the FilterToolbar creating a form, the user needs to wrap their DataTable in a form (a FilterForm actually) and pass that form into the FilterToolbar when it's constructed. The table I am working on displays records from a database and allows users to select rows to perform an action on. Because of that, my DataTable is wrapped in a CheckGroup, which is wrapped in a form. Since there was already a Form around the table, I tried switching it to a FilterForm and passing it into the FilterToolbar but I get an exception saying that the focus-tracker component was added in code but not the markup. Should I be able to use that form for both the check group and the filter toolbar or do I need to add another form somehow? Any help would be appreciated. -Brandon -- View this message in context: http://www.nabble.com/FilterToolbar-API-Changes-tf4678799.html#a13368543 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/FilterToolbar-API-Changes-tf4678799.html#a13370982 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.0-beta4 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta4
Re: FilterToolbar API Changes
I was trying to modify underlying data provider, which caused the error. Apologies for mail deluge. Pavol I have following related problem with wicket-phonebook and FilterToolbar API Change: When I hit back button and then try to sort using column names in the Actions header of the table, I receive: WicketMessage: Error attaching this container for rendering: [MarkupContainer [Component id = users, page = com.revedex.shop.web.page.ListContactsPage, path = 20:filter-form:users.DefaultDataTable, isVisible = true, isVersioned = true]] Root cause: java.lang.NullPointerException at org.apache.wicket.markup.repeater.data.DataViewBase$ModelIterator.hasNext(DataViewBase.java:121) at org.apache.wicket.markup.repeater.AbstractPageableView$CappedIteratorAdapter.hasNext(AbstractPageableView.java:371) at org.apache.wicket.marku -- View this message in context: http://www.nabble.com/FilterToolbar-API-Changes-tf4678799.html#a13812196 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
FilterToolbar API Changes
Could somebody please explain the Wicket-Extensions 1.3 beta 4 API changes for the FilterToolbar? I have looked everywhere for information and a working example but can't seem to find any. I found a mailing list conversation about the reasoning for the change but nothing that helps me get things up and running again. From what I gather, instead of the FilterToolbar creating a form, the user needs to wrap their DataTable in a form (a FilterForm actually) and pass that form into the FilterToolbar when it's constructed. The table I am working on displays records from a database and allows users to select rows to perform an action on. Because of that, my DataTable is wrapped in a CheckGroup, which is wrapped in a form. Since there was already a Form around the table, I tried switching it to a FilterForm and passing it into the FilterToolbar but I get an exception saying that the focus-tracker component was added in code but not the markup. Should I be able to use that form for both the check group and the filter toolbar or do I need to add another form somehow? Any help would be appreciated. -Brandon -- View this message in context: http://www.nabble.com/FilterToolbar-API-Changes-tf4678799.html#a13368543 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: FilterToolbar API Changes
see wicket-phonebook in wicket-stuff -igor On 10/23/07, UPBrandon [EMAIL PROTECTED] wrote: Could somebody please explain the Wicket-Extensions 1.3 beta 4 API changes for the FilterToolbar? I have looked everywhere for information and a working example but can't seem to find any. I found a mailing list conversation about the reasoning for the change but nothing that helps me get things up and running again. From what I gather, instead of the FilterToolbar creating a form, the user needs to wrap their DataTable in a form (a FilterForm actually) and pass that form into the FilterToolbar when it's constructed. The table I am working on displays records from a database and allows users to select rows to perform an action on. Because of that, my DataTable is wrapped in a CheckGroup, which is wrapped in a form. Since there was already a Form around the table, I tried switching it to a FilterForm and passing it into the FilterToolbar but I get an exception saying that the focus-tracker component was added in code but not the markup. Should I be able to use that form for both the check group and the filter toolbar or do I need to add another form somehow? Any help would be appreciated. -Brandon -- View this message in context: http://www.nabble.com/FilterToolbar-API-Changes-tf4678799.html#a13368543 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: FilterToolbar API Changes
Do you have an address for that? I downloaded what I thought was the latest version from http://wicketstuff.org/confluence/display/STUFFWIKI/wicket-phonebook yesterday but it appears to be using an older version of Wicket-Extensions. The page I was focusing on, ListContactsPage, uses the older (now missing) constructor that takes a DataTable and SortableDataProvider as parameters. Is a newer version available somewhere else online? -Brandon igor.vaynberg wrote: see wicket-phonebook in wicket-stuff -igor On 10/23/07, UPBrandon [EMAIL PROTECTED] wrote: Could somebody please explain the Wicket-Extensions 1.3 beta 4 API changes for the FilterToolbar? I have looked everywhere for information and a working example but can't seem to find any. I found a mailing list conversation about the reasoning for the change but nothing that helps me get things up and running again. From what I gather, instead of the FilterToolbar creating a form, the user needs to wrap their DataTable in a form (a FilterForm actually) and pass that form into the FilterToolbar when it's constructed. The table I am working on displays records from a database and allows users to select rows to perform an action on. Because of that, my DataTable is wrapped in a CheckGroup, which is wrapped in a form. Since there was already a Form around the table, I tried switching it to a FilterForm and passing it into the FilterToolbar but I get an exception saying that the focus-tracker component was added in code but not the markup. Should I be able to use that form for both the check group and the filter toolbar or do I need to add another form somehow? Any help would be appreciated. -Brandon -- View this message in context: http://www.nabble.com/FilterToolbar-API-Changes-tf4678799.html#a13368543 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/FilterToolbar-API-Changes-tf4678799.html#a13370982 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: FilterToolbar API Changes
Check it out from subversion, then you are sure you have the latest (though it may still be a bit out of date). https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicket-phonebook/ Martijn On 10/23/07, UPBrandon [EMAIL PROTECTED] wrote: Do you have an address for that? I downloaded what I thought was the latest version from http://wicketstuff.org/confluence/display/STUFFWIKI/wicket-phonebook yesterday but it appears to be using an older version of Wicket-Extensions. The page I was focusing on, ListContactsPage, uses the older (now missing) constructor that takes a DataTable and SortableDataProvider as parameters. Is a newer version available somewhere else online? -Brandon igor.vaynberg wrote: see wicket-phonebook in wicket-stuff -igor On 10/23/07, UPBrandon [EMAIL PROTECTED] wrote: Could somebody please explain the Wicket-Extensions 1.3 beta 4 API changes for the FilterToolbar? I have looked everywhere for information and a working example but can't seem to find any. I found a mailing list conversation about the reasoning for the change but nothing that helps me get things up and running again. From what I gather, instead of the FilterToolbar creating a form, the user needs to wrap their DataTable in a form (a FilterForm actually) and pass that form into the FilterToolbar when it's constructed. The table I am working on displays records from a database and allows users to select rows to perform an action on. Because of that, my DataTable is wrapped in a CheckGroup, which is wrapped in a form. Since there was already a Form around the table, I tried switching it to a FilterForm and passing it into the FilterToolbar but I get an exception saying that the focus-tracker component was added in code but not the markup. Should I be able to use that form for both the check group and the filter toolbar or do I need to add another form somehow? Any help would be appreciated. -Brandon -- View this message in context: http://www.nabble.com/FilterToolbar-API-Changes-tf4678799.html#a13368543 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/FilterToolbar-API-Changes-tf4678799.html#a13370982 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.0-beta4 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta4/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: FilterToolbar API Changes
That worked perfectly. Thanks for the point in the right direction. For anyone looking for information on a similar problem, a change in Wicket-Extensions 1.3 beta 4 requires users to pass a FilterForm to a FilterToolbar when it is constructed. If your table already uses components like a CheckGroup, your DataTable should already be wrapped in a Form of some sort. Simply changing that Form to a FilterForm will allow you to use that form for both a CheckGroup and the FilterToolbar. But be aware that you will now have to manually add a focus-tracker and focus-restore component to your markup. The corresponding objects are added on the Java side by the FilterToolbar. An example, can be found at https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicket-phonebook/src/java/wicket/contrib/phonebook/web/page/ListContactsPage.html Martijn Dashorst wrote: Check it out from subversion, then you are sure you have the latest (though it may still be a bit out of date). https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicket-phonebook/ Martijn On 10/23/07, UPBrandon [EMAIL PROTECTED] wrote: Do you have an address for that? I downloaded what I thought was the latest version from http://wicketstuff.org/confluence/display/STUFFWIKI/wicket-phonebook yesterday but it appears to be using an older version of Wicket-Extensions. The page I was focusing on, ListContactsPage, uses the older (now missing) constructor that takes a DataTable and SortableDataProvider as parameters. Is a newer version available somewhere else online? -Brandon igor.vaynberg wrote: see wicket-phonebook in wicket-stuff -igor On 10/23/07, UPBrandon [EMAIL PROTECTED] wrote: Could somebody please explain the Wicket-Extensions 1.3 beta 4 API changes for the FilterToolbar? I have looked everywhere for information and a working example but can't seem to find any. I found a mailing list conversation about the reasoning for the change but nothing that helps me get things up and running again. From what I gather, instead of the FilterToolbar creating a form, the user needs to wrap their DataTable in a form (a FilterForm actually) and pass that form into the FilterToolbar when it's constructed. The table I am working on displays records from a database and allows users to select rows to perform an action on. Because of that, my DataTable is wrapped in a CheckGroup, which is wrapped in a form. Since there was already a Form around the table, I tried switching it to a FilterForm and passing it into the FilterToolbar but I get an exception saying that the focus-tracker component was added in code but not the markup. Should I be able to use that form for both the check group and the filter toolbar or do I need to add another form somehow? Any help would be appreciated. -Brandon -- View this message in context: http://www.nabble.com/FilterToolbar-API-Changes-tf4678799.html#a13368543 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/FilterToolbar-API-Changes-tf4678799.html#a13370982 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.0-beta4 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta4/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/FilterToolbar-API-Changes-tf4678799.html#a13372438 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Example FilterToolbar?
Hi, is there an example on how to use FilterToolbar/FilterForm with a DataTable? I always get missing markup-id's exceptions and am a bit lost... Thanks! Best regards, --- Jan. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Example FilterToolbar?
see wicket-phonebook in wicketstuff -igor On 10/14/07, Jan Kriesten [EMAIL PROTECTED] wrote: Hi, is there an example on how to use FilterToolbar/FilterForm with a DataTable? I always get missing markup-id's exceptions and am a bit lost... Thanks! Best regards, --- Jan. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DataTable FilterToolbar Shifted After AJAX Call
That's a problem of DataTable producing invalid markup, that the browser is not able to replaced by ajax call (but it is able to process it on regular request). I'm afraid there is no solution currently for your problem. Please add a JIRA entry, possibly with a quickstart to reproduce the problem. -Matej On 10/10/07, UPBrandon [EMAIL PROTECTED] wrote: I am working on a project that has a DataTable with a filter that uses AJAX to update an object on the backend and refresh the table, among other things. Everything is working well so far except the columns in the filter toolbar row are shifted one column to the right after the AJAX refresh. Using Firebug to inspect the toolbar row after the update, I see that everything is shifted one to the right because Wicket is inserting a div in the tr before the td's. So instead of tr td.../td td.../td /tr I have tr div/div td.../td td.../td /tr The contents of the div are: div id=filter-form18 wicket:id=filter-forminput type=hidden value= wicket:id=focus-tracker name=checkGroup:equipmentDataTable:topToolbars:2:toolbar:filter-form:focus-tracker id=queueDetailsPanel:checkForm:checkGroup:equipmentDataTable:topToolbars:2:toolbar:filter-form:focus-tracker//div If it makes any difference, when I do the update, I am not updating the DataTable directly - I am updating a higher level Panel that contains the DataTable. Has anyone else had any similar problems? -Brandon -- View this message in context: http://www.nabble.com/DataTable-FilterToolbar-Shifted-After-AJAX-Call-tf4601906.html#a13139327 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DataTable FilterToolbar Shifted After AJAX Call
Oh, well that's good to hear. My team and I are using the last major release, beta 3. I will see if a more recent build fixes the problem and add a Jira ticket if it doesn't. Are nightly stable builds available anywhere? -Brandon Evan Chooly wrote: What version of wicket are you using? I saw this with beta3 but later snapshots fixed it for me. So if you're not on a recent snapshot, you might consider trying that and seeing if that helps. On 10/10/07, UPBrandon [EMAIL PROTECTED] wrote: I am working on a project that has a DataTable with a filter that uses AJAX to update an object on the backend and refresh the table, among other things. Everything is working well so far except the columns in the filter toolbar row are shifted one column to the right after the AJAX refresh. Using Firebug to inspect the toolbar row after the update, I see that everything is shifted one to the right because Wicket is inserting a div in the tr before the td's. So instead of tr td.../td td.../td /tr I have tr div/div td.../td td.../td /tr The contents of the div are: div id=filter-form18 wicket:id=filter-forminput type=hidden value= wicket:id=focus-tracker name=checkGroup:equipmentDataTable:topToolbars:2:toolbar:filter-form:focus-tracker id=queueDetailsPanel:checkForm:checkGroup:equipmentDataTable:topToolbars:2:toolbar:filter-form:focus-tracker//div If it makes any difference, when I do the update, I am not updating the DataTable directly - I am updating a higher level Panel that contains the DataTable. Has anyone else had any similar problems? -Brandon -- View this message in context: http://www.nabble.com/DataTable-FilterToolbar-Shifted-After-AJAX-Call-tf4601906.html#a13139327 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/DataTable-FilterToolbar-Shifted-After-AJAX-Call-tf4601906.html#a13160984 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DataTable FilterToolbar Shifted After AJAX Call
I am working on a project that has a DataTable with a filter that uses AJAX to update an object on the backend and refresh the table, among other things. Everything is working well so far except the columns in the filter toolbar row are shifted one column to the right after the AJAX refresh. Using Firebug to inspect the toolbar row after the update, I see that everything is shifted one to the right because Wicket is inserting a div in the tr before the td's. So instead of tr td.../td td.../td /tr I have tr div/div td.../td td.../td /tr The contents of the div are: div id=filter-form18 wicket:id=filter-forminput type=hidden value= wicket:id=focus-tracker name=checkGroup:equipmentDataTable:topToolbars:2:toolbar:filter-form:focus-tracker id=queueDetailsPanel:checkForm:checkGroup:equipmentDataTable:topToolbars:2:toolbar:filter-form:focus-tracker//div If it makes any difference, when I do the update, I am not updating the DataTable directly - I am updating a higher level Panel that contains the DataTable. Has anyone else had any similar problems? -Brandon -- View this message in context: http://www.nabble.com/DataTable-FilterToolbar-Shifted-After-AJAX-Call-tf4601906.html#a13139327 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
FilterToolbar
Apparently the API between beta3 and the latest SNAPSHOT changed for FilterToolbar and now it needs a FilterForm. I can't find any examples (not even unit tests) that show how I should build my page/table with this new API. Does anyone have an example working with the latest code? Thanks.
Re: FilterToolbar
Evan, See wicket-phonebook in wicket-stuff. Tauren On 9/20/07, Evan Chooly [EMAIL PROTECTED] wrote: Apparently the API between beta3 and the latest SNAPSHOT changed for FilterToolbar and now it needs a FilterForm. I can't find any examples (not even unit tests) that show how I should build my page/table with this new API. Does anyone have an example working with the latest code? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]