Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » [Neon] OkButton
[Neon] OkButton [message #1718505] Fri, 25 December 2015 10:57 Go to next message
Rene Eigenheer is currently offline Rene EigenheerFriend
Messages: 109
Registered: July 2009
Senior Member
I'm struggling with an OkButton.

Using Neon M4, I've created a new Scout-Project.
In the HelloWorldForm I've added an OKButton within the TopBox:
@Order(2000.0)
public class OkButton extends AbstractOkButton {
}

After pressing the Ok Button and switching to several other function, the HelloWorldForm never again paints the fields - the screen stays blank.

Do I miss something?

[Updated on: Fri, 25 December 2015 10:57]

Report message to a moderator

Re: [Neon] OkButton [message #1718520 is a reply to message #1718505] Sat, 26 December 2015 08:35 Go to previous messageGo to next message
Jeremie Bresson is currently offline Jeremie BressonFriend
Messages: 1252
Registered: October 2011
Senior Member
Maybe I missed something in your question, but an "Ok button" saves and closes the form. This is the case with the Neon or the Mars Version.

When the form is closed, my guess is that you have nothing more on the form/view stack and this could explain the white screen you see.

If you just want to save the form content but let the form open, I recommend you to use a SaveButton (a class that extends AbstractSaveButton)

Does it help you? If not, feel free to continue the discussion. Some more code and/or screenshots might help to understand what you mean.
Re: [Neon] OkButton [message #1718525 is a reply to message #1718520] Sat, 26 December 2015 09:25 Go to previous messageGo to next message
Rene Eigenheer is currently offline Rene EigenheerFriend
Messages: 109
Registered: July 2009
Senior Member
yes that is clear,

but how do I reopen the form? I thought, that when I click later on the same page in the navigation tree, that the form should newly open again.
Re: [Neon] OkButton [message #1718526 is a reply to message #1718525] Sat, 26 December 2015 09:41 Go to previous messageGo to next message
Jeremie Bresson is currently offline Jeremie BressonFriend
Messages: 1252
Registered: October 2011
Senior Member
It is really hard to tell without seeing your code... My guess is that you are dealing with a detail form for a page... If you are using the default behavior, you could debug when the methods "AbstractPage.ensureDetailFormCreated()" and "AbstractPage.ensureDetailFormStarted()" are called and maybe modify them to match the behavior you want.

I suspect that the detail form do not reappear, because it is still there but closed (this state is produced when the user has clicked on OK)

I think the "Scout way" is that we do not have any data modification in our detail form. This way, starting the detail form once is sufficient.

If you add buttons that allow the user to close the detail form, you also need to program the logic that will discard the old instance of your form (the one that is stored and closed) and create a new instance of the form when the user clicks on the page again.
Re: [Neon] OkButton [message #1718706 is a reply to message #1718526] Tue, 29 December 2015 11:06 Go to previous message
Rene Eigenheer is currently offline Rene EigenheerFriend
Messages: 109
Registered: July 2009
Senior Member
Jeremie, based on your comments I've got it working by adding
if ((getDetailForm() != null) && getDetailForm().isFormClosed()) {
	setDetailForm(null);
}
super.pageActivatedNotify();

in the pageActivatedNotify()

I still think, that there might be somewhere a problem/bug ... maybe next time I will meet with some of you guys, we can discuss Wink
Previous Topic:[Neon] Change colors of html ui
Next Topic:[Neon] Mobile support
Goto Forum:
  


Current Time: Thu Apr 25 06:54:07 GMT 2024

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

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

Back to the top