• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

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

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!!!

 
Saloon Keeper
Posts: 28078
198
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
¡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.

 
I have always wanted to have a neighbor just like you - Fred Rogers. Tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic