Hi Martijn,

I have a page, that contains a panel (PanelA), and link. The link instantiate 
modalWindow that uses PanelB.


MyPage contains:
Panel panelA = new PanelA();
add(panelA);
final ModalWindow modalWindow = new ModalWindow("modalwindow");
modalWindow.setContent( new PanelB(modalWindow.getContentId()));



in PanelB:

  AjaxButton ajaxButton = new AjaxButton("test") {

      protected void onSubmit(AjaxRequestTarget target, Form form) {
             // how do i get reference to PanelA?
             // or to any component in PanelA ?              
       }
                    
 };


Thanks,
Allan

--
The only constant in life is change.

----- Original Message ----
From: Martijn Lindhout <[EMAIL PROTECTED]>
To: [email protected]
Sent: Monday, January 14, 2008 2:23:51 PM
Subject: Re: how to reference component in RequestTarget


what is exactly the usecase?

2008/1/14, Beyonder Unknown <[EMAIL PROTECTED]>:
>
>
> Hi All,
>
> I was wondering what is the best practice when referencing components
> inside an onClick/onSubmit. Normally:
>
>                     public void onClick(AjaxRequestTarget target) {
>                               //do things here.
>                                 //update these components.
>                               target.addComponent(panelA);
>                               target.addComponent(panelB);
>
>                     }
>
> But what if you don't have direct access to PanelA or PanelB?
>
> Any help will be greatly appreciated!
>
> Thanks,
> Wen Tong
>
> --
> The only constant in life is change.
>
>
>
>
>
>      
 
____________________________________________________________________________________
> Be a better friend, newshound, and
> know-it-all with Yahoo! Mobile.  Try it now.
> http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Martijn Lindhout
JointEffort IT Services
http://www.jointeffort.nl
[EMAIL PROTECTED]
+31 (0)6 18 47 25 29





      
____________________________________________________________________________________
Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  
http://tools.search.yahoo.com/newsearch/category.php?category=shopping

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

Reply via email to