You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Azhaguramanhjam, Ramkumar " <ra...@citi.com> on 2008/11/24 20:47:27 UTC
Reg DatevalidationRestriction issue.
Hi
Iam trying to implement the restrictions on a date by not allowing
some invalid days to be entered but I get an IllegalArgumentException at
runtime.
I think it is trying to convert a string to array at runtime. Can u plz
let me know how to use this in a right way?
<tr:inputDate id="daysOfWeek" value="#{bean.date}"
label="Select a date, but not a
Monday">
<tr:convertDateTime pattern="yyyy-MM-dd"/>
<tr:validateDateRestriction invalidDaysOfWeek="Mon"/>
</tr:inputDate>
java.lang.IllegalArgumentException: Cannot convert mon of type class
java.lang.String to class [Ljava.lang.String;
at
com.sun.el.lang.ELSupport.coerceToType(ELSupport.java:329)
Thanks
Ramkumar A
Phone:410-332-3341
Re: Reg DatevalidationRestriction issue.
Posted by Matthias Wessendorf <ma...@apache.org>.
On Mon, Nov 24, 2008 at 9:06 PM, Matthias Wessendorf <ma...@apache.org> wrote:
>> <tr:validateDateRestriction invalidDaysOfWeek="Mon"/>
>>
>> </tr:inputDate>
>>
>>
>>
>> java.lang.IllegalArgumentException: Cannot convert mon of type class
>> java.lang.String to class [Ljava.lang.String;
>>
>> at com.sun.el.lang.ELSupport.coerceToType(ELSupport.java:329)
>
> Interesting.
> The "invalidDaysOfWeek" attribute takes String[], but should take a
> single string.
>
> Can you file a bug ?
ok, on my app it works (on WLS)
Are you eventually mixing some libs ?
Eg. JSF 1.2 and Trinidad 1.0.x ?
If you are on JSF 1.2 (what the error kinda says), you
need Trinidad 1.2.x
-Matthias
>
> -Matthias
>
>>
>>
>>
>> Thanks
>>
>> Ramkumar A
>>
>> Phone:410-332-3341
>>
>>
>
>
>
> --
> Matthias Wessendorf
>
> blog: http://matthiaswessendorf.wordpress.com/
> sessions: http://www.slideshare.net/mwessendorf
> twitter: http://twitter.com/mwessendorf
>
--
Matthias Wessendorf
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
twitter: http://twitter.com/mwessendorf
Re: Reg DatevalidationRestriction issue.
Posted by Matthias Wessendorf <ma...@apache.org>.
> <tr:validateDateRestriction invalidDaysOfWeek="Mon"/>
>
> </tr:inputDate>
>
>
>
> java.lang.IllegalArgumentException: Cannot convert mon of type class
> java.lang.String to class [Ljava.lang.String;
>
> at com.sun.el.lang.ELSupport.coerceToType(ELSupport.java:329)
Interesting.
The "invalidDaysOfWeek" attribute takes String[], but should take a
single string.
Can you file a bug ?
-Matthias
>
>
>
> Thanks
>
> Ramkumar A
>
> Phone:410-332-3341
>
>
--
Matthias Wessendorf
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
twitter: http://twitter.com/mwessendorf