Skip to content

Instantly share code, notes, and snippets.

@JonathanLalou
Created June 19, 2017 04:05
Show Gist options
  • Save JonathanLalou/1234e9d25cbce70d4a6ef67e07f1837f to your computer and use it in GitHub Desktop.
Save JonathanLalou/1234e9d25cbce70d4a6ef67e07f1837f to your computer and use it in GitHub Desktop.
Annoying: #Primefaces's datatable must be declared at lazy=true, otherwise commandButton (at least #Bootsfaces'ones) are ignored
<!-- lazy is true-->
<p:dataTable
id="butterDT"
var="butter" value="#{aBean.butters}"
lazy="true"
>
<p:column>
<!-- will be intercepted and handled at runtime-->
<b:commandButton actionListner="#{aController.doSomething(butter)}"
/>
</p:column>
</p:dataTable>
<!-- lazy is false-->
<p:dataTable
id="peanutDT"
var="peanut" value="#{aBean.peanuts}"
lazy="false"
>
<p:column>
<!-- will be intercepted and handled at runtime-->
<b:commandButton actionListner="#{aController.doSomething(peanut)}"
/>
</p:column>
</p:dataTable>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment