my dog learned polymorphism*
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
Author

<li> around outputtext

Frank Jacobsen
Ranch Hand

Joined: May 17, 2002
Posts: 353
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 ?

Frank

Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16236
    
  21

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.
 
jQuery in Action, 2nd edition
 
subject: <li> around outputtext