You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Th...@putnam.com on 2006/09/08 18:36:04 UTC
does anyone have sample code for a tooltip-like display?
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.
Re: does anyone have sample code for a tooltip-like display?
Posted by ayan <am...@intralinks.com>.
Hi,
Im also facing same prob with <t:popup>, When I put the mouse over a
column that has a popup tag, a small empty component appears next to the mouse,
and the text associated with the popup appears separately to the right of the
mouse, overlaying the text in another column.
Im curius to know which whitespaces you substitutedwith & where I ve to
set escape="false"?
Appriciate your response....
thanks
ayan
Re: does anyone have sample code for a tooltip-like display?
Posted by Mads Henderson <ma...@gmail.com>.
I have also had odd behaviour with <t:popup> on IE, but I worked around it
by substituting all whitespaces with (remember to set
escape="false").
There is also a pretty good and easy to use javascript you can use at
http://www.walterzorn.com
Hope that helps.
Mads
On 9/8/06, Mike Kienenberger <mk...@gmail.com> wrote:
>
> Tom,
>
> Unfortunately, my only experience has been with the code you saw
> posted. Only the value bindings were changed.
>
> I know some of my end users have reported odd behavior under IE, but
> it wasn't a show stopper for them.
>
> Also, there was a recent 1.1.5 tomahawk bug that required the t:popup
> component to have a manual id specified. I think it's fixed now.
>
> I don't know enough about javascript to fill a thimble, so I kinda
> have to let others implement and maintain t:popup.
>
> On 9/8/06, Thomas_Perry@putnam.com <Th...@putnam.com> wrote:
> >
> >
> >
> >
> >
> >
> > Mike, thanks for the example.
> >
> > I tried it but I'm seeing these results...
> >
> > When I put the mouse over a column that has a popup tag,
> > a small empty component (with tiny scrollbars) appears next to
> > the mouse, and the text associated with the popup appears
> > separately to the right of the mouse, overlaying the text in another
> > column. The text has no border, maybe just spaces around it.
> > The text and tiny scrollable field do move with the mouse.
> >
> > Have you seen/heard of this behavior?
> >
> > The text must belong in the empty component, but how does it get there?
> >
> > And does the popup field *have* to have scrollbars? It ought to be
> > just a box.
> >
> > Thanks again for your help.
> > Tom
> >
> >
> >
> >
> > "Mike
> > Kienenberger"
> > <mkienenb@gmail.c
> To
> > om> "MyFaces Discussion"
> > <us...@myfaces.apache.org>
> > 09/08/2006 12:44
> cc
> > PM
>
> > Subject
> > Re: does anyone have sample code
> > Please respond to for a tooltip-like display?
> > "MyFaces
> > Discussion"
> > <users@myfaces.ap
> > ache.org>
> >
> >
> >
> >
> >
> >
> > 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 <Th...@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.
> > >
> >
> >
> >
> >
> >
> > 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.
> >
>
Re: does anyone have sample code for a tooltip-like display?
Posted by Mike Kienenberger <mk...@gmail.com>.
Tom,
Unfortunately, my only experience has been with the code you saw
posted. Only the value bindings were changed.
I know some of my end users have reported odd behavior under IE, but
it wasn't a show stopper for them.
Also, there was a recent 1.1.5 tomahawk bug that required the t:popup
component to have a manual id specified. I think it's fixed now.
I don't know enough about javascript to fill a thimble, so I kinda
have to let others implement and maintain t:popup.
On 9/8/06, Thomas_Perry@putnam.com <Th...@putnam.com> wrote:
>
>
>
>
>
>
> Mike, thanks for the example.
>
> I tried it but I'm seeing these results...
>
> When I put the mouse over a column that has a popup tag,
> a small empty component (with tiny scrollbars) appears next to
> the mouse, and the text associated with the popup appears
> separately to the right of the mouse, overlaying the text in another
> column. The text has no border, maybe just spaces around it.
> The text and tiny scrollable field do move with the mouse.
>
> Have you seen/heard of this behavior?
>
> The text must belong in the empty component, but how does it get there?
>
> And does the popup field *have* to have scrollbars? It ought to be
> just a box.
>
> Thanks again for your help.
> Tom
>
>
>
>
> "Mike
> Kienenberger"
> <mkienenb@gmail.c To
> om> "MyFaces Discussion"
> <us...@myfaces.apache.org>
> 09/08/2006 12:44 cc
> PM
> Subject
> Re: does anyone have sample code
> Please respond to for a tooltip-like display?
> "MyFaces
> Discussion"
> <users@myfaces.ap
> ache.org>
>
>
>
>
>
>
> 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 <Th...@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.
> >
>
>
>
>
>
> 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.
>
Re: does anyone have sample code for a tooltip-like display?
Posted by Th...@putnam.com.
Mike, thanks for the example.
I tried it but I'm seeing these results...
When I put the mouse over a column that has a popup tag,
a small empty component (with tiny scrollbars) appears next to
the mouse, and the text associated with the popup appears
separately to the right of the mouse, overlaying the text in another
column. The text has no border, maybe just spaces around it.
The text and tiny scrollable field do move with the mouse.
Have you seen/heard of this behavior?
The text must belong in the empty component, but how does it get there?
And does the popup field *have* to have scrollbars? It ought to be
just a box.
Thanks again for your help.
Tom
"Mike
Kienenberger"
<mkienenb@gmail.c To
om> "MyFaces Discussion"
<us...@myfaces.apache.org>
09/08/2006 12:44 cc
PM
Subject
Re: does anyone have sample code
Please respond to for a tooltip-like display?
"MyFaces
Discussion"
<users@myfaces.ap
ache.org>
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 <Th...@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.
>
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.
Re: does anyone have sample code for a tooltip-like display?
Posted by Mike Kienenberger <mk...@gmail.com>.
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 <Th...@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.
>