Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
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

Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
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: 349
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: 16019

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.

Customer surveys are for companies who didn't pay proper attention to begin with.
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.
It is sorta covered in the JavaRanch Style Guide.
subject: <li> around outputtext