Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSF - Renderized String of tags...

 
David Salaete
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I�m doing a JSF web, and I�m using a ManagedBean component that I use to return a link list,
very similar to list of "breadcrumbs".

In the beginning, I returned that link list already builded:

(The method getCadena() of the managed bean returns the list as is

<h:commandLink value="Home" action="#{navegacionMB.accesoFuncionalidadAction}">
<f:param name="paramIdAccesoFuncionalidad" value="-1"/>
</h:commandLink>
<h:commandLink value="Informes" action="#{navegacionMB.accesoFuncionalidadAction}">
<f:param name="paramIdAccesoFuncionalidad" value="1"/>
</h:commandLink>
<h:commandLink ....

and I put it in my page:

<hutputText value="#{breadCrumbMB.cadena}"></hutputText>

but I only obtain the string "as-is" printed in my page, as expected...

But �How can I put the string in such a way that JSF renders it as a command string?

I suppose there�s a way but I can�t find it...

Thank you very much!!
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JSF != HTML.

JSF components must run at the server side and they will produce HTML output. JSF does not run at the client side. The web browser doesn't understand it at all.

Write the components out in the JSF page itself instead of printing the source using outputText.

If you have a List<Breadcrumb> in your bean, then do for example:You can also use Tomahawk's t:dataList instead of c:forEach.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic