Skip to main content



      Home
Home » Eclipse Projects » Eclipse Scout » Extension visibility
Extension visibility [message #1860580] Fri, 18 August 2023 04:46 Go to next message
Eclipse UserFriend
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 11:28 Go to previous message
Eclipse UserFriend
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: Mon Jun 16 13:28:17 EDT 2025

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

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

Back to the top