samyem tuladhar - 2008-02-02

Logged In: YES
user_id=172234
Originator: NO

For eg:

HTML:
<body>
<div>
<button id="someButton"></button>
</div>
</body>

Code:
WButton button=new WButton("someButton");
button.addClickListener(...); //WON't work

button cannot be added to RootPanel.get() as this will move the button out from the DIV into the BODY level. We do not want to create a panel at div unnecessarily as well. Had WButton called the onAttach() event in constructor, the above code would work.