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.
}
});
sigh, this is _exactly_ what i explained how to do in my previous email
-igor
------------------------------
Date: Fri, 6 Jul 2007 00:43:07 -0700
From: [EMAIL PROTECTED]
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user] link ajax and panel
On 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 iframe
P2 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,
ed
------------------------------
Date: Thu, 5 Jul 2007 17:01:44 -0700
From: [EMAIL PROTECTED]
To: wicket-user@lists.sourceforge.net
Subject: 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,
ed
------------------------------
Date: Thu, 5 Jul 2007 14:25:20 -0700
From: [EMAIL PROTECTED]
To: wicket-user@lists.sourceforge.net
Subject: 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! <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
------------------------------
Don't get caught with egg on your face. Play Chicktionary!
<http://club.live.com/chicktionary.aspx?icid=chick_wlmailtextlink>
-------------------------------------------------------------------------
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
------------------------------
Don't get caught with egg on your face. Play Chicktionary!
<http://club.live.com/chicktionary.aspx?icid=chick_wlmailtextlink>
-------------------------------------------------------------------------
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
------------------------------
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
-------------------------------------------------------------------------
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