incubator-adffaces-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Kuno.Baeris...@bkw-fmb.ch>
Subject Node Stamp Facet with an outcome that references to a managed bean
Date Thu, 05 Apr 2007 12:13:44 GMT
Hi all!

I've got another nut to crack. I use the NavigationModel like described in http://incubator.apache.org/adffaces/devguide/navigation.html.


But for my navigation node in the faces-config.xml I need for the outcome property an el expression
that calls an action on a managed bean, like: #{customerAction.logout}. Typically, this action
will initialize the usecase I'm jumping in. The sample uses only simple logical outcome strings.

Instead of calling this action, Trinidad calls the method customerAction.getLogout() and the
application will end up with following error on the first page :

javax.faces.el.PropertyNotFoundException: /layout.xhtml @33,107 value="#{menuModel.model}":
Bean: ....CustomerAction, property: logout
	at com.sun.facelets.el.LegacyValueBinding.getValue(LegacyValueBinding.java:58)
	at org.apache.myfaces.trinidad.bean.FacesBeanImpl.getProperty(FacesBeanImpl.java:67)
	at org.apache.myfaces.trinidad.component.UIXComponentBase.getProperty(UIXComponentBase.java:1118)
	at org.apache.myfaces.trinidad.component.UIXNavigationLevel.getValue(UIXNavigationLevel.java:122)
	at org.apache.myfaces.trinidad.component.UIXCollection._flushCachedModel(UIXCollection.java:1085)
	at org.apache.myfaces.trinidad.component.UIXCollection.encodeBegin(UIXCollection.java:510)
	at org.apache.myfaces.trinidadinternal.uinode.UIComponentUINode._renderComponent(UIComponentUINode.java:317)
	at org.apache.myfaces.trinidadinternal.uinode.UIComponentUINode._renderComponent(UIComponentUINode.java:332)
	at org.apache.myfaces.trinidadinternal.uinode.UIComponentUINode.render(UIComponentUINode.java:279)
	at org.apache.myfaces.trinidadinternal.uinode.UIComponentUINode.render(UIComponentUINode.java:256)
	at org.apache.myfaces.trinidadinternal.ui.composite.ContextPoppingUINode$ContextPoppingRenderer.render(ContextPoppingUINode.java:240)
	at org.apache.myfaces.trinidadinternal.ui.BaseUINode.render(BaseUINode.java:358)
	at org.apache.myfaces.trinidadinternal.ui.BaseUINode.render(BaseUINode.java:313)
	at org.apache.myfaces.trinidadinternal.ui.BaseRenderer.renderChild(BaseRenderer.java:425)
	at org.apache.myfaces.trinidadinternal.ui.BaseRenderer.renderNamedChild(BaseRenderer.java:397)
	at org.apache.myfaces.trinidadinternal.ui.laf.base.desktop.PageHeaderLayoutRenderer._renderTabBar(PageHeaderLayoutRenderer.java:584)
	at org.apache.myfaces.trinidadinternal.ui.laf.base.desktop.PageHeaderLayoutRenderer.renderContent(PageHeaderLayoutRenderer.java:444)

Can I change that behavior?

My facelet looks like this:

      <tr:navigationPane hint="tabs" shortDesc="Whle Tab" var="node" value="#{menuModel.model}">
           <f:facet name="nodeStamp">
              <tr:commandNavigationItem
                text="#{node.label}"
                action="#{node.getOutcome}"/>
            </f:facet>
      </tr:navigationPane>

and one of my navigation nodes in faces-config.xml looks like this:

 <managed-bean>
    <managed-bean-name>navItem_a7</managed-bean-name>
    <managed-bean-class>.....NavigationItem</managed-bean-class>
    <managed-bean-scope>none</managed-bean-scope>
    <managed-property>
      <property-name>label</property-name>
      <value>Abmelden</value>
    </managed-property>
    <managed-property>
      <property-name>viewId</property-name>
      <value>/demo/choosePizza.xhtml</value>
    </managed-property>
    <managed-property>
      <property-name>outcome</property-name>
      <value>#{customerAction.logout}</value>
    </managed-property>
 </managed-bean>    

NOTE that is used an el expression for the outcome. 

I would be glad for your hints.

Thanks

Kuno

Mime
View raw message