jsf custom control strange behaviour
Posted
by Cristian Boariu
on Stack Overflow
See other posts from Stack Overflow
or by Cristian Boariu
Published on 2010-04-22T13:21:54Z
Indexed on
2010/04/22
13:23 UTC
Read the original article
Hit count: 181
hi, I have a jsf custom control which contains this:
<rich:column>
<c:if test="#{not empty columnTitle}">
<f:facet name="header">
<rich:spacer/>
</f:facet>
</c:if>
<s:link view="#{view}"
value="#{messages['edit']}"
propagation="#{propagation}">
<f:param name="${paramName}" value="${paramValue}"/>
</s:link>
 
<h:commandLink action="#{entityHome.removeMethodName(entity)}"
value="#{messages['remove']}"/>
</rich:column>
You see that command link action. I want it to call an action like this:
action="#{documentHome.removeProperty(property)"}
Well, in order to do this i call the control like:
<up:columnDetails view="/admin/property.xhtml"
columnTitle="yes"
entity="#{property}"
paramValue="#{property.propertyId}"
propagation="nest"
entityHome="documentHome"
removeMethodName="removeProperty"/>
So, i hardcode entityHome and removeMethodName. Well an error is firing.
Caused by javax.servlet.ServletException with message: "#{entityHome.removeMethodName(entity)}: javax.el.MethodNotFoundException
It seems that it cannot interpret "removeMethodName". If i print entityHome or removeMethodName it correctly shows the values i pass. But i think jsf has an error like not beeing able to "believe" that after an object.something, that something can be a parameter...
Can anyone guide me...?
© Stack Overflow or respective owner