myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Fekete (JIRA)" <>
Subject [jira] Commented: (TRINIDAD-1127) XMLMenu / CommandNavigationItem
Date Thu, 08 Jan 2009 09:46:59 GMT


Martin Fekete commented on TRINIDAD-1127:

problem is with using action and destination both at same time this way:

<tr:navigationPane hint="bar" var="foo" value="#{root_menu}" level="0">
	<f:facet name="nodeStamp">
		<tr:commandNavigationItem text="#{foo.label}" action="#{foo.doAction}" immediate="true"destination="#{foo.destination}"
rendered="#{foo.rendered}" />

with menu config like this

<itemNode id="aa" label="AA" destination="/faces/aa.xhtml" focusViewId="/aa.xhtml" />
<itemNode id="bb" label="BB" action="#{myBean.action}" focusViewId="/bb.xhtml" />

navigation will get incorectly rendered. root of this problem is that destination property
when present on commandNavigationItem tag is always evaluated as not null. its either "/faces/aa.xhtml"
in case of itemNode aa or "" (<- this is empty string) in case of item node bb.

this can be easily fixed by converting evaluated empty string to null, but new issue can arise,
if user wants to navigate to destination "". 

> XMLMenu / CommandNavigationItem
> -------------------------------
>                 Key: TRINIDAD-1127
>                 URL:
>             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

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message