Search code examples
javatapestry

How can I hide extra component span tags in Tapestry?


If I use a span tag to render a component like <span jwcid="@If" .../>, my HTML ends up with a bunch of useless span tags. Most of the time, that's ok, but in some cases, it's interfering with my CSS or making the page invalid. Is there a way to tell Tapestry to process the tag, but not actually render it?


Solution

  • Take a look at org.apache.tapestry.renderTags Tapestry configuration property:

    Specifies whether or not some block level components will render their template tag names by default.

    This currently affects the If, Else and For components.

    You can also specify the renderTag parameter for a particular component instance, see the If component documentation.