This content has been marked as final.
Show 1 reply
-
1. Re: Why don't @DataModelSelection and RichFaces' extendedDataTable like each other?
clebiovieira Sep 8, 2011 12:03 PM (in response to poschd)
Daniel Posch wrote on May 17, 2010 16:09:
Hi everyone,
injecting the selected row on a RichFaces extendedDataTable using @DataModelSelection just doesn't work, that is, the annoted attribute is always null. When searching the forum for this issue I figured out that I am not the only one having run into trouble when trying to do that [1] [2]. These topics' solutions seem to work fine, but I have not yet understood what's wrong with using @DataModelSelection and <rich:extendedDataTable/> together? WHY doesn't it work?
Best regards,
Daniel
[1] http://seamframework.org/Community/RichextendedDataTableAndSelection
[2] http://seamframework.org/Community/PreservePreviouslySelectedRowOnRichextendedDatatableAfterSort
Here is some exampe Java/JSF code:@Name("iws1e_detail") @Scope(ScopeType.PAGE) public class IWS1E_detail implements Serializable { @DataModel private List<ViewE1> etList; @DataModelSelection private ViewE1 selectedEt; // <-- always null @Factory(value = "etList") public void findEtList() { // ... } }
<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:s="http://jboss.com/products/seam/taglib" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:a4j="http://richfaces.org/a4j" xmlns:rich="http://richfaces.org/rich" template="layout/template.xhtml"> <ui:define name="body"> <h:form> <rich:extendedDataTable id="etTable" value="#{etList}" var="viewet" sortMode="multi" height="720px" rowClasses="rvgRowOne,rvgRowTwo"> <!-- ... --> </rich:extendedDataTable> </h:form> </ui:define> </ui:composition>
It has already been solved?
I am also trying to solve three days.
The official example is very complicated.