omnifaces / optimusfaces

Utility library for OmniFaces + PrimeFaces combined
Other
43 stars 10 forks source link

Custom actions do not work without exportable or searchable #18

Closed mydeadlyvenoms closed 6 years ago

mydeadlyvenoms commented 6 years ago

<ui:define name="actions">...</ui:define> does not work without setting exportable or searchable to true.

BalusC commented 6 years ago

This is less or more a technical limitation. It's not possible to check whether a specific <ui:define> is defined. In order to support alone <ui:define name="actions"> without searchable/exportable, it would be necessary to always declare the <f:facet name="header"> of the underlying <p;dataTable>. But its renderer has the nasty behavior that it will always add some markup to it even though its contents is empty (i.e. when you aren't at all using searchable/exportable/actions), resulting in a slightly odd looking empty header.

I'll have to muse a bit on the best approach first.

BalusC commented 6 years ago

I have added <op:dataTable ... actionable="true"> for this specific case.

Not nice, but there's no other way without JSF impl specific hacks.

mydeadlyvenoms commented 6 years ago

Hi @BalusC thank you for your help, unfortunately the actionable param seems not to trigger as the <ui:define name="actions"> is still gone after removing exportable and searchable. Am I missing something?

BalusC commented 6 years ago

Build failed so the SNAPSHOT JAR with the fix wasn't created. I will fix failing build later.