What the example lacks is the Submit button processing for the entire form.
There are probably lots of ways to handle this - ajax and non-ajax.

Once you get the submit button you want to use defined, that is where you
can access all the items in the repeater by visiting the "children" of the
form

I did something like this within the onSubmit of whatever button/link you
choose:

form.visitFormComponents(new FormComponent.AbstractVisitor() {

    @Override
     protected void onFormComponent(FormComponent<?> formComponent) {

           if
(formComponent.getInputName().contains(":orderComponent:orderNo")) {
                if (formComponent.getConvertedInput() != null) {
                        // update stuff
                }
           }

     }
}

the getInputName() allows you to check which component name you are working
with.  All of the components in the same repeater "row" will have the same
number.   Run the example again and do a view page source. You will see what
I mean. simple:41:id, simple:41:firstname, etc.   I have only used this in
one application so far and only needed one input field in the repeater.  I
am sure there may be better ways to get at the entire row, then process each
component in that row.  Perhaps each row could be a markup container then
process the children of that container?

This is just one way. I am sure those with more experience will show other
ways.


On Fri, Sep 18, 2009 at 10:06 AM, Randy <[email protected]> wrote:

>
> In the Wicket Examples, there is a data view with editable values
> (org.apache.wicket.examples.repeater.FormPage).  It is not clear to me how
> to access the updated text field(s) so that changes can be recorded in the
> actual data item instance for the row.  I see how to reference the data
> item
> instance, but am not sure how to access the text fields.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to