Did it this way. Passed field names via the tag, then obtained values inside
the validator class using getFieldValue(fieldName, object).
Thank you for suggestions.
stanlick wrote:
>
> Rather than pass this, that and the other parameter(s) to your validator,
> why not just retrieve what you ne
Rather than pass this, that and the other parameter(s) to your validator,
why not just retrieve what you need from inside the validator? You have the
ActionInvocation passed to your doIntercept(...), which contains the
ValueStack containing your objects.
Peace,
Scott
On Tue, May 19, 2009 at 7:
2009/5/21 manub :
> I think that this may work for the expression validator because you are
> supplying an expression.
I've been thinking about tag, with it you can set any field
in your validator and it can be an OGNL expression.
Regards
--
Lukasz
http://www.lenart.org.pl/
--
I think that this may work for the expression validator because you are
supplying an expression.
Maybe I need to use an expression too, but I don't know how to evaluate it
within my Java class for Validator.
Lukasz Lenart wrote:
>
> 2009/5/20 manub :
>> I've written a custom field validator, w
2009/5/20 manub :
> I've written a custom field validator, which needs other field values to
> validate his field. I need a way to pass that values to that field
> validator.
Did you try to use param tag as below?
$...@pl.org.lenart.ems.model.employeetype@.value()
!= 'dd'}
error.emplo
Lukasz Lenart wrote:
>
> Frankly, I don't understand, are you trying to pass data from
> validator xml configuration to action?
>
I've written a custom field validator, which needs other field values to
validate his field. I need a way to pass that values to that field
validator.
--
View thi
2009/5/20 manub :
> Yes, I did. But in the action the string takes the value "${field}" and not
> the field value.
Frankly, I don't understand, are you trying to pass data from
validator xml configuration to action?
Regards
--
Lukasz
http://www.lenart.org.pl/
--
Yes, I did. But in the action the string takes the value "${field}" and not
the field value.
Lukasz Lenart wrote:
>
> 2009/5/19 manub :
>> I'm trying to write a custom field validator which needs other fields to
>> validate the field I need to validate. How can I pass field values (and
>> not
>
2009/5/19 manub :
> I'm trying to write a custom field validator which needs other fields to
> validate the field I need to validate. How can I pass field values (and not
> static params) to a field validator in the validation xml? I'm using Struts
> 2.1.6.
Did you try ${fieldFromAction} ?
Regar
9 matches
Mail list logo