• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Using AjaxProxy to send data back to the server, causign errors
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using AjaxProxy to send data back to the server, causign errors


  • Subject: Re: Using AjaxProxy to send data back to the server, causign errors
  • From: Mike Schrag <email@hidden>
  • Date: Fri, 11 Sep 2009 12:19:34 -0400

the ajax example apps (probably AjaxExample2) has an example of bidirectional communication with the server components ... i would look at that first.

ms

On Sep 11, 2009, at 12:17 PM, Gustavo Pizano wrote:

Yep in fact, I sent a string 'To the server' , and it was printed in the application console no problems, so I need to send the right data, the quesiton is then, what should I send there, a JS Array?, if so what should I have as parameter in the method? or should create an Array and then convert it to a JSON and then send it to the server, and in the server put as parameter a JSONObject?... this is what I dunno ..


Thx

Gustavo

On Sep 11, 2009, at 2:52 PM, Jean-Francois Veillette wrote:

it look like the json format used to pass values from the browser to the server was misinterpreted by the json bridge on the server. Maybe it was invalid json sent to the server.
I would look at what is the actual data sent to the server and tune it to make sure it get translated to the object class you really want on the server.


- jfv

Le 09-09-11 à 08:43, Gustavo Pizano a écrit :

Hello.
Im usign the AjaxProxy Wonder component, Im receiving data alreayd from the
server, and Im generating a grid using EXTJs, now when I select rows in the
grid, and then I click an AjaxSubmitButton, I have the following.


<wo:AjaxSubmitButton id = "reassign" class = "moreButton" action =
"$reasignSelections" value = "Reasign To Translator" onComplete
="reassignToUser()"/>

so in the action binding method Im doing nothing so far, jsut returning
null.


in the JS reassignToUser() Im doing the follwoing:

 var records = window.grid.selModel.getSelections();
 json.translations.reassignToTranslator(records);

but Im getting JSONRpcClientException: invalid or unexpected data in fixups:
unexpected exception, in the Safari debugger Console, and a:


ep 11 14:33:44 XWSLocalizer[51417] ERROR org.jabsorb.JSONRPCBridge -
unexpected exception
JSONException: JSONArray[0] not found.
at org.json.JSONArray.get(JSONArray.java:189)
at org.jabsorb.JSONRPCBridge.next(JSONRPCBridge.java:1317)
at org.jabsorb.JSONRPCBridge.traverse(JSONRPCBridge.java:1270)
at org.jabsorb.JSONRPCBridge.applyFixup(JSONRPCBridge.java:1207)
at org.jabsorb.JSONRPCBridge.call(JSONRPCBridge.java:494)
at er.ajax.AjaxProxy.handleRequest(AjaxProxy.java:176)
... skipped 15 stack elements
at er.ajax.AjaxRequestHandler.handleRequest (AjaxRequestHandler.java:17)
... skipped 6 stack elements


Im seeing that the var records in the JS has actually data, and its an array
with a lot of stuff, but here are the objects in positions 0 - n, now, I
guess this is more about EXTJS, but inside each Object in the array, there
are many more stuff, but there is a data property and a toJSON, which
contains my values, ... so how to send and NSArray back to the srever with
this information?, and what to di in case its a lot of data?m I was thinking
in making a for loop to generate an arrya with the data, and to the server,
but what if there is a lot of data?, is there a way to do this "magicaly"
:P.


So I guess the error Im getting, its because Im not sending the right Object
type.


Thanks

Gustavo
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Using AjaxProxy to send data back to the server, causign errors
      • From: Gustavo Pizano <email@hidden>
References: 
 >Using AjaxProxy to send data back to the server, causign errors (From: Gustavo Pizano <email@hidden>)
 >Re: Using AjaxProxy to send data back to the server, causign errors (From: Jean-Francois Veillette <email@hidden>)
 >Re: Using AjaxProxy to send data back to the server, causign errors (From: Gustavo Pizano <email@hidden>)

  • Prev by Date: Re: Using AjaxProxy to send data back to the server, causign errors
  • Next by Date: Re: Using AjaxProxy to send data back to the server, causign errors
  • Previous by thread: Re: Using AjaxProxy to send data back to the server, causign errors
  • Next by thread: Re: Using AjaxProxy to send data back to the server, causign errors
  • Index(es):
    • Date
    • Thread