Closed tenuki closed 2 years ago
Hi @tenuki, yes, there is a way to do this. Use @data=$.currentInstance
to set the complete data object. Note that these parameters are set first, and then individual parameters can be specified to override what was put in @data
$.ret = POST /publicactions/id(@data = $.currentInstance);
$.ret = POST /publicactions/id(@data = $.currentInstnce, x = 5);
Hey! Thanks! I missed that.. I'm using @data
with callhandler.. now it really would be nice to have all in one place : to post to /publications/$.currentInstance.id(@data = $.currentInstance) for example. ( useful for people using: https://foalts.org/docs/architecture/controllers#the-controller-method-arguments ).
Thank you!!!
Hi!
I'm trying to post an object to a remote handler, but to get it encoded I have to pass it as one value containing the whole object instead of the whole object itself. I mean:
This works:
click.handler="$.ret = POST /publicaciones/id(object=$.currentInstance)"
. But I would need this to work:click.handler="$.ret = POST /publicaciones/id($.currentInstance)"
.Other way would be to able to specify the post body from fn:json via http module, but haven't found how to do that too.
Btw, I found really useful #9 and its answer, and perhaps it would be nice to:
callhandler
Thanks