4 Replies Latest reply on Aug 25, 2010 10:24 PM by boy18nj

    Clear Button Implementation

    fjkjava.febinjk.gmail.com
      Hi All,

      I am developing a web application using seam 2.0. I use seam gen to create the project fist then I copied all Entities and framework components like EntityHome and EntityQuery object and created a new project. I create my own action class and uses in EntityHome inside the action for CRUD operations. Some of my action may require multiple EntityHome objects.

      My problem is regarding CLEAR button, all the pages in my web application is designed to include a clear button. How can I implement this functionality in my application?

      <h:form id="frmRt">
      .
      .
      <h:inputText value="#{tktInfoHome.instance.receivedQty}" required="true" id="txtQty">
      .
      .
      .

      <a:commandButton action="#{returnsManager.clear}" reRender="frmRt" immediate="true" value="Clear"/>
      </h:form>


      Inside my Action

      public void clear() {
      //What I need to do here actually
      //I tried tktInfoHome.clearInstatnce();
      //tktInfoHome.setInstance(null);
      //tktInfoHome.setInstance(new Object());
      tktInfoHome.getInstance().setReceivedQty(0);
      //Nothing woking          
      }


      My input control is not getting cleared. Please help me to solve this issue. I need to implement this in all the pages.

      Thanks