We need to just keep Extjs files in the page and the name of the components should be the same as the name of the attributes in Action so that we can refer those for the sake of validation.
In Struts 2.0 and above,We just need to make a single xml instead of two in Struts 1.x,with the name "ActionClassName-validation.xml" and this must be kept in the class path of the application.
To display error messages in view page,we can use <s:fielderror/>.
Thanks,
In Struts 2.0 and above,We just need to make a single xml instead of two in Struts 1.x,with the name "ActionClassName-validation.xml" and this must be kept in the class path of the application.
To display error messages in view page,we can use <s:fielderror/>.
Thanks,
ReplyDeleteExt.onReady(function(){
var simple = new Ext.form.FormPanel({
labelWidth: 75,
standardSubmit: true,
frame:true,
title: 'UserLoginForm',
bodyStyle:'padding:5px 5px 0',
width: 350,
defaults: {width: 230},
defaultType: 'textfield',
items: [
{ fieldLabel: 'User Name :', name: 'uname',required : true},
{ fieldLabel: 'Email :', name: 'mail', required : true },
{ fieldLabel: 'Age :', name: 'age',required : true}
],
buttons: [{
text: 'Submit',
handler: function() {
simple.getForm().getEl().dom.action = 'verify.action';
simple.getForm().getEl().dom.method = 'POST';
simple.getForm().submit(); }
}]
});
simple.render('frame');
});
This may be helpful to use as your view.
Delete