wood burning stoves 2.0*
The moose likes JSF and the fly likes JSF - Renderized String of tags... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "JSF - Renderized String of tags..." Watch "JSF - Renderized String of tags..." New topic
Author

JSF - Renderized String of tags...

David Salaete
Greenhorn

Joined: Aug 27, 2008
Posts: 19
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!!


There are 10 types of people: Those who understand binary code and those who don�t.
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSF - Renderized String of tags...