Forum Stats

  • 3,827,999 Users
  • 2,260,846 Discussions
  • 7,897,427 Comments

Discussions

Menu in tamplate?

575792
575792 Member Posts: 68
edited Nov 14, 2008 12:35AM in JDeveloper and ADF
I create a menu into tamplate page and configure each commandMenuItem with the action that defined in the faces-config.

I create two pages using same tamplate.. and when i try to use menu to navegate from one to another .. it didn´t do!

i already has mi commandMenuItems with PartialTrigger = false..

so is not posible has Menu in Template? or what could be the problem!!...
Tagged:

Best Answer

  • Shay Shmeltzer-Oracle
    Shay Shmeltzer-Oracle Director of Product Management for Oracle's Cloud Development Tools Posts: 16,867 Employee
    Answer ✓
    The menu items work for me when I have global navigation rules in the adfc-config.xml file:
    <?xml version="1.0" encoding="windows-1252" ?>
    <adfc-config xmlns="http://xmlns.oracle.com/adf/controller" version="1.2">
      <view id="untitled1">
        <page>/untitled1.jspx</page>
      </view>
      <view id="untitled2">
        <page>/untitled2.jspx</page>
      </view>
      <control-flow-rule>
        <from-activity-id>*</from-activity-id>
        <control-flow-case>
          <from-outcome>second</from-outcome>
          <to-activity-id>untitled2</to-activity-id>
        </control-flow-case>
      </control-flow-rule>
      <control-flow-rule>
        <from-activity-id>*</from-activity-id>
        <control-flow-case>
          <from-outcome>first</from-outcome>
          <to-activity-id>untitled1</to-activity-id>
        </control-flow-case>
      </control-flow-rule>
    </adfc-config>
    And in the template:
              <af:menuBar>
                <af:commandMenuItem text="First" action="first"
                                    partialSubmit="false"/>
                <af:commandMenuItem text="Second" action="second"
                                    partialSubmit="false"/>

Answers

  • Shay Shmeltzer-Oracle
    Shay Shmeltzer-Oracle Director of Product Management for Oracle's Cloud Development Tools Posts: 16,867 Employee
    What is in your faces-config.xml navigation rules?
    Are they directing from one specific page to another? If this is the case then it probably won't make sense to put this in a template since the rule only applies for one page that does this navigation.
    Shay Shmeltzer-Oracle
  • Shay Shmeltzer-Oracle
    Shay Shmeltzer-Oracle Director of Product Management for Oracle's Cloud Development Tools Posts: 16,867 Employee
    Also can you try it out with buttons instead of menus and see if you have different results?
    Shay Shmeltzer-Oracle
  • Shay Shmeltzer-Oracle
    Shay Shmeltzer-Oracle Director of Product Management for Oracle's Cloud Development Tools Posts: 16,867 Employee
    Answer ✓
    The menu items work for me when I have global navigation rules in the adfc-config.xml file:
    <?xml version="1.0" encoding="windows-1252" ?>
    <adfc-config xmlns="http://xmlns.oracle.com/adf/controller" version="1.2">
      <view id="untitled1">
        <page>/untitled1.jspx</page>
      </view>
      <view id="untitled2">
        <page>/untitled2.jspx</page>
      </view>
      <control-flow-rule>
        <from-activity-id>*</from-activity-id>
        <control-flow-case>
          <from-outcome>second</from-outcome>
          <to-activity-id>untitled2</to-activity-id>
        </control-flow-case>
      </control-flow-rule>
      <control-flow-rule>
        <from-activity-id>*</from-activity-id>
        <control-flow-case>
          <from-outcome>first</from-outcome>
          <to-activity-id>untitled1</to-activity-id>
        </control-flow-case>
      </control-flow-rule>
    </adfc-config>
    And in the template:
              <af:menuBar>
                <af:commandMenuItem text="First" action="first"
                                    partialSubmit="false"/>
                <af:commandMenuItem text="Second" action="second"
                                    partialSubmit="false"/>
  • 575792
    575792 Member Posts: 68
    Ey thanks.. that was mi problem : navigation rules arent global...

    It wrorking fine now
This discussion has been closed.