• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
  • Piet Souris
  • Himai Minh

JSF - Renderized String of tags...

Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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 value="Informes" action="#{navegacionMB.accesoFuncionalidadAction}">
<f:param name="paramIdAccesoFuncionalidad" value="1"/>
<h:commandLink ....

and I put it in my page:

<h:outputText value="#{breadCrumbMB.cadena}"></h:outputText>

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!!
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
A teeny tiny vulgar attempt to get you to buy our stuff
Free, earth friendly heat - from the CodeRanch trailboss
    Bookmark Topic Watch Topic
  • New Topic