Re: [S1] json and Action execute()

2008-01-23 Thread nuwan chandrasoma
gt; request.setAttribute("", rslt.toString()); //this name is unknown, i > dont > >> know what to put here > >> return null; > >> > >> > >> what did i do wrong/ didnt do? tnx a lot > >> -- > >> View this message in context: >

Re: [S1] json and Action execute()

2008-01-22 Thread auz
ME/ >> >> Struts Action execute code >> >> JSONArray list = new JSONArray(); >> JSONObject obj = new JSONObject(); >> while(result.next()) { >> obj.put("uid", result.getInt("departmentID")); >>

Re: [struts] [S1] json and Action execute()

2008-01-22 Thread James Mitchell
Doh! Sorry. On Jan 22, 2008 4:21 PM, Dale Newfield <[EMAIL PROTECTED]> wrote: > James Mitchell wrote: > > Take a look at this page: > > http://cwiki.apache.org/S2PLUGINS/json-plugin.html > > The OP specified struts1 in the subject. > > -Dale > > >

Re: [struts] [S1] json and Action execute()

2008-01-22 Thread Dale Newfield
James Mitchell wrote: Take a look at this page: http://cwiki.apache.org/S2PLUGINS/json-plugin.html The OP specified struts1 in the subject. -Dale - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [

Re: [S1] json and Action execute()

2008-01-22 Thread Frank W. Zammetti
", result.getInt("departmentID")); > obj.put("name", result.getString("name")); > list.put(obj); > } > JSONObject rslt = new JSONObject(); > rslt.put ("total", list.length()); > rslt.put("list", list); > request.setAt

Re: [S1] json and Action execute()

2008-01-22 Thread James Mitchell
ist = new JSONArray(); > JSONObject obj = new JSONObject(); > while(result.next()) { > obj.put("uid", result.getInt("departmentID")); > obj.put("name", result.getString("name")); > list.put(obj); > } > JSONObject rslt = new JSO

[S1] json and Action execute()

2008-01-22 Thread auz
esult.getInt("departmentID")); obj.put("name", result.getString("name")); list.put(obj); } JSONObject rslt = new JSONObject(); rslt.put ("total", list.length()); rslt.put("list", list); request.setAttribute("", rslt.toString()); //this name is