File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSF and the fly likes <li> around outputtext Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "<li> around outputtext" Watch "<li> around outputtext" New topic

<li> around outputtext

Frank Jacobsen
Ranch Hand

Joined: May 17, 2002
Posts: 358
In html i would have written li around the text, but what do i do i jsf, i have tried many things but i dident find the right solution ?


Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17417

4 possible solutions, but nothing I know of is guaranteed 100%:

1. Use the <ul> and <li> tags in the traditional way but quote them using <f:verbatin>.

2. Stuff the HTML in by brute force and depend that the implementation of JSF and supporting framework, if any (e.g.: Facelets) will pass them through.

3. Implement a custom JSF tag definition that has an HTML renderer that creates bulleted items (cleanest approach, but it's more work).

4. Define CSS styles for the displayed are that do the bulleting in CSS.

An IDE is no substitute for an Intelligent Developer.
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
If you're using JSF 1.2, just do it as you want.
If you're still at 1.1 or older, then you indeed have to wrap it with f:verbatim.
I agree. Here's the link:
subject: <li> around outputtext
It's not a secret anymore!