Hi,

I don't know, if you had the same experience, but it always feels nasty to
me when I do simple XML bindings, where xml element names and field ids are
always called the same.
Wouldn't it be good to make some attributes optional in the binding
definition?

Here's a partial example from the file form2_bind_xml.xml:
<wb:repeater
        id="contacts"
        parent-path="contacts"
        row-path="contact"
        unique-row-id="id"
        unique-path="@id">
        <wb:on-bind>
                <wb:value id="firstname" path="firstname"/>
                <wb:value id="lastname" path="lastname"/>
                <wb:value id="phone" path="phone/@nr"/>
                <wb:value id="email" path="email"/>
        </wb:on-bind>
</wb:repeater>

That's what I'd like to write:
<wb:repeater
        id="contacts"
        row-path="contact"
        unique-row-id="id"
        unique-path="@id">
        <wb:on-bind>
                <wb:value id="firstname"/>
                <wb:value id="lastname"/>
                <wb:value id="phone" path="phone/@nr"/>
                <wb:value id="email"/>
        </wb:on-bind>
</wb:repeater>

So what I mean is, that if the @path is missing on wb:value it defaults to
the same as @id and if @parent-path is missing on wb:repeater it defaults to
@id too.
Perhaps there are some more simplifications possible.

What do others think?

Bye,

Andreas

Reply via email to