-
1. Re: rich:componentControl and rich:toolTip
smile24 Apr 6, 2008 5:29 PM (in response to smile24)richfaces 3.2.0
-
2. Re: rich:componentControl and rich:toolTip
ilya_shaikovsky Apr 7, 2008 7:22 AM (in response to smile24)seems ToolTip doesn't supports such substitutions. Please put an RFC to our jira.
-
4. Re: rich:componentControl and rich:toolTip
tybul Nov 9, 2009 10:31 AM (in response to smile24)Hi, I think I have found a workaround since I have bumped on same problem.
Im using current release of RF 3.3.2.SR1, so my solution is related to this version.
Its true that rich:tooltip doesnt resolve parameters provided via rich:control in a param attribute or f:param. In order to show a tooltip for a whole row, You have to capture onRowMouseOver of dataTable and then show the tooltip manually. But instead placing rich:toolTip outside the dataTable, You need to nest it inside a table, and define whole view of tooltip in it. During creating view, separate tooltip with separate id will be created for each row, and all we need to do is to show it (by calling "show" method of its component). Making tooltips per row might be a drawback but You dont have to make an ajax call, each time row is changed, because all data is generated on client side. Until tooltip parametrisation is fixed this is a cheap but working solution. Take a look at code below:
...
<rich:dataTable id="issueItems" var="issue" value=#{issueList.list}>
(..several columns definition)
<rich:column>
<f:facet name="header">
issue type
</f:facet>
<h:outputTest value="#{issue.issueType}"/>
<!-- here comes tooltip definition, remember to provide its id !!! -->
<!-- for convention sake, its not attached to column, because we need it per row -->
<rich:tooltip id="rowTooltip" attached="false">
<h1>Issue details</h1>
<h:output:Text value=#{issue.descritpion}>
</rich:tooltip>
</rich:column>
<!-- here comes control for tooltip, note that it captures onRowMouseOver/Out actions -->
<rich:componentControl event="onRowMouseOver" for="rowTooltip" operation="show"/>
<rich:componentControl event="onRowMouseOut" for="rowTooltip" operation="hide"/>
</rich:dataTable>
You HAVE to provide onRowMouseOut control to close tooltip when user leaves active row. Either way tooltip will be shown.
remember to define id for tooltip, during restore view phase, it will get a client id something like: form_name:3: rowTooltip where the number in the middle will represent selected row. Checkout page source and You will se what has been really generated.
Hopefully this will help someone. Im also intrested when this issue will be solved, because providin a parameres in componentControl would be very convinient.
Example below should