RE: How to make readonly in Select Box

2004-02-20 Thread Ameer Ahmed
Use logic tags, and check if in edit mode then display the value using bean write, 
else display the drop down

Ramachandran [EMAIL PROTECTED] wrote:If i make it as disable means, i was not able 
to retrieve the value na.

For me now, If a user goes for a Edit Page, what he chooses while add should
be displayed but in readonly mode...

So shall i can use disable here?

-Original Message-
From: Nguyen, Hien [mailto:[EMAIL PROTECTED]
Sent: Friday, February 20, 2004 9:14 PM
To: 'Struts Users Mailing List'
Subject: RE: How to make readonly in Select Box


But select has 'disabled' as an attribute
(http://www.w3.org/TR/html401/interact/forms.html#h-17.6) so I think you can
use 'disabled' to make it read-only.

-Original Message-
From: Slattery, Tim - BLS [mailto:[EMAIL PROTECTED]
Sent: Friday, February 20, 2004 10:39 AM
To: 'Struts Users Mailing List'
Subject: RE: How to make readonly in Select Box


 I want to make readyonly in Select Box. If i gave
 readonly=true. There is no property called readonly..What i
 have to do for that one

HTML Select groups don't have a readonly property, that's why the Struts
tag doesn't have it.

--
Tim Slattery
[EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.

Validator Order with custom validations

2004-02-20 Thread Ameer Ahmed
Hi All, 
I have the following setup for validating certain fields. I have written a custom 
validator for validating certain date logic.
 
validation-rules.xml
 
validator name=xxxDates
  classname=com.xxxValidator
  method=validatexxxDates
  methodParams=java.lang.Object,
org.apache.commons.validator.ValidatorAction,
org.apache.commons.validator.Field,
org.apache.struts.action.ActionErrors,
javax.servlet.http.HttpServletRequest
  msg=errors.date.lessthanequal
/validator
 
validator.xml
 
field property=presentationStart  depends=required,date,xxxDates
 arg0 key=presentationStart/
 var
  var-namedatePatternStrict/var-name
  var-valueMM/dd//var-value
  var-namesecondProperty/var-name
  var-valuepresentationEnd/var-value
 /var
 /field 
  field property=presentationEnd  depends=required,date,xxxDates
 arg0 key=presentationEnd/
 var
  var-namedatePatternStrict/var-name
  var-valueMM/dd//var-value
  var-namesecondProperty/var-name
  var-valuepresentationStart/var-value
 /var
 /field
 
and on my jsp
html:form  action=/propertyOffer onsubmit=return validatePropertyFormBean(this);
html:text property=presentationStart size=20  /
html:text property=presentationEnd size=20  /

html:javascript formName=propertyFormBean/
 
Ok this works like a charm, if i submit the form without any values i get a javascript 
popup alert saying presentationStart is required, presentationEnd is required. 
However, when i put a value in presentationStart and submit i dont get a js popup for 
presentationEnd, however the validation runs and i get a server side error saying 
presentationEnd is required. So my question is when you put in a custom validator for 
one of the fields why doesnt it evaluate the required validation (javascript) for the 
2nd field? is this a bug? Any help would be appreciated. If i remove my custom 
validator(xxxDates) from both fields, the js required pop up runs smoothly for the 2nd 
field if the first one is not null. So to recap when you put in a custom validator for 
one of the fields the validator doesn't run through the rest of the fields until it 
has performed the serverside validation on the custom validator for the 1st field. I 
am using struts 1.1 with validator as plug-in
 
Ameer
 


-
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.