You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Martin Marinschek (JIRA)" <de...@myfaces.apache.org> on 2006/01/04 12:30:01 UTC
[jira] Commented: (MYFACES-996) jsValueSet wrong generated JS code
[ http://issues.apache.org/jira/browse/MYFACES-996?page=comments#action_12361738 ]
Martin Marinschek commented on MYFACES-996:
-------------------------------------------
Send me a patch, and I'll commit it...
regards,
Martin
> jsValueSet wrong generated JS code
> ----------------------------------
>
> Key: MYFACES-996
> URL: http://issues.apache.org/jira/browse/MYFACES-996
> Project: MyFaces
> Type: Bug
> Components: Tomahawk
> Versions: 1.1.1
> Reporter: Martin Zdila
>
> <x:jsValueSet name="foo" value="#{bean.val}" />
> public List getVal() {
> List list = new ArrayList();
> list.add(new Integer(1000));
> return list;
> }
> now the generated code (short version) is:
> var foo = new Array(1000);
> This mean: assign an array with 1000 empty elements to variable foo. That's not the expected result. In such a case a following code shold be generated:
> var foo = [1000];
> Moreover, i would also make the generated code shorder using {} and [] annotation. Eg:
> var bar = [123, "test", {"someKey" : [true, 666, test], "otherKey" : "aValue"}];
> (i know .. this should be better reported as enhancement)
> See also: MYFACES-559
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira