日期:2014-05-18  浏览次数:20725 次

刚开始使用jsf,请教跳转问题,谢谢各位
下面是我遇到的问题
<managed-bean>
    <managed-bean-name> custorderDAOImpl </managed-bean-name>
    <managed-bean-class> com.cheers.jzth.custorder.CustOrderDAOImpl </managed-bean-class>
    <managed-bean-scope> session </managed-bean-scope>
  </managed-bean>
 
  <managed-bean>
    <managed-bean-name> custorderinfDAOImpl </managed-bean-name>
    <managed-bean-class> com.cheers.jzth.custorder.CustOrderInfDAOImpl </managed-bean-class>
    <managed-bean-scope> session </managed-bean-scope>
  </managed-bean>
 
    <managed-bean>
    <managed-bean-name> CustOrderInf </managed-bean-name>
    <managed-bean-class> com.cheers.jzth.custorder.CustOrderInf </managed-bean-class>
    <managed-bean-scope> request </managed-bean-scope>
  </managed-bean>

<navigation-rule>
    <from-view-id> /web/custorder/custorderlist.xhtml </from-view-id>
    <navigation-case>
      <from-outcome> success </from-outcome>
      <to-view-id> /web/custorder/custorderlist.xhtml </to-view-id>
    </navigation-case>
    <navigation-case>
      <from-outcome> detail </from-outcome>
      <to-view-id> /web/custorder/custorderdetail.xhtml </to-view-id>
    </navigation-case>
  </navigation-rule>
 
  <navigation-rule>
    <from-view-id> /web/custorder/custorderdetail.xhtml </from-view-id>
    <navigation-case>
      <from-outcome> orderinfoedit </from-outcome>
      <to-view-id> /web/custorder/custorderdetailedit.xhtml </to-view-id>
    </navigation-case>
  </navigation-rule>
 
  <navigation-rule>
    <from-view-id> /web/custorder/custorderdetailedit.xhtml </from-view-id>
    <navigation-case>
      <from-outcome> success </from-outcome>
      <to-view-id> /web/custorder/custorderdetail.xhtml </to-view-id>
    </navigation-case>
  </navigation-rule>


一开始是一个订单列表,点“详细”可以看到订单的详情,实现如下
<h:commandLink   value= "detail "   action= "#{custorderDAOImpl.detail} "   >
      <f:param   value= "#{order.id} "   name= "orderid "   />
</h:commandLink>

String   detail()
{
      ..   取得订单详细列表,
    return   "detail "
}
这一步没有问题,然后是在详细列表中有一个“修改”按钮
<h:commandLink   value= "edit1 "  
    action= "#{custorderinfDAOImpl.editorderinfo} "   >
        <f:param   value= "#{order.comp_id.orderid} "   name= "orderid "   />
        <f:param   value= "#{order.comp_id.merchid} "   name= "merchid "   /> <