my dog learned polymorphism*
The moose likes JSF and the fly likes Issue with jstl + facelets Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Issue with jstl + facelets " Watch "Issue with jstl + facelets " New topic
Author

Issue with jstl + facelets

Julien Martin
Ranch Hand

Joined: Apr 24, 2004
Posts: 384
Hello,

I am trying to obtain a dynamic menu. I have the following xhtml facelets pages:

menu.xhtml


and in my home page:



The unexpected result is as follows: the contents of both <c:when... and ><c:otherwise is displayed!!!

Can anyone please help?

Thanks in advance,

J.>
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16160
    
  21

JSTL does not work well with JSF, facelets or not.

There are some very nice JSF Menu components out there, however. For example: http://livedemo.exadel.com/richfaces-demo/richfaces/dropDownMenu.jsf


Customer surveys are for companies who didn't pay proper attention to begin with.
Julien Martin
Ranch Hand

Joined: Apr 24, 2004
Posts: 384
Thanks Tim,
I eventually found a solution: that is using the <h:panelGroup with only the rendered attribute. Thus I have no ><span or ><div in my html.
Regards,
J.>
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16160
    
  21

Actually, I recommend little or no actual HTML. JSF tags can generally do everything you need. Sometimes it can be a little awkward, but you'll be in better shape in case you need to adapt the app for a non-HTML platform some day.
 
Consider Paul's rocket mass heater.
 
subject: Issue with jstl + facelets