myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Yee <richard.k....@gmail.com>
Subject Re: ContextMenus
Date Wed, 01 Jul 2009 16:20:10 GMT
Robin,
Your jsp has this now:
    <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>

I think it needs this:

    <tr:navigationPane var="foo" value="#{personMenu}" level="0" hint="buttons">
       <f:facet name="nodeStamp">
          <tr:commandNavigationItem text="#{foo.label}"
partialSubmit="true" icon="#{foo.icon}" action="#{foo.doAction}" />
       </f:facet>
    </tr:navigationPane>
    <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>

My setup is not exactly the same as yours. I have tabbed menus in the
first navigation item and then button menus in the 2nd. Not sure if
the two levels of button menus will work the same. Also, I'm using a
level value that is indexed at 0 instead of 1.

-R

On Wed, Jul 1, 2009 at 5:04 AM, Robin
Müller-Bady<robin.muellerbady@googlemail.com> wrote:
> *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