Announcement

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

    RestDataSource XML request format

    I'm using a RestDataSource to populate data into a tree. The RestDataSource contains the field :
    Code:
    DataSourceEnumField genderId = new DataSourceDynamicEnumField("gender.id",
    				ApplicationParameters.getInstance().getResource(
    						"personGenderId"), 2, true);
    		genderId.setForeignKey("genderDS.id");
    and it uses the DSDataFormat.XML.

    what I receive as request in my servlet is :
    Code:
    <request>
        <data>
            <personDS>
                <gender.id></gender.id>
            </personDS>
        </data>
        <dataSource>personDS</dataSource>
        <operationType>fetch</operationType>
        <operationId>personDS_fetch</operationId>
        <startRow></startRow>
        <endRow></endRow>
        <sortBy></sortBy>
        <textMatchStyle></textMatchStyle>
        <componentId>isc_OID_26</componentId>
        <oldValues></oldValues>
    </request>
    As you can see the content of the tag <data></data> is the person DataSource with the foreign key to the gender DataSource.

    Can anyone tell me what i should respond to this request : the people data or the gender data or both.
    If for both, how I have to format the XML to be sent ?

    #2
    What is it you actually want displayed? Is the tree supposed to show a mix of gender and person records or what? Which is first?

    Comment


      #3
      I'm trying to use the same DataSource in both the tree and the dynamicForm.
      The form is supposed to contain a comobobox pointing to the person gender (foreign key to an other DataSource). I need this field only in the form and not in the tree.

      Comment


        #4
        Whenever you use an optionDataSource, the records returned should be records of that optionDataSource.

        Didn't notice this before but gender.id is an invalid field name, they should be indentifiers (dot not allowed).

        Comment


          #5
          Originally posted by Isomorphic
          Whenever you use an optionDataSource, the records returned should be records of that optionDataSource.
          Can you explain more please ?

          Can I use the same DataSource for both tree and form ? and is it possible to mix more than one DataSource in the tree ?

          Comment

          Working...
          X