Hi there,

In the private method Form#isMultiPart the visitor algorithm does not check for components that implement IFormVisitorParticipant.

Here is my use case (I've been debugging quite some time to find the source of recent problems I've encountered):

Within a form I have a nested In-Method PagingNavigator (with a read-only text field) that returns FALSE for IFormVisitorParticipant#processChildren. Also the grid uses some filtering criteria that the user can change (some text fields - also children of the form).

Hierarchy:
------------------------------------------------------------------------------------------
form
 -- filter
   -- criteria-1...x
 -- grid
   -- paging-toolbar
-- paging-navigator [IFormVisitorParticipant -> processChildren() returns false]
         -- text-field
 -- search-button
------------------------------------------------------------------------------------------
When the form is submitted (via SEARCH button) the following happens:

Form#isMultiPart() tries to determine if that text field is visible in the hierarchy; which at some time (through recursion) asks the toolbar. The paging-toolbar contains the following code:

------------------------------------------------------------------------------------------
    @Override
    public boolean isVisible() {
        return getDataGrid().getTotalRowCount() != 0;
    }

------------------------------------------------------------------------------------------
This queries the data provider which at that point can not use the current filtering criteria - because they are not submitted yet. Therefore the results in the grid are wrong. The text field is ignored for validation / updating of the model. That works as expected. In my option the text-field should not be visited at all since its parent (navigator) specifies otherwise.

Note, that prior to wicket 1.4.12 I didn't have this problem (I was using 1.4.10 before where there is no check for visibleInHierarchy in Form#isMultiPart). I've looked at the source code of Form#isMultiPart in 1.4.14 and 1.5.M3 and both seem to be the same.

Should I create a JIRA issue for that (I think it's a bug) or is there an easy workaround that I miss?

Kind regards,
Daniel Soneira

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

Reply via email to