2 Replies Latest reply on Jul 8, 2011 8:44 AM by Mahin Noufal

    wyciwyg problem with a4j:commandButton and a4j:commandLink

    Mahin Noufal Newbie

      Hi,

      I have in my application lot of a4j commandbuttons. If I click more than 1 time these buttons, it is giving wyciwyg problem. Can you help me to solve this?

       

      <h:form id="assignment">
                                          <rich:extendedDataTable rowClasses="row1, row2" width="100%" height="350px" value="#{QuestionAction.questionList}" var="item" id="simpletable" style="overflow: auto;">
                                              <rich:column width="10%" id="column1" label="#{MessageAction.questionCode}">
                                                  <f:facet name="header" id="facet1">
                                                      #{MessageAction.itemCode}
                                                  </f:facet>
                                                  <h:commandLink action="#{QuestionAction.editQuestion}" actionListener="#{QuestionAction.retrieveData}" onclick="#{QuestionAction.resetValues()}" id="editorlink" disabled="#{item.isLinkEnabled}">
                                                      <h:outputText value="#{item.questionCode}" id="lname"/>
                                                      <f:attribute name="question" value="#{item}" id="att1"/>
                                                  </h:commandLink>
                                              </rich:column>
                                              <rich:column width="12%" id="column2" label="#{MessageAction.itemType}">
                                                  <f:facet name="header" id="facet2">
                                                      #{MessageAction.itemType}
                                                  </f:facet>
                                                  <h:outputText value="#{item.questionType}" id="questionType"/>
                                              </rich:column>
                                              <rich:column width="8%" id="column3" label="#{MessageAction.skill}">
                                                  <f:facet name="header" id="facet3">
                                                      #{MessageAction.skill}
                                                  </f:facet>
                                                  <h:outputText value="#{item.skill.skillName}" id="skill"/>
                                              </rich:column>
                                              <rich:column width="9%" id="column4" label="#{MessageAction.level}">
                                                  <f:facet name="header" id="facet4">
                                                      #{MessageAction.level}
                                                  </f:facet>
                                                  <h:outputText value="#{item.level.levelName}" id="level"/>
                                              </rich:column>
                                              <rich:column width="12%" id="column5" label="#{MessageAction.standard}">
                                                  <f:facet name="header" id="facet5">
                                                      #{MessageAction.standard}
                                                  </f:facet>
                                                  <h:outputText value="#{item.standard.standardName}" id="standard"/>
                                              </rich:column>
                                              <rich:column width="20%" id="column6" label="#{MessageAction.description}">
                                                  <f:facet name="header" id="facet6">
                                                      #{MessageAction.description}
                                                  </f:facet>
                                                  <h:outputText value="#{item.description}" id="description"/>
                                              </rich:column>
                                              <rich:column width="15%" id="column7" label="#{MessageAction.keyWords}">
                                                  <f:facet name="header" id="facet7">
                                                      #{MessageAction.keyWords}
                                                  </f:facet>
                                                  <h:outputText value="#{item.keywords}" id="keywords"/>
                                              </rich:column>
                                              <rich:column width="7%" id="submitColumn">
                                                  <f:facet name="header" id="submitFacet">
                                                      Submit
                                                  </f:facet>
                                                  <a4j:commandLink style="display: #{item.visibility}" id="submitLink" action="#{QuestionAction.submitCheck}" reRender="submitPanel" actionListener="#{QuestionAction.retrieveData1}" >
                                                      <h:graphicImage id="submitImage" value="Images/Submit.gif" style="border:0; "/>
                                                      <f:attribute id="submitAttribute" name="question1" value="#{item}" />
                                                  </a4j:commandLink>
                                              </rich:column>
                                              <rich:column width="7%" id="column9">
                                                  <f:facet name="header" id="facet9">
                                                      #{MessageAction.delete}
                                                  </f:facet>
                                                  <a4j:commandLink id="deleteLink" action="#{QuestionAction.deleteCheck}" style="display: #{item.deleteVisibility}" actionListener="#{QuestionAction.retrieveData1}" reRender="deletePanel">
                                                      <h:graphicImage id="deleteImage" value="Images/delete.gif" style="border:0" />
                                                      <f:attribute id="question" name="question1" value="#{item}"/>
                                                  </a4j:commandLink>
                                              </rich:column>
                                          </rich:extendedDataTable>
       </h:form>
                                      <rich:modalPanel id="submitPanel" autosized="true" width="300" showWhenRendered="#{QuestionAction.showModelPanel}"  >
                                          <f:facet name="header">
                                              <h:outputText value="Submit" />
                                          </f:facet>
                                          <f:facet name="controls">
                                              <h:panelGroup>
                                                  <h:graphicImage value="Images/close.png" id="hidelink1" styleClass="hidelink" onclick="#{rich:component('submitPanel')}.hide();"/>
                                              </h:panelGroup>
                                          </f:facet>
                                          <a4j:outputPanel ajaxRendered="true">
                                              <h:panelGrid columns="1">
                                                  <h:form>
                                                      <h:panelGrid columns="2">
                                                          <h:outputText id="submitMessage" value="#{QuestionAction.message}"  />
                                                      </h:panelGrid>
                                                      <center>
                                                          <a4j:commandButton id="submitOk" value="OK" action="#{QuestionAction.submitQuestion}" reRender="submitPanel,simpletable,editorlink,submitLink"/>
                                                      </center>
                                                  </h:form>
                                              </h:panelGrid>
                                          </a4j:outputPanel>
                                      </rich:modalPanel>
                                      <rich:modalPanel id="deletePanel" autosized="true" width="300" showWhenRendered="#{QuestionAction.showModelPanel}"  >
                                          <f:facet name="header">
                                              <h:outputText value="#{MessageAction.delete}" />
                                          </f:facet>
                                          <f:facet name="controls">
                                              <h:panelGroup>
                                                  <h:graphicImage value="Images/close_panel.png" id="hidelink12" styleClass="hidelink" onclick="#{rich:component('deletePanel')}.hide();"/>
                                              </h:panelGroup>
                                          </f:facet>
                                          <a4j:outputPanel ajaxRendered="true">
                                              <h:panelGrid columns="1">
                                                  <h:form>
                                                      <h:panelGrid columns="2">
                                                          <h:outputText id="deleteMessage" value="#{QuestionAction.message}"  />
                                                      </h:panelGrid>
                                                      <center>
                                                          <a4j:commandButton id="deleteOk" value="Yes" action="#{QuestionAction.delete}" reRender="deletePanel,simpletable"/>
                                                          <a4j:commandButton id="deleteCancel" value="Cancel" onclick="#{rich:component('deletePanel')}.hide();"/>
                                                      </center>
                                                  </h:form>
                                              </h:panelGrid>
                                          </a4j:outputPanel>
                                      </rich:modalPanel>