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="">home</a>
     <a href="">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

Reply via email to