Hi

* The first (and simpler) options is to provide the beanModel via the
model parameter.
beanModel = beanModelSource.createEditModel(entityType, messages);

With this option you can't use the "add", "exclude" or "include"
parameters in the template, if you need to change something you will
have to modify the beanModel in your Java code.

* Another option (how Tynamo is doing it) is to have a specific
Binding to compute the bindingType on the fly.
Check it out: 
http://svn.codehaus.org/tynamo/trunk/tapestry-model/tapestry-model-core/src/main/java/org/tynamo/bindings/
If you use this option your component could look something like this:
<t:beaneditform object="mb:object" include="${fields}" ....

Of course in this case the "object" property can't be null (never ever).

I hope it helps.
Cheers.
Alejandro.


On Mon, Mar 28, 2011 at 2:03 PM, nquirynen <nat...@pensionarchitects.be> wrote:
> I have a page where i can edit 1 object that has been selected to edit. This
> object can be a different datatype everytime depending on some properties
> set in the page.
>
>
> //Here i get the right object
> public Object getObject() {
>        return dao.getDaoForEntityType(entityType).get(objectId);
> }
> //the beaneditform
> t:beaneditform object="object" include="${fields}" /
>
>
> Ofcourse this results in "Bean editor model for java.lang.Object does not
> contain a property named ..."
>
> Any tutorials or examples on this done before, or hints on how to achieve
> this are really appreciated.
>
> Thanks!
>
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/Generic-beaneditorform-tp4267477p4267477.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to