myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robin Müller-Bady <robin.muellerb...@googlemail.com>
Subject Re: ContextMenus
Date Wed, 01 Jul 2009 12:04:31 GMT
*keepalive* :)
My advisor is already laughing at me for my rudimentary results :-)

2009/6/29 Robin Müller-Bady <robin.muellerbady@googlemail.com>

> Dear List,
>
> I´m student in Germany and actually working on a web chat client using
> Apache MyFaces Trinidad for my bachelorthesis. I used the IBM JWL before,
> but for performance reasons, we decided to switch to Trinidad.
> My question is, whether it is possible to build contextMenus out of the
> XMLMenuModel files. I want to show a menubar (like <tr:navigationPane
> hint="bar">) an several sub-menus by clicking on one of the entries. My
> sample xml-file looks like this:
>
>     <menu xmlns="http://myfaces.apache.org/trinidad/menu">
>         <itemNode id="chat" action="#{persons.doChat}"
>             icon="images/tools/chat.png" focusViewID="/test1.jsp"
> label="Chat" />
>         <itemNode id="delete" action="#{persons.doDelete}"
>             icon="images/tools/delete.png" focusViewID="/test1.jsp"
>             label="Delete">
>             <itemNode id="delete1" action="#{persons.doDelete}"
>                 icon="images/tools/delete.png" focusViewID="/test1.jsp"
>                 label="Delete1" />
>         </itemNode>
>         <itemNode id="block" action="#{persons.doBlock}"
>             icon="images/tools/block.png" focusViewID="/test1.jsp"
> label="Block" />
>         <itemNode id="info" action="#{persons.doFetchInfo}"
>             icon="images/tools/info.png" focusViewID="/test1.jsp"
> label="Info" />
>     </menu>
>
>
> The menu hierarchy should be like this:
>
> Menu
> - Chat
> - Delete
> - - Delete1
> - Block
> - Info
>
> but there is the submenu "Delete1" missing.
>
> Menu
> - Chat
> - Delete
> - Block
> - Info
>
> My *.jsp integration of the menu looks like this:
>
>     <tr:navigationPane var="foo" value="#{personMenu}" level="1"
> hint="buttons">
>        <f:facet name="nodeStamp">
>           <tr:commandNavigationItem text="#{foo.label}"
> partialSubmit="true" icon="#{foo.icon}" action="#{foo.doAction}" />
>        </f:facet>
>     </tr:navigationPane>
>
>
> The Entry in my faces-config.xml:
>
>     <managed-bean>
>        <managed-bean-name>personMenu</managed-bean-name>
>
> <managed-bean-class>org.apache.myfaces.trinidad.model.XMLMenuModel</managed-bean-class>
>        <managed-bean-scope>request</managed-bean-scope>
>        <managed-property>
>           <property-name>source</property-name>
>           <value>/main.xml</value>
>        </managed-property>
>     </managed-bean>
>
>
> I already found some examples in the www, but none of these worked
> properly. Another problem is, that this web chat client runs on Websphere
> Application Server 6.1, so I need to use the v1.0.10 of Trinidad for JSF
> 1.1.
> Thank you in advance for your help !
>
> Kind regards,
>
> Robin Mueller-Bady
>

Mime
View raw message