Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

javax.el.PropertyNotFoundException on composite method reference

 
Evaristo Perez
Greenhorn
Posts: 4
Eclipse IDE Hibernate Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've got a a4j:actionbuttn in a composite with its action passed as parameter. It works, it executes its action, but throws this exception:



Propiedad 'borrarTipoItv' no hallada en el tipo com.itym.gui.model.catalogs.CatalogoTiposITVBean
Property 'borrarTipoItv' not found int type com.itym.gui.model.catalogs.CatalogoTiposITVBean


My composite is as follows:



And it's used as:



And the method is as follows:



I've tried everything, but always get the same result. Any ideas?

EDIT: Using Mojarra 2.1.7, Springs 3.1, etc etc etc
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18014
47
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, considering that the message is "Propiedad 'borrarTipoItv' no hallada en el tipo com.itym.gui.model.catalogs.CatalogoTiposITVBean", I would expect that Facelets is interpreting "borrarTipoItv" to be a property name, not an action method name and it's unhappy because it can't find "getBorrarTipoItv()" and "setBorrarTipoItv()"

Looking at the javadocs for the attribute tag, I notice that their syntax for action methods is different:



I think that the major fault is that you didn't specify that it was an action, but it might also want the more general signature as well.
 
Evaristo Perez
Greenhorn
Posts: 4
Eclipse IDE Hibernate Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I finally found it.

When a method invoked in a composite throws an exception, it always returns "Property not found Exception" regardless of the actual exception.

The method was throwing an exception in the last line, so i didn't notice and i thought it was executed OK.
 
suresh selva
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI, am using facelet and got same exp.This code run in app sever but it does not in web server tomcat . i have dought Facelets dont support in webserver tomcat??? A
Caused by: javax.faces.FacesException: javax.el.PropertyNotFoundException: /facelets/agency.xhtml @660,94 rendered="#{ContactNames.visible}": ELResolver cannot handle a null base Object with identifier 'ContactNames'
at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:393)
at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:111)
at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxChildren(AjaxChildrenRenderer.java:83)
at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:157)
at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxChildren(AjaxChildrenRenderer.java:83)
at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:157)
at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxChildren(AjaxChildrenRenderer.java:83)
at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:157)
at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxChildren(AjaxChildrenRenderer.java:83)
at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:157)
at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxChildren(AjaxChildrenRenderer.java:83)
at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:157)
at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxChildren(AjaxChildrenRenderer.java:83)
at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:157)
at org.ajax4jsf.renderkit.AjaxContainerRenderer.encodeAjax(AjaxContainerRenderer.java:123)
at org.ajax4jsf.component.UIAjaxRegion.encodeAjax(UIAjaxRegion.java:263)
at org.ajax4jsf.component.AjaxViewRoot$4.invokeContextCallback(AjaxViewRoot.java:489)
at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:711)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic