I'm a dumdum.
The answer is to use AjaxCheckBox (duhh)
Cheers
WK

WicketKeeper wrote:
> 
> Hi
> 
> I have an autocomplete field object with the getChoices method overridden,
> which works just fine. Next to it I have a checkbox, which when checked
> alters the logic in getChoices so that the string is interpreted as a
> regular expression.
> 
> This DOES work:
> 
> tsf = new TableSelectionField("TableNameAutoCompleteTextField");
> subjcb = new CheckBox("SubjectsRegexpCheckBox")
>         {
>               protected boolean wantOnSelectionChangedNotifications()
>               {
>                       return true;
>               }
>         };
> 
> both components are added to form, so they implicitly get the
> CompoundPropertyModel.
> 
> Right, that's wonderful - except now when I click the checkbox the entire
> page refreshes. When there's lots of stuff on the page this can be a heavy
> operation. So I took this bit out:
> 
> subjcb = new CheckBox("SubjectsRegexpCheckBox")
>         {
>               protected boolean wantOnSelectionChangedNotifications()
>               {
>                       return true;
>               }
>         };
> 
> And now the autocomplete field does not work - well, not completely. If I
> click submit on the form (which gets that state of the checkbox and field)
> I get the expected results, even if the autocomplete field doesn't
> populate correctly.
> 
> Is there any way I can get round this without forcing a refresh when i
> click on the checkbox?
> 
> Cheers
> WK
> 

-- 
View this message in context: 
http://www.nabble.com/Synchronizing-AutoCompleteTextField-with-a-checkbox-tf4730399.html#a13526222
Sent from the Wicket - User mailing list archive at Nabble.com.


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

Reply via email to