Announcement

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

    Set default values in ds.xml

    Hi

    I am using sql connector to perform all fetch operations with the help of inbuilt ds.
    Since we do not have any entity here , how can we set default value for each field , tried using param defaultValue="" but it still throws field does not have a default value error
    Any pointers pls?

    #2
    defaultValue is a feature to provide defaults in the UI when users are editing. It has no server-side effect and isn't allowed in .ds.xml.

    However, if set defaultValue on, for example, a FormItem, you can use this in combination with a server-side validator (to ensure the value is never missing) to achieve a default value that the end user actually sees (which is better UI).

    If there's some reason you want to inject a default value in server-code, you can use a DMI to do this (see the QuickStart Guide if you don't know what this means).

    Comment

    Working...
    X