I am watching this answer or this answer which describes how to make actionListener
for example being reusable in case of facelets as :
<my:tag ... bean="#{myBean}" actionMethod="preFillData" />
...
<h:commandButton ... action="#{bean[actionMethod]}" />
It is good. The thing is I am confused about what if the values are null for example? Something like this but I am not sure is it workable in case jsf syntax (see next snippet) :
not tested
<h:commandButton ... action="#{(bean==null||actionMethod==null?myBeanB[myMethodB]:bean[actionMethod])}" />
The alike expression is causes Illegal Syntax for Set Operation
exception being thrown... so I am not sure about the syntax :(*
So my question is... how to analyze the attribute(s) have values on client side?