posts - 0,  comments - 0,  trackbacks - 0
                 In addition to the from-outcome element, there is also a from-action element. That flexibility can be useful if you have two separate actions with the same action string or two action method expressions that return the same action string.

                  For example, suppose that in our quiz application, the startOverAction returns the string "again" instead of "startOver". The same string can be returned by the answerAction. To differentiate between the two navigation cases, you can use a from-action element. The contents of the element must be identical to the method expression string of the action attribute:

            <navigation-case>
               
          <from-action>#{quiz.answerAction}</from-action>
               
          <from-outcome>again</from-outcome>
               
          <to-view-id>/again.jsp</to-view-id>
            
          </navigation-case>
            
          <navigation-case>
               
          <from-action>#{quiz.startOverAction}</from-action>
               
          <from-outcome>again</from-outcome>
               
          <to-view-id>/index.jsp</to-view-id>
            
          </navigation-case>
                                 上文出自:《core JavaServer™ Faces, Second Edition》
          posted on 2007-12-11 18:52 *一凡* 閱讀(194) 評論(0)  編輯  收藏 所屬分類: JSF
          主站蜘蛛池模板: 宁国市| 图木舒克市| 原阳县| 三都| 沙洋县| 榆林市| 铜鼓县| 恩施市| 灵武市| 肃宁县| 北海市| 瑞丽市| 顺平县| 和林格尔县| 温泉县| 葵青区| 梁河县| 安岳县| 宜君县| 茶陵县| 怀宁县| 集贤县| 文安县| 增城市| 莱芜市| 南通市| 蒲城县| 徐汇区| 白沙| 衡阳市| 新源县| 淮滨县| 桃园县| 莒南县| 雅江县| 论坛| 溧水县| 密山市| 仙游县| 来安县| 金乡县|