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
somewhat hackish, but you can accomplish this by using expressions :
#params['attrib'] != null ? attrib in ('a','list','of','values')
(this is just an example stating that you can check for the existence of the
variable in the parameter and then execute an expression like you normally
would )
Sorry I did'nt understand your answer.
I was talking about some input/ fileds in my JSP (present in some JPS,
not in others), and how to write my XML validator file, like :
validators
field name=myInputFieldName
field-validator type=requiredstring
param
You can manage conditionals by using expressions and fieldexpressions , so
your validation below would become :
field name=myInputFieldName
field-validator type=fieldexpression
(#params['myInputFieldName'] neq null) ( myInputFieldName
neq null
4 matches
Mail list logo