0 Replies Latest reply on Apr 18, 2012 4:02 PM by firespy

    Using ToolTip with mode="ajax" in <rich:datatable> with <f:setPropertyActionListener>

    firespy

      Hello!

       

       

      I have Form, which creates my table according to the values the user selects. (With ajax):

       

      <a4j:region>
              <h:form>
                  <rich:panel>
                      <f:facet name="header">
                          <h:outputText value="Bitte wählen Sie das Datum aus."></h:outputText>
                      </f:facet>
                      <rich:calendar locale="de" value="#{overviewDPBean.sDate}"
                          required="true"></rich:calendar>
                  </rich:panel>
      
                  <rich:panel>
                      <f:facet name="header">
                          <h:outputText value="Bitte wählen Sie die Abteilung aus."></h:outputText>
                      </f:facet>
                      <rich:select id="names" defaultLabel="Wählen Sie die Abteilung aus"
                          value="#{overviewDPBean.abteilung}" required="true">
                          <f:selectItems value="#{overviewDPBean.abteilungen}" />
                      </rich:select>
                  </rich:panel>
                  <h:commandButton id="namesSubmit" value="Los">
                      <a4j:ajax render="tagesplan"></a4j:ajax>
                  </h:commandButton>
              </h:form>
          </a4j:region>
      

       

      Here is the Table created:

       

      <rich:dataTable id="tagesplan" value="#{overviewDPBean.dataList}"
              var="dataItem">
              <f:facet name="header">
                  <rich:columnGroup>
                      <rich:column>
                          <h:outputText value="Typ" />
      
                      </rich:column>
                      <rich:column>
                          <h:outputText value="Bezeichnung" />
      
                      </rich:column>
                      <rich:column>
                          <h:outputText value="Bezeichnung1" />
      
                      </rich:column>
                      <rich:column>
                          <h:outputText value="Bezeichnung2" />
      
                      </rich:column>
                      <rich:column>
                          <h:outputText value="Bezeichnung3" />
      
                      </rich:column>
                      <rich:column>
                          <h:outputText value="Bezeichnung4" />
      
                      </rich:column>
      
                  </rich:columnGroup>
              </f:facet>
      
              <rich:columnGroup>
                  <rich:column>
                      <h:outputText value="#{dataItem.klassId}" />
                  </rich:column>
      
                  <rich:column>
                      <h:outputText value="#{dataItem.bezeichnung}" />
                  </rich:column>
      
                  <rich:column>
                      <h:form>
      
                          <a4j:commandLink value="#{dataItem.bezeichnung1}">
                              <f:setPropertyActionListener value="#{dataItem.bezeichnung1}"
                                  target="#{qualByNameBean.name}"></f:setPropertyActionListener>
                              <rich:tooltip showEvent="click" mode="ajax">
                                  <h:outputText value="#{qualByNameBean.gQuals}"></h:outputText>
                              </rich:tooltip>
                          </a4j:commandLink>
                      </h:form>
                  </rich:column>
      
                  <rich:column>
                      <h:form>
      
                          <a4j:commandLink value="#{dataItem.bezeichnung2}">
                              <f:setPropertyActionListener value="#{dataItem.bezeichnung2}"
                                  target="#{qualByNameBean.name}"></f:setPropertyActionListener>
                              <rich:tooltip showEvent="click" mode="ajax">
                                  <h:outputText value="#{qualByNameBean.gQuals}"></h:outputText>
                              </rich:tooltip>
                          </a4j:commandLink>
                      </h:form>
                  </rich:column>
      
                  <rich:column>
                      <h:form >
                          <a4j:commandLink value="#{dataItem.bezeichnung3}" render="tagesplan">
                              <f:setPropertyActionListener value="#{dataItem.bezeichnung3}"
                                  target="#{qualByNameBean.name}"></f:setPropertyActionListener>
                              <rich:tooltip showEvent="click" mode="ajax">
                                  <h:outputText value="#{qualByNameBean.gQuals}"></h:outputText>
                              </rich:tooltip>
                          </a4j:commandLink>
                      </h:form>
                  </rich:column>
      
                  <rich:column>
                      <h:form  >
                          <a4j:commandLink value="#{dataItem.bezeichnung4}" render="tagesplan">
                              <f:setPropertyActionListener value="#{dataItem.bezeichnung4}"
                                  target="#{qualByNameBean.name}"></f:setPropertyActionListener>                        
                                  <rich:tooltip showEvent="click" mode="ajax">
                                      <h:outputText value="#{qualByNameBean.gQuals}"></h:outputText>
      
                                  </rich:tooltip>
      
                          </a4j:commandLink>
                      </h:form>
                  </rich:column>
              </rich:columnGroup>
          </rich:dataTable>
      

       

      The Problem is I cannot get mode="ajax" to work with this tooltip nor triggers

      <f:setPropertyActionListener value="#{dataItem.bezeichnung4}"

        target="#{qualByNameBean.name}"></f:setPropertyActionListener>

       

      If I remove the mode="ajax" in the tooltip, it renders the tooltip normally, but <f:setPropertyActionListener> doesnt work.

      Maybe this helps: Before I did my Ajax Select (the first snipped), I just displayed everything and it worked like it should. I think the problem ist the double ajax thing. But I have no clue

      I love richfaces so far, and it works like a charm. But I cant get these tooltips to work.