7 Replies Latest reply on Jan 31, 2011 7:07 AM by tupudopor

    rich:toolTip

    tupudopor

      Hy everybody,

       

      I have a problem with a rich:toolTip that i use. The whole context is that i have a rich:dataTable and many columns in it. I have created two more columns, that both have a rich:toolTip inside of them. The two colums shall not appera at the sametime, and i realized that with a boolean from my bean. The problem is that the tooltip from one column should open up, and the other down. I can't find any problems with my code and i couldn't find anything on the net, so i'm asking you....

       

      <rich:column rendered="#{carData.rowType}" style="width:10px; color:red; padding:0px;">

                                  <rich:panel  style="width: 0px; border-style:none; border-width:0px; padding:0px!important;">

                                      <br />

                                      <a4j:commandLink actionListener="#{cardetails.getFinanceProductInfo}">

                                          <f:param name="id" value="#{car.vehicleId}" />

                                          <f:param name="rid" value="#{car.vehicleRid}" />

                                          <img id="infoicon1" src="eric_rebrush/_common/img/standard_elements/info.gif" width="13" height="12" alt="" border="0" />

                                      </a4j:commandLink>

       

                                      <rich:toolTip id="bottomToolTip" showDelay="500" showEvent="onclick" mode="ajax" style="background-color:white;border-color:orange;" direction="bottom-left" layout="block">

       

                                          <div style="width: 249px; padding-left: 1px; font-weight: bold; padding-bottom: 18px;">

                                          <h:outputText ......... />

       

                                          </div>

                                      </rich:toolTip>

       

                                  </rich:panel>

                              </rich:column>

                              <rich:column rendered="#{! carData.rowType}" style="width:10px; color:red; padding:0px;">

                                  <rich:panel  style="width: 0px; border-style:none; border-width:0px; padding:0px!important;">

                                      <br />

                                      <a4j:commandLink actionListener="#{cardetails.getFinanceProductInfo}">

                                          <f:param name="id" value="#{car.vehicleId}" />

                                          <f:param name="rid" value="#{car.vehicleRid}" />

                                          <img id="infoicon1" src="eric_rebrush/_common/img/standard_elements/info.gif" width="13" height="12" alt="" border="0" />

                                      </a4j:commandLink>

                                      <rich:toolTip id="topToolTip" showDelay="500" showEvent="onclick" mode="ajax" style="background-color:white;border-color:red;" direction="top-left" layout="block">

                                          <div style="width: 249px; padding-left: 1px; font-weight: bold; padding-bottom: 18px;">

                                          <h:outputText ........... />

       

                                          </div>

                                      </rich:toolTip>

       

                                  </rich:panel>

                              </rich:column>

       

      The rendering is alright, the problem comes only by the direction of the two toolTips.

        • 1. rich:toolTip
          ilya40umov

          Could you attache some screenshots please?

          • 2. rich:toolTip
            tupudopor

            a screenshot with the table and the tooltips is not possbile ... condifentiality stuff at my job but perhaps you could explain to me where the problem could be.. i think that if you need a screenshot, you might have an ideea

            • 3. rich:toolTip
              ilya40umov

              1) I thought that screenshots could help to understand your problem better.

              2) Try to use this API to control toolTips behavior

              Table 6.159. JavaScript API

               

               

              FunctionDescription
              show()Shows the corresponding toolTip
              hide()Hides the corresponding toolTip
              enable()Enables the corresponding toolTip
              disable()Disables the corresponding toolTip
              • 4. rich:toolTip
                tupudopor

                i have just tried it and it doesn't work... can it have something to do with the fact i'm usin Richfaces 3.3.1 ?? the firebug says me that enable is not a function any other suggestions perhaps?

                • 5. rich:toolTip
                  mp911de

                  Have you tried to put ich:toolTip into your a4j:commandLink?

                  • 6. rich:toolTip
                    tupudopor

                    i tried it now and it does not work . the second tooltip still opens wherever it wants to ( even though it should open only top-left ). Thanks for your answer

                    • 7. rich:toolTip
                      tupudopor

                      so ... i think i know now where the problem is ... i've talked with a collegue and he said that the problem could be at a javascript from richfaces ( reggarding this tooltip ). When i define a dirrection for a tooltip, the javascript sees first if the tooltip shall not be too big for the browsers window ... if so, he changes the dirrection. So if i have a tolltip that should open down, but it won't fit in my browser window, it will chose to open it up, and viceversa