Hello,

you can use a normal Link too. If you have a Page that has another
constructor that needs Parameters than you cant use the
PageLink(java.lang.String id, Page page) constructor. Its deprecated.

Instead use this:

add(new Link("id") {
    public void onClick() {
        setResponsePage(new MyPage(with Params));
    }
});

greetings


HITECH79 wrote:
> 
> 
> 
> greeklinux wrote:
>> 
>> Hello HITECH79,
>> 
>> Is this a normal link to a page? You can do it much cleaner.
>> I think this should be enough:
>> 
>> add(new PageLink("mainLinkSupport", AcsSupportPage.class));
>> 
>> I suppose you will have somethink like this:
>> 
>> < a href="#" wicket:id="mainLinkSupport" >SUPPORT</ a >
>> 
>> You can add a Label component to your link:
>> 
>> add(new PageLink("mainLinkSupport", AcsSupportPage.class).add(
>>      new Label("supportLabel", new YourModel())));
>> 
>> Html:
>> < a href="#" wicket:id="mainLinkSupport">< span wicket:id="supportLabel"
>> >SUPPORT</ span></ a>
>> 
>> Do you want to localize the label?
>> 
>> greetings
>> 
>> 
>> 
>> 
>> HITECH79 wrote:
>>> 
>>> Hallo I am new in this forum and have this Problem with Pagelink:
>>> 
>>> JAVA:
>>> 
>>> add(new PageLink("mainLinkSupport", new IPageLink() {
>>>         private static final long serialVersionUID = 1L;
>>> 
>>>         public Page getPage() {
>>>           return new AcsSupportPage();
>>>         }
>>> 
>>>         public Class<? extends Page> getPageIdentity() {
>>>           return AcsSupportPage.class;
>>>         }
>>>       }));
>>> 
>>> 
>>> 
>>> 
>>> HTML:
>>> <!--<li> SUPPORT </li>-->
>>> 
>>> 
>>> My Question is how can i change the "LinkLabel" SUPPORT dynamic in the
>>> JAVA Code and not static in HTML.
>>> 
>>> Thanks a lot
>>> 
>>> 
>>> 
>>> 
>> 
>> 
> 
> Thanks this problem is now resolved :-)
> 
> My next question is, can I use simply a Link to Link to other Page or ist
> Pagelink the better way...?
> 
> greetings
> 
> 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Dynamic-Link-label-tp18363277p18365700.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to