On Mon, Mar 28, 2011 at 4:40 PM, Thiago H. de Paula Figueiredo <thiag...@gmail.com> wrote: > On Mon, 28 Mar 2011 11:30:29 -0300, Alejandro Scandroli > <alejandroscandr...@gmail.com> wrote: > >> 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. > > I can't test it now, but providing your own BeanModel doesn't prevent you > from using the add, exclude and include parameters at all. It may not make > much sense, but I'm sure you can use them. >
Hmmm, maybe I'm doing something wrong, but I wasn't able to make it work and believe me I've tried. Also, if you look at the code both methods BeanEditForm.onPrepareFromForm and BeanEditor.doPrepare will check for model==null before applying BeanModelUtils.modify. Maybe it's an unwanted behavior or a side effect, but it looks like you can't mix them. Please let me know if you think there is another way. Saludos. Alejandro. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org