mount your page - that way you will always know what the url will be
and there is no need to have it constructed at runtime by wicket.

-igor

On Wed, May 20, 2009 at 10:10 AM, Kent Larsson <kent.lars...@gmail.com> wrote:
> I have a follow up question, a harder one.
>
> I want to send the mail from a Spring Bean using the Spring Framework.
>
> The Spring Beans mark my transaction boundary. When I call a method in
> a Spring bean a transaction is started, and when the method returns
> the transaction is commited. Inside my Wicket component code there
> never is any transaction.
>
> It would be best if I could create the URL inside the Spring Bean as I
> would like to do it inside the transaction.
>
> I guess I could do it using a callback from the Spring Bean to the
> Wicket component. But if I'm able to do it without any callback I
> think that would be a better solution. Is it possible?
>
> Best regards, Kent
>
>
> On Wed, May 20, 2009 at 6:33 PM, Kent Larsson <kent.lars...@gmail.com> wrote:
>> Thank you, it worked!
>>
>> PageParameters pars = new PageParameters();
>> pars.add("confirmationCode", "some conf?code&string");
>> System.out.println("URL: " + urlFor(ForgotPasswordRequest.class, pars));
>>
>> Best regards, Kent
>>
>>
>> On Wed, May 20, 2009 at 6:01 PM, Clint Popetz <cl...@42lines.net> wrote:
>>> Component.urlFor(ForgotPasswordRequest.class,pars);
>>>
>>> (not a static...call it as "urlFor(...)" from your page or component)
>>>
>>> -Clint
>>>
>>> On Wed, May 20, 2009 at 10:54 AM, Kent Larsson <kent.lars...@gmail.com> 
>>> wrote:
>>>> Hi,
>>>>
>>>> I have created a BookmarkablePageLink and I would like to grab a
>>>> properly escaped URL-string which I can then send through e-mail.
>>>>
>>>> For my first try noHtmlSensitiveChars & fullyEscaped contained the
>>>> empty ("") string:
>>>>
>>>> PageParameters pars = new PageParameters();
>>>> pars.add("confirmationCode", "someconfcodestring");
>>>> BookmarkablePageLink bookmarkablePageLink = new
>>>> BookmarkablePageLink("link", ForgotPasswordRequest.class, pars);
>>>> String noHtmlSensitiveChars = 
>>>> bookmarkablePageLink.getModelObjectAsString();
>>>> String fullyEscaped = Strings.escapeMarkup(noHtmlSensitiveChars, true,
>>>> true).toString();
>>>> System.out.println("No sensitive chars:" + noHtmlSensitiveChars);
>>>> System.out.println("Fully escaped:" + fullyEscaped);
>>>>
>>>> Any ideas on how I could solve this?
>>>>
>>>> Best regards, Kent
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Clint Popetz
>>> http://42lines.net
>>> Scalable Web Application Development
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

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

Reply via email to