Did you solve this? I am getting the same right now. I just started my second attempt with 5.3 after Taha pointed out a solution for my user type translators.
But now I am looking at these JSONArray stack traces ... Perhaps there is a snapshot release of 5.3 that I can try with !? 2011/11/21 Serge Eby <sd...@hotmail.com> > Hi, > > I am using T 5.3-rc-3 and I am getting the following error message while > submitting any forms in my app: > > --- > A JSONArray text must start with '[' at character 1 of "[\"save\", > \"save\"]" > -- > > Stack trace: > -- > org.apache.tapestry5.json.JSONTokener.syntaxError(JSONTokener.java:384) > org.apache.tapestry5.json.JSONArray.parse(JSONArray.java:126) > org.apache.tapestry5.json.JSONArray.<init>(JSONArray.java:95) > org.apache.tapestry5.corelib.components.Form.isFormCancelled(Form.java:590) > > org.apache.tapestry5.corelib.components.Form.advised$onAction_12585e84eba88bfd(Form.java:511) > > org.apache.tapestry5.corelib.components.Form$Invocation_onAction_12585e84eba88bfc.proceedToAdvisedMethod(Unknown > Source) > > org.apache.tapestry5.internal.plastic.AbstractMethodInvocation.proceed(AbstractMethodInvocation.java: > ... > --- > What's puzzling is that the form works in a dummy app but fails in the core > (complex) app. This makes me believe that there is something else that is > interfering with tapestry. I've also noticed that if I disable Javascript > in > the browser, the submission is successful. > > It looks as if: > String raw = request.getParameter(SUBMITTING_ELEMENT_ID); > > in Form.isCancelled() is returning a String in double quotes (in my case) > but I can't figure out where this is created. > > Has anybody else seen this? > > > Below is an excerpt: > > java class: > > .... > void onSuccess() { > > String uploadDir = context.getRealFile("/").getAbsolutePath() + > "/resources"; > File dirPath = new File(uploadDir); > > if (!dirPath.exists()) { > dirPath.mkdirs(); > } > > File copied = new File(uploadDir , file.getFileName()); > file.write(copied); > > } > > tml: > > .... > <form t:type="form" t:id="upload" clientValidation="none"> > <ul> > <li> > <label t:type="label" for="name"/> > <input t:type="textfield" t:id="name" validate="required"/> > </li> > <li> > <label t:type="label" for="file"/> > <input t:type="upload" t:id="file" validate="required"/> > </li> > <li> > <input t:type="submit" value="Upload" t:id="save" /> > > <input type="button" value="Cancel"/> > > </li> > </ul> > </form> > ... > > > -- > Thanks, > > /Serge > > > -- > View this message in context: > http://tapestry-users.832.n2.nabble.com/5-3-JSONArray-Error-while-submitting-forms-tp7018161p7018161.html > Sent from the Tapestry Users 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 > > -- [Hem: 08-715 59 57, Mobil: 070-991 86 42] Allévägen 2A, 132 42 Saltsjö-Boo