1 Reply Latest reply on May 18, 2009 6:12 AM by gonorrhea

    problem with a button click on a page..

      I have a problem with a button click on a page..


      The button click invokes an action.



      in listOB.xhtml


      <s:decorate id="button" template="layout/display.xhtml">
          <div class="navBar">            
            <s:button  value="Update" action="#{bAction.updateBs}" view="/listOB.xhtml"/>                           
          </div>
          <br class="clear"/>
      </s:decorate>



      In pages.xml



      <page view-id="/listOB.xhtml" login-required="true">
          <param name="firstResult" value="#{bS.firstResult}"/>
          <param name="firstName" value="#{listB.userFirstNameForSearchSent}"/>
          <param name="lastName" value="#{listB.userLastNameForSearchSent}"/>
        </page>
      



      In component bAction


      updateBs {


      Make database updates


      }


      Everything is ok except that my view does not show the database updates. If I click on the menu again it shows updated values.


      Any hints on what I am doing wrong ?



        • 1. Re: problem with a button click on a page..
          gonorrhea

          show all your code (esp. for the xhtml).  you may need to add a reRender attribute to your s:button tag.


          Is there an HtmlForm being submitted?  If yes, consider replacing s:button with h:commandButton as s:button issues an HTTP GET request vs. HTTP POST request for HtmlCommandButton.