Hmm. I've definitely wondered this as well. Unfortunately, something like this might bind the view and the model too closely together. You're really then instrumenting your model not with business logic (per, validate) but with display characteristics which starts to move away from the point of an MVC architecture. I can see the convenience, but I wonder if there's a more model-oriented way of describing this which the view (beaneditform) can interpret. Can't think of a good approach at the moment, but there should be one. It might amount to the same thing, but with less display-centric terminology.

Christian.

On 27-Oct-07, at 5:16 PM, Christoph Jaeger wrote:

Hi,

I like using the BeanEditForm, but I think there should be some
additional annotations to make it even easier to use.

There is already an annotation called "NonVisual" to mark properties you
do not want to display on your page.

How about

@Display(type=password)

so you do not have to use

<t:parameter name="password">
 <t:label for="password"/>
 <t:passwordfield t:id="password" value="person.password"/>
</t:parameter>

or

@Display(type=multiline)

instead of

<t:parameter name="address">
 <t:label for="address"/>
 <t:textarea t:id="address" value="person.address"/>
</t:parameter>

or

@Display(type=text, length=30)

for

<t:parameter name="email">
 <t:label for="email"/>
 <t:textfield t:id="email" value="person.email" size="30"/>
</t:parameter>

I think this would increase the chances of using just

<t:beaneditform object="person"/>

in your .tml files. Or is something like this already implemented, and I
just overlooked it?

Thanks,

Christoph Jäger


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to