-
1. Re: RF 4: rich:tooltip not working on h:inputText?
jpapouse May 23, 2012 3:16 AM (in response to kwutzke)Yes, there is an already reported bug (https://issues.jboss.org/browse/RF-11343). You can use target attribute instead:
<h:inputText id="input"/> <rich:tooltip id="tooltip" target="input"> Tooltip content </rich:tooltip>
-
2. Re: RF 4: rich:tooltip not working on h:inputText?
kwutzke May 23, 2012 6:47 AM (in response to jpapouse)It's not working. I had tried this before and all possible combinations of ID, target, and in/outside the inputText - no tooltip displayed. Appears to be a more severe bug. This is really basic stuff in RF not working.
-
3. Re: RF 4: rich:tooltip not working on h:inputText?
jpapouse May 24, 2012 5:19 AM (in response to kwutzke)Can you provide more information about your environment? Version of RichFaces, container, etc.?
-
4. Re: RF 4: rich:tooltip not working on h:inputText?
kwutzke May 24, 2012 10:36 AM (in response to jpapouse)I'm using RF 4.2.1.Final, JBoss AS 7.1.1.Final, and Mojarra 2.1.7.
Karsten
-
5. Re: RF 4: rich:tooltip not working on h:inputText?
jpapouse May 25, 2012 10:43 AM (in response to kwutzke)1 of 1 people found this helpfulOh, I see. I think the problem is you've set @disabled=true in h:inputText.
When you set @readonly=true only, it works correctly. Try the following code:
<h1>Enabled</h1> <h:form> Type text: <h:inputText id="in" value="#{richTooltipBean.value}"> <f:ajax event="keyup" render="out" /> </h:inputText> <rich:tooltip id="tooltip" target="in" direction="bottomRight"> Tooltip content </rich:tooltip> <br /> Output: <h:outputText value="#{richTooltipBean.value}" id="out" /> </h:form> <h1>Disabled</h1> <h:form> Type text: <h:inputText id="in2" value="#{richTooltipBean.value2}" disabled="true"> <f:ajax event="keyup" render="out2" /> </h:inputText> <rich:tooltip id="tooltip" target="in2" direction="bottomRight"> Tooltip content </rich:tooltip> <br /> Output: <h:outputText value="#{richTooltipBean.value2}" id="out2" /> </h:form> <h1>Read Only</h1> <h:form> Type text: <h:inputText id="in3" value="#{richTooltipBean.value3}" readonly="true"> <f:ajax event="keyup" render="out3" /> </h:inputText> <rich:tooltip id="tooltip" target="in3" direction="bottomRight"> Tooltip content </rich:tooltip> <br /> Output: <h:outputText value="#{richTooltipBean.value3}" id="out3" /> </h:form>
My fork of dev-examples containing the code above is available here: https://github.com/papousek/dev-examples/tree/thread-200040 (after deployment, open http://localhost:8080/output-demo-4.2.1.Final/faces/examples/tooltip.xhtml in your browser).
I think the rich:tooltip behaves correctly when it isn't active when the input is disabled.
-
6. Re: RF 4: rich:tooltip not working on h:inputText?
kwutzke May 27, 2012 4:15 AM (in response to jpapouse)Thanks for your help.
The problem with my code is that I placed the tooltip as an sub element inside the inputText. Putting them outside seems to be mandatory.
The disabled thing you have demonstrated is really true. The next question would be if tooltips should automatically be hidden for disabled elements and/or if there should be a flag on the tooltip to override the behavior on disabled components.
Karsten
-
7. Re: RF 4: rich:tooltip not working on h:inputText?
jpapouse May 30, 2012 5:51 AM (in response to kwutzke)I think the disabling of rich:tooltip on disabled input elements make sense. If you don't think so, create a new feature request on JIRA.