This content has been marked as final.
Show 4 replies
-
1. Re: How to get current row values when renderizing a dataTable?
nbelaevski Dec 23, 2009 4:46 PM (in response to edilmar)Hi,
Take a look at "var" attribute.
-
2. Re: How to get current row values when renderizing a dataTable?
edilmar Dec 23, 2009 5:11 PM (in response to nbelaevski)I think you didn't understand my question.
To get values from dataTable into .xhtml is easy, with "var" attribute of the dataTable.
My problem is: How to get the "var" attribute into the managed bean, to process some logic and return a value for a column.
-
3. Re: How to get current row values when renderizing a dataTable?
sdf1 Dec 23, 2009 7:39 PM (in response to edilmar)Try something like this http://community.jboss.org/message/517715#517715 (this is my solution and some of it works). -
4. Re: How to get current row values when renderizing a dataTable?
nbelaevski Dec 23, 2009 7:51 PM (in response to edilmar)Ok, I'll try to clarify. Here are some suggestions:
1. Use data model listener (can be working wrong for the case of sorting/filtering)
2. Use Seam and pass "var" into the method, like this:
<rich:dataTable var="v"> ... #{someBean.someMethod(v)}
3. Use Application#evaluateExpressionGet to read "var" just from the getter method body:
public String getSomething() { ... VarType var = (VarType) application.evaluateExpressionGet(context, "#{var}", VarType.class); }