[ http://jira.andromda.org/browse/JSF-31?page=comments#action_13613 ] 

Babar Ansari commented on JSF-31:
---------------------------------

I have worked around these problems for now. These are not a blockers priority 
atleast for me.

> Validation by using @andromda.presentation.view.field.format generates 
> illegal Java Script
> ------------------------------------------------------------------------------------------
>
>          Key: JSF-31
>          URL: http://jira.andromda.org/browse/JSF-31
>      Project: JSF cartridge
>         Type: Bug

>  Environment: andromda 3.2 snapshot, windows 2000 sp4, Firefox 1.5.0.7
>     Reporter: Babar Ansari
>     Assignee: Chad Brandon
>     Priority: Blocker

>
> illegal java script is generated when I use 
> @andromda.presentation.view.field.format  tag for validation
> Details:
> when @andromda.presentation.view.field.format  = range 1 10000
> Validation.xml has:
> <field property="distanceCovered" depends="required,integer,intRange">
> <arg position="0" key="distance.covered" />
> <arg position="1" name="intRange" key="${var:min}" resource="false"/>
> <arg position="2" name="intRange" key="${var:max}" resource="false"/>
> <var>
>     <var-name>min</var-name>
>     <var-value><![CDATA[1]]></var-value>
> </var>
> <var>
>     <var-name>max</var-name>
>     <var-value><![CDATA[10000]]></var-value>
> </var>
> </field>
> Errors Are:
> Error: invalid property id
> Line: 226, Column: 8
> Source Code:
> return {,min:'1'max:'10000'}[x];
> --------^
> this[9] = new Array("registerEnterPropertiesNextForm:distanceCovered", 
> "Distance Covered is required.", new Function("x", "return 
> {,min:'1'max:'10000'}[x];"));
> when @andromda.presentation.view.field.format  = pattern 
> \(?[0-9]{3}\)?[0-9]{3}-?[0-9]{4}
> Validation.xml has:
> <field property="userInfoPhoneNumber" depends="required,mask">
> <arg position="0" key="phone.number" />
> <var>
>     <var-name>mask</var-name>
>     <var-value><![CDATA[^\(?[0-9]{3}\)?[0-9]{3}-?[0-9]{4}$]]></var-value>
> </var>
> </field>
> Errors Are:
> Error: invalid quantifier ?[0-9]{3})?[0-9]{3}-?[0-9]{4}$
> Line: 164, Column: 13
> Source Code:
> return {mask:/^(?[0-9]{3})?[0-9]{3}-?[0-9]{4}$/}[x];
> --------------^
> this[7] = new 
> Array("registerEnterUserInformationNextForm:userInfoPhoneNumber", "Phone 
> Number is required.", new Function("x", "return 
> {mask:/^\(?[0-9]{3}\)?[0-9]{3}-?[0-9]{4}$/}[x];"));

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.andromda.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

Reply via email to