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

  • Hard to understand from the docs how lists in different parts of .ds.xml work

    Hi Isomorphic,

    please see how I struggled to understand how to define Validator.dependentFields here (I'm only talking about definition in XML, not the effect).

    Actually there are different ways here to define lists in different cases and it's not easy to see how to apply a list correctly:

    public java.lang.String[] dependentFields
    User-defined list of fields on which this validator depends.

    public java.lang.String[] groupBy
    List of fields to group by when using server-side summarization.
    <operationBinding operationType="fetch" operationId="count">

    From the docs I don't get why the way of defining things is different here. An example in the respective docs would definitely help (like you do e.g. here for OperationBinding.criteria).

    OperationBinding.requiresRole on the other hand (e.g., there are many of these) which takes a comma separated list, is clear here:
    public java.lang.String requiresRole
    Comma-separated list of user roles that are allowed to invoke the operation described by this operationBinding.
    Best regards
    Last edited by Blama; 10th Jan 2019, 15:35. Reason: formatted

  • #2
    The standard format for multiple items is covered here, which is linked in bold text from literally all of the tags in the documentation for the .ds.xml format.

    If you do not see inline documentation for a shorthand format, the above standard format is the one to use.


    • #3
      Hi Isomorphic,

      thanks, that it the information I was looking for. But what about groupBy then? In my example in #1 (which comes from one of my files), the syntax differs from e.g. Validator.dependentFields.
      Is my syntax there wrong then?

      I think I got it from ServerSummaries and just added a 2nd field.

      Best regards


      • #4
        groupBy can be either singular or plural. The example shows a valid singular format. Your attempt at a plural format doesn't match the docs, and isn't supported (even though it happened to work) and you should fix it to match the documented format.


        • #5
          Hi Isomorphic,

          I'll do that, but I'm not clear about the expected structure in this special case. It's clear here:
          • operationBindings: List of <operationBinding> (without plural "s") inside <operationBindings></operationBindings>
          • fields: List of <field> (without plural "s") inside <fields></fields>
          But for "groupBy": Not sure how to make the singular-list-version inside a plural-tag here. Can you explain what is expected here?

          Best regards


          • #6
            The inner tag name doesn’t matter.