Instead of using wantOnSelectionChangedNotifications you could add an AjaxEventBehavior or AjaxFormSubmitBehavior on "onchange", depending on whether you want the form to be processed or not. wantOnSelectionChangedNotifications is a bit strange in that it uses normal javascript to submit the form the formcomponent is in.

I'd rather have that onSelectionChanged would be called _any_ which way the form was submitted, be it javascript (wantOSCN), normal submit or ajax. Would this be the same then as onModelChanged?

Matthijs

salmas wrote:
I have a DataTable in which I have a panel which contains a textfield and a
radiogroup. When the user changes the selection in the radiogroup I'd like
to populate a value in the textfield. I subclassesed RadioGroup to catch the
selectionChangedEvent

RadioGroup choice = new RadioGroup(workflowFrame_radioPanel_radioGroup,new
Model()){
        protected void onSelectionChanged(java.lang.Object newSelection) {
            //Figure out what is selected and set value in textfield
        }
                        
protected boolean wantOnSelectionChangedNotifications() { return true; } };

As soon as I override the wantOnSelectionChangedNotifications method I get
the notifications but the table is redrawn as soon as the user selects an
option in the radiogroup while if I do not override this method the UI does
not do this ugly redraw when the user toggles the selection in the
radiogroup. I am using AJAX to redraw my table in other instances so that
the table redraw is smooth. Is there any way I can catch the selection
changed event and have the table not redraw? I can redraw it myself with an
AJAX target after I set the value in the textfield.



--
Matthijs Wensveen
Func. Internet Integration
W http://www.func.nl
T +31 20 4230000
F +31 20 4223500

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

Reply via email to