commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lance Semmens <>
Subject RE: using struts validator for a form-property of type="org.apache.struts.upload.FormFile"
Date Wed, 24 Jan 2007 11:21:00 GMT
You might have more luck posting this on the struts user list.


-----Original Message-----
From: Fleetwood, Brett (DCS) [] 
Sent: 24 January 2007 07:17
Subject: using struts validator for a form-property of type="org.apache.struts.upload.FormFile"

G'day All,
I'm trying to validate a form that contains a
org.apache.struts.upload.FormFile as a form property on a JSP. From the
struts HTML tag-lib I'm using <html:file> in my JSP like this;
<html:file size="80" property="fileUpload" styleClass="inputfield"
errorStyleClass="inputfielderror" />

and I've set up the form bean like this;

<form-bean name="documentUploadForm" dynamic="true"

    <form-property name="fileUpload"

    <form-property name="documentIndex" type="java.lang.String" />

    <form-property name="personIndex" type="java.lang.String" />

    <form-property name="documentType" type="java.lang.String" />

    <form-property name="documentAttributeDescription"
type="java.lang.String" /> 


where the DcsDynaValidatorForm extends the DynaValidatorForm.

I'm trying to validate the form by checking the text of the FormFile
object to see if its blank. This is what i've tried in validation.xml
but it doesn't get picked up;

<field property="fileUpload" depends="required" >

    <arg key="File" resource="false" position="0" />


I'm quite new to this and if i've omitted anything then please let me

Thanks in advance,




To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message