Try adding a WindowClosedCallback to your modal window to repaint the
ListMultipleChoice.
something like
setWindowClosedCallback(new WindowClosedCallback()
{
private static final long serialVersionUID = 1L;
@Override
public void onClose(AjaxRequestTarget target)
{
target.addComponent(myMultipleChoice);
}
});
Maurice
On Tue, Mar 4, 2008 at 10:30 AM, Gabor Szokoli <[EMAIL PROTECTED]> wrote:
> On 3/3/08, Maurice Marrink <[EMAIL PROTECTED]> wrote:
> > Just using ajax to update one form field should not wipe out all the
> > other form fields, unless you add the entire form to your ajaxtarget.
> > It is sufficient to only add the formcomponent you are updating to
> > your ajaxtarget that way anything the user typed in will be preserved.
> > Could you check if this is the case, and if not provide us with some
> > code?
>
> You are right, adding the specific component to the ajaxtarget
> prevents the unaffected fileds from being effected, thanks.
>
> But now nothing gets updated :-)
>
> The component added to the target is not a textfield as I remembered,
> but a ListMultipleChoice, whose "choices" model got updated by the
> form on the modalwindow.
> (It's not even its own model, but its parents CompoundPropertyModel...)
> In the ajax debug window, I can only see the modalwindow form
> submission, and no further activity.
>
> I tried to call modelChanged() on the ListMultipleChoice instance.
>
> Should I be using a different widget if I don't care about selection,
> just want to display a list?
>
> Should I surround the <select> tag with a <div> and add that to the
> ajaxtarget?
>
> We're preparing a code example, the actual code is a bit convolved.
>
>
> Thanks!
>
>
>
> Gabor Szokoli
>
> ---------------------------------------------------------------------
> 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]