I have a page with a form that uses a LoadableDetachableModel nested in a
CompoundPropertyModel. The form has a lot of labels and one text field. The
page is refreshed thru an AjaxFormSubmitBehavior so load only gets called
once. The problem is that I need the value of the text field in order to
load the next object.
How do I get a hold of that text field's value in the
LoadableDetachableModel load method?
public class ReceiveItemDetail
{
public ReceiveItemDetail()
{
super();
IModel receiveModel = new LoadableDetachableModel()
{
protected Object load()
{
// I need the TextField value here
...
}
};
add(new ReceiveItemDetailForm("receiveItemDetailForm", new
CompoundPropertyModel(receiveModel)));
...
}
public final class ReceiveItemDetailForm extends Form
{
public ReceiveItemDetailForm(final String id, final IModel
model)
{
super(id, model);
setOutputMarkupId(true);
add(new AjaxFormSubmitBehavior("onsubmit")
{
protected void onSubmit(AjaxRequestTarget
target)
{
// refresh page
}
...
});
TextField upc = new TextField("upc");
upc.setOutputMarkupId(true);
add(upc);
// Other Labels
...
}
}
}
Thanks,
Warren Bell
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]