• Question about new Object Data Source

    By Franz Zinecker 1 decade ago

    All,

    I'm unmarshalling (parsing) a XML file with JAXB. JAXB allows me to have a POJO which allows me to manipulate a XML File in the background. I want to map this class to the Object Data Source to display some XML content directly in the XPage.



    I think, this should be possible without any problem, but I'm missing some examples, what to put into the "CreateObject" and "SaveObject" properties of the Data Source and how I can manipulate the different node elements with the "var" property.



    Any hints/tips available ?

    • Not yet fully documented,but we're making progress...

      By Philippe Riand 1 decade ago

      In the createObject, you should return the object which will be consumed and published by the data source. Note that, once returned this way, it is "owned" by the data source, and you should not store it in a different place (ex: managed bean...). The object also have to be Serializable.

      saveObject means that the user trigerred a save action (ex: submit button) and the data hold by your object should be saved to your back end database. The action to take here tighly depends on your object implementation