Re: [S2] Validation setup

2007-04-09 Thread Dave Newton
--- Skip Hollowell <[EMAIL PROTECTED]> wrote:
> minLength and maxLength (case is important and I am
> an idiot)

;) I'd bet we'd turn the game over if we all kept
score on stuff like that!

d.



 

Never miss an email again!
Yahoo! Toolbar alerts you the instant new Mail arrives.
http://tools.search.yahoo.com/toolbar/features/mail/

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



Re: [S2] Validation setup

2007-04-09 Thread Skip Hollowell

minLength and maxLength (case is important and I am an idiot)

Done and done.  Thanks Dave for helping where you could.  Much appreciated.

Skip.

Skip Hollowell wrote:

Now, if I could only figure out why I am getting errors on the minlength
and maxlength of my stringlength validator:
   




  4
  4
  



WARNING: Caught OgnlException while setting property 'minlength' on type
'com.opensymphony.xwork2.validator.validators.StringLengthFieldValidator'. 


ognl.NoSuchPropertyException:
com.opensymphony.xwork2.validator.validators.StringLengthFieldValidator.minlength 







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



Re: [S2] Validation setup

2007-04-09 Thread Dave Newton
--- Skip Hollowell <[EMAIL PROTECTED]> wrote:
> Now, if I could only figure out why I am getting
> errors on the minlength and maxlength of my 
> stringlength validator:
>   4
>   4

Try minLength/maxLength.

> WARNING: Caught OgnlException while setting property
> 'minlength' on type 

That's a warning, btw :p

d.



 

No need to miss a message. Get email on-the-go 
with Yahoo! Mail for Mobile. Get started.
http://mobile.yahoo.com/mail 

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



Re: [S2] Validation setup

2007-04-09 Thread Skip Hollowell

The file name for the validation file is:
{ActionName}-{AliasName}-validation.xml

In my case:
AccountAction-Payment_retrieveFee-validation.xml

Now, if I could only figure out why I am getting errors on the minlength 
and maxlength of my stringlength validator:

  
   
   
   
   
 4
 4
 
   
   

WARNING: Caught OgnlException while setting property 'minlength' on type 
'com.opensymphony.xwork2.validator.validators.StringLengthFieldValidator'.
ognl.NoSuchPropertyException: 
com.opensymphony.xwork2.validator.validators.StringLengthFieldValidator.minlength


Anyone?

Skip Hollowell wrote:

I had the whole validation thing working great, and then I had to go and
get 'fancy' with my Actions and aliases, and now, I can't seem to get my
validator xml files named correctly...



/WEB-INF/jsp/UC01-EnterPayment.jsp




name="input">/WEB-INF/jsp/UC01-FindAccount.jsp

/WEB-INF/jsp/UC01a-RetrieveFee.jsp
/WEB-INF/jsp/UC01-FindAccount.jsp
name="search">/WEB-INF/jsp/UC01-FindAccount.jsp

Account_input
Account_input

 
name="input">/WEB-INF/jsp/UC01a-RetrieveFee.jsp
name="list">/WEB-INF/jsp/UC01a-RetrieveFee.jsp

/WEB-INF/jsp/UC01b-EnterPayment.jsp
/WEB-INF/jsp/UC01b-EnterPayment.jsp
/WEB-INF/jsp/UC01a-RetrieveFee.jsp
/WEB-INF/jsp/UC01b-EnterPayment.jsp
Menu
/WEB-INF/jsp/UC01a-RetrieveFee.jsp


According to the doc:

Validation rules can be specified:

   1. Per Action class: in a file named ActionName-validation.xml
   2. Per Action alias: in a file named ActionName-alias-validation.xml
   3. Inheritance hierarchy and interfaces implemented by Action class:
  WebWork searches up the inheritance tree of the action to find
  default validations for parent classes of the Action and
  interfaces implemented


So I have a form that will be submitting a payment, and I want to
validate a couple fields on the form...


What do I name my validation xml file in com.skip.action?
AccountAction-valdiation.xml is too broad
AccountAction_payment-validation.xml doesn't work
AccountAction_Payment-validation.xml doesn't work
Payment-validation.xml doesn't work


I'll keep digging through Wikis, Examples and Doc, but I haven't found
it yet.
Thanks for any help

Skip


-
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]



Re: [S2] Validation setup

2007-04-05 Thread Skip Hollowell

OK, I think I may be on to something here...

In this particular Action, I am working with a Payment class, instead of 
individual fields.  that may very well be where all of my trouble is.









align="center"/>



So say I want to validate the ccNumber and ccExpDate.  These are part of 
my Payment, so how do I go about validating them?  Let's assume for now 
that the AccountAction class has a method called doRetrieveFee() and my 
validation file should in fact be called 
AccountAction-doRetrieveFee-validation.xml


My AcccountAction works with the complete payment as such:
   /**
* @param payment
*The payment to set.
*/
   public void setPayment(PaymentBean payment) {
   this.payment = payment;
   }

   /**
* @return Returns the payment.
*/
   public PaymentBean getPayment() {
   return payment;
   }

So in my validator I have tried a couple variations on a theme.  Does 
anyone see what I need to change or modify to get some validation happening?


http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd";>


   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
 4
 4
 
   
   





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



Re: [S2] Validation setup

2007-04-05 Thread Skip Hollowell

Dave Newton-4 wrote:
--- Skip Hollowell <[EMAIL PROTECTED] 
> 
wrote:

> Dave Newton-4 wrote:
>> Skip Hollowell said:
>>> AccountAction_payment-validation.xml doesn't work
>>> AccountAction_Payment-validation.xml doesn't work
>> Are the underscores typos?
> No typos.
> So how can I turn on the validation for this form /
> action / method?

No luck.  It's confusing, I can get the plan 
AccountAction-validation.xml to trigger, but nothing else.  I too am a 
bit foggy on the alias concept.  I really don't want to have to pull my 
AccountAction apart into separate actions, but that may be what needs to 
be done.  (AccountRetrieveAction, AccountPaymentAction, 
AccountSearchAction, etc etc)

Try:

AccountAction-doRetrieveFee-validation.xml

(I've never been sure about that whole "alias"
terminology, quite frankly. Maybe it's XWork-ish?)

d.




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



Re: [S2] Validation setup

2007-04-05 Thread Dave Newton
--- Skip Hollowell <[EMAIL PROTECTED]> wrote:
> Dave Newton-4 wrote:
>> Skip Hollowell said:
>>> AccountAction_payment-validation.xml doesn't work
>>> AccountAction_Payment-validation.xml doesn't work
>> Are the underscores typos?
> No typos.
> So how can I turn on the validation for this form / 
> action / method?

Try:

AccountAction-doRetrieveFee-validation.xml

(I've never been sure about that whole "alias"
terminology, quite frankly. Maybe it's XWork-ish?)

d.



 

Bored stiff? Loosen up... 
Download and play hundreds of games for free on Yahoo! Games.
http://games.yahoo.com/games/front

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



Re: [S2] Validation setup

2007-04-05 Thread Skip Hollowell

Dave Newton-4 wrote:
--- Skip Hollowell <[EMAIL PROTECTED] 
> 
wrote:



> AccountAction_payment-validation.xml doesn't work
> AccountAction_Payment-validation.xml doesn't work

Are the underscores typos?

No typos.  I am grasping at straws since I don't seem to have a handle 
on an alias vs an action name.  I could certainly go the other way, with 
Action-method-validation.xml, if it would work for me, which up until 
now it has not.  Payment is just another name for the AccountAction, the 
alias if you will.


I have a doRetrieveFee method in my AccountAction class.  The form in 
question will be calling that method.  So how can I turn on the 
validation for this form / action / method?

> Payment-validation.xml doesn't work

Is that in the package containing the Payment class?

(Haven't played with validation like that much; I
prefer action[-method] validation almost all the
time.)

d.



 
 

It's here! Your new message!  
Get new email alerts with the free Yahoo! Toolbar.

http://tools.search.yahoo.com/toolbar/features/mail/

-
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]



Re: [S2] Validation setup

2007-04-05 Thread Dave Newton
--- Skip Hollowell <[EMAIL PROTECTED]> wrote:
> I had the whole validation thing working great, and
> then I had to go and get 'fancy' with my Actions and

> aliases, 

That'll teach ya'!

> AccountAction_payment-validation.xml doesn't work
> AccountAction_Payment-validation.xml doesn't work

Are the underscores typos?

> Payment-validation.xml doesn't work

Is that in the package containing the Payment class? 

(Haven't played with validation like that much; I
prefer action[-method] validation almost all the
time.)

d.



 

It's here! Your new message!  
Get new email alerts with the free Yahoo! Toolbar.
http://tools.search.yahoo.com/toolbar/features/mail/

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