First, I'm new to Wicket.
I think however I'm either doing something fundamentally wrong or I may
have discovered a problem with how ContainerFeedbackMessageFilter checks
which Feedbacks to "accept".
Short version:
Using the debugger I found that the DateTextField being passed to the
accept function has the id of the just submitted page, which it then is
trying to match to the new component hierarchy (which has completely
different id's). Of course, it will never find this "stale id" and thus
the feedback message is not added to the proper panel (the panel without
filter works fine, as soon as I filter it, it stops working).
The long version:
I've got a page that displays several lists of dates + some other data.
Like so:
Title of List 1
12-01-2008 <other data>
13-01-2008 <other data>
14-01-2008 <other data>
(hidden feedback panel)
Title of List 2
12-01-2008 <other data>
13-01-2008 <other data>
14-01-2008 <other data>
(hidden feedback panel)
So it's basically 2 ListView's nested inside each other. Every row of
data has an edit button, which changes the row into editable form. Only
one row is editable at a time, so there's only one DateTextField
component (the rest are just labels). I added the FeedbackPanel to a
form object which surrounds each List (so the page has 2 forms), and
filter it by using the reference to the form using a
ContainerFeedbackMessageFilter.
With the debugger I can clearly see that a DateTextField message is
being passed to this filter, but is has the wrong id (id is 106 for
example). In the hierarchy of components, I could only find a
DateTextField with id = 203, and so there is no match to be found.
Ignoring the problem and submitting the form again, results in the
filter being passed a DateTextField with id = 203 which existed in the
previous tree of components, but not anymore in the new one... and so on...
Now, every time the page reloads, Wicket recreates the Form class that I
use for these components (it contains all the ListViews). I assume that
is normal behaviour, but perhaps it isn't and that's what is causing my
problems.
Any help would be appreciated :)
--John
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org