You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Richard Fagot <ri...@gmail.com> on 2009/04/11 20:49:39 UTC

Access wicket pages from external link

Hi all,

  is there a way to access a wicket page using an link external from wicket
website. In my case, I am creating the subscribe part of a website in
wicket. When a new user subscribes I want to send to him a  confirmation
email containing a link to a wicket page to confirm its subscription. Is it
possible ? can I add something like
http://wicket.website.com/ConfirmationPage.html?user=userName&otherInfo=...
in the mail content ? If it's possible how to implement the solution ?


thanks



-------------------------------------------------------------------------------------------------------------------------
Richard Fagot                                                   22, rue
Aristote
richard.fagot@gmail.com                                   31400 Toulouse
Port. +33 (0)6.12.59.25.94                                 France

Dom.  +33 (0)5.61.52.44.13
Fax.   +33 (0)9.55.36.90.01

Site : www.beasymptotic.fr          Viadeo   :
www.viadeo.com/fr/profile/richard.fagot1
Blog : richardfagot.blogspot.com  LinkedIn :
www.linkedin.com/in/richardfagot
-------------------------------------------------------------------------------------------------------------------------

Re: Access wicket pages from external link

Posted by Kent Larsson <ke...@gmail.com>.
Hi,

I'm pretty sure I'm doing something wrong and I have trouble getting
any of the two methods to work.

The information at
http://cwiki.apache.org/WICKET/getting-a-url-for-display.html looks
easy enough. But I can't get it to work. When I have:

public class RegisterAccount extends BasePage {
	public RegisterAccount() {
                String url = urlFor("someKindOfName",
RegisterAccount.class, new PageParameters("foo=bar"));
	}
}

I get: The method urlFor(IPageMap, Class, PageParameters) in the type
Component is not applicable for the arguments (String,
Class<RegisterAccount>, PageParameters)

Any ideas on how to get the Wiki-way to work?



If I instead try to follow the advice from Martin. When I have:

public class RegisterAccount extends BasePage {
	public RegisterAccount() {
		BookmarkablePageLink bpl = new BookmarkablePageLink("idOfComponent",
RegisterAccount.class);
        String url = urlFor(bpl);
	}
}

I get: The method urlFor(IRequestTarget) in the type Component is not
applicable for the arguments (BookmarkablePageLink)

Any ideas on getting the way Martin suggested to work?


Best regards, Kent

On Sun, Apr 12, 2009 at 6:50 PM, richard.fagot <ri...@gmail.com> wrote:
>
> Thank you, it was what I needed. Using these info I've finally found the
> http://cwiki.apache.org/WICKET/getting-a-url-for-display.html wiki  page
> about this subject.
>
>
>
> Martin Makundi wrote:
>>
>> Hi!
>>
>> You can just make for example a bookmarkable page link with parameters:
>> new BookmarkablePageLink("id", Page.class, parameters);
>> And you can convert this into url by calling urlFor(bookmarkablelink)
>> and probably you want to use requestutils to get its absolute url...
>>
>> **
>> Martin
>>
>> 2009/4/11 Richard Fagot <ri...@gmail.com>:
>>> Hi all,
>>>
>>>  is there a way to access a wicket page using an link external from
>>> wicket
>>> website. In my case, I am creating the subscribe part of a website in
>>> wicket. When a new user subscribes I want to send to him a  confirmation
>>> email containing a link to a wicket page to confirm its subscription. Is
>>> it
>>> possible ? can I add something like
>>> http://wicket.website.com/ConfirmationPage.html?user=userName&otherInfo=...
>>> in the mail content ? If it's possible how to implement the solution ?
>>>
>>>
>>> thanks
>>>
>>>
>>>
>>> -------------------------------------------------------------------------------------------------------------------------
>>> Richard Fagot                                                   22, rue
>>> Aristote
>>> richard.fagot@gmail.com                                   31400 Toulouse
>>> Port. +33 (0)6.12.59.25.94                                 France
>>>
>>> Dom.  +33 (0)5.61.52.44.13
>>> Fax.   +33 (0)9.55.36.90.01
>>>
>>> Site : www.beasymptotic.fr          Viadeo   :
>>> www.viadeo.com/fr/profile/richard.fagot1
>>> Blog : richardfagot.blogspot.com  LinkedIn :
>>> www.linkedin.com/in/richardfagot
>>> -------------------------------------------------------------------------------------------------------------------------
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/Access-wicket-pages-from-external-link-tp23004277p23012602.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Access wicket pages from external link

Posted by "richard.fagot" <ri...@gmail.com>.
Thank you, it was what I needed. Using these info I've finally found the 
http://cwiki.apache.org/WICKET/getting-a-url-for-display.html wiki  page
about this subject.



Martin Makundi wrote:
> 
> Hi!
> 
> You can just make for example a bookmarkable page link with parameters:
> new BookmarkablePageLink("id", Page.class, parameters);
> And you can convert this into url by calling urlFor(bookmarkablelink)
> and probably you want to use requestutils to get its absolute url...
> 
> **
> Martin
> 
> 2009/4/11 Richard Fagot <ri...@gmail.com>:
>> Hi all,
>>
>>  is there a way to access a wicket page using an link external from
>> wicket
>> website. In my case, I am creating the subscribe part of a website in
>> wicket. When a new user subscribes I want to send to him a  confirmation
>> email containing a link to a wicket page to confirm its subscription. Is
>> it
>> possible ? can I add something like
>> http://wicket.website.com/ConfirmationPage.html?user=userName&otherInfo=...
>> in the mail content ? If it's possible how to implement the solution ?
>>
>>
>> thanks
>>
>>
>>
>> -------------------------------------------------------------------------------------------------------------------------
>> Richard Fagot                                                   22, rue
>> Aristote
>> richard.fagot@gmail.com                                   31400 Toulouse
>> Port. +33 (0)6.12.59.25.94                                 France
>>
>> Dom.  +33 (0)5.61.52.44.13
>> Fax.   +33 (0)9.55.36.90.01
>>
>> Site : www.beasymptotic.fr          Viadeo   :
>> www.viadeo.com/fr/profile/richard.fagot1
>> Blog : richardfagot.blogspot.com  LinkedIn :
>> www.linkedin.com/in/richardfagot
>> -------------------------------------------------------------------------------------------------------------------------
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Access-wicket-pages-from-external-link-tp23004277p23012602.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Access wicket pages from external link

Posted by Martin Makundi <ma...@koodaripalvelut.com>.
Hi!

You can just make for example a bookmarkable page link with parameters:
new BookmarkablePageLink("id", Page.class, parameters);
And you can convert this into url by calling urlFor(bookmarkablelink)
and probably you want to use requestutils to get its absolute url...

**
Martin

2009/4/11 Richard Fagot <ri...@gmail.com>:
> Hi all,
>
>  is there a way to access a wicket page using an link external from wicket
> website. In my case, I am creating the subscribe part of a website in
> wicket. When a new user subscribes I want to send to him a  confirmation
> email containing a link to a wicket page to confirm its subscription. Is it
> possible ? can I add something like
> http://wicket.website.com/ConfirmationPage.html?user=userName&otherInfo=...
> in the mail content ? If it's possible how to implement the solution ?
>
>
> thanks
>
>
>
> -------------------------------------------------------------------------------------------------------------------------
> Richard Fagot                                                   22, rue
> Aristote
> richard.fagot@gmail.com                                   31400 Toulouse
> Port. +33 (0)6.12.59.25.94                                 France
>
> Dom.  +33 (0)5.61.52.44.13
> Fax.   +33 (0)9.55.36.90.01
>
> Site : www.beasymptotic.fr          Viadeo   :
> www.viadeo.com/fr/profile/richard.fagot1
> Blog : richardfagot.blogspot.com  LinkedIn :
> www.linkedin.com/in/richardfagot
> -------------------------------------------------------------------------------------------------------------------------
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org