Skip to main content

Problem with f:validateRegex - Bug?

1 reply [Last post]
lorion42
Offline
Joined: 2009-11-30

Hi,
I try to generate a formular with JSF 2.01 and I want to use the regex validator for my input. The regex changes according to a value in the bean. But I can't realize it in JSF... I tried the following code:

But this generates the ErrorMessage "Regex pattern must be set to non-empty value."

everything workes fine if I changed to . But this should be the same for my example. I already checked that indexOfInputs is 0 and #{GrammarBean.regEx[indexOfInputs]} is "[a-z]*". This must be a bug in the JSF API.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Ryan Lubke

You may want to look at using varStatus and its index property:

http://java.sun.com/javaee/javaserverfaces/2.0/docs/pdldocs/facelets/ind...

On 11/30/09 8:17 AM, webtier@javadesktop.org wrote:
> Hi,
> I try to generate a formular with JSF 2.01 and I want to use the regex validator for my input. The regex changes according to a value in the bean. But I can't realize it in JSF... I tried the following code:
>
> > value="#{GrammarBean.inputs[indexOfInputs]}" required="true">
>
>

>

>

>
> But this generates the ErrorMessage "Regex pattern must be set to non-empty value."
>
> everything workes fine if I changed to. But this should be the same for my example. I already checked that indexOfInputs is 0 and #{GrammarBean.regEx[indexOfInputs]} is "[a-z]*". This must be a bug in the JSF API.
> [Message sent by forum member 'lorion42' ]
>
> http://forums.java.net/jive/thread.jspa?messageID=373861
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: webtier-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: webtier-help@glassfish.dev.java.net
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: webtier-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: webtier-help@glassfish.dev.java.net