myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Kienenberger" <mkien...@gmail.com>
Subject Re: does anyone have sample code for a tooltip-like display?
Date Fri, 08 Sep 2006 16:44:06 GMT
Here's an example of displaying the first value in a list for a
column, and then using t:popup to display an entire list of values on
hover.   jstl:length() is only available if you're using facelets,
though.  I've manually edited this page code to provide a simpler
example, so hopefully I didn't introduce a typo.

					<t:column>
						<f:facet name="header">
		        			<h:outputText value="Name"/>
						</f:facet>
			            <h:outputText
							rendered="#{(itemList != null) and (0 != jstl:length(itemList))}"
							value="#{itemList[0].name}" />
			            <t:popup id="namePopup"
							rendered="#{1 lt jstl:length(itemList)}"
			                styleClass="popup"
			                closePopupOnExitingElement="true"
			                closePopupOnExitingPopup="true"
			                displayAtDistanceX="10"
			                displayAtDistanceY="10" >
				            <h:outputText
								style="color: green;"
								value=" [#{jstl:length(itemList)}]" />
			                <f:facet name="popup">
			                    <h:panelGroup>
			                    	<t:dataList
			                    		value="#{itemList}"
			                    		var="item">
						            	<h:outputText value="#{item.name}" />
						            	<t:htmlTag value="br" />
						</t:dataList>
			                    </h:panelGroup>
			                </f:facet>
			            </t:popup>
				</t:column>



On 9/8/06, Thomas_Perry@putnam.com <Thomas_Perry@putnam.com> wrote:
>
>
>
>
>
> I have a list that is populated from a dataTable.
>
> data in several columns (outputText) is truncated by the backing bean
> to help keep the overall list within an area.
>
> I'd like to display the full data in a column when the user moves the mouse
> over a column with truncated data.
>
> I've been looking at onmouseover and t:popup but don't have a clue
> on how these could be used to display the full data.
>
> Can anyone offer a piece of code or a reference to some code that does
> this?
>
> Thanks for your help
> Tom
>
>
>
>
> This message is intended for the recipient only and is not meant to be forwarded or distributed
in any other format. This communication is for informational purposes only.  It is not intended
as an offer or solicitation for the purchase or sale of any financial instrument, or security,
or as an official confirmation of any transaction.  Putnam does not accept purchase or redemptions
of securities, instructions, or authorizations that are sent via e-mail.   All market prices,
data and other information are not warranted as to completeness or accuracy and are subject
to change without notice.  Any comments or statements made herein do not necessarily reflect
those of Putnam, LLC (DBA Putnam Investments) and its subsidiaries and affiliates.  If you
are not the intended recipient of this e-mail, please delete the e-mail.
>

Mime
View raw message