Nevermind, I figured it out:

<t:dataTable binding="#{myBean.dataTable}" rows="#{myBean.rowsPerPage}" 
...>
...
<h:outputText value="Rows per page:"/>
<h:inputText value="#{myBean.rowsPerPage}"/>
...

Thank you,
Eric Jung




Eric Jung/X/PH/Novartis 
05/23/2007 10:37 AM

To
[email protected]
cc

Subject
dataTable rows per page--user-defined??





Hi,

I have a dataTable with dataScroller. I'd like the user to be able to 
change how many rows are displayed per page. The following code displays 
the table and scroller just fine,
<t:dataTable binding="#{myBean.dataTable}" rows="15" ...>
...

But this code causes an exception:

<h:outputText value="Rows per page:"/>
<h:inputText binding="#{myBean.dataTable.rows}"/>

Exception:

Caused by: javax.faces.el.EvaluationException: Bean: 
org.apache.myfaces.component.html.ext.HtmlDataTable, property: rows
        at 
org.apache.myfaces.el.PropertyResolverImpl.setProperty(PropertyResolverImpl.java:410)
        at 
org.apache.myfaces.el.PropertyResolverImpl.setValue(PropertyResolverImpl.java:173)
        ... 55 more
Caused by: java.lang.IllegalArgumentException: argument type mismatch
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at 
org.apache.myfaces.el.PropertyResolverImpl.setProperty(PropertyResolverImpl.java:406)
        ... 56 more

Anyone know what I'm doing wrong?

Thanks,
Eric Jung

_________________________

CONFIDENTIALITY NOTICE

The information contained in this e-mail message is intended only for the 
exclusive use of the individual or entity named above and may contain 
information that is privileged, confidential or exempt from disclosure 
under applicable law. If the reader of this message is not the intended 
recipient, or the employee or agent responsible for delivery of the 
message to the intended recipient, you are hereby notified that any 
dissemination, distribution or copying of this communication is strictly 
prohibited. If you have received this communication in error, please 
notify the sender immediately by e-mail and delete the material from any 
computer.  Thank you.


_________________________

CONFIDENTIALITY NOTICE

The information contained in this e-mail message is intended only for the 
exclusive use of the individual or entity named above and may contain 
information that is privileged, confidential or exempt from disclosure 
under applicable law. If the reader of this message is not the intended 
recipient, or the employee or agent responsible for delivery of the 
message to the intended recipient, you are hereby notified that any 
dissemination, distribution or copying of this communication is strictly 
prohibited. If you have received this communication in error, please 
notify the sender immediately by e-mail and delete the material from any 
computer.  Thank you.

Reply via email to