Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » Extension visibility
Extension visibility [message #1860580] Fri, 18 August 2023 08:46 Go to next message
Oueslati Anis is currently offline Oueslati AnisFriend
Messages: 134
Registered: June 2014
Location: Paris
Senior Member
Hello
I would like to control the extension visibility from a field existing in other module.
I have a form containing a Smart field and a Tab Box
I created an extension for the tab Box that add a new Tab,
Now I would like to control the visibility of the new Tab based on the value on the field

I tried to make the Smart Field acting as a master field for the tab box but when try to get the value I have null

I get the value in the

public ExtensionFormDetailTabExtension(DetailsBox ownerForm) {
		super(ownerForm);
        ownerForm.getMasterValue();
	}


how to get value of the Smart field inside the extension and also notify extension that smart field value changed.

Regards
Anis
Re: Extension visibility [message #1860899 is a reply to message #1860580] Thu, 07 September 2023 15:28 Go to previous message
Beat Schwarzentrub is currently offline Beat SchwarzentrubFriend
Messages: 214
Registered: November 2010
Senior Member
Hi Anis

You should not access other fields in the constructor. When a form is opened, there are two phases. In the first phase, instances of all form fields are created, e.g. their constructor is called, and all properties are set to their configured value (initConfig). Then, in the second phase, all instances are initialized (execInit) via a form field visitor.

I think in your case, you should hook into the second phase. In the extension, you can manually register a listener to the smart field, so you get informed when the value changes.

Regards,
Beat
Previous Topic:Drag And Drop in TileGrid
Next Topic:Application with and without authentication
Goto Forum:
  


Current Time: Sat Dec 07 06:47:19 GMT 2024

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

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

Back to the top