You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by UPBrandon <bc...@up.com> on 2007/10/23 18:50:34 UTC

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: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: FilterToolbar API Changes

Posted by Pavol Rovensky <ko...@yahoo.com>.
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: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: FilterToolbar API Changes

Posted by Pavol Rovensky <ko...@yahoo.com>.
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 <bc...@up.com> 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 <bc...@up.com> 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: users-unsubscribe@wicket.apache.org
>>> >> For additional commands, e-mail: users-help@wicket.apache.org
>>> >>
>>> >>
>>> >
>>> > ---------------------------------------------------------------------
>>> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> > For additional commands, e-mail: users-help@wicket.apache.org
>>> >
>>> >
>>> >
>>>
>>> --
>>> 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: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>> 
>> 
>> -- 
>> 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: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/FilterToolbar-API-Changes-tf4678799.html#a13809097
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: FilterToolbar API Changes

Posted by UPBrandon <bc...@up.com>.
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 <bc...@up.com> 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 <bc...@up.com> 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: users-unsubscribe@wicket.apache.org
>> >> For additional commands, e-mail: users-help@wicket.apache.org
>> >>
>> >>
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> > For additional commands, e-mail: users-help@wicket.apache.org
>> >
>> >
>> >
>>
>> --
>> 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: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
> 
> 
> -- 
> 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: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 
> 
> 

-- 
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: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: FilterToolbar API Changes

Posted by Martijn Dashorst <ma...@gmail.com>.
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 <bc...@up.com> 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 <bc...@up.com> 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: users-unsubscribe@wicket.apache.org
> >> For additional commands, e-mail: users-help@wicket.apache.org
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
> >
>
> --
> 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: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>


-- 
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: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: FilterToolbar API Changes

Posted by UPBrandon <bc...@up.com>.
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 <bc...@up.com> 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: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 
> 
> 

-- 
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: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: FilterToolbar API Changes

Posted by Igor Vaynberg <ig...@gmail.com>.
see wicket-phonebook in wicket-stuff

-igor


On 10/23/07, UPBrandon <bc...@up.com> 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: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org