[midPoint] Mandatory fields

Katarina Valalikova k.valalikova at evolveum.com
Thu Aug 6 15:16:02 CEST 2015


Hi Peter,

which version of midPoint are you using? I'm asking because from the 
version 3.1.1 it is not necessary to modify midpoint's schemas 
dirrectly. You can do it in runtime environment using object template. 
In my opinion this is better way for customization as you can do it 
without rebuilding and redeploying midPoint with every other change. The 
example configuration is bellow:

<objectTemplate 
xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
xmlns:c="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
                 oid="10000000-0000-0000-0000-000000000000">
    <name>User Template</name>
    <mapping>
                 <!-- this is a section where you can have your mappings -->
    </mapping>

<!-- here start the section for 'schema override' -->
  <item>
         <ref>c:additionalName</ref> <!-- the name of the schema 
attribute you want to modify -->
         <limitations>
*<layer>presentation</layer> * <!-- layer has to be set to presentation 
- this will provide checks on the GUI layer -->*
**            <ignore>true</ignore>*                      <!-- 
completely hides this attribute in GUI -->
         </limitations>
    </item>

<item>
         <ref>c:name</ref>
         <limitations>
*<layer>presentation</layer>**
**            <minOccurs>1</minOccurs>*        <!-- this makes the field 
mandatory -->
         </limitations>
    </item>

<!-- end of the 'schema override' section -->


Hope this helps you.

Best Regards,
Katarina Valalikova


Dňa 6. 8. 2015 o 14:43 Petr Gašparík napísal(a):
> Hi,
> I customized common-3.xsd - minOccurs="1" in scheme jar to make 
> attributes mandatory.
>
> Now, input fields has red asterisk but midPoint is not taking care 
> about that and allows empty values.
>
> What I am missing? Thanks!
> Any answer is appreciated, we run PoC right now..
>
> beste regards, Petr G.
> -- 
> -- 
> Petr G.
>
>
> _______________________________________________
> midPoint mailing list
> midPoint at lists.evolveum.com
> http://lists.evolveum.com/mailman/listinfo/midpoint

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20150806/44b0fd14/attachment.htm>


More information about the midPoint mailing list