Re: Struts 2 - Conditional Validation

2008-12-13 Thread ManiKanta G
Hi, > Thanks for the reply. Checkbox always has a value of true/false. > Well this is not case with all the frameworks... Truly speaking browser will send only the field name and value to the server (along with some headers). But S2 deals in this way such that checkbox will have false if it was

RE: Struts 2 - Conditional Validation

2008-12-12 Thread Richa Pandharikar
7; Subject: RE: Struts 2 - Conditional Validation Hi ManiKanta, Thanks for the reply. Checkbox always has a value of true/false. Below is the validation entry which is working for me - Error Message. Regards, Richa -Origin

RE: Struts 2 - Conditional Validation

2008-12-12 Thread Richa Pandharikar
...@gmail.com] Sent: Thursday, December 11, 2008 10:28 PM To: Struts Users Mailing List Subject: Re: Struts 2 - Conditional Validation > > (checkbox == true) and (textbox).equals("") > Unless u wrote ur custom validator dealig the 'checkbox == true' compari

Re: Struts 2 - Conditional Validation

2008-12-11 Thread ManiKanta G
> > (checkbox == true) and (textbox).equals("") > Unless u wrote ur custom validator dealig the 'checkbox == true' comparison, by default these type of comparisons will not work. You have to specify the check box's value (check box based whi

Struts 2 - Conditional Validation

2008-12-11 Thread Richu
My form contains a checkbox and a text field. Entering a value in the text field is mandatory only if the checkbox is selected. How to write the conditional validation for this? I tried the validation entry as below but it is not working– (checkbox == true

Re: [s2] conditional validation

2007-11-22 Thread lbastil
annotation.html >> >> >> >> --- lbastil <[EMAIL PROTECTED]> wrote: >> >> >> >>> >> >>> Hm, but as I have model driven action, >> >>> for both methods (even if I want to validate >> >>> different attr

Re: [s2] conditional validation

2007-11-22 Thread Dave Newton
ven if I want to validate > >>> different attributes later on) > >>> the first I have to use is VisitorFieldValidator > >>> with appendPrefix=false for > >>> the model attribute of the action class. > >>> > >>> So at this lev

Re: [s2] conditional validation

2007-11-22 Thread lbastil
ss. >>> >>> So at this level there is no difference, thats why I >>> cannot see how it >>> should help. >>> >>> Could you explain your suggestion a little more in >>> detail? >>> Would it be realizable with annotation

Re: [s2] conditional validation

2007-11-21 Thread lbastil
d. >> > You can differentiate between them in a couple >> > different ways, the easiest may be to just create >> two >> > action mappings, one for each method. >> > >> > d. >> > >> > --- lbastil <[EMAIL PROTECTED]> w

Re: [s2] conditional validation

2007-11-20 Thread Dave Newton
ch method. > > > > d. > > > > --- lbastil <[EMAIL PROTECTED]> wrote: > > > >> > >> Is there any way with the build in declarative > >> validation possibilities in > >> struts 2 (annotations, xml) > >> to do something like

Re: [s2] conditional validation

2007-11-20 Thread lbastil
>> struts 2 (annotations, xml) >> to do something like conditional validation in the >> following sense: >> >> in the action class I have a model class, where on >> action method one i want >> to validate >> a special subset of model attributes and on actio

Re: [s2] conditional validation

2007-11-20 Thread Dave Newton
declarative > validation possibilities in > struts 2 (annotations, xml) > to do something like conditional validation in the > following sense: > > in the action class I have a model class, where on > action method one i want > to validate > a special subset of model attrib

[s2] conditional validation

2007-11-20 Thread lbastil
Is there any way with the build in declarative validation possibilities in struts 2 (annotations, xml) to do something like conditional validation in the following sense: in the action class I have a model class, where on action method one i want to validate a special subset of model attributes

Re: Conditional Validation

2007-11-03 Thread Gary Affonso
[EMAIL PROTECTED] wrote: Can anyone tell me how to do conditional validation in struts 2? In one form I want validations for a particular category (say Category XYZ) only if the candidate in that. If he is NOT Category XYZ then by checking a checkbox he should be able to skip the validations

Conditional Validation

2007-11-03 Thread naveen472-m
Can anyone tell me how to do conditional validation in struts 2? In one form I want validations for a particular category (say Category XYZ) only if the candidate in that. If he is NOT Category XYZ then by checking a checkbox he should be able to skip the validations for that. I am not able

Re: Conditional validation

2007-09-18 Thread Ted Husted
I added this as * http://jira.opensymphony.com/browse/XW-565 -Ted. On 8/3/07, mraible <[EMAIL PROTECTED]> wrote: > > I figured out how to do this - posting here so others will benefit. - To unsubscribe, e-mail: [EMAIL PROTECTE

Re: [S2] Conditional Validation (test if field is present in JSP)

2007-09-17 Thread cilquirm
; > > true > > > > ... > > > > > > cilquirm <[EMAIL PROTECTED]> > 17/09/2007 16:50 > Veuillez répondre à > "Struts Users Mailing List" > > > A > user@struts.apache.org > cc > > Objet > Re: [S2] C

Re: [S2] Conditional Validation (test if field is present in JSP)

2007-09-17 Thread MLENEVEUT
17/09/2007 16:50 Veuillez répondre à "Struts Users Mailing List" A user@struts.apache.org cc Objet Re: [S2] Conditional Validation (test if field is present in JSP) somewhat hackish, but you can accomplish this by using expressions : #params['attrib'] != null ? att

Re: [S2] Conditional Validation (test if field is present in JSP)

2007-09-17 Thread cilquirm
g of this flag ? > > Thanks for your tips. > > Regards, > > Michaël > -- View this message in context: http://www.nabble.com/-S2--Conditional-Validation-%28test-if-field-is-present-in-JSP%29-tf4465421.html#a12737286 Sent from the Struts - User mailing list archive at Nabble.com. ---

[S2] Conditional Validation (test if field is present in JSP)

2007-09-17 Thread MLENEVEUT
Hi all, We have an Action redirecting to several JSP, depending on the customer. But the forms of these JSP are different : some fields are added/removed in some JSP. So the automatic validation fails for those fields not existing in some JSP. We bypass the problem by copying the Action metho

Re: Conditional validation

2007-08-20 Thread Zoran Avtarovski
I'm pretty sure you need to have around your expression. Z. > > Perhaps someone can order this XML to produce the desired result? > > > > > > > > > > > > > > > > model.password.equals(model.confirmPassword) > > > ${getText("nomatch")} ${model.password} and > ${model.confirmPas

Re: Conditional validation

2007-08-20 Thread Dave Newton
--- stanlick <[EMAIL PROTECTED]> wrote: > > model.password.equals(model.confirmPassword) > > ${getText("nomatch")} ${model.password} and > ${model.confirmPassword} > > I wouldn't even think that would pass DTD validation; doesn't the expression need to be in a param tag? d. --

Re: Conditional validation

2007-08-20 Thread stanlick
(model.confirmPassword) ${getText("nomatch")} ${model.password} and ${model.confirmPassword} -- View this message in context: http://www.nabble.com/Conditional-validation-tf36

Re: Conditional validation

2007-08-19 Thread j alex
ields if the person > >> selects the "Other..." option. The validation syntax starts to get > >> complicated at this point. I'd like to do something like: > >> > >> reason != 'partner' or (reason == 'partner' and partnerPos

Re: Conditional validation

2007-08-18 Thread stanlick
27;OTHER') -> kick in visitor validation. >> >> I still think the above syntax is confusing (ref >> http://tinyurl.com/2htw2k), I'd much rather write something like: >> >> reason == 'partner' and partnerPositionID == 'OTHER' -> show

Re: Conditional validation

2007-08-13 Thread j alex
gt; drop-down. One rule is that the user must select at least one choice > >>> when the drop-down has its radio button selected: > >>> > >>> > >>> reason != 'partner' or (reason == 'partner' and > >>> p

Re: Conditional validation

2007-08-13 Thread mraible
"Other..." >>> >>> >>> This works. Now I want to require a number of fields if the person >>> selects the "Other..." option. The validation syntax starts to get >>> complicated at this point. I'd like to do something lik

Re: Conditional validation

2007-08-13 Thread strutstwouser
he above syntax is confusing (ref >> http://tinyurl.com/2htw2k), I'd much rather write something like: >> >> reason == 'partner' and partnerPositionID == 'OTHER' -> show message >> >> I'm guessing it's possible to write my own Fiel

Re: Conditional validation

2007-08-03 Thread mraible
te my own FieldExpressionValidator that > inverses the true/false outcome? > > Why do I need conditional visitor validation? > > I'm trying to create a "component" that can be re-used in the backend > (model object w/ its own validation rules) and on the front-end (

Re: Conditional validation

2007-08-01 Thread mraible
asier way to do this, please let me know. Of course, I could use JSF/Wicket/Tapestry - and that might be the outcome if this is not possible. Thanks, Matt Sparecreative wrote: > > Is there a way to setup conditional validation through the validation.xml > file? > > I'm cur

Conditional validation

2007-05-01 Thread Zoran Avtarovski
Is there a way to setup conditional validation through the validation.xml file? I'm currently user the visitor validator method where my core user validation properties are in a User-validation.xml file. I want to be able to use this same file for all my user actions (register, add, update

Re: Conditional validation in Struts.

2007-04-03 Thread Dave Newton
--- "Peter L. Berghold" <[EMAIL PROTECTED]> wrote: > Consider the following sniglet from my > validation.xml: > > depends="requiredif"> > > > field[0] > dropins_allowed_rq > > > fieldTest[0] > EQUALS > > > fieldValue[0] > on > > What version of Struts are you using? IIRC requiredif was d

Conditional validation in Struts.

2007-04-03 Thread Peter L. Berghold
Consider the following sniglet from my validation.xml: field[0] dropins_allowed_rq fieldTest[0] EQUALS fieldValue[0] on What I'm trying to accomplish is if the checkbox dropins_allowed_rq is checked then I want to consider the text field nonmember_dropin_rate_rq as a required field, othe

RE: Conditional Validation

2006-07-31 Thread Givler, Eric
To: user@struts.apache.org Cc: Subject: Conditional Validation I am using the Struts validation.xml to check if clients leave any of the required text fields in the form blank. I prepared two action mappings for this web

Re: Conditional Validation

2006-07-29 Thread Paul Benedict
If you do not use client-side validation (I never do), you can do this: Override getValidationKey() in your ActionForm and come up with a different key that the validator should use. You might want to look for a certain request parameter (like the close button) and either totally ignore validati

Conditional Validation

2006-07-29 Thread Caroline Jen
I am using the Struts validation.xml to check if clients leave any of the required text fields in the form blank. I prepared two action mappings for this web page. The 'validate'attribute is set to "false" for the first action mapping because when I have the web page displayed in the browserat th

Re: Conditional validation

2006-05-04 Thread Adam Hardy
Dave Newton on 04/05/06 19:13, wrote: Adam Hardy wrote: In the last couple of days someone said that they separated the two flows using GET and POST - or at least I thought so. It sounded interesting but on looking at the struts-config DTD, there seems no way to do this. I can't find the threa

Re: Conditional validation

2006-05-04 Thread Dave Newton
Adam Hardy wrote: > In the last couple of days someone said that they separated the two > flows using GET and POST - or at least I thought so. > > It sounded interesting but on looking at the struts-config DTD, there > seems no way to do this. > > I can't find the thread in the archive now. Did I m

Re: Conditional validation

2006-05-04 Thread Michael Jouravlev
On May 4, 2006, at 11:27 AM, Adam Hardy wrote: > In the last couple of days someone said that they separated the two > flows using GET and POST - or at least I thought so. > > It sounded interesting but on looking at the struts-config DTD, > there seems no way to do this. > > I can't find the thr

Re: Conditional validation

2006-05-04 Thread Jakub Milkiewicz
Hi Can you point it where i can find it Thanks 2006/5/4, James Mitchell <[EMAIL PROTECTED]>: The newest version of the Struts mailreader sample app shows a best practices approach to just what you describe. Take a look at that and see if you might be able to do the same. (Specifically, look at

Re: Conditional validation

2006-05-04 Thread Adam Hardy
Could be easily overlooked, I agree - but is it even possible? I don't think it is possible to configure on the action mapping level. James Mitchell on 04/05/06 17:43, wrote: I don't think that would be the best solution (but that's just my 2c) -- I would opt for the declarative approach, with

Re: Conditional validation

2006-05-04 Thread James Mitchell
I don't think that would be the best solution (but that's just my 2c) -- I would opt for the declarative approach, with wildcards for "verbosely declarative simplicity" -- now there's an oxymoron for ya :) -- James Mitchell On May 4, 2006, at 11:27 AM, Adam Hardy wrote: In the last coupl

Re: Conditional validation

2006-05-04 Thread Adam Hardy
In the last couple of days someone said that they separated the two flows using GET and POST - or at least I thought so. It sounded interesting but on looking at the struts-config DTD, there seems no way to do this. I can't find the thread in the archive now. Did I misread that previous post

Re: Conditional validation

2006-05-04 Thread James Mitchell
The newest version of the Struts mailreader sample app shows a best practices approach to just what you describe. Take a look at that and see if you might be able to do the same. (Specifically, look at the paths for Edit* and Save*) HTH -- James Mitchell On May 4, 2006, at 9:40 AM, Mu

Conditional validation

2006-05-04 Thread Mulligan, Scott H
I just started playing with the commons-validator and came across a problem with how I have my Struts application structured. I am using dispatch actions that have "load" and "save" methods. In the "load" I retrieve the reference data needed to build the page and then forward to the jsp page. In th

Re: conditional validation

2005-11-27 Thread Martin Gainty
Sent: Sunday, November 27, 2005 1:32 PM Subject: Re: conditional validation Thanks Martin for responding. But I am afraid we probably are talking of two different things. Unless I am missing some point somewhere. I am referring to regular expressions in the context of validator framework. (entrie

Re: conditional validation

2005-11-27 Thread Raghu Kanchustambham
> Taglib? > > http://struts.apache.org/struts-doc-1.2.7/userGuide/struts-logic.html#lessEqual > HTH, > M- > - Original Message - > From: "Raghu Kanchustambham" <[EMAIL PROTECTED]> > To: "Struts Users Mailing List" > Sent: Sunday, November 27, 2005 3:

Re: conditional validation

2005-11-27 Thread Martin Gainty
s Mailing List" Sent: Sunday, November 27, 2005 3:43 AM Subject: Re: conditional validation > ...(educationDetails[0].marks le 100)... Doesnt work... le/ge/gt/lt is not recognized. I worked around the problem by enforcing through floatRange to be between 35 and 100. Note that floatRange valid

Re: conditional validation

2005-11-27 Thread Raghu Kanchustambham
> ...(educationDetails[0].marks le 100)... Doesnt work... le/ge/gt/lt is not recognized. I worked around the problem by enforcing through floatRange to be between 35 and 100. Note that floatRange validations work perfectly fine. I wanted to allow either a "0" (to stand for a 'dont care') and a ra

Re: conditional validation

2005-11-25 Thread Laurie Harper
Raghu Kanchustambham wrote: Second, shouldn't you allow an empty value for marks if degree.id isn't set, rather than forcing the user to enter numeric data that's going to be ignored? I really dont care about what the user enters for marks if he chooses "none" for the degree. I dont care even

Re: conditional validation

2005-11-25 Thread Laurie Harper
newton rutgers wrote: Hello All, Can i do the conditional validation. For example if i have a drop down and the default value is "Please select one". if user dosen't select anything. validation won't show that it is required field to select. can anyone please help. Also

Re: conditional validation

2005-11-24 Thread Raghu Kanchustambham
Hi Laurie, Thanks for responding. > Firstly, the check for marks <= 100 in the validwhen rule is redundant, True! I realize that and have removed that. > Second, shouldn't you allow an empty value for marks if degree.id isn't set, > rather than forcing the user to enter numeric data that's going

Re: conditional validation

2005-11-24 Thread Laurie Harper
Raghu Kanchustambham wrote: Hi, I have the following situation: 1. educationDetails[0].degree.id is not chosen. (drop down return value = -1). OR 2. educationDetails[0].degree.id > 0 (the user chose one of the options from the drop down) which implies the marks should be atleast 35% and not mo

conditional validation

2005-11-24 Thread Raghu Kanchustambham
Hi, I have the following situation: 1. educationDetails[0].degree.id is not chosen. (drop down return value = -1). OR 2. educationDetails[0].degree.id > 0 (the user chose one of the options from the drop down) which implies the marks should be atleast 35% and not more than 100% I tried the atta

Re: Conditional validation

2005-11-08 Thread Laurie Harper
Jay Burgess wrote: I have a form field on my JSP that's being conditionally displayed based on the status of servlet context attribute: I'm using the Struts validator to validate this field: ... Obviously, I only want the client-side Javascript validations to fire if the field is pre

Conditional validation

2005-11-07 Thread Jay Burgess
I have a form field on my JSP that's being conditionally displayed based on the status of servlet context attribute: I'm using the Struts validator to validate this field: ... Obviously, I only want the client-side Javascript validations to fire if the field is present. Is there a w

Re: Conditional validation for mask, date, integer etc

2005-10-25 Thread Saul Qunming Yuan
s that what you're after? > > > > Stew > > > > On 19/10/05, Saul Qunming Yuan dataanvil.com> wrote: > >> Hi All, > >> > >> > >> I'm wondering if there is a way to define conditional validation for > >> mask, > >> d

Re: Conditional validation for mask, date, integer etc

2005-10-19 Thread Saul Qunming Yuan
urned by bean.getDepends() > > It's used with indexed properties where the fields for the form to > fill in are configurable and come from a database. > > Is that what you're after? > > Stew > > On 19/10/05, Saul Qunming Yuan <[EMAIL PROTECTED]> wrote: >&g

Re: Conditional validation for mask, date, integer etc

2005-10-19 Thread Stewart Cambridge
hat you're after? Stew On 19/10/05, Saul Qunming Yuan <[EMAIL PROTECTED]> wrote: > Hi All, > > > I'm wondering if there is a way to define conditional validation for mask, > date, integer etc in validation.xml. I know there is a "validwhen", but it >

Conditional validation for mask, date, integer etc

2005-10-19 Thread Saul Qunming Yuan
Hi All, I'm wondering if there is a way to define conditional validation for mask, date, integer etc in validation.xml. I know there is a "validwhen", but it only checks for the condition as defined by the "test" variable. What I want is to perform the mask, date valida

Re: Conditional validation/field chaining with Validator plugin

2004-07-08 Thread Erik Weber
e" and "false"). There is a companion text area for an explanation -- to be filled in if the boolean select value happens to be "true". So in otherwords, the business rule is that the text area must contain a value if the value of the select is "true", otherwis

Conditional validation/field chaining with Validator plugin

2004-07-08 Thread Erik Weber
n if the boolean select value happens to be "true". So in otherwords, the business rule is that the text area must contain a value if the value of the select is "true", otherwise, it can be left blank. So I need conditional validation or field chaining. I am assuming th

Re: Newbie question: How to implement conditional validation in an ActionForm?

2004-05-15 Thread Niall Pemberton
andle different page validations for the same form. Niall - Original Message - From: "Adam Lipscombe" <[EMAIL PROTECTED]> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]> Sent: Thursday, May 13, 2004 5:46 PM Subject: RE: Newbie question: How

RE: Newbie question: How to implement conditional validation in an ActionForm?

2004-05-13 Thread Adam Lipscombe
That did the trick. Many thanks! -Original Message- From: John Moore [mailto:[EMAIL PROTECTED] Sent: 13 May 2004 17:58 To: Struts Users Mailing List Subject: Re: Newbie question: How to implement conditional validation in an ActionForm? Adam Lipscombe wrote: > >Is there any