Hi,
In my form, 
I have provided radio choices r1,r2,r3,etc based on whose selection I have to 
change a panel's(id is p1) model object and display the panel corresponding to 
that in UI.
I have used components RadioGroup, Radio to implement this.


I need to do this using Ajax.
Taking hint from,
http://www.nabble.com/RadioGroup-onchange-event-%28Wicket-1.2%29-tf1862107.html#a5165682
I am using AjaxFormSubmitBehavior for this.

For example, the panel is the user's address. A user can have different 
addresses(a1,a2,a3,etc).
The behaviour I want is that when user selects r1, a1 should be displayed.If he 
selects r2, a2 should be displayed and likewise.
This is working fine.
Also, I want that if user modifies any of the address lines of a1 and goes to 
a2 and comes back to a1, the address lines of a1 should not be the modified 
ones.

This is not happening because I guess, in AjaxFormSubmitBehavior the model is 
updated with the latest values.

To tackle this, I tried to override the
onEvent method of AjaxFormSubmitBehavior 
with 
protected void onEvent(AjaxRequestTarget target)
    {
        
      onSubmit(target);
        
    }

But now  if user selects now r2 the choice remains still at r1, because the 
model for radio choice remains unchanged.

Is there a way to allow selective update of some components' models only. e.g I 
need update of radio choice model here, but not for address panel's model

Regards,
Vivek




 
____________________________________________________________________________________
Don't get soaked.  Take a quick peek at the forecast
with the Yahoo! Search weather shortcut.
http://tools.search.yahoo.com/shortcuts/#loc_weather

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to