You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by "De Soza, Jean-Pierre" <Je...@hp.com> on 2009/07/10 11:08:00 UTC

Dynamic links in inmethod DataGrid

Hello,

I'm facing a very specific issue with Links in a cell of the inmethod DatGrid:

-        If I use a link with a static text next to a label with a variable text, the link works perfectly:

<label wicket:id="label">A variable text</label>&nbsp;<a href="some url" wicket:id="link">Read More...</a>

-        Now if I change the hierarchy (in markup and in java), the same link won't work:

<a href="some url" wicket:id="link"> <label wicket:id="label">A variable text</label></a>
Curiously enough, if you view the source of the page in the browser, and copy the generated href and paste it in a new browser window, the link works as expected.
Any experience or idea on this?

Jean-Pierre DE SOZA
Software Engineer



Re: Dynamic links in inmethod DataGrid

Posted by James Carman <jc...@carmanconsulting.com>.
The wicket:id attributes can be useful during development.  They're
automatically stripped in "deployment" mode.  You might also want to
turn on the setting that tells Wicket to spit out the component path.

On Mon, Jul 13, 2009 at 5:55 PM, satar<st...@gmail.com> wrote:
>
> James, is this similar to calling
> getMarkupSettings().setStripWicketTags(boolean), which I am doing in the
> application init for my app? I saw that in some example somewhere during my
> reading and wondered why would you want to ever include wicket id's in the
> generated html? Is there any good reason one my want the tags in the
> rendered HTML?
> --
> View this message in context: http://www.nabble.com/Dynamic-links-in-inmethod-DataGrid-tp24424621p24470121.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: Dynamic links in inmethod DataGrid

Posted by satar <st...@gmail.com>.
James, is this similar to calling
getMarkupSettings().setStripWicketTags(boolean), which I am doing in the
application init for my app? I saw that in some example somewhere during my
reading and wondered why would you want to ever include wicket id's in the
generated html? Is there any good reason one my want the tags in the
rendered HTML?
-- 
View this message in context: http://www.nabble.com/Dynamic-links-in-inmethod-DataGrid-tp24424621p24470121.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: Dynamic links in inmethod DataGrid

Posted by James Carman <jc...@carmanconsulting.com>.
http://wicket.apache.org/docs/1.4/org/apache/wicket/Component.html#setRenderBodyOnly(boolean)

On Fri, Jul 10, 2009 at 8:17 AM, jpds<je...@hp.com> wrote:
>
> Can you elaborate a little bit, James, I am not sure about what you exactly
> mean.
> Override OnRender for the label?
>
> I'd also like to add another variable in the picture... In fact, the link
> does work, but only with Firefox, not with IE7, and I unfortunately need to
> support both.
>
>
> James Carman-3 wrote:
>>
>> Tell the label to render its body only.
>>
>
> --
> View this message in context: http://www.nabble.com/Dynamic-links-in-inmethod-DataGrid-tp24424621p24426453.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: Dynamic links in inmethod DataGrid

Posted by jpds <je...@hp.com>.
Can you elaborate a little bit, James, I am not sure about what you exactly
mean.
Override OnRender for the label?

I'd also like to add another variable in the picture... In fact, the link
does work, but only with Firefox, not with IE7, and I unfortunately need to
support both.


James Carman-3 wrote:
> 
> Tell the label to render its body only.
> 

-- 
View this message in context: http://www.nabble.com/Dynamic-links-in-inmethod-DataGrid-tp24424621p24426453.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: Dynamic links in inmethod DataGrid

Posted by James Carman <jc...@carmanconsulting.com>.
Tell the label to render its body only.

On Fri, Jul 10, 2009 at 5:08 AM, De Soza,
Jean-Pierre<Je...@hp.com> wrote:
> Hello,
>
> I'm facing a very specific issue with Links in a cell of the inmethod DatGrid:
>
> -        If I use a link with a static text next to a label with a variable text, the link works perfectly:
>
> <label wicket:id="label">A variable text</label>&nbsp;<a href="some url" wicket:id="link">Read More...</a>
>
> -        Now if I change the hierarchy (in markup and in java), the same link won't work:
>
> <a href="some url" wicket:id="link"> <label wicket:id="label">A variable text</label></a>
> Curiously enough, if you view the source of the page in the browser, and copy the generated href and paste it in a new browser window, the link works as expected.
> Any experience or idea on this?
>
> Jean-Pierre DE SOZA
> Software Engineer
>
>
>

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