On Dec 23, 2009, at 5:05 AM, Radek Rekas wrote:

> We are posting a string of name=value pairs seperated by
> ampersands with a className property at the end set to the type of
> xwiki class that we would like to create.
> 
> The object of the correct type is getting created and attached to the page 
> however all of the fields in that object are empty.
> 
> What is the correct format needed to post the name=value pairs?
> 
> What is the significance of the "property#" bit in the object resources 
> section of the restfulapi doco 
> (http://platform.xwiki.org/xwiki/bin/view/Features/XWikiRESTfulAPI).  Do the 
> name=value pairs need to be prefixed with "property#"?
> 
That's it.
The property# is a prefix to be added to the "name=value" pair in order to make 
the processing logic recognize that which pairs are talking about a property of 
the object and which about some data concerning the representation (like the 
className and other attributes that could be taken into account in the future). 

So a request like this:

className=Foo
property#a=aaa
property#b=bbb
...

Will create an object of type Foo whose property "a" will be set to "aaa" and 
property "b" will be set to "bbb".

-Fabio
_______________________________________________
users mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to