You've defined the createObject
attribute for the data source, but you haven't specified the saveObject
attribute... that's what the error message you're getting ("save method has not been implemented") is referring to.
So, for example, if you want your dummyAction()
method to run when a save is triggered, try this:
<xp:this.data>
<xe:objectData var="demo" ignoreRequestParams="true"
readonly="false" scope="view"
createObject="#{javascript:return new demo.SampleBean();}"
saveObject="#{javascript:return value.dummyAction();}">
</xe:objectData>
</xp:this.data>
When the saveObject
attribute is specified as a SSJS method binding, the variable value
is bound to the data object, and then the method binding is invoked. So you can either pass value
to some other object to handle the business logic of saving the object, or you can use a syntax of value.anyMethod()
to keep the business logic of object serialization internal to the object itself.
NOTE: whatever logic you do use in this method, you'll want to return a boolean (not void
), so that a return value of false
can be treated as a cancellation, just like the standard Domino document data source does.