As I use an MVC controller to retrieve the HTML form, I'll use the REST one with the 
"new"
parameter to get the resource initial state.
>>
That is actually not intended. When creating a resource, your application 
should reply with an url
(e.g. location header) where the created resource can be found. You should then 
go and GET the new
resource, not with the "new" param.

Regards
Christian

Hi Christian and thank you for your answer.

The "new" request I was talking about is not intended to create the resource. Instead, it is intended to get the default value of the resource, that will be used on client side to populate an almost blank form. The user will then complete the form and submit it. At that time, the resource will be actually created.

The question you could ask then is: why don't you setup default values on server side before rendering the new form? The answer is simple: as Dojo is widely used, the user is able to create many resources without refreshing the HTML. And some default values could be changed in the meantime.

Regards
--
Guillaume ORIOL

Reply via email to