[jboss-user] [JBoss Seam] - @DataModelSelectionIndex always returns 0
gothmog
do-not-reply at jboss.com
Sun Sep 2 08:02:01 EDT 2007
Hi,
I have the following class:
| @Scope(ScopeType.APPLICATION)
| public class EXAccessPoint {
| ...
| @DataModel
| private List<EntryExit> currentAlerts;
| @DataModelSelectionIndex
| private int alertIndex;
| ...
| public void actionAlert() {
| log.info("actionAlert():alertIndex=" + alertIndex);
| alerts.remove(alertIndex);
| calculateAlerts();
| }
|
|
and no matter what element I click in the rendered grid, the alertIndex is always 0 so it always removes the first item? What am I doing wrong?
Here is is rendered (portion) of the page
| <h:dataTable value="#{entryGate.currentAlerts}" var="alert">
| <h:column>
| <f:facet name="header">Alert</f:facet>
| <h:commandLink action="#{entryGate.actionAlert}">#{alert.message}"</h:commandLink>
| </h:column>
| </h:dataTable>
|
Thanks
Troy
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4080291#4080291
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4080291
More information about the jboss-user
mailing list