Isn't there an EL builtin function for size/length though? I think
the following should work:
@Validate(expression="fn:length(this) > 0)")
or alternatively
@Validate(expression="!empty(this)")
My syntax/names might be a little off, but you get the idea.
-t
On Mar 29, 2008, at 4:54 AM, Anonymous User wrote:
> Mathieu Avoine <[EMAIL PROTECTED]> writes:
>> @ValidateNestedProperties({
>> @Validate(field="selectedIds", required=true,
>> on={"goToSelectVehicles","activate"}, expression="this != null &&
>> this.size > 0")
>> Unfortunately, it doesn't work. So, my questions:
>>
>> 1) What am I doing wrong?
>> 2) Is there an attribute for the @Validate annotation to validate the
>> size of a List?
>
> The problem is that when you use expression this.size > 0 it tries
> to call
> method getSize() which does not exist. Unfortunately straight method
> calls like
> this.size() are not supported(by EL and Stripes?).
>
> You can bypass this problem by using validation method
> (@ValidationMethod) for
> checking the size of the list.
>
>
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
> _______________________________________________
> Stripes-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/stripes-users
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users