File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes  javax.el.PropertyNotFoundException: Objetivo inalcanzable - JSF - Facelet - method-signature Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark " javax.el.PropertyNotFoundException: Objetivo inalcanzable - JSF - Facelet - method-signature" Watch " javax.el.PropertyNotFoundException: Objetivo inalcanzable - JSF - Facelet - method-signature" New topic
Author

javax.el.PropertyNotFoundException: Objetivo inalcanzable - JSF - Facelet - method-signature

Jeronimo Carrizo
Greenhorn

Joined: Aug 17, 2010
Posts: 1
Hello, shows me error in my custom command-button (Navegator) when I try to access the Bean Baking. y try without custom component but is the same result....Anyone have any idea? I did what I was saying even this forum, but neither worked for me: "http://forums.sun.com/thread.jspa?threadID=5446516"


-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Excepcion
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
javax.servlet.ServletException: javax.el.PropertyNotFoundException: Objetivo inalcanzable, identificador 'swithPagesBean' resuelto a nulo
javax.faces.webapp.FacesServlet.service(FacesServlet.java:321)
org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:79)


causa raíz

javax.faces.el.EvaluationException: javax.el.PropertyNotFoundException: Objetivo inalcanzable, identificador 'swithPagesBean' resuelto a nulo
javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:91)
com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:98)
javax.faces.component.UICommand.broadcast(UICommand.java:311)
javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:781)
javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1246)
com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:77)
com.sun.faces.lifecycle.Phase.doPhase(Phase.java:97)
com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:114)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:308)
org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:79)
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


My code is:



BACKING BEAN : "SwithPagesBean" ----------------------------------------------------


public class SwithPagesBean implements Serializable {

private String home = "home";
private String newUserPage = "new_user";
private String modifiUserPage = "modifi_user";

//*Getteres,Setter & constructor *//
}


//This is the first page to run

FILE: "HOME.XHTML" ---------------------------------------------------------------

<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets">


<f:view>
<h:head>
</h:head>
<h:body>
<h:form>
<ui:composition template="template_home.xhtml">
<ui:define name="footer">
<h:form>
<h1>Estas en el home</h1>
</h:form>
</ui:define>
</ui:composition>
</h:form>
</h:body>
</f:view>

</html>

FILE: TEMPLATE_HOME.XHTML -----------------------------------------------------------------------------

<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:p="http://primefaces.prime.com.tr/ui"
xmlns:ui="http://java.sun.com/jsf/facelets">

<f:view>
<h:head>
</h:head>
<h:body>
<div id="layout_intellipost">
<div id="header">
<ui:include src="header.xhtml" />
</div>
<div>
<ui:insert name="footer">
</ui:insert>
</div>
</div>
</h:body>
</f:view>
</html>

FILE: "HEADER.XHTML"-------------------------------------------------------------------------------------------

<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:p="http://primefaces.prime.com.tr/ui"
xmlns:gfu="http://java.sun.com/jsf/composite/gfu">


<f:view>

<ui:composition>
<h:form>
<p:panel id="panel" header="IntelliPos - Caja 66" >
<h:panelGrid columns="6">

<gfu:Navegator action="#{swithPagesBean.newUserPage}" btnModificacionLabel="Modificar Usuario" />

</h:panelGrid>
</p:panel>
</h:form>
</ui:composition>

</f:view>
</html>


FILE: "NAVEGATOR"
---------------------------------------------------------------------------------------------------------------

<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:p="http://primefaces.prime.com.tr/ui"
xmlns:composite="http://java.sun.com/jsf/composite">

<f:view>

<head>
<title>Navegator Alta</title>
</head>
<body>
<composite:interface>

<composite:attribute name="btnModificacionLabel" />
<composite:actionSource name="btnModificacion" />
<composite:attribute name="action" method-signature="java.lang.String f()" targets="btnModificacion" />

</composite:interface>

<composite:implementation>

<h:commandButton id="btnModificacion" value="#{cc.attrs.btnModificacionLabel}"/>

</composite:implementation>
</body>
</f:view>
</html>
---------------------------------------------------------------------------------------------------------
file: "faces-config"

<navigation-rule>
<navigation-case>
<from-outcome>new_user</from-outcome>
<to-view-id>/facelet/alta.xhtml</to-view-id>
</navigation-case>
</navigation-rule>
---------------------------------------------------------------------------------------------------------





When y try to click in my custom command button "navegator", this is to fire the excepcion mentioned.



Thanks Very Much!!!

Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15956
    
  19

¡Welcome to the JavaRanch, Jeronimo!

You have not identified SwithBackingBean to JSF. You must do that either by adding an annotation the the SwithBackingBean class definition or by adding a managed-bean definition to faces-config.xml. If you're using JSF version 1.x, annotations don't work.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
Consider Paul's rocket mass heater.
 
subject: javax.el.PropertyNotFoundException: Objetivo inalcanzable - JSF - Facelet - method-signature
 
Similar Threads
JSF 2.0 Login
Problem trying to send file to browser in JSF
impossible to make work a galleria from primefaces
Facelets Problem
Sorting is not working in my JSF PrimeFaces Datatable and blank (empty) rows are displayed filtering