[jboss-user] [JBoss Seam] - How to access h:datatable row data during its iteration
terryb
do-not-reply at jboss.com
Tue Nov 27 22:00:24 EST 2007
I want to access row data to do certain computation on some columns as the datatable iterates to populate itself. That computed value then will be displayed in table's footer.
I also want to just access row index to list on the table.
I tried datatable binding to to UIData in the backing bean but I get EntityManager is Null error?
I think I can't use @DataModel for this purpose, since from what I read it works when user selects a row on table manually.
|
| @Name("paymentReconciliation")
| public class PaymentReconciliation extends EntityQuery {
|
| ...
|
| private UIData tableData = null;
|
| public UIData getTableData() {
| getTableData");
| return this.tableData;
| }
|
| public void setTableData(UIData uiData) {
| this.tableData = uiData;
| }
|
| ...
|
| }
|
| XHTML[\b]
|
| ...
| <h:dataTable id="paymentReconciliationList" var="paymentRecon" value="#{paymentReconciliation.resultList}"
| rendered="#{not empty paymentReconciliation.resultList}" border="1" binding="#{paymentReconciliation.tableData}">
|
| ...
|
| Exception
| 11:51:55,077 ERROR [ExceptionFilter] exception root cause
| java.lang.IllegalStateException: entityManager is null
| at org.jboss.seam.framework.EntityQuery.validate(EntityQuery.java:31)
| at sun.reflect.GeneratedMethodAccessor542.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:20)
| at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:57)
| at org.jboss.seam.interceptors.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:34)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
| at org.jboss.seam.interceptors.TransactionInterceptor$1.work(TransactionInterceptor.java:32)
| at org.jboss.seam.util.Work.workInTransaction(Work.java:37)
| at org.jboss.seam.interceptors.TransactionInterceptor.aroundInvoke(TransactionInterceptor.java:27)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
| at org.jboss.seam.interceptors.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:27)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
| at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:103)
| at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:151)
| at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:87)
| at au.edu.tisc.session.admin.PaymentReconciliation_$$_javassist_97.validate(PaymentReconciliation_$$_javassist_9
| 7.java)
| ...
|
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4108284#4108284
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4108284
More information about the jboss-user
mailing list