Hi, i am a relative inexperienced developer. I have worked with a couple of
presentation frameworks and there is a feature i would really like to have,
that no framework i know has. Here the thing: sometimes i do not like to
have getters and setters for all my classes because of  my domain modeling.
And also do not like to define a bean on the web tier for each class i want
to create from the UI and then populate or create a model object from it (i
think sometimes this is useful, but many times it is duplicated work). So
what i would really like is to somehow define on the html pages, that
certain parameters are part of the constructor of certain class. I just want
you to know that i have no idea if this is possible, just would like to have
it as a developer using a web framework. A very rough example would be
something like this:

<t:form ....>
   <input t:type="TextField" t:constructorParamIndex="0" object="item"
t:id="..."/>
   <input t:type="TextField" t:value="item.value1" t:id="..."/>
</t:form>

So in my dreams :) this would do something like this:

* Get the item class.
* create a new instance (newItem) of that class using a constructor and
using the first textfield as the first parameter.
* invoke newItem.setValue1(...) or set via reflection the value defined on
the second textfield.

I know that there are lots of holes on this idea, but basically i think the
idea is not very complicated. Maybe there is already a nice and simple
solution to this, and i am not familiar with it. If not, i would like to
know how hard would it be to implement, maybe i will give it a shot.

Thanks for your time.
Best regards.
Manuel.

Reply via email to