READ MORE >> Oprekan.
I’m making a search engine for ontology using Sesame as its server engine. Querying and getting results should be done by a bean. Displaying these results should be handled by a view (JSP/JSF). How to do this?
Some pointers:
JSF and the forEach loop. This post discusses how to implement this issue in JSF.
Java Technology Forums - loop over hashMap (c:forEach for JSF). This discussion suggest for not thinking in JSTL when programming with JSF. JSF provides datatable for this purpose.
Tag name: af:forEach . There is an implementation in the ADF Faces (oracle punya).
The O’Reilly JSF book mentions that “It’s important to understand that the c:forEach element body can’t include any JSF component custom actions, such as h:outputText. The reason for this limitation has to do with the fact that the number of times the c:forEach action processes its body depends on the runtime value of the items attribute. The first time the page is processed it may loop over the body 10 times, adding new JSF components for the columns in the 10 rows to the view. The next time, it may loop over the body only five times. It would then have to remove the components for the last five rows that were added to the view the last time the page was processed. Part of this particular problem could be solved by letting the component IDs be set by an EL expression, and use the expression to make the IDs unique for the components in each row by appending the row number. It turns out that this opens up another can of worms, so the specification group decided that the best solution was to forbid JSF components actions within the body of a c:forEach action (as well as any other custom actions that loop over the element body) and provide a special component type to deal with tabular data instead. “
READ MORE >> Oprekan.











No Comments on “How to render forEach loop with JSF?”
You can track this conversation through its atom feed.
Leave a Reply