3 Replies Latest reply on Feb 19, 2007 11:26 AM by damatrix

    parameterised method receives null object

    damatrix

      I'm using Seam 1.1.6.GA. My problem is with the following bit of code on my facelet:

      <h:form>
       <h:outputLabel for="name" value="Customer's name: "/>
       <h:outputText id="name" value="#{registration.customer.fullname}"/>
       <br/><br/>
       <h:outputLabel for="fair" value="Fair: "/>
       <h:commandLink id="fair" value="#{registration.fair.title}" action="#{advertManager.beginApplication(regisration)"/>
       <br/><br/>
       <h:outputLabel for="category" value="Product category: "/>
       <h:outputText id="category" value="#{registration.category.title}"/>
       <br/><br/>
      </h:form>
      


      The whole page renders with all the outputText values as well as the h:commandLink. However clicking the h:commandLink calls the method expression with the parameter being null.

      I don't understand why the method is called with a null parameter, when that same "registration" object being passed is obviously not null from the page preceding the method call. If it is any help the "registration" object is outjected from a SESSION scoped seam component before being displayed on this page.