Make URL Template example from opensocial spec actually work with shindig
-------------------------------------------------------------------------

                 Key: SHINDIG-890
                 URL: https://issues.apache.org/jira/browse/SHINDIG-890
             Project: Shindig
          Issue Type: Bug
          Components: Features (Javascript)
    Affects Versions: 1.0.x-incubating
            Reporter: Henning Schmiedehausen
         Attachments: SHINDIG-890.patch

The opensocial gadgets reference contains the following example for view 
templates:

[...]
http://container.com/apps/{name}/{owner}{-prefix|/|path}{-opt|?os_|params}{-join|&os_|params}
 

Here are some parameters:

{ 
  name : 'Wilma',
  owner : 'Betty',
  path : ['dino','car'], 
  params = { a : 'Barney', b : 'Fred'}
}
[...]

Funnily enough, this example actually does not work with shindig, because the 
-opt prefix can currently only deal with simple elements and arrays and the 
-join prefix does not know how to deal with objects.

The attached patch fixes this and uses Douglas Crockfords "isEmpty(obj)" code 
to test whether an object is empty or not. Please apply.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to