You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Xavier López <xa...@gmail.com> on 2010/04/28 11:51:48 UTC

wicket:message attribute in regular html tags with child components

Hi,

I have just bumped into a particular situation, I think I know what's
happening but I'd like to share and, if possible, have it confirmed here.
Additionally, some info on this subject could be added to the wiki page
https://cwiki.apache.org/WICKET/wickets-xhtml-tags.html#Wicket%27sXHTMLtags-Attributewicket:message

In a regular <table> html tag (wicket:id-less), I'd like to have a
wicket:message attribute (for the 'summary' attribute) in order to take
advantage from wicket's localization mechanism. Under this tag, I have a
number of wicket components. My surprise came when I found the following
error:

<table wicket:message="summary:myresource">
> <tr><td><span wicket:id="myComponent"></span></td></tr>
> </table>
>
> org.apache.wicket.markup.MarkupException: Unable to find component with id
> 'myComponent' in [MarkupContainer [Component id = _message_attr_303]]. This
> means that you declared wicket:id=myComponentin your markup, but that you
> either did not add the component to your page at all, or that the hierarchy
> does not match.
>


The first suspicious thig I noticed here was the "_message_attr_303" in the
component hierarchy. Digging through the code, I found in
WicketMessageTagHandler that this id is given to components with
wicket:message attributes and without wicket:id's.

So, maybe what's happening here is that the <table> tag is being assigned a
wicket:id and Wicket expects me to add 'myComponent' to the automatically
generated _message_attr_303... Should it be fixed by modelling the <table>
tag with a webmarkupcontainer and adding 'myComponent' to it ?

Cheers,
Xavier

Wickets in China

Posted by aa...@oocl.com.
Hello guys,

Any body here from China? Would like to know if there is anybody interesting in translate some book/docs into Chinese, if you are interested, please drop me a message.

Thanks
Aaron
IMPORTANT NOTICE
Email from OOCL is confidential and may be legally privileged.  If it is not
intended for you, please delete it immediately unread.  The internet
cannot guarantee that this communication is free of viruses, interception
or interference and anyone who communicates with us by email is taken
to accept the risks in doing so.  Without limitation, OOCL and its affiliates
accept no liability whatsoever and howsoever arising in connection with
the use of this email.  Under no circumstances shall this email constitute
a binding agreement to carry or for provision of carriage services by OOCL,
which is subject to the availability of carrier's equipment and vessels and
the terms and conditions of OOCL's standard bill of lading which is also
available at http://www.oocl.com.

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


Re: wicket:message attribute in regular html tags with child components

Posted by Xavier López <xa...@gmail.com>.
Oh, now I think I got your point... I don't know how wicket treats markup
internally, I could expect some markup substitution on the "attribute
wicket:message='summary:myResource' " by "summary='This table....'"

In fact, I have tried using another tag, without any child Wicket Component

<input type="text" wicket:message="title:myresource"></input>

And Wicket is treating it correctly...

<input type="text" wicket:message="Test Title"></input>

Thanks,
Xavier


2010/4/28 Igor Vaynberg <ig...@gmail.com>

> i meant where do you expect the localized message to be rendered into?
> if wicket:message is attached to the table tag?
>
> -igor
>
> On Wed, Apr 28, 2010 at 9:52 AM, Xavier López <xa...@gmail.com> wrote:
> > Hi, I'd expect it to lie in the ContainerComponent's folder, assuming
> > ContainerComponent is the the Page or Panel associated with that
> markup...
> > In other words, getString("myresource") from that component would find
> it.
> >
> > Does this have something to do with that error ?
> >
> > Thanks,
> > Xavier
> >
> > 2010/4/28 Igor Vaynberg <ig...@gmail.com>
> >
> >> when you have markup like:
> >>
> >> <table wicket:message="summary:myresource">
> >> > <tr><td><span wicket:id="myComponent"></span></td></tr>
> >> > </table>
> >>
> >> where do you expect your localized message to go?
> >>
> >> -igor
> >>
> >> On Wed, Apr 28, 2010 at 2:51 AM, Xavier López <xa...@gmail.com>
> wrote:
> >> > Hi,
> >> >
> >> > I have just bumped into a particular situation, I think I know what's
> >> > happening but I'd like to share and, if possible, have it confirmed
> here.
> >> > Additionally, some info on this subject could be added to the wiki
> page
> >> >
> >>
> https://cwiki.apache.org/WICKET/wickets-xhtml-tags.html#Wicket%27sXHTMLtags-Attributewicket:message
> >> >
> >> > In a regular <table> html tag (wicket:id-less), I'd like to have a
> >> > wicket:message attribute (for the 'summary' attribute) in order to
> take
> >> > advantage from wicket's localization mechanism. Under this tag, I have
> a
> >> > number of wicket components. My surprise came when I found the
> following
> >> > error:
> >> >
> >> > <table wicket:message="summary:myresource">
> >> >> <tr><td><span wicket:id="myComponent"></span></td></tr>
> >> >> </table>
> >> >>
> >> >> org.apache.wicket.markup.MarkupException: Unable to find component
> with
> >> id
> >> >> 'myComponent' in [MarkupContainer [Component id =
> _message_attr_303]].
> >> This
> >> >> means that you declared wicket:id=myComponentin your markup, but that
> >> you
> >> >> either did not add the component to your page at all, or that the
> >> hierarchy
> >> >> does not match.
> >> >>
> >> >
> >> >
> >> > The first suspicious thig I noticed here was the "_message_attr_303"
> in
> >> the
> >> > component hierarchy. Digging through the code, I found in
> >> > WicketMessageTagHandler that this id is given to components with
> >> > wicket:message attributes and without wicket:id's.
> >> >
> >> > So, maybe what's happening here is that the <table> tag is being
> assigned
> >> a
> >> > wicket:id and Wicket expects me to add 'myComponent' to the
> automatically
> >> > generated _message_attr_303... Should it be fixed by modelling the
> >> <table>
> >> > tag with a webmarkupcontainer and adding 'myComponent' to it ?
> >> >
> >> > Cheers,
> >> > Xavier
> >> >
> >>
> >> ---------------------------------------------------------------------
> >> 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
>
>


-- 
"Klein bottle for rent--inquire within."

Re: wicket:message attribute in regular html tags with child components

Posted by Igor Vaynberg <ig...@gmail.com>.
wicket:message is not intended to be used on actual wicket components,
only on raw markup. if you have a component then its trivial to add
the localized attribute from code. remember, wicket prefers everything
to be done from code. wicket:message exists because creating a markup
container in code and adding the attribute that way is too noisy since
the container would serve no other function.

-igor

On Fri, Apr 30, 2010 at 2:14 AM, Xavier López <xa...@gmail.com> wrote:
> Hasn't anybody else been in this situation ? I finally checked it is
> necessary for a regular tag with a wicket:message attribute and with wicket
> component childs to be also a wicket component... Maybe it would be nice to
> have this information on the wiki page talking about the wicket:message
> attribute...
>
> This example would give the error:
>
> public class TestPage extends Page {
> public TestPage(){
> add(new Label("childLabel", "Sample text for the label"));
> }
> }
>
> <html>
> <body>
> <table wicket:message="summary:anyResourceKey">
> <tr><td><span wicket:id="childLabel"></span></td></tr>
> </table>
> </body>
> </html>
>
>
> The only way I see to get around it is to :
> public class TestPage extends Page {
> public TestPage(){
> WebMarkupContainer cont = new WebMarkupContainer("cont");
> add(cont);
> cont.add(new Label("childLabel", "Sample text for the label"));
> }
> }
>
> <html>
> <body>
> <table wicket:id="cont" wicket:message="summary:anyResourceKey">
> <tr><td><span wicket:id="childLabel"></span></td></tr>
> </table>
> </body>
> </html>
>
> Cheers,
> Xavier
>
> 2010/4/29 Xavier López <xa...@gmail.com>
>
>> Yes, you are right, Wilhelmsen, and that's what Wicket is doing, I
>> understand that correctly. The problem is, when I have a wicket component
>> attached to that <table> tag. Wicket seems to treat that <table> as a
>> component, with autogenerated wicket:id, and logically, expects the child
>> components (in markup) to be added to it. I suppose I have to manually model
>> that <table> into a wicket component (i.e. WebMarkupContainer) in order to
>> be able to add those child components to it and let Wicket process the
>> component hierarchy correctly...
>>
>>
>> BTW, I just noticed I wrote the last message incorrectly:
>>
>> <input type="text" wicket:message="title:myresource"></input>
>>
>> Turns into
>>
>> <input type="text" title="Test Title"></input>
>>
>>
>> Thanks,
>> Xavier
>>
>> 2010/4/29 Wilhelmsen Tor Iver <To...@arrive.no>
>>
>> > i meant where do you expect the localized message to be rendered into?
>>> > if wicket:message is attached to the table tag?
>>>
>>> Well, since he is using the attribute version of wicket:message, I guess
>>> he expects the output from
>>>
>>> > >> <table wicket:message="summary:myresource">
>>>
>>> to be
>>>
>>> <table summary="localized message with key myresource">
>>>
>>> - Tor Iver
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> 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: wicket:message attribute in regular html tags with child components

Posted by Xavier López <xa...@gmail.com>.
Hasn't anybody else been in this situation ? I finally checked it is
necessary for a regular tag with a wicket:message attribute and with wicket
component childs to be also a wicket component... Maybe it would be nice to
have this information on the wiki page talking about the wicket:message
attribute...

This example would give the error:

public class TestPage extends Page {
public TestPage(){
add(new Label("childLabel", "Sample text for the label"));
}
}

<html>
<body>
<table wicket:message="summary:anyResourceKey">
<tr><td><span wicket:id="childLabel"></span></td></tr>
</table>
</body>
</html>


The only way I see to get around it is to :
public class TestPage extends Page {
public TestPage(){
WebMarkupContainer cont = new WebMarkupContainer("cont");
add(cont);
cont.add(new Label("childLabel", "Sample text for the label"));
}
}

<html>
<body>
<table wicket:id="cont" wicket:message="summary:anyResourceKey">
<tr><td><span wicket:id="childLabel"></span></td></tr>
</table>
</body>
</html>

Cheers,
Xavier

2010/4/29 Xavier López <xa...@gmail.com>

> Yes, you are right, Wilhelmsen, and that's what Wicket is doing, I
> understand that correctly. The problem is, when I have a wicket component
> attached to that <table> tag. Wicket seems to treat that <table> as a
> component, with autogenerated wicket:id, and logically, expects the child
> components (in markup) to be added to it. I suppose I have to manually model
> that <table> into a wicket component (i.e. WebMarkupContainer) in order to
> be able to add those child components to it and let Wicket process the
> component hierarchy correctly...
>
>
> BTW, I just noticed I wrote the last message incorrectly:
>
> <input type="text" wicket:message="title:myresource"></input>
>
> Turns into
>
> <input type="text" title="Test Title"></input>
>
>
> Thanks,
> Xavier
>
> 2010/4/29 Wilhelmsen Tor Iver <To...@arrive.no>
>
> > i meant where do you expect the localized message to be rendered into?
>> > if wicket:message is attached to the table tag?
>>
>> Well, since he is using the attribute version of wicket:message, I guess
>> he expects the output from
>>
>> > >> <table wicket:message="summary:myresource">
>>
>> to be
>>
>> <table summary="localized message with key myresource">
>>
>> - Tor Iver
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>
>

Re: wicket:message attribute in regular html tags with child components

Posted by Xavier López <xa...@gmail.com>.
Yes, you are right, Wilhelmsen, and that's what Wicket is doing, I
understand that correctly. The problem is, when I have a wicket component
attached to that <table> tag. Wicket seems to treat that <table> as a
component, with autogenerated wicket:id, and logically, expects the child
components (in markup) to be added to it. I suppose I have to manually model
that <table> into a wicket component (i.e. WebMarkupContainer) in order to
be able to add those child components to it and let Wicket process the
component hierarchy correctly...


BTW, I just noticed I wrote the last message incorrectly:

<input type="text" wicket:message="title:myresource"></input>

Turns into

<input type="text" title="Test Title"></input>


Thanks,
Xavier

2010/4/29 Wilhelmsen Tor Iver <To...@arrive.no>

> > i meant where do you expect the localized message to be rendered into?
> > if wicket:message is attached to the table tag?
>
> Well, since he is using the attribute version of wicket:message, I guess he
> expects the output from
>
> > >> <table wicket:message="summary:myresource">
>
> to be
>
> <table summary="localized message with key myresource">
>
> - Tor Iver
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>

SV: wicket:message attribute in regular html tags with child components

Posted by Wilhelmsen Tor Iver <To...@arrive.no>.
> i meant where do you expect the localized message to be rendered into?
> if wicket:message is attached to the table tag?

Well, since he is using the attribute version of wicket:message, I guess he expects the output from

> >> <table wicket:message="summary:myresource">

to be

<table summary="localized message with key myresource">

- Tor Iver



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


Re: wicket:message attribute in regular html tags with child components

Posted by Igor Vaynberg <ig...@gmail.com>.
i meant where do you expect the localized message to be rendered into?
if wicket:message is attached to the table tag?

-igor

On Wed, Apr 28, 2010 at 9:52 AM, Xavier López <xa...@gmail.com> wrote:
> Hi, I'd expect it to lie in the ContainerComponent's folder, assuming
> ContainerComponent is the the Page or Panel associated with that markup...
> In other words, getString("myresource") from that component would find it.
>
> Does this have something to do with that error ?
>
> Thanks,
> Xavier
>
> 2010/4/28 Igor Vaynberg <ig...@gmail.com>
>
>> when you have markup like:
>>
>> <table wicket:message="summary:myresource">
>> > <tr><td><span wicket:id="myComponent"></span></td></tr>
>> > </table>
>>
>> where do you expect your localized message to go?
>>
>> -igor
>>
>> On Wed, Apr 28, 2010 at 2:51 AM, Xavier López <xa...@gmail.com> wrote:
>> > Hi,
>> >
>> > I have just bumped into a particular situation, I think I know what's
>> > happening but I'd like to share and, if possible, have it confirmed here.
>> > Additionally, some info on this subject could be added to the wiki page
>> >
>> https://cwiki.apache.org/WICKET/wickets-xhtml-tags.html#Wicket%27sXHTMLtags-Attributewicket:message
>> >
>> > In a regular <table> html tag (wicket:id-less), I'd like to have a
>> > wicket:message attribute (for the 'summary' attribute) in order to take
>> > advantage from wicket's localization mechanism. Under this tag, I have a
>> > number of wicket components. My surprise came when I found the following
>> > error:
>> >
>> > <table wicket:message="summary:myresource">
>> >> <tr><td><span wicket:id="myComponent"></span></td></tr>
>> >> </table>
>> >>
>> >> org.apache.wicket.markup.MarkupException: Unable to find component with
>> id
>> >> 'myComponent' in [MarkupContainer [Component id = _message_attr_303]].
>> This
>> >> means that you declared wicket:id=myComponentin your markup, but that
>> you
>> >> either did not add the component to your page at all, or that the
>> hierarchy
>> >> does not match.
>> >>
>> >
>> >
>> > The first suspicious thig I noticed here was the "_message_attr_303" in
>> the
>> > component hierarchy. Digging through the code, I found in
>> > WicketMessageTagHandler that this id is given to components with
>> > wicket:message attributes and without wicket:id's.
>> >
>> > So, maybe what's happening here is that the <table> tag is being assigned
>> a
>> > wicket:id and Wicket expects me to add 'myComponent' to the automatically
>> > generated _message_attr_303... Should it be fixed by modelling the
>> <table>
>> > tag with a webmarkupcontainer and adding 'myComponent' to it ?
>> >
>> > Cheers,
>> > Xavier
>> >
>>
>> ---------------------------------------------------------------------
>> 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: wicket:message attribute in regular html tags with child components

Posted by Xavier López <xa...@gmail.com>.
Hi, I'd expect it to lie in the ContainerComponent's folder, assuming
ContainerComponent is the the Page or Panel associated with that markup...
In other words, getString("myresource") from that component would find it.

Does this have something to do with that error ?

Thanks,
Xavier

2010/4/28 Igor Vaynberg <ig...@gmail.com>

> when you have markup like:
>
> <table wicket:message="summary:myresource">
> > <tr><td><span wicket:id="myComponent"></span></td></tr>
> > </table>
>
> where do you expect your localized message to go?
>
> -igor
>
> On Wed, Apr 28, 2010 at 2:51 AM, Xavier López <xa...@gmail.com> wrote:
> > Hi,
> >
> > I have just bumped into a particular situation, I think I know what's
> > happening but I'd like to share and, if possible, have it confirmed here.
> > Additionally, some info on this subject could be added to the wiki page
> >
> https://cwiki.apache.org/WICKET/wickets-xhtml-tags.html#Wicket%27sXHTMLtags-Attributewicket:message
> >
> > In a regular <table> html tag (wicket:id-less), I'd like to have a
> > wicket:message attribute (for the 'summary' attribute) in order to take
> > advantage from wicket's localization mechanism. Under this tag, I have a
> > number of wicket components. My surprise came when I found the following
> > error:
> >
> > <table wicket:message="summary:myresource">
> >> <tr><td><span wicket:id="myComponent"></span></td></tr>
> >> </table>
> >>
> >> org.apache.wicket.markup.MarkupException: Unable to find component with
> id
> >> 'myComponent' in [MarkupContainer [Component id = _message_attr_303]].
> This
> >> means that you declared wicket:id=myComponentin your markup, but that
> you
> >> either did not add the component to your page at all, or that the
> hierarchy
> >> does not match.
> >>
> >
> >
> > The first suspicious thig I noticed here was the "_message_attr_303" in
> the
> > component hierarchy. Digging through the code, I found in
> > WicketMessageTagHandler that this id is given to components with
> > wicket:message attributes and without wicket:id's.
> >
> > So, maybe what's happening here is that the <table> tag is being assigned
> a
> > wicket:id and Wicket expects me to add 'myComponent' to the automatically
> > generated _message_attr_303... Should it be fixed by modelling the
> <table>
> > tag with a webmarkupcontainer and adding 'myComponent' to it ?
> >
> > Cheers,
> > Xavier
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: wicket:message attribute in regular html tags with child components

Posted by Igor Vaynberg <ig...@gmail.com>.
when you have markup like:

<table wicket:message="summary:myresource">
> <tr><td><span wicket:id="myComponent"></span></td></tr>
> </table>

where do you expect your localized message to go?

-igor

On Wed, Apr 28, 2010 at 2:51 AM, Xavier López <xa...@gmail.com> wrote:
> Hi,
>
> I have just bumped into a particular situation, I think I know what's
> happening but I'd like to share and, if possible, have it confirmed here.
> Additionally, some info on this subject could be added to the wiki page
> https://cwiki.apache.org/WICKET/wickets-xhtml-tags.html#Wicket%27sXHTMLtags-Attributewicket:message
>
> In a regular <table> html tag (wicket:id-less), I'd like to have a
> wicket:message attribute (for the 'summary' attribute) in order to take
> advantage from wicket's localization mechanism. Under this tag, I have a
> number of wicket components. My surprise came when I found the following
> error:
>
> <table wicket:message="summary:myresource">
>> <tr><td><span wicket:id="myComponent"></span></td></tr>
>> </table>
>>
>> org.apache.wicket.markup.MarkupException: Unable to find component with id
>> 'myComponent' in [MarkupContainer [Component id = _message_attr_303]]. This
>> means that you declared wicket:id=myComponentin your markup, but that you
>> either did not add the component to your page at all, or that the hierarchy
>> does not match.
>>
>
>
> The first suspicious thig I noticed here was the "_message_attr_303" in the
> component hierarchy. Digging through the code, I found in
> WicketMessageTagHandler that this id is given to components with
> wicket:message attributes and without wicket:id's.
>
> So, maybe what's happening here is that the <table> tag is being assigned a
> wicket:id and Wicket expects me to add 'myComponent' to the automatically
> generated _message_attr_303... Should it be fixed by modelling the <table>
> tag with a webmarkupcontainer and adding 'myComponent' to it ?
>
> Cheers,
> Xavier
>

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


Re: Wizards, urls & parameters

Posted by Jeremy Thomerson <je...@wickettraining.com>.
Nevermind - you're most likely using redirect after post (since it's
default).  So, the URL you are referring to is most likely the one that
actually appears after you redirect.  If so, that means the solution I
mentioned a minute ago won't work.  I'm going to bed now.

--
Jeremy Thomerson
http://www.wickettraining.com



On Thu, Apr 29, 2010 at 12:33 AM, Jeremy Thomerson <
jeremy@wickettraining.com> wrote:

> On the form, could you try something like this?  I've never tried it - but
> it might work:
>
> @Override
> protected void onComponentTag(final ComponentTag tag) {
>     super.onComponentTag(tag);
>     String action = tag.get("action");
>     tag.put("action", action + "&myStep=foo");
> }
>
>
> --
> Jeremy Thomerson
> http://www.wickettraining.com
>
>
>
>
> On Wed, Apr 28, 2010 at 5:29 AM, Rommert de Bruijn <r....@func.nl>wrote:
>
>> Hi all,
>>
>> I'm maintaining a web application that's mostly based on wizard steps. My
>> question is about the way the wizard modifies the urls.
>>
>> I realize that once I've entered the wizard flow, my url's are modified by
>> wicket to look like [url]/?wicket:interface=:1::::. I've read earlier posts
>> on wizards & urls, and I agree that a wizard step should not (and probably
>> can not) be a bookmarkable page. But is it possible to add parameters to the
>> url modified by wicket?
>>
>> What I would like to accomplish (mainly for farming statistics about the
>> visited steps) is to have an identifier of the current step be displayed in
>> the url. So when I'm at step 3 I'd like to see the wicket-formatted
>> [url]/?wicket:interface=:1::::, but with an additional parameter
>> stepIdentifier=3, resulting in something like
>> [url]/?wicket:interface=:1::::&stepIdentifier=3. That way -I hope- a tool
>> like Google Analytics can show me the number of visits for each step.
>>
>> Is it possible to add parameters to a wicket-generated url? I've set up a
>> simple POC with the StaticWizard from WizardExamples but once I'm in the
>> wizard flow I do not have any control over the url, it seems.
>>
>> Thanks in advance,
>> Rommert
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>

Re: Wizards, urls & parameters

Posted by Jeremy Thomerson <je...@wickettraining.com>.
On the form, could you try something like this?  I've never tried it - but
it might work:

@Override
protected void onComponentTag(final ComponentTag tag) {
    super.onComponentTag(tag);
    String action = tag.get("action");
    tag.put("action", action + "&myStep=foo");
}


--
Jeremy Thomerson
http://www.wickettraining.com



On Wed, Apr 28, 2010 at 5:29 AM, Rommert de Bruijn <r....@func.nl>wrote:

> Hi all,
>
> I'm maintaining a web application that's mostly based on wizard steps. My
> question is about the way the wizard modifies the urls.
>
> I realize that once I've entered the wizard flow, my url's are modified by
> wicket to look like [url]/?wicket:interface=:1::::. I've read earlier posts
> on wizards & urls, and I agree that a wizard step should not (and probably
> can not) be a bookmarkable page. But is it possible to add parameters to the
> url modified by wicket?
>
> What I would like to accomplish (mainly for farming statistics about the
> visited steps) is to have an identifier of the current step be displayed in
> the url. So when I'm at step 3 I'd like to see the wicket-formatted
> [url]/?wicket:interface=:1::::, but with an additional parameter
> stepIdentifier=3, resulting in something like
> [url]/?wicket:interface=:1::::&stepIdentifier=3. That way -I hope- a tool
> like Google Analytics can show me the number of visits for each step.
>
> Is it possible to add parameters to a wicket-generated url? I've set up a
> simple POC with the StaticWizard from WizardExamples but once I'm in the
> wizard flow I do not have any control over the url, it seems.
>
> Thanks in advance,
> Rommert
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Wizards, urls & parameters

Posted by Rommert de Bruijn <r....@func.nl>.
Hi all,

I'm maintaining a web application that's mostly based on wizard steps. 
My question is about the way the wizard modifies the urls.

I realize that once I've entered the wizard flow, my url's are modified 
by wicket to look like [url]/?wicket:interface=:1::::. I've read earlier 
posts on wizards & urls, and I agree that a wizard step should not (and 
probably can not) be a bookmarkable page. But is it possible to add 
parameters to the url modified by wicket?

What I would like to accomplish (mainly for farming statistics about the 
visited steps) is to have an identifier of the current step be displayed 
in the url. So when I'm at step 3 I'd like to see the wicket-formatted 
[url]/?wicket:interface=:1::::, but with an additional parameter 
stepIdentifier=3, resulting in something like 
[url]/?wicket:interface=:1::::&stepIdentifier=3. That way -I hope- a 
tool like Google Analytics can show me the number of visits for each step.

Is it possible to add parameters to a wicket-generated url? I've set up 
a simple POC with the StaticWizard from WizardExamples but once I'm in 
the wizard flow I do not have any control over the url, it seems.

Thanks in advance,
Rommert

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