-
1. Tooltip only works inside a panel?
nbelaevski May 19, 2011 12:12 AM (in response to giberius)1 of 1 people found this helpfulHi Tom,
No, that's a limitation of tooltip component. You can wrap it into a4j:outputPanel.
-
2. Tooltip only works inside a panel?
sivaprasad9394 May 19, 2011 12:12 AM (in response to giberius)Hi Tom,
Try like this it will work.....
<h:inputText id="filterID" size="28" value="">
<rich:toolTip for="filterID" value="Plese Enter"></rich:toolTip>
</h:inputText>
-
3. Tooltip only works inside a panel?
giberius May 19, 2011 1:12 PM (in response to sivaprasad9394)I am working with richfaces 4.0.0
toolTip and for does not exist in release 4.0.0, I think this is from release 3.3.
In 4.0.0 you have tooltip and attribut target , I followed up your advise for this equivalent but the result was negative.
-
4. Re: Tooltip only works inside a panel?
giberius May 19, 2011 2:47 PM (in response to nbelaevski)Hello Nick,
I have it working with the a4j:outputPanel, only you have to put the rich:tooltip as a child of the a4j:outputPanel. When you make the rich:tooltip a child of the a4j:commandButton it does not work.
So working is:
<aj4:outputPanel>
<a4j:commandButton .... />
<rich:outputPanel>
hi
</rich:outputPanel>
</a4j:outputPanel>
I preferred just to make tooltip child of what ever component I would like and to have a tooltip, but I will use aj4:outputPanel.
Thanks for your tip!!
-
5. Re: Tooltip only works inside a panel?
ilya_shaikovsky May 21, 2011 10:13 AM (in response to giberius)not works
<h:commandButton value="test">
<rich:tooltip>test</rich:tooltip>
</h:commandButton>
works
<h:commandButton value="test" id="but">
<rich:tooltip>test</rich:tooltip>
</h:commandButton>
I believe that should be in RF documentation but not checked. the same will be for output text graphic image and maybe more ones.
The problem is - components not always encodes it's id to the client if it's not set (auto-generated). And tooltip requires it to attach properly. So just not forget to set id to parent components which need tooltips and in most cases it will be ok.
About input text. Looking to Input rendered code (TextRenderer)
@Override
public void encodeChildren(FacesContext context, UIComponent component)
throws IOException {
boolean renderChildren = WebConfiguration.getInstance()
.isOptionEnabled(WebConfiguration.BooleanWebContextInitParameter.AllowTextChildren);
if (!renderChildren) {
return;
}
We see that JSF input not just not renders our tooltip (AllowTextChildren context parameter is false by default in JSF). So that's not tooltip problem also actually.
-
6. Tooltip only works inside a panel?
giberius May 22, 2011 5:35 AM (in response to ilya_shaikovsky)with a <h:commandButton ....> it is working when id on the parent component is used.
with a <a4j:commandButton ....> it is not working, also when id is used, (somehow I expect it should work).
with the construction <a4j:outputPanel>
< just a component />
<rich:tooltip> Hello </rich:tooltip>
<a4j:outputPanel>
it is working for <h:inputText ....> and other components as I have see so far. So using <a4j:outputPanel> is for me the contstruction I will use.
I think it is a good idea to put this more clearly in the documentation.
Thanks for all the support!!
-
7. Tooltip only works inside a panel?
ilya_shaikovsky May 22, 2011 8:44 AM (in response to giberius)with a <a4j:commandButton ....> it is not working, also when id is used, (somehow I expect it should work).
worked for mee to when id is defined. need to check.
B.t.w. wanted to say a few words about the workaround you using. It's ok and for that cases outputPanel was partially designd(except updates). But be aware about it layout attribute. It's ok to have default <span> rendering as far as you having just text inside. But it should be set to bolck to render <div> when block components placed inside.
About docs - the only big concern - id's should be already in documentation.. but thanks maybe a good idea to recheck and rise an issue. And about text yup.. as not much guys knows about that settings for children encoding.
-
8. Re: Tooltip only works inside a panel?
rcordoba Jan 24, 2013 3:05 PM (in response to ilya_shaikovsky)Hi Ilya,
I have seen in internet there was a bug for tooltip with h:graphicImage that was released in version RF.4.2.2.
I´m using RF 4.2.3 and it´s not working for me. None of the both examples below work:
1.
<div class="buscadorBarcosColumnaCorta" id="divIconoMasOpcionesBuscador">
<h:graphicImage value="/images/plusIcon.png" id="iconoMasOpciones" styleClass="iconoMedio">
<rich:tooltip value="Hi this is a tooltip" />
</h:graphicImage>
2.
<div class="buscadorBarcosColumnaCorta" id="divIconoMasOpcionesBuscador">
<h:graphicImage value="/images/plusIcon.png" id="iconoMasOpciones" styleClass="iconoMedio" />
<rich:tooltip value="Hi this is a tooltip" target="iconoMasOpciones" />
</div>
Regards,
Roberto.
-
9. Re: Tooltip only works inside a panel?
rcordoba Jan 25, 2013 8:57 AM (in response to rcordoba)Hi all,
Workaround is not working for me neither. None of the next options works:
1.
<a4j:outputPanel>
<h:graphicImage value="/images/plusIcon.png" id="iconoMasOpciones" styleClass="iconoMedio" />
<rich:tooltip value="Hi this is a tooltip" />
</a4j:outputPanel>
2.
<a4j:outputPanel>
<h:graphicImage value="/images/plusIcon.png" id="iconoMasOpciones" styleClass="iconoMedio" />
<rich:tooltip>"Hi this is a tooltip"</rich:tooltip>
</a4j:outputPanel>
I have tested same combination by adding to web.xml
<context-param>
<param-name>com.sun.faces.allowTextChildren</param-name>
<param-value>true</param-value>
</context-param>
and it still doesn´t work.
In IE I can get next javascript error:
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; MS-RTC LM 8; 889801903; Version/11.08050; managedpc)
Timestamp: Fri, 25 Jan 2013 13:50:06 UTC
Message: Object expected
Line: 173377761
Char: 1
Code: 0
URI: http://localhost:8080/perrisyatchs/
Please, help me. I need tooltips in my app.
Thanks,
Roberto.