I am new to JSF 1.2, I am trying to output some text into my javascript call like so
something(<t:outputText value="#{bean.val}"/>)
but instead of g开发者_开发技巧etting plain text output, this is all being wrapped in a span. How do i get rid of the span?
I am not sure about t:outputText
, but an h:outputText
without any other attribute than value
should not render any HTML element.
something(<h:outputText value="#{bean.val}"/>);
If you're using id
, styleClass
or something like that, then it will indeed render a <span>
since those attributes has to get somewhere anyway.
If you're using Facelets as view technology instead of legacy JSP, then you could also just use EL in template text like follows:
something(#{bean.val})
what about simply putting:
something("#{bean.val}");
精彩评论