2 Replies Latest reply on Aug 20, 2007 11:27 AM by Ning Zhao

    Conditionally Rendering Parameters

    Lloyd Closson Newbie

      I have a seam-gen page with the following in the pages.xml file.

      <page view-id="/admin/manage-customers.xhtml">
       <param name="firstResult" value="#{customerList.firstResult}"/>
       <param name="order" value="#{customerList.order}"/>
       <param name="from"/>
       <param name="firstName" value="#{customerList.customer.firstName}"/>
       <param name="lastName" value="#{customerList.customer.lastName}"/>
       <param name="emailAddress" value="#{customerList.customer.emailAddress}"/>

      When I enter a value in the form for the first name, all of the parameters are rendered in the URL:


      This triggers my model validation and I get the error that the Email Address must be well formed. If I manually remove the emailAdress param all works well. How do I prevent the empty email param from being rendered?