Answer the question
In order to leave comments, you need to log in
How to stop reading a list?
Hello,
please help, I can't figure out how to stop reading from List.
public String NumberOfRecords() {
String n1 = tableCity.get(n2);
n2++;
return n1;
}
<div id="list" >
<f:view>
<h:form>
<p:dataTable var="directory" value="#{dataDB.tableCity}" style="margin-bottom:280px; font-size: 12px">
<!-- <p:ajax event="rowEdit" listener="#{dtEditView.onRowEdit}" update=":form:msgs" />
<p:ajax event="rowEditCancel" listener="#{dtEditView.onRowCancel}" update=":form:msgs" />
-->
<c:forEach items="#{dataDB.columns}" var="obj">
<p:column headerText="#{dataDB.NumberOfColumn()}" >
<h:outputText value="#{dataDB.NumberOfRecords()}" />
</p:column>
</c:forEach>
</p:dataTable>
</h:form>
</f:view>
</div>
I understand with my brain that I need to put some kind of limiter or foreach, but I can’t think of which one.
Severe: Error Rendering View[/directory.xhtml]
javax.el.ELException: /directory.xhtml @63,85 value="#{dataDB.NumberOfRecords()}": java.lang.IndexOutOfBoundsException: Index: 304, Size: 304
.......................
FATAL: JSF1073: javax.el.ELException caught during processing of RENDER_RESPONSE 6 : UIComponent-ClientId=, Message=/directory. xhtml @63,85 value="#{dataDB.NumberOfRecords()}": java.lang.IndexOutOfBoundsException: Index: 304, Size: 304
FATAL: /directory.xhtml @63,85 value="#{dataDB.NumberOfRecords( )}": java.lang.IndexOutOfBoundsException: Index: 304, Size: 304
javax.el.ELException: /directory.xhtml @63,85 value="#{dataDB.NumberOfRecords()}": java.lang.IndexOutOfBoundsException: Index: 304, Size: 304
....................
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question