1

I want to add conditionally add some arguments to a p:dataTable like described in Conditionally render element's attribute in a composite component. But even without the c:if I get an java.lang.IllegalArgumentException: argument type mismatch (Stacktrace on pastebin).

...
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:p="http://primefaces.org/ui"
...

<p:dataTable var="r" value="#{myBean.values}" >
  <f:attribute name="paginator" value="true" />
</p:dataTable>

The error does not occur (and the paginator is available) if I add the attribute directly <p:dataTable ... paginator="true">. My environment is Primefaces 3.4.1 with JBoss 7.1.1-Final.

Community
  • 1
  • 1
Thor
  • 6,607
  • 13
  • 62
  • 96
  • not sure about your approach, but I think you might tweak the following approach to your needs http://jdevelopment.nl/easily-disable-sorting-primefaces-3s-datatable/ its working great for the sorting... really a great article its written by Arjan Tijms , (BalusC co worker)! – Daniel Oct 22 '12 at 07:34
  • Thank's interesting article. Currently I'm trying to solve a similar issue with filtering. – Thor Oct 22 '12 at 08:07

1 Answers1

3

Try passing it as EL object:

<f:attribute name="paginator" value="#{true}" />
Akos K
  • 7,071
  • 3
  • 33
  • 46