You need to declare the tag attribute as a method expression attribute in the .taglib.xml
by explicitly declaring a <method-signature>
. It indeed defaults to a value expression.
<tag>
<tag-name>DemoDialog</tag-name>
<source>DemoDialog.xhtml</source>
<attribute>
<name>okButtonActionListener</name>
<method-signature>void actionListener(javax.faces.event.ActionEvent)</method-signature>
</attribute>
</tag>
(the method name actionListener
is fully free to your choice; what counts are the return type and parameter types, those have to be fully qualified names)
Additional bonus, explicitly declaring tag attribtues in .taglib.xml
enables IDE autocompletion on those.