you can get to outer class scoping easily

for example if that label was inside a panel


class MyPanel extends Panel {
 public MyPanel(String id) {
    super(id);
    add(new AjaxLink("link") {
        public void onclick(ajaxrequesttarget target) {
           // to get a reference to the panel that the link is in just do
           Panel panel=MyPanel.this;
           // or

            MyPanel.this.add....
          }


-igor



On 6/20/07, rc.china <[EMAIL PROTECTED]> wrote:


Sorry, one error in the code:
    this.add(...)   ==> this.findPage().add(...)

And we change like above, the output is what we want:)

--
View this message in context:
http://www.nabble.com/Re%3A-How-can-we-change-a-component-dynamically-in-Wicket---%28ccc-rrr%29-tf3956306.html#a11226195
Sent from the Wicket - User mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to