Has anyone got any tips on how to
get a tooltip displaying with an <xf:output mediatype="image/*> ?
Both the image url & the tooltip text are derived from XForms
instance data so I can't use regular HTML.
One way might be to have an <xf:output> of type HTML, and use a (complicated) XPath expression to generate an <img> tag with the tooltip. Which seems a bit ugly! Adrian -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Hi Adrian,
> Has anyone got any tips on how to get a tooltip displaying with an > <xf:output mediatype="image/*> ? Both the image url & the tooltip text > are derived from XForms instance data so I can't use regular HTML. maybe you could put the xf:output into a xhtml:div with a title attribute. So the attribute value gets displayed as tooltip text. The attribute value could be set dynamically with XSL. I've attached an example. HTH florian -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws imgtest.xhtml (1K) Download Attachment |
Administrator
|
On 9/1/07, Florian Schmitt <[hidden email]> wrote:
> maybe you could put the xf:output into a xhtml:div with a title > attribute. So the attribute value gets displayed as tooltip text. The > attribute value could be set dynamically with XSL. I've attached an example. Yes. And if the value is static, you can also write: <xforms:output ref="/*" xhtml:title="gaga"/> This will a title="gaga" on the span that contains your value. Alex -- Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise http://www.orbeon.com/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Thanks for both suggestions:
unfortunately the tooltip text needs to be updated as the instance data
changes. As I understand it the xsl is going to run once only using the
initial instance value when the form is loaded.
Adrian Alessandro Vernet wrote: On 9/1/07, Florian Schmitt [hidden email] wrote:maybe you could put the xf:output into a xhtml:div with a title attribute. So the attribute value gets displayed as tooltip text. The attribute value could be set dynamically with XSL. I've attached an example.Yes. And if the value is static, you can also write: <xforms:output ref="/*" xhtml:title="gaga"/> This will a title="gaga" on the span that contains your value. Alex -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Using the approach in
samples/dynamic-image-trigger.xhtml
(http://mail-archive.objectweb.org/ops-users/2006-12/msg00461.html) you
can use a trigger to output the image and then add a <xf:hint> as
normal.
Adrian Baker wrote: Thanks for both suggestions: unfortunately the tooltip text needs to be updated as the instance data changes. As I understand it the xsl is going to run once only using the initial instance value when the form is loaded. -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Administrator
|
In reply to this post by Adrian Baker
On 9/2/07, Adrian Baker <[hidden email]> wrote:
> > Thanks for both suggestions: unfortunately the tooltip text needs to be > updated as the instance data changes. As I understand it the xsl is going to > run once only using the initial instance value when the form is loaded. We are planning to change the way <xforms:hint> is implemented to display a tooltip (instead of the current label now shown at the left of the control). When this is done, you will be able to use a <xforms:hint ref="..."> inside an <xf:output mediatype="image/*>. I imagine that this is what you wanted to do originally, right? Alex -- Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise http://www.orbeon.com/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Administrator
|
In reply to this post by Adrian Baker
On 9/5/07, Adrian Baker <[hidden email]> wrote:
> Using the approach in samples/dynamic-image-trigger.xhtml > (http://mail-archive.objectweb.org/ops-users/2006-12/msg00461.html) > you can use a trigger to output the image and then add a <xf:hint> as > normal. Nice trick :). Alex -- Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise http://www.orbeon.com/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Free forum by Nabble | Edit this page |