Extension: (maybe this will be more clear?:-)
 
Actually what I would like to do is something like this:
 
Definition file:
<..>
    <wd:repeater id="Key">
        <wd:widgets>
            <wd:output id="rowid">
                <wd:label>rowid</wd:label>
                <wd:datatype base="long">
                    <wd:convertor type="formatting"/>
                </wd:datatype>
           </wd:output>
            <wd:output id="type">
                 <wd:label>Type</wd:label>
                 <wd:datatype base="string"/>
            </wd:output>
            <wd:output id="code">
                <wd:label>Code</wd:label>
                <wd:datatype base="string"/>
            </wd:output>
               ...
            </wd:widgets>
    </wd:repeater>
 
    <wd:repeater id="Movie">
        <wd:widgets>
            <wd:widget refid="Key"/>    <!-- Here's the thing!-->
            <...>
        </wd:widgets>
    </wd:repeater>
</..>
 
(Same argument for binding files: I set the context correctly and then reference to the previous key object. Binding elements/attributes will be the same in movie and outside, thus setting my context correctly, or because of the fact that I'm referencing from inside the repeater, its context is already set, should be enough.)
 
This definition/binding would be applied to e.g:
    <person>
        <key/>
        <key/>
        <movie>
            <key/>
            <key/>
        </movie>
        <movie>
        ...
    </person>
 
This one time definition/binding of the Key will result in unduplicated code and ergo less faults while changing Key elements/attributes. At the moment, I'm duplicating the Key: once inside the Movie and once outside.
 
This is just a thought (trying to make life easier for users;-)! If it's crazy to do so, just let me know!
 
Greetz,
 
Jan
----- Original Message -----
Sent: Monday, December 22, 2003 8:49 AM
Subject: Woody referencing/copying widgets?

Hi,
 
Is there any way to reference/copy a widget that's already defined/used? I currently have the following situation:
 
<person>
    <key>
        <value>
        <type>
        <...>
    </key>
    <...>
    <movie>
        <key>
            <value>
            <type>
            <...>
        </key>
        <...>
    </movie>
</person>
 
Notice the keys: the format is the same. So: I want to define one key and reuse it whenever I need to. Is this possible?
 
Greetz,
 
Jan

Reply via email to