2 Replies Latest reply on Apr 5, 2013 7:56 AM by vi_mahe_ka1

    How to erase values in popuppannel

    mmunir

      I am using RichFaces 4 on Windows. When i click on Create button, then a popupPannel is displayed asking to enter values.

       

      If i enter some values and leave the remaining and press the save button on this panel, the error message appears because of validation. Now i press the cancel button to hide it.

       

      Now when i again click the create button, then same old values are still present, i want to know how do i erease them.

       

      Create Button

       

      <a4j:commandLink styleClass="no-decor" render="newGrid" execute="@this" oncomplete="#{rich:component('newPane')}.show()">

                <h:graphicImage value="resources/images/edit.gif" alt="edit" />

      </a4j:commandLink>

       

       

      Cancel Button

       

      <a4j:commandButton value=" #{msg.cancel} " onclick="#{rich:component('newPane')}.hide(); return false;" />

        • 1. Re: How to erase values in popuppannel
          rhanus

          a very silimar facelet works for me fine

          values from popupPanel should be maintained in request scoped bean and create button should (re-)render the popupPanel itself

          • 2. Re: How to erase values in popuppannel
            vi_mahe_ka1

            add an actionListener in commandLink which will call a bean method, where you can nullify the bean values.

            ex:

             

            <a4j:commandLink action="#{someBean.someAction}" ----/>

             

            someAction{

             

            prop1=null;

            prop2=null;

             

            }

             

            you can add following lines as well

             

            UIInput otherInput = (UIInput) context.getViewRoot().findComponent("formId:otherInputId");
            otherInput.setValue("");
            otherInput.setSubmittedValue)("");