cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to add validation on Save action in backoffice

Former Member
0 Likes
849

Like in create-wizard we can add some validation rules which make the navigation buttons unavailable if for example some fields are not filled.

Does anyone how to use the validation mechanism in editor area?

The fields of data model are marked as mandatory and when the user don't fill them the default message appears.

How to manage this notification?

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Likes

Hi ,

You have to write render class for your's fields in editor area.With render class and ZK action events to able to validate the render fields.Please check OOTB password rendered.

UserPasswordPanelRenderer.java

Class Usage :

         <editorArea:tab name="hmc.password" position="7" tooltipText="customersupport_backoffice_customer_tab_password_desc">
             <editorArea:section name="hmc.password">
                 <editorArea:customPanel name="userPasswordPanelRenderer" spring-bean="userPasswordPanelRenderer"/>
                 <editorArea:panel name="">
                     <editorArea:attribute qualifier="passwordQuestion" description="hmc.text.passwordQuestion.description"/>
                     <editorArea:attribute qualifier="lastLogin" description="hmc.text.lastLogin.description"/>
                     <editorArea:attribute qualifier="loginDisabled" label="hmc.text.password.logindisabled"/>
                 </editorArea:panel>
             </editorArea:section>
         </editorArea:tab>
         
         

For notifications use NotificationService.java