2 Replies Latest reply on Mar 5, 2013 4:41 PM by crimson

    rich:tooltipp not working inside rich:pickList

    crimson

      Hi all,

       

      In richfaces 3.3.x I had no problem using rich:tooltip inside the rich:column tag of a rich:listShuttle.

      However, in Richfaces 4.3.0 this is NOT working inside rich:pickList:

       

      {code:xml}

      <h:body>

          <f:view>

              <h:form>

                  <rich:pickList value="#{backBean.pickListTargetCol}"

                                 var="item"

                                 listsHeight="100"

                                 listWidth="100"

                                 sourceCaption="SourceItems"

                                 targetCaption="PickedItems">

                      <f:selectItems value="#{backBean.pickListSourceCol}"/>

                      <rich:column id="myCol">

                          <h:outputText id="item" value="Item_#{item}"/>

                          <rich:tooltip target="item" value="Tooltip_#{item}"/>

                      </rich:column>

                  </rich:pickList>

              </h:form>

          </f:view>

      </h:body>

      {code}

       

      backBean:

       

      {code} 
      @ManagedBean(name = "backBean")

      @SessionScoped

      public class TestBean {


          private Collection<Integer> pickListTargetCol;
          private Collection<Integer> pickListSourceCol;

          public Collection<Integer> getPickListTargetCol() {
              return pickListTargetCol;
          }

          public void setPickListTargetCol(Collection<Integer> pickListTargetCol) {
              this.pickListTargetCol = pickListTargetCol;
          }

          public Collection<Integer> getPickListSourceCol() {
              Collection<Integer> result = new ArrayList();
              for(int i = 1; i<=10; i++) {
                  result.add(i);
              }
              return result;
          }

          public void setPickListSourceCol(Collection<Integer> pickListSourceCol) {
              this.pickListSourceCol = pickListSourceCol;
          }

      }
      {code}

       

      With this setup, I see the following bug:

      Only the first entry in the source list shows a tooltip on mose over!

       

      The interesting thing: Using rich:tooltip inside a rich:column of a rich:datatable in the same way works perfectly!

      Only in case it is a rich:picklist which sourrounds the rich:column, it does not work.

       

      My fault or shall I raise a JIRA ticket?

       

      Bye,

      Manuel

        • 1. Re: rich:tooltipp not working inside rich:pickList
          michpetrov

          Hi,

           

          it's not your fault, looks like the rich:column does not generate unique IDs when not in a table so all the tooltips are attached to the first occurence. And JSF does not let you generate dynamic IDs manually so there is no easy workaround (if there is any). Raise a ticket

          • 2. Re: rich:tooltipp not working inside rich:pickList
            crimson

            Michal Petrov schrieb:

             

            Hi,

             

            it's not your fault, looks like the rich:column does not generate unique IDs when not in a table so all the tooltips are attached to the first occurence. And JSF does not let you generate dynamic IDs manually so there is no easy workaround (if there is any). Raise a ticket

            Hi Michal,

             

            2nd time in a row thank you for your valuable input!

            I raised the following JIRA ticket: https://issues.jboss.org/browse/RF-12825

             

            Best regards,

            Manuel