Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Form.saveData() -> store to xml file

    Hi,
    I'm creating a large form which is filled with (server side) XML data. The form is created via a datasource. Can you please tell me the steps to store the updated values into the XML file?


    Datasource (MetaFormXmlDS):
    ###########################
    Code:
    ...
    DataSourceTextField authorName = new DataSourceTextField("authorName", "Author", 128, true); 
    setFields(authorName);  
    setDataURL("ds/meta.data.xml");  
    ...
    View:
    #####
    Code:
    ...
    DataSource xmlDs = MetaFormXmlDS.getInstance();
    final DynamicForm testForm = new DynamicForm(); 
    testForm.setDataSource(xmlDs);
    ...
    The user edits the form values and presses a button which calls:
    Code:
    ...
    testForm.saveData();
    ...
    First I thought this will do the trick and store the edited values magically into the XML file - but there has to be a server side logic to update the file?!? Which methods do I have to implement?

    Thank you in advance,
    Flo

    #2
    Of course, saveData method will only generate request in xml format. You have to write your own server logic to persist this in xml file. You can use jdom library for example.

    Comment

    Working...
    X