Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » How to create a Pop Up Form?(How to create a Pop Up Form?)
How to create a Pop Up Form? [message #1062769] Mon, 10 June 2013 16:23 Go to next message
Ferran Siles Vila is currently offline Ferran Siles VilaFriend
Messages: 11
Registered: March 2013
Junior Member
Hello,

I just wanted to know which is the simple way to create a Pop-Up with an input form, which pops up for example when selecting a menu option. If inside this Pop-UP the OK button is clicked the (*) SERVICES.getService(ILDAPOutlineService.class).methodXXX() will be called and the Pop-up will be closed.

Connected to the first one, I have another question: How to "communicate" with other parts of the 'Desktop' class like for example a menu, "menu Y", (implemented with "AbstractMenu"), after calling(*), and then calling for example ZZZZZClass.this.execAction()?

Thank you for your time.



Re: How to create a Pop Up Form? [message #1062852 is a reply to message #1062769] Tue, 11 June 2013 06:15 Go to previous messageGo to next message
Urs Beeli is currently offline Urs BeeliFriend
Messages: 573
Registered: October 2012
Location: Bern, Switzerland
Senior Member
Displaying a pop-up dialog from a menu

  1. Define the popup dialog as a normal form (let's assume it is called PopupDialogForm)
  2. in your menu's execAction method add the following code:
      PopupDialogForm form = new PopupDialogForm();
      form.startNew();
      form.waitFor();
      if (form.isFormStored()) {
        SERVICES.getService(ILDAPOutlineService.class).methodXXX();
      }
    


I am not sure I understand what you want to do in your second part of the question, but if you need access to a ZZZZZClass instance, why don't you add a member var for it to Desktop and then use that to access execAction()?

[Updated on: Tue, 11 June 2013 06:16]

Report message to a moderator

Re: How to create a Pop Up Form? [message #1062866 is a reply to message #1062852] Tue, 11 June 2013 07:52 Go to previous messageGo to next message
Jeremie Bresson is currently offline Jeremie BressonFriend
Messages: 1252
Registered: October 2011
Senior Member
An other possibility is to use MessageBox:

MessageBox.showOkMessage(TEXTS.get("MessageBoxTitle"), TEXTS.get("MessageBoxHeader"), TEXTS.get("MessageBoxInfo"))


There is different kind of message boxes (Ok, Yes/No, Yes/No/Cancel, delete confirmation, ...) Have a look at the different static methods on MessageBox.
Re: How to create a Pop Up Form? [message #1062963 is a reply to message #1062866] Tue, 11 June 2013 14:32 Go to previous message
Ferran Siles Vila is currently offline Ferran Siles VilaFriend
Messages: 11
Registered: March 2013
Junior Member
Thank you both! Finally I have chosen the solution proposed by Urs, although the one by Jeremie could fit my requirements.
Previous Topic:Switching between table pages
Next Topic:How to access execAction() methods from Desktop outer class?
Goto Forum:
  


Current Time: Fri Apr 26 21:28:38 GMT 2024

Powered by FUDForum. Page generated in 0.02921 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top