Hie

I created a gwt component which is a button (click on which inovkes a
popup).

If i embed it just once then it comes fine on the html page. However, when i
embed it for the second time i just see one.

here is the module load code:
@Override
public void onModuleLoad() {

final Button joinusButton = new Button("Join Us");
joinusButton.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
// Instantiate the popup and show it.
JoinUsPopup joinusPopup = new JoinUsPopup();
joinusPopup.showRelativeTo(joinusButton);
joinusPopup.show();
}
});


RootPanel.get("joinus").add(joinusButton);
if(RootPanel.get("joinusbottom") != null){
final Button joinusBottomButton = new Button("Join Us");
joinusBottomButton.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
// Instantiate the popup and show it.
JoinUsPopup joinusBottomPopup = new JoinUsPopup();
joinusBottomPopup.showRelativeTo(joinusBottomButton);
joinusBottomPopup.show();
}
});
RootPanel.get("joinusbottom").add(joinusBottomButton);
}



and mypage.html has following divs

<div id="joinus"></div>

<div id="joinusbottom"> </div>

Any idea why i see just one ?

Thankx and Regards

Vik
Founder
www.sakshum.com
www.sakshum.blogspot.com

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

Reply via email to