History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: WW-1453
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: tm_jee
Reporter: Marcin Kuthan
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
WebWork

customOnSubmit_parameters.id() function name cause problem when parameters.id contains forbidden characters

Created: 18/Apr/07 08:40 AM   Updated: 29/Nov/07 03:01 AM
Component/s: None
Affects Version/s: 2.2.5
Fix Version/s: 2.2.7

Issue Links:
Container
 
This issue is part of:
WW-1442 webwork tag attribute should take js ... Major Resolved


 Description  « Hide
When form "id" attribute contains forbidden characters, generated JS function name is invalid. The JS specification allows only a-zA-Z0-9_ characters (verified with Rhino JS engine)

In template files "form.ftl" and "form-close.flt" all non-word characters must be replaced/removed e.g:

${parameters.id?replace('\\W', '_', 'r')}

This issue is related to http://jira.opensymphony.com/browse/WW-1440.



 All   Comments   Change History      Sort Order:
tm_jee - [29/Nov/07 02:59 AM ]
Modified: mybrain\webwork\src\java\com\opensymphony\webwork\components\UIBean.java
Modified: mybrain\webwork\src\test\com\opensymphony\webwork\components\UIBeanTest.java
Sending content: mybrain\webwork\src\java\com\opensymphony\webwork\components\UIBean.java
Sending content: mybrain\webwork\src\test\com\opensymphony\webwork\components\UIBeanTest.java
Completed: At revision: 2973

tm_jee - [29/Nov/07 02:59 AM ]
Fixed as above. Kindly review. :)

Cheers.