CQ5 Dialog Validation

By registering a listener to the beforesubmit event, you can validate a dialog.

… xtype=“dialog”>    … 

Serverside Validation

After defining a custom validating servlet, you can put the following code snippet in the beforesubmit area. It is important to call the servlet using async=false, to ensure everything is handled by the same thread.
CQ.Ext.Ajax.request({ method: ‘POST’, url: ‘/content.myvalidationservlet.json’, async: false, success: function(response){
  // do something
}, params: { … } }); 


tag

71 Words

2013-02-06 14:39 +0100