0 Replies Latest reply on Jul 4, 2011 11:09 AM by Uwe Clement

    clear modalPanel form

    Uwe Clement Newbie

      I simply want to clear the user inputs when i reopen a modal dialog. I am starting to think if richfaces is really the right technology!

       

      i just have a dialog, which will be opened multiple times. On the dialog is a label, and the value can change. but there will be shown always just the initial value from the managed bean. if i change the binding value of that label, the dialog is not really interested in that. he shows always the first value which was set.

       

      <ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
           xmlns:f="http://java.sun.com/jsf/core"
           xmlns:h="http://java.sun.com/jsf/html"
           xmlns:rich="http://richfaces.org/rich"
           xmlns:a4j="http://richfaces.org/a4j"
           xmlns:richx="http://richfaces.org/richx">
      
           <rich:modalPanel id="historyItemDetailModalPanel" width="700"
                height="180" autosized="true">
                <f:facet name="header">#{msg.historyEntryDetail}</f:facet>
      
                <a4j:outputPanel id="myOutPanel">
      
                     <ui:decorate template="/layout/fields.xhtml">
                          <ui:decorate template="/layout/display.xhtml">
                               <ui:define name="label">
                                    <h:outputLabel styleClass="Text" value="#{msg.actionplanTabSql}"></h:outputLabel>
                               </ui:define>
      
                               <ui:define name="input">
                                    <h:outputLabel styleClass="Text"
                                         value="#{customerSelectionEditController.selectedHistoryContext}">
                                    </h:outputLabel>
                               </ui:define>
                          </ui:decorate>
                     </ui:decorate>
      
                     <ui:decorate template="/layout/button.xhtml">
                          <ui:define name="button">
                               <a4j:commandButton value="#{msg.cancel}" title="#{msg.cancel}"
                                    onclick="Richfaces.hideModalPanel('historyItemDetailModalPanel')"></a4j:commandButton>
                          </ui:define>
                     </ui:decorate>
      
                </a4j:outputPanel>
      
           </rich:modalPanel>
      </ui:composition>
      

       

      BackingBean

       

      ..
       private String selectedHistoryContext = "1";
      ...
       public String getSelectedHistoryContext() {
              return selectedHistoryContext;
          }
      
          public void setSelectedHistoryContext(final String selectedHistoryContext) {
              this.selectedHistoryContext = selectedHistoryContext;
          }
      

       

       

      So the label shows always "1", doesn't matter what is the real value in that binding variable.

       

      So simply in any other programming language!

       

      Same problem than:

      http://community.jboss.org/message/50261

       

      He also didn't receove help.

       

      Anyhow, pls help.

       

      MANY THANKS IN ADVANCE!!!!