Skip to Content

As we know that ,there are 6 types of controllers:

  1. Component controller
  2. Custom controller
  3. Configuration controller
  4. Interface controller
  5. View controller
  6. Window controller

Then what is the configuration controller?


Configuration controller in turns a custom controller.

What is the use of Configuration controller?


It is necessary if the corresponding component implements special configuration and personalization.

Eg: Setting the visibility of a view element dynamically for different users

Instead of writing code to set visibility we can maintain the visibility in configuration. Each user group can have their own visibility settings through configuration.

All attributes that should be accessible via configuration have to be defined in the context of the configuration controller.

Limitations of Configuration controller:


– Only one configuration controller may exist in any component.

– Any controller can access the configuration controller, but configuration controller cannot access any other controller.

– Life time of this controller is as long as the component lives.

Creation of configuration controller:


Step1: Create a WD component

1.JPG

Step2: Create a Custom controller by right clicking on component

2.JPG

Step3: Now you can see the extra folder in component hierarchy for custom controller.

3.JPG

Step4: Change the custom controller to configuration controller by right clicking on the custom controller

4.JPG

Step5: Now you can see that, name has been changed to configuration controller.

          Like component controller, we can create context attributes in custom controller.

          Nodes which we created in configuration controller will be available during configuration.

          Now create a node for visibility with type WDY_BOOLEAN.

5.JPG

Step6: Create a context node in view controller and place the UI elements in the view

6.JPG

61.JPG

Step7: Unlike component controller, configuration controller context will not be available to view controller. To make it available, create component usage in view              controller properties.

7.JPG

Step8: Map the context from configuration controller to view controller.

8.JPG

Step9: We want to set the visibility through configuration to material number UI element.

          So bind the visibility of material number with visibility node.

9.JPG

Step10: Create WD application

             Right click on application and click on create/change configuration

10.JPG

Step11: One browser window will open to create application configuration.

            Enter the configuration name and click on create

11.JPG

Step12: Enter the package name and click on OK

12.JPG

Step13: We have created now application configuration, Next screen prompt you to create Component configuration.

             Enter the configuration name and hit enter. After hitting enter  ‘Go to Component Configuration’ button will be enabled.

13.JPG

– Step14: Click on ‘Go to Component Configuration’ button

14.JPG

– Step15:In the next screen enter the configuration name and click on create and save it into one package

15.JPG

Step16:  Node attributes which we created in Configuration controller will be available in Component configuration.

16.JPG

Step17:  Now check the visibility check box to make the input field visible and Click on Save

17.JPG

Step18: Before testing the configuration make sure that, all configurations (Both application and component configurations) has been saved.

            Now expand the application, there you can see the application configuration which we have created.

            Assign the application name to the application parameter WDCONFIGURATIONID

untitled.JPG

Step 19: Test the application

181.JPG

Step 20: Now change the configuration to make the material number UI element invisible.

            Double click on configuration. Click on start configurator.

19.JPG

Step 21: Click on Change

20.JPG

Step22:Click on the button ‘Go to Component configuration’.

           Uncheck the visibility attribute and click on Save.

21.JPG

Step 23: Test the Application.

22.JPG

Conclusion: Each application can have N number of configurations. So each user group can set their visibility according to their requirement without touching the code.

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply