How do you forward from a link within .this is what I am doing ----p2 is being 
rendered by a gridview component. So I am doing the following in P1P1() {  
final P3 p3=new P3(...);IDataProvider dataProvider = new 
P2dataProvider(category);        GridView gridView = new GridView("rows", 
dataProvider)        {            protected void populateItem(Item item)        
    {                final P2Type p2Type = (P2type)item.getModelObject();       
         String AjaxLink ="http://wicket.org";;                item.add(new 
P2("P2", AjaxLink)
                {
                            P3 newP3 = new P3(...);
                           p3.replaceWith(newP3);
                });            }            protected void 
populateEmptyItem(Item item)            {                item.add(new 
Label("test", "*empty*"));            }        };        gridView.setRows(5);   
     gridView.setColumns(2);        add(gridView);        add(new 
PagingNavigator("navigator", gridView));    }Now in P2.java ---        add(new 
Label("Testing");        add(new AjaxLink("AjaxtestLink")        {            
public void onClick(AjaxRequestTarget target)            {               /How 
do you forward to the parent onClick.            }        });Date: Fri, 6 Jul 
2007 00:43:07 -0700From: [EMAIL PROTECTED]: [EMAIL PROTECTED]: Re: 
[Wicket-user] link ajax and panelOn 7/5/07, Ed _ <[EMAIL PROTECTED]> wrote:





sorry  didn't quiet get it.here is my scenario - 3 panels P1 contains - P2 and 
P3  (P1 , P2 and P3 are all different kinds of panels)P3 has a iframeP2 has a 
link - which onclick - needs to change the contents of P3 (either by changing 
the src attribute of the iframe (old style (if i may say that) ajax - or as you 
are pointing out completely swapping out the P3.
P1() {  final P3 p3=new P3(...);  add(new P2(..) {    onclick(AjaxRequestTarget 
t) {       p3.replaceWith(new P3(...));       t.addComponent(p3);     }   }}
P2.onclick() is forwared from a link that is inside it-igor 
thx,edDate: Thu, 5 Jul 2007 17:01:44 -0700From: 
[EMAIL PROTECTED]: [EMAIL PROTECTED]: Re: [Wicket-user] link ajax and panel
On 7/5/07, Ed _ <[EMAIL PROTECTED]> wrote:






Will that work across panels ? the panel making the request itself does not 
have the entity to be updated. I ask cause all the examples have both entities 
in a given page.yes it is possible, just a matter of adding the right panel to 
the ajaxrequesttarget. a pattern i use a lot is to forward event handling of 
encapsulated componenets to the outside component.
so if you have a reusable panel that has a link you want to handle i would do 
something like this:abstract class mypanel extends panel {  public mypanel(...) 
{    add(new ajaxlink("delete") { onclick(ajaxrequesttarget t) { 
mypanel.this.ondelete(t); }  }  protected abstract void 
ondelete(ajaxrequesttarget t);}what ends up happening is that usually mypanel 
and the panel you wish to update are on the same level so referencing is easy:
final panel updated=new panel(...);add(updated);add(new mypanel(...) { 
ondelete(ajaxrequesttarget t) { t.addComponent(updated); }}-igor 

thx,edDate: Thu, 5 Jul 2007 14:25:20 -0700From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]: Re: [Wicket-user] link ajax and panel
On 7/5/07, Ed _ <[EMAIL PROTECTED]> wrote:






I am trying to update a panel on a rendered page on click of a link.The panel 
is essentially an iframe How would I try and do this without refreshing the 
entire page. Are there any Ajax calls for this.


AjaxLink ?-igor thanks,ed
Local listings, incredible imagery, and driving directions - all in one place! 
Find it!



-------------------------------------------------------------------------This 
SF.net email is sponsored by DB2 ExpressDownload DB2 Express C - the FREE 
version of DB2 express and takecontrol 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
Don't get caught with egg on your face.    

Play Chicktionary! 
-------------------------------------------------------------------------This 
SF.net email is sponsored by DB2 ExpressDownload DB2 Express C - the FREE 
version of DB2 express and takecontrol 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
Don't get caught with egg on your face.    
Play Chicktionary! 
-------------------------------------------------------------------------This 
SF.net email is sponsored by DB2 ExpressDownload DB2 Express C - the FREE 
version of DB2 express and takecontrol 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

_________________________________________________________________
Local listings, incredible imagery, and driving directions - all in one place! 
Find it!
http://maps.live.com/?wip=69&FORM=MGAC01
-------------------------------------------------------------------------
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