1 Reply Latest reply on Feb 1, 2008 5:08 AM by Pete Muir

    <s:button> does not include Request parameter in 2.0.0 GA

    Jack Cheng Newbie

      i observed an interesting behavior with the <s:button> and request parameters just now.

      in pages.xml

      <page view-id="/hello.jsp" action="#{helloWorld.sayHello}">





      in hello.jsp
      this line of code,
      <s:button view="/hello2.jsp" action="#{hellowWord2.sayAgain}"/>,

      is translated to

      <input onclick="location.href='/hello2.seam?firstName=&lastName=&cid=3&actionMethod=hello2.jsp%3AhellowWord2.sayAgain'" id="j_id2:j_id6" value="Say again" type="button" />

      Notice the empty values for the firstName in lastName parameters in the onclick event even if the person object's corresponding attributes contain values.

      this line of code without the view attribute in the button tag works -
      <s:button action="#{hellowWord2.sayAgain}"/> to
      <input onclick="location.href='/hello.seam?firstName=Mickey&lastName=Mouse&cid=3&actionMethod=hello.jsp%3AhellowWord2.sayAgain'" id="j_id2:j_id6" value="Say again" type="button" />

      I'm using Seam 2.0.0 GA.