Got a question on what the expected behaviours are from a link and a button both of which have their response page set to the same page (onClick & onSubmit respectively). I took these form items from the Cheesr example in 'Wicket in Action' and I have used both of these on the second tab on an AjaxTabbedPanel and both response pages set to return to the page containing the tabbed panel. Selecting the link redisplays the tabbed panel showing the first tab. The button, however, displays the second tab. I did attempt a cancel "button" and this behaved the same as the link but I don't understand why disabling validation and form updating should make a difference. Does anyone have any suggestions as to why there is different behaviour here?

public class VxsUserPage extends VxsBasePage {
      ...

       public TabPanel2(String id) {
           super(id);

           Form form = new Form("form");
           add(form);
form.add(new VxsUserSettingsPanel("userSettings", new Model( VxsUserPage.this.user)));

           form.add(new Link("cancel") {
               @Override
               public void onClick() {
                   setResponsePage(VxsUserPage.class);
               }
           });

           form.add(new Button("submit") {
               @Override
               public void onSubmit() {
                   setResponsePage(VxsUserPage.class);
               }
           });
       }
      ...
}

Regards,
Russell

--
*VoxSurf Limited*
Registered & principal office:
2nd Floor
Elme House
133 Long Acre
London WC2E 9DT
United Kingdom
Company No (England):  4051448

http://www.voxsurf.com/

Email disclaimer: This can be viewed at http://www.voxsurf.com/disclaimer.html

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

Reply via email to