I'm experimenting with dynamic page layouts.
I'd like to know if it is possible to replace a component with another
on-the-fly.
The main problem is that after I (fast) read the wiki, I don't fully
understand how Wicket stores the state of different pages.
Like in my example, how can I activate the latest version of a page (on
which the link is already replaced with the label).
Sorry if my answer is confusing, I'm really a newbie :)
Br,
Norbi
----- Original Message -----
From: "Juergen Donnerstag" <[EMAIL PROTECTED]>
To: <wicket-user@lists.sourceforge.net>
Sent: Wednesday, June 29, 2005 5:02 PM
Subject: Re: [Wicket-user] navigation q. - newbie
Norbert,
not sure why you want to change it to a label? Links have already the
ability to change there style (kind of become a label), in case the
link points to the page currently on the screen. Please see the
navmenu example. Is that what you try to do or are I'm
misunderstanding you?
Juergen
On 6/29/05, Norbert Sándor <[EMAIL PROTECTED]> wrote:
Hi,
I'd like to create 2 pages. They have a shared border with links to both
pages.
One of the pages has a Link which is replaced with a Label when the link
is
clicked.
What should I do with the page to "remember" that the link was replaced
with
the label? Now it changes back to link when the next time I visit the page
using the border.
The related source codes:
Border.html
<wicket:link>
<a href="HomePage.html">home</a>
<a href="AnotherPage.html">another</a>
</wicket:link>
HomePage.java
public class HomePage extends NormalPage
{
public HomePage()
{
getBorder().add(new Label("label", "home"));
}
}
ProductsPage.java
public class AnotherPage extends NormalPage
{
public AnotherPage()
{
getBorder().add(new Link("label")
{
public void onClick()
{
this.getParent().replace(new Label("label", "simple
label"));
}
});
}
}
Thanks in advance!
Norbi
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=ick
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user