Jan Hoskens wrote:
Extension: (maybe this will be more clear?:-)
that helped indeed.
this sounds like some original idea of building a catalog of widget-definitions to be reused over all forms
(which I think is more generic then just having reuse inside one definition file, but not implemented though)
but it also sounds like one of the new widgets Timothy is cracking up: http://wiki.cocoondev.org/Wiki.jsp?page=TimLarson
(pls check up on the class widget on that page)
regards, -marc=
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 ----- *From:* Jan Hoskens <mailto:[EMAIL PROTECTED]> *To:* [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> *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
-- Marc Portier http://outerthought.org/ Outerthought - Open Source, Java & XML Competence Support Center Read my weblog at http://blogs.cocoondev.org/mpo/ [EMAIL PROTECTED] [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
