sorry guys but I can't figure out how to pass the commandlink to
identify the right object to the action in the next action in
nevigation..

i save my jsp with dataTable

   <f:view>
<html>
  <head>
    <title></title>
  </head>
  <body>
  <h:form>
      <h:dataTable var="myUser" value="#{user.allUsers}" >
            <h:column>
                <f:facet name="header">
                    username
                </f:facet>
                
                <h:outputText value="#{myUser.name}"  />
            </h:column>
            <h:column>
                <f:facet name="header">
                    action
                </f:facet>
                <h:commandLink action="#{user.showUserDetail}" >
                    <f:param name="id" value="#{myUser.id}"/>
                    <h:outputText value="show user details"/>
                </h:commandLink>
            </h:column>

      </h:dataTable>
      </h:form>
  </body>
</html>
</f:view>

and my action method

public String showUserDetail(){
        setName("pine");
        setId(1);
        return "ok";

    }

and a simple page  

<f:view>
      <head>               
         <title>A Simple JavaServer Faces Application</title>
      </head>
      <body>
         <h:form>
            <h3>
               Welcome to JavaServer Faces, 
               <h:outputText value="#{user.name}"/>!
            </h3>
         </h:form>
      </body>      
   </f:view>

I set the navigation as follow

<navigation-rule>
       <from-view-id>/userlist.jsp</from-view-id>
       <navigation-case>
           <from-outcome>ok</from-outcome>
       <to-view-id>/welcome.jsp</to-view-id>
  </navigation-case>

the command link do not follow the navigation rule... why?

thanks again

Sam

Reply via email to