Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

Merging properties of ds fields of inherited and inheriting Datasource

$
0
0
Hi
example:
base.ds.xml
Code:

<DataSource ID="base">
    <fields>
        <field name="foo" type="text" ...>
            <validators> ...
        </field>
    <fields>
</DataSource>

a.ds.xml
Code:

<DataSource ID="a" inheritsFrom="base">
    <fields>
        <field name="foo" required="true"/>
    <fields>
</DataSource>

b.ds.xml
Code:

<DataSource ID="b" inheritsFrom="base">
    <fields>
        <field name="foo" required="false"/>
    <fields>
</DataSource>

"foo" field definition is in base and I don't need to duplicate it again in child datasource. I only added property (required) that differs in child datasources.

I was thinking about creating singleton in java, where I could additionally call setRequired(true/false) on foo field, but I was wondering if you don't have some better approach how to do it just with xml descriptors.

Thanks
Matus

Viewing all articles
Browse latest Browse all 4756

Trending Articles