Tooltip content is computed when submitting a form
--------------------------------------------------

                 Key: RF-7356
                 URL: https://jira.jboss.org/jira/browse/RF-7356
             Project: RichFaces
          Issue Type: Bug
          Components: component-output
    Affects Versions: 3.2.2
         Environment: Windows XP / Firefox 3.0.10
            Reporter: Anthony Ogier


Here is the xhtml :
----------------------------------------------------------------------------------------------------------------------------------------------------------------
        <html>
                <h:form>
                        <rich:panel>
                                <h:graphicImage url="/img/eye.gif"/>
                                <rich:toolTip followMouse="true" mode="ajax">
                                        <f:facet name="defaultContent">
                                                <h:outputText value="Please 
wait"/>
                                        </f:facet>
                                        <span>
                                                <ui:repeat 
value="#{testBean.listLabels(4)}" var="label">
                                                        <p><h:outputText 
value="#{label}" /></p>
                                                </ui:repeat>
                                        </span>
                                </rich:toolTip>
                        </rich:panel>
                        <h:commandButton action="#{testBean.action}" 
value="Test action" />
                </h:form>
        </html>
----------------------------------------------------------------------------------------------------------------------------------------------------------------
and the bean :
----------------------------------------------------------------------------------------------------------------------------------------------------------------
@Name("testBean")
public class TestBean {
        @Logger
        private Log log;

        public void action() {
                log.warn("action !");
        }

        public String getComputedLabel() {
                log.warn("getComputedLabel()");
                return "computed label";
        }

        public List<String> listLabels(final int size) {
                log.warn("listLabels("+size+")");
                final ArrayList<String> list = new ArrayList<String>(size);
                for (int i = 0; i < size; i++) {
                        list.add("Label "+(i+1));
                }
                return list;
        }
}
----------------------------------------------------------------------------------------------------------------------------------------------------------------
When moving the mouse over the eye image, here is the server log :
11:18:25,603 WARN  [bean.TestBean] listLabels(4)
11:18:25,603 WARN  [bean.TestBean] listLabels(4)

The method is called twice ... but the worse is when clicking on the "Test 
action" button, here is the log :
11:18:33,393 WARN  [bean.TestBean] listLabels(4)
11:18:33,393 WARN  [bean.TestBean] action !

The content of the tooltip is computed ! That problem seems to exist only when 
using ui:repeat component inside the tooltip... when using c:foreach, the 
method listLabels is no more called at all.

I've got problem with similar usage, but with a "listLabels" method which is 
very long to compute, and which I don't want to be called when submitting my 
form.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        
_______________________________________________
richfaces-issues mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/richfaces-issues

Reply via email to