Hi Abhi,
   To answer your question:
1) trinidad 1.05, myfaces 1.1.5
2)  <managed-bean>
    <managed-bean-name>globalMenu</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>/WEB-INF/menus/globalMenus.xml</value>
    </managed-property>
  </managed-bean>
  <managed-bean>
    <managed-bean-name>tabMenu</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>/WEB-INF/menus/tabMenus.xml</value>
    </managed-property>
  </managed-bean>
3.  tr:commandNavigationItem , attached also find  code snippet
<tr:commandNavigationItem text="#{menuItem.label}"
                                    accessKey="#{menuItem.accessKey}"
                                    action=""
                                    selected="#{menuItem.selected}"
                                   
                                     rendered="#{menuItem.type == 'global'}"
                                    immediate="true"/>
after logged in I tab on one of the tab, say tab "A", and close the browser, other user logged in with their own user id, they see "A" tab is getting the focus.  I tried to setSelected(true) to one of the tab that supposed to be "highlighted", it doesn't take it at all.
 
XMLMenuModel has scope of "request", MenuModelAdapter has the scope of  "session",  I change to "request". MenuTreeModelAdapter has the scope of  "session", I changed to "none".  I still have the same problem.
 
I saw the oracle doc MenuModel has getFocusRowKey(), I'm going to try that.
 
L Wu
-------------- Original message from Abhijit Ghosh <[email protected]>: --------------

Hi,
a)Please let me know which version of Trinidad are you using?
b)Please also paste the faces-config.xml section where you have specified the
  managed bean entry for XMLMenuModel.
c)Can you please explain what you mean,when you say 'state' of the menu,also which
trinidad component are you binding to the XMLMenuModel.

Thanks,
Abhi

On Sat, May 16, 2009 at 1:49 AM, <[email protected]> wrote:
our project have configured XMLMenuModel in faces-config.xml using xml file as source, however
1. the XMLMenuModel menu state is shared among different logged in users, and
2. when closing the browser and log back in again, the previous state of the menu is preserved.
we follows oracle ADF "how to create dynamic navigation menu" and trinidad XMLMenuModel documentation
What needs to be done so that different users have their own menu state and the state can be reset at each session.  I've tried to use setSelect(true) to reset after each logging, it doesn't work
 
 

  <tr:panelPageHeader> 
    <f:facet name="navigationGlobal">
      <tr:navigationPane hint="buttons" var="menuItem"
                         value="#{menuModel_main.model}" level="0"
                         inlineStyle="padding:0em 0em 0.5em;">
        <f:facet name="nodeStamp">
          <tr:commandNavigationItem text="#{menuItem.label}"
                                    accessKey="#{menuItem.accessKey}"
                                    action="#{menuItem.doAction}"
                                    selected="#{menuItem.selected}"
                                    onclick="#{menuItem.onClick}"
                                     rendered="#{menuItem.type == 'global'}"
                                    immediate="true"/>
        </f:facet>
      </tr:navigationPane>
    </f:facet>
    <f:facet name="navigation1">
      <tr:navigationPane hint="tabs" var="tabItem" value="#{tabMenu}" level="0" 
inlineStyle="text-align:left;font-weight:600;">
        <f:facet name="nodeStamp">
          <tr:commandNavigationItem text="#{tabItem.label}"
                                    accessKey="#{tabItem.accessKey}"
                                    action="#{tabItem.doAction}"
                                    selected="#{tabItem.selected}"
                                    rendered="#{tabItem.rendered}"
                                    
inlineStyle="text-align:left;font-weight:600;"/>
        </f:facet>
      </tr:navigationPane>
    </f:facet>
    <f:facet name="navigation2">
      <tr:navigationPane hint="bar" var="buttonItem" value="#{tabMenu}"
                         level="1"   
                         inlineStyle="background-color:#E9EEFF; border-bottom: 
solid 1px #4372AA;">
        <f:facet name="nodeStamp">
          <tr:commandNavigationItem text="#{buttonItem.label}"
                                    accessKey="#{buttonItem.accessKey}"
                                    action="#{buttonItem.doAction}"
                                    disabled="#{buttonItem.disabled}"
                                    rendered="#{buttonItem.rendered}" />
        </f:facet>
      </tr:navigationPane>
    </f:facet>
  </tr:panelPageHeader>

Reply via email to