You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by spargonaut <sp...@gmail.com> on 2011/07/18 23:17:09 UTC

T5 + opentip.js bug / question

Hi!

I was following a post from Taha over on Java Magic (
http://tawus.wordpress.com/2011/07/12/a-tooltip-component-for-tapestry/ Here
) for creating tool tips using the opentip.js library.

I have followed his post almost verbatim, and have it all working except for
one small part.  When the user scrolls their mouse over the element that is
supposed to activate the tool tip, a message appears, although it seems to
be showing a JSON object containing the message, as opposed to only the
message.

i.e. in the tool tip box, its displaying:
{ "content" : "Term Groups allow information ..." }

When it should only be showing:
Term Groups allow information ...


I've gone over everything I've implemented from the post with a fine toothed
comb and appear to have everything correct, but I may very well be missing
something.

A big thanks to Taha for his awesome tutorials and community involvement,
and of course thank you to anyone who might be able to help me shed some
light on my problem.

cheers

--
View this message in context: http://tapestry.1045711.n5.nabble.com/T5-opentip-js-bug-question-tp4601227p4601227.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T5 + opentip.js bug / question

Posted by spargonaut <sp...@gmail.com>.
Ahhh, that worked beautifully!
Thank you so very much.

and thanks again for the awesome write ups, they've helped me immensely.
Keep up the good work.

js

--
View this message in context: http://tapestry.1045711.n5.nabble.com/T5-opentip-js-bug-question-tp4601227p4612351.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T5 + opentip.js bug / question

Posted by Taha Hafeez <ta...@gmail.com>.
Hi

I had to modify opentip.js to use tapestry's json return value. The
change is in the success handler which instead of simply displaying
the javascript displays the content sent from tapestry event handler.

       onSuccess: function(transport) {
         this.debug('Loading successfull.');
         Tapestry.loadScriptsInReply(transport, function()
               {
                  this.content = transport.responseJSON.content;
               }.bind(this));
       }.bind(this),

The full js is at
https://github.com/tawus/tawus/blob/master/tawus-addons/src/main/resources/com/googlecode/tawus/addons/mixins/opentip/opentip.js

I will update the tutorial too. Thanks for pointing it out.


regards
Taha

On Tue, Jul 19, 2011 at 2:47 AM, spargonaut <sp...@gmail.com> wrote:
> Hi!
>
> I was following a post from Taha over on Java Magic (
> http://tawus.wordpress.com/2011/07/12/a-tooltip-component-for-tapestry/ Here
> ) for creating tool tips using the opentip.js library.
>
> I have followed his post almost verbatim, and have it all working except for
> one small part.  When the user scrolls their mouse over the element that is
> supposed to activate the tool tip, a message appears, although it seems to
> be showing a JSON object containing the message, as opposed to only the
> message.
>
> i.e. in the tool tip box, its displaying:
> { "content" : "Term Groups allow information ..." }
>
> When it should only be showing:
> Term Groups allow information ...
>
>
> I've gone over everything I've implemented from the post with a fine toothed
> comb and appear to have everything correct, but I may very well be missing
> something.
>
> A big thanks to Taha for his awesome tutorials and community involvement,
> and of course thank you to anyone who might be able to help me shed some
> light on my problem.
>
> cheers
>
> --
> View this message in context: http://tapestry.1045711.n5.nabble.com/T5-opentip-js-bug-question-tp4601227p4601227.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org