Since when do we have <wicket:link> and what does it do?

Gili

Norbert Sándor wrote:
I go back using the links of my border component:
<wicket:link>
     <a href="HomePage.html">home</a>
     <a href="AnotherPage.html">another</a>
</wicket:link>
Norbi

    ----- Original Message -----
    *From:* Johan Compagner <mailto:[EMAIL PROTECTED]>
    *To:* wicket-user@lists.sourceforge.net
    <mailto:wicket-user@lists.sourceforge.net>
    *Sent:* Wednesday, June 29, 2005 5:27 PM
    *Subject:* Re: [Wicket-user] navigation q. - newbie

    how do you go back to that page?
    but saying: setResponsePage(new MyPage());

    then you will have a new instance of mypage with the link instead of
    label.
    if you are having MyPage1 and MyPage2 (where you go to from mypage1
    that has the link replaced)
    and if you want to go to the same instance then you have to give the
    mypage1 instance to mypage2 instance
    and on every link you have there where you do setResponsePage to
    youre first page you use that instance, so you don't make a new one.

    johan



    Norbert Sándor 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

--
http://www.desktopbeautifier.com/


-------------------------------------------------------
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_id=7477&alloc_id=16492&op=click
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to