Clearing selection in datatable: NoRowAvailableException

UI Components for JSF
Post Reply
rasmusson.stefan
Posts: 22
Joined: 26 Mar 2010, 16:00

26 Mar 2010, 16:24

I use a datatable and a dropdown box. The idea is that the dropdown box should select what group of data the table should display.
The problem occured when I added

Code: Select all

window.location.href =
in the onselectComplete in datatable. The error occurs when the navigation is done and I try to go back to the previous page with bowser back button. When I try to change group in the drop down box I get a
javax.faces.model.NoRowAvailableException, I've traced it down to a request variable that seems to be the problem, but when I try to set it the ajaxevent that updates the dropdownbox stops working.

I thing I've work my self into a bad loop here, I thing there is a better solution but I don know what.

Code: Select all

<h:selectOneMenu value="#{OperatorController.eventPk}">
						<f:selectItems value="#{ElectionEventController.electionEventList}" var="n" itemLabel="#{n.id}" itemValue="#{n.pk}"/>
						 <p:ajax event="change" action="#{OperatorController.clearAndReload}" onsuccess="document.form.submit();"/>
</h:selectOneMenu>

Code: Select all

<p:dataTable id="datatable" binding="#{OperatorController.dataTable}" value="#{OperatorController.operatorList}" update="createNew" onselectComplete="window.location.href = 'viewOperator.xhtml';" var="operator" border="1" selectionMode="single" selection="${OperatorController.currentOperator}" paginator="true" rows="10">
Thanks!

/Stefan

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 33 guests