Re: Validator with property String array problem

2003-08-26 Thread Suhel Rizvi Hotmail Account
Hi David,

Thanks for the info but still not made progress and wonder if you can help
or point me in the right direction for implementation guidance.

I tried downloading latest nightly build of commons-validator
(commons-validator-20030826.zip) and deployed it into my application to the
WEB-INF/lib directory but still got the same result as before (validation
occurs but no pop up error messages appearing)

Am I using the correct syntax in the strut-config.xml and validation.xml and
my jsp or do I need to change it? Are there any online notes as to how to
correctly use the fixed commons-validator for validating propety String
arrays ?

Thanks and regards

Suhel

- Original Message -
From: David Graham [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Friday, August 22, 2003 2:41 PM
Subject: Re: Validator with property String array problem


 Commons Validator was recently modified to allow the required validation
 in Struts to run on String[] or Collection objects.  You can download the
 latest Validator nightly build to try it out.

 David

 --- java-dude [EMAIL PROTECTED] wrote:
  Hi,
 
  I am having problems using  Validator framework to perform client
  side validation on a String array property declared in a
  DynaValidatorForm.
 
  The results are that the validation does seem to work in a fashion
  such that the user is not taken to the next page and is kept on
  current jsp while data entered is invalid BUT no pop up alert error
  messages are being diplayed. (For other forms in the application
  where I am validating single properties the validation and pop up
  error messages are working fine.)
 
  Has anybody solved/encountered this problem ?
 
  I have provided the relevant snippets from my current configuration
  to illustrate my implementation :-
 
  struts-config.xml
  =
  .
  .
  .
  form-bean
   name=enterReadingForm
   type=org.apache.struts.validator.DynaValidatorForm
   form-property name=theReading type=java.lang.String[]/
  /form-bean
  .
  .
  .
 
  validation.xml
  ==
  .
  .
  .
  form name=enterReadingForm
field property=theReading indexedListProperty=theReading
depends=required,minlength,maxlength,mask
  arg0 key=prompt.theReading/
  arg1   key=${var:minlength} name=minlength
   resource=false/
  arg2   key=${var:maxlength} name=maxlength
   resource=false/
  var
  var-nameminlength/var-name
  var-value1/var-value
  /var
  var
  var-namemaxlength/var-name
  var-value6/var-value
  /var
  var
  var-namemask/var-name
  var-value^[0-9]*$/var-value
  /var
/field
  /form
  .
  .
  .
 
  ApplicationResources.properties
  ===
  .
  .
  .
  prompt.theReading=The Reading
  .
  .
  .
 
  enterReading.jsp
  
  .
  .
  .
  nested:iterate id=registerDetails name=readingDetails
  scope=page property=register
  nested:text name=registerDetails
   property=theReading size=6 maxlength=6/
  /nested:iterate
  .
  .
  .
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 


 __
 Do you Yahoo!?
 Yahoo! SiteBuilder - Free, easy-to-use web site design software
 http://sitebuilder.yahoo.com

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




---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.512 / Virus Database: 309 - Release Date: 19/08/2003

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



Re: Putting request parameter into page context

2002-11-15 Thread hotmail
I've used scriptlets - but probably not what you're looking for !

% String eventId = (String)request.getParameter(id); %
a href=../viewEvent.do?id=%= eventId %View Event/a

- Original Message -
From: Michael Lee [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Friday, November 15, 2002 10:49 AM
Subject: Putting request parameter into page context


This seems like it would be so simple yet I can't get it to work
I've tried all kinds of combinations of bean:define...
bean:define id=startRow name=startRow type=java.lang.Integer/
I want to take the request parameter startRow and put it in a page object
startRow
startRow is in the request (URL.com/someaction.jsp?startRow=10).
thanks,
Mike

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