Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to add cancel button in PopupPanel in Gwt
    primarykey
    data
    text
    <p>I am new to programming.</p> <p>I have vertical panel.A button(lblAddFolderIcon) is added on the verticalPanel and also some widgets.</p> <p>on click of b1 there should be a popup panel with some more widgets and two button with add and cancel.</p> <p>My Code:</p> <pre><code> lblAddFolderIcon.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { String childFolder = item.getText(); String[] mainRepository=getPath(item); String objectId=item.getTitle(); final AddFolderPopup addFolderPopup = new AddFolderPopup(childFolder,mainRepository[0],objectId); addFolderPopup.setHeight("300px"); addFolderPopup.setWidth("502px"); addFolderPopup.setPopupPositionAndShow(new PopupPanel.PositionCallback() { public void setPosition(int offsetWidth, int offsetHeight) { // TODO Auto-generated method stub int left = (Window.getClientWidth() - offsetWidth) / 3; int top = (Window.getClientHeight() - offsetHeight) / 3; addFolderPopup.setPopupPosition(left, top); } }); //addFolderPopup.show(); addFolderPopup.addFolderGui(); } }); </code></pre> <hr> <pre><code> public class AddFolderPopup extends PopupPanel { VerticalPanel vpPopupl = new VerticalPanel(); private String childFolder; private String mainRepository; private String objectId; public AddFolderPopup(){ super(true); } public AddFolderPopup(String childFolder, String mainRepository, String objectId) { this.childFolder = childFolder; this.mainRepository = mainRepository; this.objectId = objectId; } public void addFolderGui() { // some widget to design Gui and Button btnCancel = new Button("Cancel"); btnCancel.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { /* i Dont Know what should i write here so that this popupwindow is closed */ } }); } } </code></pre> <p>Plz suggest some code to close this popup window and also whether my approach is correct.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload