Re: Injecting JavaScript(JSNI) to Cell Table DOM

2015-04-03 Thread Abdullah

Hi Frank,
Thanks for your suggestion..

I added this in Scheduler

Scheduler.get().scheduleDeferred(new ScheduledCommand() {
@Override
public void execute() {
initTooltip();
}
});
This Works for me..

 can you try:
 $wnd.$($doc).ready(

 function(){
 $wnd.jQuery([rel=tooltipTop]).tooltip({ placement: 'top'});
 });


 or skip the ready block your dom is already there...


-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Injecting JavaScript(JSNI) to Cell Table DOM

2015-04-02 Thread Frank Taffelt
can you try:
$wnd.$($doc).ready(
function(){
$wnd.jQuery([rel=tooltipTop]).tooltip({ placement: 'top'});
});


or skip the ready block your dom is already there...


On Wednesday, April 1, 2015 at 6:22:36 PM UTC+2, Abdullah wrote:

 Hi,
 In my application i am using GWT Cell Table, for some of the Column Header 
 i want to add tooltip.Column Header is created by using SafeHtml and 
 Injecting JS to cell table header using JSNI. But that time the DOM is not 
 creating and JavaScript is not attaching to the column Header for 
 tooltip.If i use Timer then the Problem is goes off,I don't want to use 
 Timer.Is there any Way to inject JS?Any Clue?See below code,

 *Column Header SafeHtml:*
 SafeHtml=spanTotal/spanspan title='' rel='tooltipTop' 
 class='reqFull' data-original-title='{0}' i class='fa 
 fa-info-circle'/i/span;

 *JSNI:*
  private static native void initTooltip() /*-{
 $wnd.$(document).ready(function(){
  $wnd.jQuery([rel=tooltipTop]).tooltip({ placement: 'top'});
 });
 
 }-*/;

 I am Calling this JSNI after the table creation but still DOM is not ready.
 Even i tried calling this JSNI Script in onAttach() Method,

 @Override
 protected void onAttach() {
 super.onAttach();
 initTooltip();
  }

 Any Suggestion?


-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Injecting JavaScript(JSNI) to Cell Table DOM

2015-04-01 Thread Abdullah
Hi,
In my application i am using GWT Cell Table, for some of the Column Header 
i want to add tooltip.Column Header is created by using SafeHtml and 
Injecting JS to cell table header using JSNI. But that time the DOM is not 
creating and JavaScript is not attaching to the column Header for 
tooltip.If i use Timer then the Problem is goes off,I don't want to use 
Timer.Is there any Way to inject JS?Any Clue?See below code,

*Column Header SafeHtml:*
SafeHtml=spanTotal/spanspan title='' rel='tooltipTop' class='reqFull' 
data-original-title='{0}' i class='fa fa-info-circle'/i/span;

*JSNI:*
 private static native void initTooltip() /*-{
$wnd.$(document).ready(function(){
 $wnd.jQuery([rel=tooltipTop]).tooltip({ placement: 'top'});
});

}-*/;

I am Calling this JSNI after the table creation but still DOM is not ready.
Even i tried calling this JSNI Script in onAttach() Method,

@Override
protected void onAttach() {
super.onAttach();
initTooltip();
 }

Any Suggestion?

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.