Re: Click Events not getting attached

2011-11-05 Thread Brandon Donnelson
If your going to extend like this, you'll need to sink the events you want 
and then use OnBrowserEvent...

Brandon Donnelson
http://gwt-examles.googlecode.com

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/TwRr0OJ2cEoJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Click Events not getting attached

2011-11-05 Thread Thomas Broyer


On Saturday, November 5, 2011 4:44:02 PM UTC+1, Brandon Donnelson wrote:

 If your going to extend like this, you'll need to sink the events you want 
 and then use OnBrowserEvent...


That's so old-school! addDomHandler(myHandler, ClickEvent.getType()) works 
equally well.

GWT Kid's problem here is to go down the DOM path without knowing how 
events work at the higher-level of widgets: 
http://code.google.com/p/google-web-toolkit/wiki/DomEventsAndMemoryLeaks

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/X6s6Ey_p28gJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Click Events not getting attached

2011-11-05 Thread Brandon Donnelson
Good point :)

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/pC_muhVoc_YJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Click Events not getting attached

2011-10-27 Thread Akash Gupta
don't cast them into elements, use them as widgets, do not deal with
elements at all.

On Thu, Oct 27, 2011 at 12:00 AM, gangurg gangurg gang...@gmail.com wrote:

 How to use them as Widgets ?


 On Wed, Oct 26, 2011 at 10:04 AM, Akash Gupta akash.b...@gmail.comwrote:

 ya use them as widgets instead of elements,  if you want to retain the
 listeners.


 On Wed, Oct 26, 2011 at 10:13 PM, Jeff Larsen larse...@gmail.com wrote:

 Why do you need to get widgets as elements?

 Why not just do

 p.add(new HTMLPanel(Hello a href=\#world\World/a);

  --
 You received this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To view this discussion on the web visit
 https://groups.google.com/d/msg/google-web-toolkit/-/1NyzCaMCB2QJ.

 To post to this group, send email to google-web-toolkit@googlegroups.com
 .
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To post to this group, send email to google-web-toolkit@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To post to this group, send email to google-web-toolkit@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Click Events not getting attached

2011-10-27 Thread Akash Gupta
instead of   MyPanel p = new MyPanel (contentHtmlPanel.getElement());

do it   MyPanel p = new MyPanel (contentHtmlPanel);

and have a constructor accordingly.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Click Events not getting attached

2011-10-26 Thread Jeff Larsen
Why do you need to get widgets as elements? 

Why not just do 

p.add(new HTMLPanel(Hello a href=\#world\World/a);

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/1NyzCaMCB2QJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Click Events not getting attached

2011-10-26 Thread Akash Gupta
ya use them as widgets instead of elements,  if you want to retain the
listeners.

On Wed, Oct 26, 2011 at 10:13 PM, Jeff Larsen larse...@gmail.com wrote:

 Why do you need to get widgets as elements?

 Why not just do

 p.add(new HTMLPanel(Hello a href=\#world\World/a);

  --
 You received this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To view this discussion on the web visit
 https://groups.google.com/d/msg/google-web-toolkit/-/1NyzCaMCB2QJ.

 To post to this group, send email to google-web-toolkit@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Click Events not getting attached

2011-10-26 Thread gangurg gangurg
How to use them as Widgets ?

On Wed, Oct 26, 2011 at 10:04 AM, Akash Gupta akash.b...@gmail.com wrote:

 ya use them as widgets instead of elements,  if you want to retain the
 listeners.


 On Wed, Oct 26, 2011 at 10:13 PM, Jeff Larsen larse...@gmail.com wrote:

 Why do you need to get widgets as elements?

 Why not just do

 p.add(new HTMLPanel(Hello a href=\#world\World/a);

  --
 You received this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To view this discussion on the web visit
 https://groups.google.com/d/msg/google-web-toolkit/-/1NyzCaMCB2QJ.

 To post to this group, send email to google-web-toolkit@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To post to this group, send email to google-web-toolkit@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Click Events not getting attached

2011-10-25 Thread gangurg gangurg
Any thoughts on the question below ? On similar lines , How to retain
Widgets Events after the widget is added as an Element .
I could add widget as an Element but loose the fact that  dont get events
attached to the widget . Is there any work around for this ?

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Click Events not getting attached

2011-10-24 Thread gangurg gangurg
public class MyPanel extends AbsolutePanel implements HasClickHandlers {
public MyPanel (Element elem) {
super(elem.com.google.gwt.user.client.Element cast());
onAttach();

}

@Override
public HandlerRegistration addClickHandler(ClickHandler handler) {
return addDomHandler(handler, ClickEvent.getType());
}
}


//Some Widget
 HTMLPanel contentHtmlPanel = new HTMLPanel(Hello a
href=\#world\World/a);



MyPanel p = new MyPanel (contentHtmlPanel.getElement());
 p.addClickHandler(new ClickHandler() {
 @Override
 public void onClick(ClickEvent event) {
  GWT.log(Hello World);
 }
   });




//Logic to mainuplate elemts inside a text area
com.google.gwt.dom.client.Text text =
 txt.getParentElement().replaceChild(Element.as(p.getElement()), txt);

The Click handler works on Firefox but in IE the click handler is not
getting attched .

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.