In examining the Visual JSF Editor sample it seems to want to use JSTL forEach inside of the JSF page. From research on the net it appears that this will not work.
I’ve tried to replace this by using the dataTable element but am not having much luck there.
The following code gives me a ” Can’t instantiate class: ”. ”
Does anyone know what might be wrong? Is the example posted in the help section wrong also? It sure seems so.
<body>
<f:view>
<H1>Current Swaps</H1>
<h:dataTable border="1" value="#{SwapBean.allSwaps}" var="thisSwap">
<h:column id="column1">
<f:facet name="header">
<h:outputText value="Name"></h:outputText>
</f:facet>
<h:outputText value="#{thisSwap.name}"></h:outputText>
</h:column>
<h:column id="column2">
<f:facet name="header">
<h:outputText value="Description"></h:outputText>
</f:facet>
<h:outputText value="#{thisSwap.description}"></h:outputText>
</h:column>
</h:dataTable>
</f:view>
</body>