Can you please send me your menu metadata file? your "node" should
have "destination" attribute in your node (.e.g. ItemNode) that has a
URL to the page you want to go to directly. So your menu metadata
should look like this for the itemNode you want to use to navigate
outside your application:
<itemNode id="gin2" label="global2" icon="/components/images/globalprefs.gif"
destination="http://www.otherapp.com/index.jspx"
focusViewId=""/>
Your commandNavigationItem in your .jspx should look like:
<af:navigationPane level="1" var="menuInfo" value="#{root_menu}" hint="tabs">
<f:facet name="nodeStamp">
<!-- Handle itemNodes -->
<af:commandNavigationItem text="#{menuInfo.label}"
action="#{menuInfo.doAction}"
destination=#(menuInfo.destination}"
icon="#{menuInfo.icon}"
rendered="#{menuInfo.rendered}"
disabled="#{menuInfo.disabled}"/>
</f:facet>
</af:navigationPane>
Dolinski, Jim (DotComm) wrote:
Gary,
I found this in the help docs,
"If both attributes are set on an itemNode, the "destination" attribute
takes precedence and a GET is done."
However, when I add the "destination" attribute to the
commandNavigationItem my menu navigation stops working regardless of
whether I specify destination or action on the itemnode.
I would like to have the functionality to use action for navigation to
pages within my application but for external urls I want to use the
destination (Ie. A separate help application).
I have this working in another application that uses the old menu system
defined in the faces config.
Thanks, Jim
-----Original Message-----
From: Gary Kind (JIRA) [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 18, 2008 3:52 PM
To: Dolinski, Jim (DotComm)
Subject: [jira] Commented: (TRINIDAD-1127) XMLMenu /
CommandNavigationItem
[
https://issues.apache.org/jira/browse/TRINIDAD-1127?page=com.atlassian.j
ira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12606
090#action_12606090 ]
Gary Kind commented on TRINIDAD-1127:
-------------------------------------
Jim, the destination is to be used to navigate directly to a page so no
POST is done. The 'action' attribute navigates to the page specified in
the navigation-case in your faces-config.xml file whose outcome matches
the value of the 'action' attribute.
Since both action and destination are used for navigation, you can only
do one OR the other. We have chosen 'destination' to take precedence
over 'action', so action must be ignored. This is not a bug.
XMLMenu / CommandNavigationItem
-------------------------------
Key: TRINIDAD-1127
URL:
https://issues.apache.org/jira/browse/TRINIDAD-1127
Project: MyFaces Trinidad
Issue Type: Bug
Components: Components
Affects Versions: 1.0.8-core
Environment: Win XP/ Jboss 4.0.4
Reporter: Jim Dolinski
I am using the new XML menu model, it is much simpler and easier to
use, thanks.
I am having problems when using both an action and destination
property on the commandNavigationItem component. When both are used any
actions fail to fire. I looked at the generated html and the href
appears to be empty when the destination is included?
<a href="" name="form:page:3:cmdNavItem" id="form:page:3:cmdNavItem">
If I remove the destination property I recieve:
<a href="#"
onclick="submitForm('form',0,{source:'form:page:3:cmdNavItem'});return
false;" name="form:page:3:cmdNavItem" id="form:page:3:cmdNavItem">
According to the documentation, "If both attributes are set on an
itemNode, the "destination" attribute takes precedence and a GET is
done".
Any help is appreciated,
Jim Dolinski