2 Replies Latest reply on Dec 17, 2007 9:26 AM by Pete Muir

    trouble with h:commandLink and f:param...

    Juraj Holtak Newbie

      hello

      My .xhtml looks like this:

      <f:facet name="Criterion">
       <h:panelGroup>
       <h:commandLink action="input_rating" actionListener="#{t.setNodeSelected}">
       <t:graphicImage value="/img/icons/16x16/actions/jabber_online.png"/>
       <h:outputText value="#{node.description}" styleClass="nodeFolder"/>
       <h:outputText value=" #{node.rating}"/>
       <f:param name="ratingCriterionParId" value="#{node.identifier}"/>
       </h:commandLink>
       </h:panelGroup>
       </f:facet>
      


      navigation.xml contains:
      <navigation-case>
       <from-outcome>input_rating</from-outcome>
       <to-view-id>/rate/inputRating.xhtml</to-view-id>
       <redirect />
      </navigation-case>
      


      then I have a file called inputRating.page.xml:
      <!DOCTYPE pages PUBLIC
       "-//JBoss/Seam Pages Configuration DTD 1.2//EN"
       "http://jboss.com/products/seam/pages-1.2.dtd">
      <page action="#{inputRatingAction.loadRatingCriterion(param.ratingCriterionParId)}">
       <description>Rating category #{ratingCriterion.name}</description>
       <begin-conversation join="true" />
      </page>


      and finaly InputRatingActionImpl.java which contains:
      public RatingCriterion loadRatingCriterion(Object id) {
       if(id!=null){
       ratingCriterion = ratingCriterionHome.find(id);
       }
       return ratingCriterion;
       }


      My problem is, that the id - parameter of loadRatingCriterion always gets a null value and I trully don`t know why...

      When I switch to s:link all works fine, but I must submit the form.

      thanks...