Summary
This PhenixID Solution Document (PSD) is written for PhenixID Identity Manager (IM) 5.4.1 or later.
Use case: You have a create or an edit form and like some controls to be mandatory. This is already a feature in IM but that feature does not let you customise the dialog box for the user. Also if the default dialog box will state the attribute which some times does not correspond with the description text.
With this filter you can create your own message text and map it to a control. You can have different message text for different controls in a form.
Download filter
Click the following link PSD1150 to download the filter.
Add filter to IM Configurator
Add MandatoryControlFilter.class to the following file path:
\..\PhenixID\IMConfigurator\ext\class\psd
You must restart IM Configurator for the filter to be active
Add filter to IM WEB
Add MandatoryControlFilter.class to the following file path:
\..\PhenixID\IM\customer\extension\class\psd
You must restart IM WEB for the filter to be active
Configure filter for a CREATE form
There are some difference when configure the mandatory filter for a create form or an edit form. This section describes when configure the filter for a CREATE form.
- Open IM Configurator
- Open the Create form you like to add the filter to.
- Open Control Properties in the form for the control that you like to associate the filter with.
Note. Make sure you do NOT have the original Mandatory checkbox checked! - Click External Filter
- Click no filter assigned under PreSave
- In Java class type: psd.MandatoryControlFilter
- In Method type: checkAttribute
- Under parameters, click String
- In the String dialog box, add your message.
- Note! For some controls you also have to add the touched filter to get the MandatoryControlFilter to work properly.
How to add the touched filterClick no filter assigned under Init- In Java class type: filter.Nordicedge
In Method type: touch
- In Java class type: filter.Nordicedge
- If your have more controls just repeat 1-10.
- Save the form and test you your form
Configure filter for an EDIT form
There are some difference when configure the mandatory filter for a create form or an edit form. This section describes when configure the filter for an EDIT form.
For an Edit form you need to add two filters. On any control where you add the MandatoryControlFilter you also need to add the INIT filter, touch. IM will on an EDIT form only operate on controls that are touched.
- Open IM Configurator
- Open the Edit form you like to add the filter to.
- Open Control Properties in the form for the control that you like to associate the filter with.
Note. Make sure you do NOT have the original Mandatory checkbox checked! - Click External Filter
- How to add the psd.MandatoryControlFilter filter
- Click no filter assigned under PreSave
- In Java class type: psd.MandatoryControlFilter
- In Method type: checkAttribute
- Under parameters, click String
- In the String dialog box, add your message.
- Note! For some controls you also have to add the touched filter to get the MandatoryControlFilter to work properly.
How to add the touched filter- Click no filter assigned under Init
In Java class type: filter.Nordicedge
In Method type: touch
- Click no filter assigned under Init
- If your have more controls just repeat 1-6.
- Save the form and test you your form
Test filter in IM Web
Login and test the form. Leave out to add a value in your control and click Apply or Create depending or form type.
MISC
Create forms and default text
In create form, IM will add a default text before your custom text stating Could not create object!
If you like that text to be something else or removed you can solve this with the lang-file.
Open en.lang and add Could not create object!=Something else or just a space to remove the text.
Format of custom text
You can add HTML styling to your text. For example:
< b >Manager< /b > is mandatory and has no value.
DISCLAIMER
Information provided in this document is for your information only. PhenixID makes no explicit or implied claims to the validity of this information. Any trademarks referenced in this document are the property of their respective owners.The origin of this information may be internal or external to PhenixID. PhenixID makes all reasonable efforts to verify this information.
PhenixID - support.phenixid.se