-
1. rich:message inside a rich:tooltip?
iabughosh Apr 2, 2011 5:49 AM (in response to nikh123123)Hi patil,
try this :
<rich:message for="t1" showDetail="false" showSummary="false">
<f:facet name="errorMarker">
<h:graphicImage id="msgImg" url="/web/error.jpg"/>
</f:facet>
</rich:message>
<rich:toolTip layout="block" for="msgImg">
<rich:message for="t1" id="msg2"></rich:message>
</rich:toolTip>
-
2. rich:message inside a rich:tooltip?
nikh123123 Apr 2, 2011 6:15 AM (in response to iabughosh)Thanks Ibrahim!
I tried it and it didn't show anything . However, if i move the rich:tooltip outside of the containing panel (but inside parent form) with attached="false", it does render. But the tooltip is displayed on mousover of form itself so it seems like it ingnores the attached property.
Secondly, throughtout the examples and even in your code, you've used rich:toolTip. I am able to use rich:tooltip only (with a small T). If I try to use the cap T, I get an error
<rich:toolTip> Tag Library supports namespace: http://richfaces.org/rich, but no tag was defined for name: toolTip
What could be the issue?
-
3. rich:message inside a rich:tooltip?
iabughosh Apr 2, 2011 6:55 AM (in response to nikh123123)ok, try moving the toolTip inside the message itself like this :
<rich:message for="t1" showDetail="false" showSummary="false">
<f:facet name="errorMarker">
<h:graphicImage id="msgImg" url="/web/error.jpg"/>
</f:facet>
<rich:toolTip layout="block" for="msgImg">
<rich:message for="t1" id="msg2"></rich:message>
</rich:toolTip>
</rich:message>
it should appears only when the mouse overs the image,
my previous sanpshot is with RichRaces version 3.3.2, maybe RichFaces 4 use it with small (T).
-
4. Re: rich:message inside a rich:tooltip?
nikh123123 Apr 2, 2011 7:14 AM (in response to iabughosh)No luck with that either!
As I said earlier, I'm not able to render a simple tooltip on a inputText component either! May be that is the root reason?
And about the small/caps (T),you must be right but its a bit conufsing. In the component reference itself both the T's are used interchangeably.
I could get a simple tooltip working only on a h:commandButton and a4j:commandLink. It didn't work with a4j:commandButton or h:inputText.
-
5. Re: rich:message inside a rich:tooltip?
ilya_shaikovsky Apr 4, 2011 6:31 AM (in response to nikh123123)<h:inputText value="#{validationBean.name}" id="name">
<rich:validator />
</h:inputText>
<rich:tooltip target="name">
<rich:message for="name" />
</rich:tooltip>
that still requires some work (prevent show if there are no errors for example). But anyway - working for me.
and not works with nested tooltip because JSF 2 has next code in input renderer
boolean renderChildren = WebConfiguration.getInstance()
.isOptionEnabled(WebConfiguration.BooleanWebContextInitParameter.AllowTextChildren);
if (!renderChildren) {
return;
}
and WebConfiguration.BooleanWebContextInitParameter.AllowTextChildren - false by default in JSF 2. So it encodes only behaviors.
-
6. Re: rich:message inside a rich:tooltip?
nikh123123 Apr 5, 2011 1:47 AM (in response to ilya_shaikovsky)Thanks Ilya! that works fine OK.Good to know the reason why it doens't work in nested mode.
In the documentation, there's no mention of the 'target' attribute. It still speaks of 'for'. Shouldn't that be corrected? Its misleading.
-
7. Re: rich:message inside a rich:tooltip?
ilya_shaikovsky Apr 5, 2011 4:36 AM (in response to nikh123123)yup.. I performing review of all thhe documentation right now. https://issues.jboss.org/browse/RFPL-1380?focusedCommentId=12593492#comment-12593492 Part 4 of the review contains that.. But many thanks and keep us updated if will have any problems like that - it's really helpfull to help fresh community look!