It is not weird in my opinion to have it leave the span tag. By leaving it in there, you maintain previewability between your rendered output and the actual template. By removing the span tag, you alter the document model, and hence the way the browser will interpret your document. Also, by leaving the span in there, it opens up the possibility to update the span through ajax calls.

As a side note: you don't /have/ to attach your labels to span tags. The following is equivalent when rendered to the browser:

<td><span wicket:id="foo"></span></td>
add(new Label("foo", "Hello, World").setRenderBodyOnly(true));

and

<td wicket:id="foo"></td>
add(new Label("foo", "Hello, World"));

Martijn

On 2/20/06, Mats Norén <[EMAIL PROTECTED]> wrote:
Hmm...ok, so basically I have to litter my Java code with
setRenderBodyOnly(true) instead. Well, I guess I can live with that.
But it seems a bit weird that the default behaviour for a label is to
leave the span tag. Anyway, thanks for the tip.

On 2/20/06, Alastair Maw <[EMAIL PROTECTED]> wrote:
> Mats Norén wrote:
> > Stupid question,
> > but is it possible to remove the actual span-tags from the output?
> >
> > getMarkupSettings().setStripWicketTags(true);
> >
> > removes the wicket:ids and the other wicket tags, but is it possible
> > to remove the span tags for a label?
> >
> > My output looks almost like the font hell from early Frontpage days,
> > it's completely littered with span tags :)
> >
> > /Mats
>
> You can call setRenderBodyOnly(true) on the Component for your span tag.
>
> Or I suppose one could write a rendering filter that removed all span
> tags that didn't have any attributes set on them, but that would be a
> bit horrid.
>
> Al
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
> for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
> _______________________________________________
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmdlnk&kid3432&bid#0486&dat1642
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user



--
Living a wicket life...

Martijn Dashorst - http://www.jroller.com/page/dashorst

Wicket 1.1.1 is out: http://wicket.sourceforge.net/wicket-1.1

Reply via email to