Yep. JSF1.1+JSP has problems mixing plain text and jsf tags.

Unless you really need an <h1> tag for some reason, why not just use css styles?
  <h:outputText styleClass="h1" value="foo"/>

Define css style "h1" to be whatever you want, eg
.h1 {
  color: red;
  font-size: large;
}

Of course sometimes an <h1> tag really is a good idea. In particular, screen-readers for the blind etc work better with meaningful markup.

Regards,

Simon

Marcel Stonitsch wrote:
Try <t:htmlTag value="h1"><h:outputText value="#{msg['bla.bla']}" /></t:htmlTag>


Hans Reip schrieb:
Hi,

I'm doing my first steps with JSF and myFaces and I hav a question regarding
html-tags and JSF.

I want to output a resource bundle key inside a <h1> html element. So I did
following:
<h1><h:outputText value="#{msg.inputname_header}"/></h1>

What happens is, that the message from the resource bundle is printed out
and after this the empty <h1>.
No error is returned, so I think it is an basical understanding problem.

I saw, that there is a <t:div> tag in the tomahawk tld but no <t:h1> tag.
What do I do wrong? Isn't it possible to use html tags together with JSF?

Thanks in advance
Regards
Hans



Reply via email to