I have a search page that lets the use enter the search term in a
TextField and select the field to search with a DDC. Using
onSelectionChanged I am able to create a new TextField pointing to the
new model that was selected in the DDC and everything works as expected.

However, if I do not want to use javascript and the roundtrip for
onSelectionChanged what would be the best way to implement this?

Here is the onSelectionChanged method for clarification:

protected void onSelectionChanged(Object o) {
    super.onSelectionChanged(o);
    field = new TextField("test",new PropertyModel(HomePage.this,o.toString()));
    if(val.equals("test3")) {
        field.add(NumberValidator.RangeValidator.range(100,200));
    }
    f.addOrReplace(field);
}

Thanks,
Ryan

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to