[
https://issues.apache.org/jira/browse/WOOKIE-151?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12972099#action_12972099
]
Raido Kuli commented on WOOKIE-151:
-----------------------------------
Implementing suggested solution works nice in Safari and Chrome, but IE 8 is
dead and haven't tested on IE 9. Giving error "Unterminated constant string"
73: wookie_wrapper.js.
73: eval("Widget.preferences." + key + "='" + value + "'"); <-- this is what i
got from SVN - this breaks IE also.
I tried it replacing with:
eval("Widget.preferences[\"" + key + "\"]='" + value + "'");
But obviously this Widget.preferences object doesn't handle data inserting like
so.
Commenting line 73 off, everything comes to life and no errors what so ever in
IE.
Another bug what i found while testing with IE is related to "seed-widget",
which creates bad JS code. Seed-widget creates js/ui.js file, where on line 30
is a mistake.
elemContentProperty.innerHTML = elemContent.innerHTML;
has to be
elemContentProperty.value = elemContent.innerHTML;
Can't set textarea content using innerHTML - using "value" is the right way
and works on Safari and IE - otherwise Safari gives blank textarea and IE
throws error and dies.
> Numeric keys for preferences result in Parse Error in Safari
> ------------------------------------------------------------
>
> Key: WOOKIE-151
> URL: https://issues.apache.org/jira/browse/WOOKIE-151
> Project: Wookie
> Issue Type: Bug
> Environment: Safari 5 Mac OS X
> Reporter: Scott Wilson
> Assignee: Raido Kuli
>
> If you create a widget that uses numeric keys for preference values, this can
> cause a Parse Error deeper in Wookie (most likely, in DWR) even if the values
> are cast to a String.
> To replicate, add this line to any widget:
> widget.preferences.setItem("12345","67890");
> Also:
> widget.preferences.setItem("12345a","67890");
> ...will fail, but not:
> widget.preferences.setItem("a12345","67890");
> I suspect this is something either in the wrapper.js or DWR engine.js.
> Unfortunately the debug tools in Safari aren't sufficient to trace it
> properly.
> As a workaround - just don't use numbers for preference keys!
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.