p.s.:


public JSONArray getNodes() {

                Request request = requestGlobals.getRequest();
                
                
                JSONArray record = new JSONArray();
                        
                JSONObject jsObject = new JSONObject();
                        
                        jsObject.put("text", "adapter");
                        jsObject.put("id", "/adapter");
                        jsObject.put("cls", "folder");
                        
                        record.put(jsObject);
                
                
                return record;
        }


When I then access: 

http://localhost:8080/reorder.getnodes

I get:

"Component Reorder does not contain an embedded component with id 'getnodes'. 
Available components: (none)."


-------- Original-Nachricht --------
> Datum: Thu, 18 Dec 2008 10:33:12 +0100
> Von: superoverdr...@gmx.de
> An: users@tapestry.apache.org
> Betreff: JSONStreamResponse. How to return an array?

> I am trying to return a JSON Array from a Page:
> 
> Array
> (
>     [0] => Array
>         (
>             [text] => adapter
>             [id] => /adapter
>             [cls] => folder
>         )
> 
>     [1] => Array
>         (
>             [text] => air
>             [id] => /air
>             [cls] => folder
>         )
> 
>     [2] => Array
>         (
>             [text] => build
>             [id] => /build
>             [cls] => folder
>         )
> 
> 
> However JSONStreamResponse only returns a single JSON object and not an
> array of objects,
> 
> How is this supposed to work in Tapestry5?
> 
> Thanks!
> 
> Toby
> 
> ---------------------------------------------------------------------
> 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