Java, JSF, PrimeFaces

Object doesn’t support this property or method datatable


if you have “Object doesn’t support this property or method” error when using primefaces datatable in Internet Explorer, it is quite likely that you assign the same name for id and widgetVar for the datatable like:

<p:dataTable id=”documents” widgetVar=”documents”

so if you change one them like widgetVar to “documentsVar” it will be fixed.

Firefox does not have this problem btw.


JSF2.0 passing actions to Composite Components


with JSF 2.0, it is very easy to pass actions to composite components. For example if your composite component is like this:

<composite:attribute name="action" required="true" method-signature="void action(java.lang.String)"/>

<p:commandButton action="#{cc.attrs.action}" value="test me button"/>

then you can use this composite component as :

<custom:testComponent action="#{somePage.testMe('test String')}"/>

as you see, you can pass parameters to the buttons also.

The java side will be as follows btw:

public void testMe(String parameterString){</pre>

easy, huh ?