You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Alvaro Martinez <in...@wanadoo.es> on 2003/12/03 17:19:15 UTC

validate at least one field

I would like to validate a form that contains several fields where at least
one of them should be filled (don't mind what of them)
How can I implement this with validator.xml?
Thanks


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


RE: How to disable a Text Box

Posted by Ramachandran <ra...@summitworks.com>.
yes i done like that only. Now it is working. Thank u...

-----Original Message-----
From: Ravi Kulkarni [mailto:rkulkarni@applabs.net]
Sent: Friday, February 06, 2004 10:06 AM
To: Struts Users Mailing List
Subject: RE: How to disable a Text Box


Well you can make the textbox readonly. This doesnt allow the user to enter
any text and u can read the value of the text box in ur action.

Hope it helps



Kulkarni

-----Original Message-----
From: Sathish Kumar T.K. [mailto:sathishk@quinnox.com]
Sent: Thursday, February 05, 2004 10:55 AM
To: Struts Users Mailing List
Subject: Re: How to disable a Text Box


Hm, use a hidden field along with the disabled text box.
Now u can take the value from the hidden field.

Something like...
<html:hidden property="start_date_hidden" value="<%=start_date%>"/>

Sathish Kumar T.K.

----- Original Message -----
From: "Ramachandran" <ra...@summitworks.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Thursday, February 05, 2004 11:00 AM
Subject: How to disable a Text Box


> Hi All,
>
>              I am having an text box.At the right side of text box there
is
> link called 'Date Component'.If select the date from that component it
will
> display in taht text box. What i have to do means, i don't allow the user
to
> enter any thing inside that text box.
>
>             So i gave disabled property. But i was not able to get the
> request from another page. And also value of date is not entering into
> database. It is entered as null.
>
>             So what i have to do. Is there any possibilty in javascript.
If
> any knows, mail me regarding this.
>
> <html:text property="start_date" size="20"value="<%=start_date%>"/>
> <A id=anchor1
>
onclick="cal1.select(document.forms[0].start_date,'anchor1','dd/MMM/yyyy');
> return false;"href="#"name=anchor1><img src="images/calendar.gif"
> border="0" width='30' height='20'>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


RE: How to disable a Text Box

Posted by Ravi Kulkarni <rk...@applabs.net>.
Well you can make the textbox readonly. This doesnt allow the user to enter
any text and u can read the value of the text box in ur action.

Hope it helps



Kulkarni

-----Original Message-----
From: Sathish Kumar T.K. [mailto:sathishk@quinnox.com]
Sent: Thursday, February 05, 2004 10:55 AM
To: Struts Users Mailing List
Subject: Re: How to disable a Text Box


Hm, use a hidden field along with the disabled text box.
Now u can take the value from the hidden field.

Something like...
<html:hidden property="start_date_hidden" value="<%=start_date%>"/>

Sathish Kumar T.K.

----- Original Message -----
From: "Ramachandran" <ra...@summitworks.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Thursday, February 05, 2004 11:00 AM
Subject: How to disable a Text Box


> Hi All,
>
>              I am having an text box.At the right side of text box there
is
> link called 'Date Component'.If select the date from that component it
will
> display in taht text box. What i have to do means, i don't allow the user
to
> enter any thing inside that text box.
>
>             So i gave disabled property. But i was not able to get the
> request from another page. And also value of date is not entering into
> database. It is entered as null.
>
>             So what i have to do. Is there any possibilty in javascript.
If
> any knows, mail me regarding this.
>
> <html:text property="start_date" size="20"value="<%=start_date%>"/>
> <A id=anchor1
>
onclick="cal1.select(document.forms[0].start_date,'anchor1','dd/MMM/yyyy');
> return false;"href="#"name=anchor1><img src="images/calendar.gif"
> border="0" width='30' height='20'>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: How to disable a Text Box

Posted by "Sathish Kumar T.K." <sa...@quinnox.com>.
Hm, use a hidden field along with the disabled text box.
Now u can take the value from the hidden field.

Something like...
<html:hidden property="start_date_hidden" value="<%=start_date%>"/>

Sathish Kumar T.K.

----- Original Message -----
From: "Ramachandran" <ra...@summitworks.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Thursday, February 05, 2004 11:00 AM
Subject: How to disable a Text Box


> Hi All,
>
>              I am having an text box.At the right side of text box there
is
> link called 'Date Component'.If select the date from that component it
will
> display in taht text box. What i have to do means, i don't allow the user
to
> enter any thing inside that text box.
>
>             So i gave disabled property. But i was not able to get the
> request from another page. And also value of date is not entering into
> database. It is entered as null.
>
>             So what i have to do. Is there any possibilty in javascript.
If
> any knows, mail me regarding this.
>
> <html:text property="start_date" size="20"value="<%=start_date%>"/>
> <A id=anchor1
>
onclick="cal1.select(document.forms[0].start_date,'anchor1','dd/MMM/yyyy');
> return false;"href="#"name=anchor1><img src="images/calendar.gif"
> border="0" width='30' height='20'>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


How to disable a Text Box

Posted by Ramachandran <ra...@summitworks.com>.
Hi All,

             I am having an text box.At the right side of text box there is
link called 'Date Component'.If select the date from that component it will
display in taht text box. What i have to do means, i don't allow the user to
enter any thing inside that text box.

            So i gave disabled property. But i was not able to get the
request from another page. And also value of date is not entering into
database. It is entered as null.

            So what i have to do. Is there any possibilty in javascript. If
any knows, mail me regarding this.

<html:text property="start_date" size="20"value="<%=start_date%>"/>
<A id=anchor1
onclick="cal1.select(document.forms[0].start_date,'anchor1','dd/MMM/yyyy');
return false;"href="#"name=anchor1><img src="images/calendar.gif"
border="0" width='30' height='20'>


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org