Is there any way of iterating over a list in JSF 1.2 without using any third party components? I know I can do it using Tomahawk. I also know that it can be done using JSTL, but I am keeping that as my last resort. Also I cannot use <ui:repeat>
since we are using JSF 1.2. Is there any elegant way like <ui:repeat>
to do it in jsf 1.2?
相关问题
- java.lang.NullPointerException at java.io.PrintWri
- h:selectOneMenu in p:dataTable doesn't submit
- PrimeFaces block UI does not work when the compone
- primefaces orderlist not getting updated with the
- JSF2 composite cc.attrs expression does not evalua
相关文章
- How to allow numbers only using f:validateRegex
- JSF 2.0: ajax request when press ENTER
- Formatting a double in JSF
- f:convertNumber on Double: ClassCastException
- SeamPhaseListener - Could not start transaction -
- How do I access EJB bean when inside a custom Conv
- Getting value from dynamically created inputText
- JSF 2.0 javascript onload/oncomplete
The only JSF 1.2 component which can iterate over a
List
is the<h:dataTable>
.In JSP, the only other "standard" (i.e. not "3rd party") tag which can iterate over a
List
is the JSTL<c:forEach>
. Using JSTL shouldn't harm that much if theList
which you'd like to iterate over is already available during view build time. You'll only run into trouble when it's only available during view render time, for example because it's been nested in a<h:dataTable>
and should be iterating over a property of table'svar
. This just won't work due to reasons also mentioned in JSTL in JSF2 Facelets... makes sense?There are no other ways without using a 3rd party library such as Tomahawk's
<t:dataList>
, unless you're open to reinventing the wheel by creating a customUIComponent
yourself. This is however not a trivial job.It's however possible to integrate Facelets 1.x in JSF 1.2. A guide is described in the Facelets 1.x docbook. This is only going to be quite some of work if you already have an existing JSF application using JSP as view technology; you'd need to convert JSP to Facelets. But it'll in end make the upgrade path to JSF 2.x so much easier. See also a.o. Migrating from JSF 1.2 to JSF 2.0 and Why Facelets is preferred over JSP as the view definition language from JSF2.0 onwards?