The following is my action class
package com.zedlabs.samplereg.action;
import java.util.HashMap;
import java.util.Map;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import com.zedlabs.action.ZedActionSupport;
import com.zedlabs.samplereg.dto.PDDto;
import com.zedlabs.samplereg.service.SampleRegService;
import com.zedlabs.samplereg.service.SampleRegServiceImpl;
public class SampleRegOne extends ZedActionSupport {
private static final long serialVersionUID = -8621676046564513353L;
private Log log=LogFactory.getLog(SampleRegOne.class);
private SampleRegService sampleReg=new SampleRegServiceImpl();
private Map<String,String> sampledrawnBy=new HashMap<String,String>();
private PDDto primaryDetails=new PDDto();
@Override
public String execute() {
try{
sampledrawnBy.put("zedlabs", "Zedlabs");
sampleReg.savePrimaryDetails(primaryDetails);
}catch(Exception e){
log.error(e.getMessage(), e);
}
return SUCCESS;
}
public Map<String, String> getSampledrawnBy() {
return sampledrawnBy;
}
public void setSampledrawnBy(Map<String, String> sampledrawnBy) {
this.sampledrawnBy = sampledrawnBy;
}
public PDDto getPrimaryDetails() {
return primaryDetails;
}
public void setPrimaryDetails(PDDto primaryDetails) {
this.primaryDetails = primaryDetails;
}
}
*Thanks and Regards,*
Muralidhar Yaragalla.
*http://yaragalla.blogspot.in/ <http://yaragalla.blogspot.in/>*
On Thu, Dec 25, 2014 at 6:30 PM, Yaragalla Muralidhar <
[email protected]> wrote:
> if the validation works then i can think about messages
>
> *Thanks and Regards,*
> Muralidhar Yaragalla.
>
> *http://yaragalla.blogspot.in/ <http://yaragalla.blogspot.in/>*
>
> On Thu, Dec 25, 2014 at 6:30 PM, Yaragalla Muralidhar <
> [email protected]> wrote:
>
>> I have changed the theme to css_xhtml so it should display right?
>>
>> *Thanks and Regards,*
>> Muralidhar Yaragalla.
>>
>> *http://yaragalla.blogspot.in/ <http://yaragalla.blogspot.in/>*
>>
>> On Thu, Dec 25, 2014 at 6:28 PM, Dave Newton <[email protected]>
>> wrote:
>>
>>> Then you're doing something else wrong; never mind.
>>>
>>> You still won't see the messages unless you display them manually.
>>>
>>> On Thu, Dec 25, 2014 at 6:56 AM, Yaragalla Muralidhar
>>> <[email protected]> wrote:
>>> > in my case validations are not happenening . Even though validation
>>> fails
>>> > it is moving to succeess rather than input jsp.
>>> >
>>> > *Thanks and Regards,*
>>> > Muralidhar Yaragalla.
>>> >
>>> > *http://yaragalla.blogspot.in/ <http://yaragalla.blogspot.in/>*
>>> >
>>> > On Thu, Dec 25, 2014 at 6:15 PM, Dave Newton <[email protected]>
>>> wrote:
>>> >
>>> >> Please read up on the themes.
>>> >>
>>> >> Nutshell: validation happens (this is trivially provable), validation
>>> >> message display does not.
>>> >>
>>> >> On Thu, Dec 25, 2014 at 6:41 AM, Yaragalla Muralidhar
>>> >> <[email protected]> wrote:
>>> >> > is it because of the simple theam? In simple theam validations dont
>>> >> happen
>>> >> > is it? if i dont use simple theme view components are generating
>>> their
>>> >> own
>>> >> > decoration. Our custom alignment is going wrong.
>>> >> >
>>> >> > *Thanks and Regards,*
>>> >> > Muralidhar Yaragalla.
>>> >> >
>>> >> > *http://yaragalla.blogspot.in/ <http://yaragalla.blogspot.in/>*
>>> >> >
>>> >> > On Thu, Dec 25, 2014 at 5:05 PM, Dave Newton <[email protected]
>>> >
>>> >> wrote:
>>> >> >
>>> >> >> Simple theme is simpler than you think.
>>> >> >> On Dec 25, 2014 4:46 AM, "Yaragalla Muralidhar" <
>>> >> [email protected]
>>> >> >> >
>>> >> >> wrote:
>>> >> >>
>>> >> >> > I am using struts2.3.20 and using simple theme.
>>> >> >> >
>>> >> >> > *Thanks and Regards,*
>>> >> >> > Muralidhar Yaragalla.
>>> >> >> >
>>> >> >> > *http://yaragalla.blogspot.in/ <http://yaragalla.blogspot.in/>*
>>> >> >> >
>>> >> >> > On Thu, Dec 25, 2014 at 4:08 PM, Yaragalla Muralidhar <
>>> >> >> > [email protected]> wrote:
>>> >> >> >
>>> >> >> > > Hi i am having problem in turning on validations. I have
>>> written
>>> >> >> > > "actionClass-validation.xml" file in the same package as action
>>> >> class.
>>> >> >> > but
>>> >> >> > > the validations are not working. the following is my
>>> validation xml
>>> >> >> file.
>>> >> >> > >
>>> >> >> > > <!DOCTYPE validators PUBLIC "-//Apache Struts//XWork Validator
>>> >> >> 1.0.3//EN"
>>> >> >> > > "
>>> http://struts.apache.org/dtds/xwork-validator-1.0.3.dtd">
>>> >> >> > > <validators>
>>> >> >> > >
>>> >> >> > > <field name="primaryDetails.branchId">
>>> >> >> > > <field-validator type="required">
>>> >> >> > > <message key="error.additional.details.passport.no
>>> ">Could
>>> >> not
>>> >> >> > find
>>> >> >> > > error.additional.details.passport.no!</message>
>>> >> >> > > </field-validator>
>>> >> >> > > <field-validator type="regex">
>>> >> >> > > <param name="regex"><![CDATA[[1-9]{0,40}]]></param>
>>> >> >> > > <message key="error.additional.details.pancard.no">Could
>>> not
>>> >> >> find
>>> >> >> > > error.additional.details.pancard.no</message>
>>> >> >> > > </field-validator>
>>> >> >> > > </field>
>>> >> >> > > <field name="primaryDetails.patientName">
>>> >> >> > > <field-validator type="required">
>>> >> >> > > <message key="error.additional.details.passport.no
>>> ">Could
>>> >> not
>>> >> >> > find
>>> >> >> > > error.additional.details.passport.no!</message>
>>> >> >> > > </field-validator>
>>> >> >> > >
>>> >> >> > > </field>
>>> >> >> > >
>>> >> >> > > </validators>
>>> >> >> > >
>>> >> >> > > do i have to do something else to turn on validations?
>>> >> >> > >
>>> >> >> > >
>>> >> >> > > *Thanks and Regards,*
>>> >> >> > > Muralidhar Yaragalla.
>>> >> >> > >
>>> >> >> > > *http://yaragalla.blogspot.in/ <http://yaragalla.blogspot.in/
>>> >*
>>> >> >> > >
>>> >> >> >
>>> >> >>
>>> >>
>>> >>
>>> >>
>>> >> --
>>> >> e: [email protected]
>>> >> m: 908-380-8699
>>> >> s: davelnewton_skype
>>> >> t: @dave_newton
>>> >> b: Bucky Bits
>>> >> g: davelnewton
>>> >> so: Dave Newton
>>> >>
>>> >> ---------------------------------------------------------------------
>>> >> To unsubscribe, e-mail: [email protected]
>>> >> For additional commands, e-mail: [email protected]
>>> >>
>>> >>
>>>
>>>
>>>
>>> --
>>> e: [email protected]
>>> m: 908-380-8699
>>> s: davelnewton_skype
>>> t: @dave_newton
>>> b: Bucky Bits
>>> g: davelnewton
>>> so: Dave Newton
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [email protected]
>>> For additional commands, e-mail: [email protected]
>>>
>>>
>>
>