voyent
Problem removing items from ace:list  XML
Forum Index -> Components
Author Message
sreynolds

Joined: 04/Apr/2008 00:00:00
Messages: 62
Offline


I have an ace:list component and a separate ace:pushButton that causes the selected item in the list to be removed. Invoking the button action sometimes, but not always, results in a NoRowAvailableException from the list component.

Any ideas as to what causes this or how to get around it?
ken.fyten

Joined: 26/Oct/2004 00:00:00
Messages: 1338
Offline


Hi,

Pretty hard to tell without a sample. Could you post a simple example app. that demonstrates the issue?

Regards,
Ken

Ken Fyten
VP Product Development
ICEsoft Technologies, Inc.
sreynolds

Joined: 04/Apr/2008 00:00:00
Messages: 62
Offline


Here's a fragment:
<code>
<ace:list
id="theList"
selectionMode="single"
value="#{aSessionBean.selectionList}"
>
<f:selectItems value="#{aSessionBean.itemList}" />
</ace:list>
<ace:pushButton
id="theButton"
type="button"
label="Remove"
actionListener="#{aSessionBean.removeAction}">
<ace:ajax execute="@this theList" render="@all" />
</ace:pushButton>
</code>

The itemList is dynamically constructed as an ArrayList<SelectItem> with each item having a String value.
The button action removes selected string value from its backing data -- the itemList would be reconstructed the next time it is fetched. It also currently removes the corresponding entry from selectionList.

It looks like maybe the problem arises when I remove the end item from the list, and then subsequent processing is using the now-invalid selection index to try to access data in the model.

The error that occurs is:
SEVERE: javax.faces.model.NoRowAvailableException
at javax.faces.model.ListDataModel.getRowData(ListDataModel.java:149)
at org.icefaces.impl.component.UISeriesBase.getRowData(UISeriesBase.java:111)
at org.icefaces.ace.component.list.ListDecoder.processSelections(ListDecoder.java:53)
at org.icefaces.ace.component.list.ListRenderer.decode(ListRenderer.java:74)
at javax.faces.component.UIComponentBase.decode(UIComponentBase.java:832)
...
wsaxton

Joined: 15/Sep/2008 00:00:00
Messages: 105
Offline


Not sure if this thread is too old to necro, but I'm also having this problem where modifying an ace:list via h:commandLink causes:

javax.faces.model.NoRowAvailableException

This happens when I:

a) reorder the list with dragging
b) remove elements with an h:commandLink
wsaxton

Joined: 15/Sep/2008 00:00:00
Messages: 105
Offline


Actually, if you remove the last item of the ace:list and submit the form, it throws this exception every time.
wsaxton

Joined: 15/Sep/2008 00:00:00
Messages: 105
Offline


I filed a bug for this issue: http://jira.icesoft.org/browse/ICE-11229

Code to reproduce the issue and instructions are found in the bug.
ken.fyten

Joined: 26/Oct/2004 00:00:00
Messages: 1338
Offline


Hi,

As per the update to the JIRA, we are unable to reproduce the issue. We don't see the exception when running your example from the JIRA.

Possible there is something else in your configuration that is involved here.

How are you distributing your app, .war?

What other jars do you have on your classpath?

Thx.
Ken

Ken Fyten
VP Product Development
ICEsoft Technologies, Inc.
ken.fyten

Joined: 26/Oct/2004 00:00:00
Messages: 1338
Offline


Okay, we have managed to recreate the exception now. See JIRA for details.

Ken Fyten
VP Product Development
ICEsoft Technologies, Inc.
 
Forum Index -> Components
Go to:   
Powered by JForum 2.1.7ice © JForum Team