By using JSONLiteral you are sending the value without quotes. But the
problem is how your value is interpreted by javascript. A string
literal without quotes will be interpreted as a variable and as that
variable is not defined you will get an error.

Can you share the actual code ?

regards
Taha

On Thu, Jul 14, 2011 at 4:53 AM, iberck <ibe...@gmail.com> wrote:
>
> I'm using
> Taha Hafeez wrote:
> >
> > Hi
> >
> > When you specify something as a JSONLiteral, it is displayed as is and no
> > quotes are applied. So the JSON is your case becomes
> >
> > { strkey: strvalue}
> >
> > so javascript tries to find the variable strvalue which is not there.
> >
> > When you don't specify JSONLiteral, JSON is
> >
> > {strkey : "strvalue"}
> >
> > which is fine.
> >
> >  Have you debugged it in firebug or chrome, it may be showing undefined
> > variable or something
> >
> > regards
> > Taha
> >
> > On Thu, Jul 14, 2011 at 1:46 AM, iberck &lt;ibe...@gmail.com&gt; wrote:
> >
> >> When I send the JSONObject: jsSupport.addInitializerCall("test1",
> >> jobj.toCompactString()); IT WORKS
> >>
> >> Thanks in advance ;)
> >>
> >> --
> >> View this message in context:
> >> http://tapestry.1045711.n5.nabble.com/T5-2-6-JSONLiteral-Bug-tp4584187p4584206.html
> >> Sent from the Tapestry - User mailing list archive at Nabble.com.
> >>
> >
>
> Thank you for your response Taha, I need the format {"key": value} because
> I'm using JQPlot library and it requires that json format
>
> Do you know are there another way to send the value from Tapestry without
> quotes ?
> I'm fixing the bug sending the json as compacted string and then breaking it
> in javascript :S
>
> Thank you
>
>
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/T5-2-6-JSONLiteral-Bug-tp4584187p4584672.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to