It can be done in once by setting all object properties (including
template, field names an dvalues).

At first look at code of the xwiki generated submission form, and get
names of all fields.
Then add name=value for properties (e.g. using curl with GET):
curl -u user:password -d
"parent=MyWood.Iszinas&template=Custom.IszinaTemplate&sheet=1&spaceName=MyWood&Custom.IszinaClass_0_datums=18.02.2010+18%3A06%3A44&Custom.IszinaClass_0_darbinieks=%24user&Custom.IszinaClass_0_tips=Custom.Ienakosa&Custom.IszinaClass_0_telefons=26563205&Custom.IszinaClass_0_teksts=aaaa&docName=S-100218-180644&action_save=Saglab%C4%81t+un+skat%C4%ABt"
  http://localhost/xwiki/bin/inline/MyWood/S-100218-180645

Do not forget to include ...&action_save=Button_label at the end.
If list boxes are used, use ids for them, not label values.
see more http://curl.haxx.se/ 

Valdis

> Now I have more tricky question -- how to add custom object using Xwiki
> REST service.
> By browsing existing ones I assume, I can create linked custom object
> using POST before, and get object id.
> Then I add wiki document using PUT and set relation to previously
> created object.
> 
> Is it right approach to test?
> Are there more recommendations beside
> http://platform.xwiki.org/xwiki/bin/view/Features/XWikiRESTfulAPI
> 
> Thanks,
> Valdis
> _______________________________________________
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users


_______________________________________________
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to