2

What's the difference between <ui:fragment> and <s:fragment> ? I use these two tag libraries interchangeably for conditional rendering (using the rendered attribute although I can't find any documentation that states "rendered" is a valid attribute for ui:fragment)

Thanks

Victor Martinez
  • 1,102
  • 2
  • 8
  • 22

2 Answers2

2

Yes rendered is the only difference.

Shervin Asgari
  • 23,901
  • 30
  • 103
  • 143
  • Thank you for your reply. I'm usign facelets with jsf 1.2 and the attribute "rendered" with ui:fragment works correctly, nevertheless i can't find any official documentation stating that "rendered" is a valid attribute for the ui:fragment tag – Victor Martinez Dec 10 '10 at 16:44
  • 2
    That attribute was indeed overlooked in the tag declaration file. They fixed it for JSF 2.1. See also http://download.oracle.com/javaee/6/javaserverfaces/2.1/docs/vdldocs/facelets/ui/fragment.html – BalusC Oct 14 '11 at 15:17
1

Sorry to be late to the party. I agree with Shervin. The "rendered" attribute on ui:fragment isn't documented, but seems to work. I'm using JSF 1.2 on JBoss 4.2.3.

I think you should use the Seam tag if you're using Seam. I'm just working with plain JSF though, so I don't have a choice.

Greg Charles
  • 1,880
  • 4
  • 20
  • 39