Showing results for 
Search instead for 
Did you mean: 

Add validation checks to Save button in Backoffice editor-area

Former Member
0 Kudos

Hi all

In one of my item-types I have a list attribute and I want to validate that always there will be at least one item in the list.

     <collectiontype code="myListCode" elementtype="AnyType" autocreate="true" type="list"/>
     <attribute qualifier="myList" type="myListCode">
            <modifiers optional="false"/>
            <persistence type="property"/>

In the create-wizard widget you can control the buttons visibility through the visible attribute as shown below thus enforcing the user to choose at least one item in the list.

 <wz:done visible="newItem.catalogVersion != null and newItem.myList != null">

But when it comes to the editor-area widget you can empty the list and save the changes without a problem.

Is there any way to customise the SAVE button in the action toolbar in editor-area in the same way as in create-wizard?



Accepted Solutions (0)

Answers (1)

Answers (1)

Active Contributor
0 Kudos


data validation should not be implemented in the view. The validation engine support will be added to the framework to support the user and the messages will be visible in the ui. So far you have to rely on the validation that happens when the entities are persisted. So you may define constaraints on the model or via Interceptors.

Cheers, Wojtek