I'm thinking that the current fix is broken, and the right solution may be that for HTML markup, always use EndTagStyle.REQUIRE. That means a <br/> in a template will render a <br></br>, but other than than those minor quibbles, it will work more in line with how SGML/HTML treats empty elements.
On Tue, Nov 25, 2008 at 6:32 AM, Nicolas Charles <[EMAIL PROTECTED]> wrote: > You could override the MarkupWriterFactory to prevent the abreviation of the > <b/> tag > It should look like this > > public class XhtmlMarkupWriterFactoryImpl implements MarkupWriterFactory { > private final String applicationCharset; > private final MarkupModel xmlModel = new DefaultMarkupModel() { > private final Set<String> DONT_ABRV = new HashSet<String>(Arrays.asList("b", > "select")); > @Override > public EndTagStyle getEndTagStyle(String element) { > boolean isDontAbr = DONT_ABRV.contains(element); > return isDontAbr ? EndTagStyle.REQUIRE : EndTagStyle.ABBREVIATE; > } > @Override > public boolean isXML() { > return true; > } > }; > } > > and alias it in the AppModule : > public static void > contributeAlias(Configuration<AliasContribution<MarkupWriterFactory>> > configuration, > @Inject @Symbol(SymbolConstants.CHARSET) final > String applicationCharset) { > configuration.add(AliasContribution.create(MarkupWriterFactory.class, > new XhtmlMarkupWriterFactoryImpl(applicationCharset))); > } > > > Note that i don't abbreviate the select either, for IE doesn't understand at > all an empty <select/> > > Regards > Nicolas > > Peter Stavrinides wrote: >> >> Tapestry is meant to generate valid XHTML, which means the tag should be >> closed, but due to a bug introduced recently it appears not to with certain >> tags see: >> https://issues.apache.org/jira/browse/TAP5-333 and vote for it to be >> fixed, in the meantime use a <span /> instead, it will work... I use the >> same rounded corner trick! >> >> cheers, >> Peter >> >> ----- Original Message ----- >> From: "akira" <[EMAIL PROTECTED]> >> To: users@tapestry.apache.org >> Sent: Tuesday, 25 November, 2008 2:53:51 AM GMT +02:00 Athens, Beirut, >> Bucharest, Istanbul >> Subject: (newbie) Tapestry generated <b/> >> >> Hi, this is the first time i'm using Tapestry. I'm using a css tricky to >> make rounded corners, the css uses empty b (bold) to create the rounded >> corners, when Tapestry generates the html it creates the open b but doesn't >> create the closing b: >> what i want: <b class="top"></b> >> Tapestry generated code: <b class="top" /> >> There's someplace where i can configure Tapestry to generate close tags >> when there is nothing between the tags? TIA. >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Howard M. Lewis Ship Creator Apache Tapestry and Apache HiveMind --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]