So:
1) createDisplayModel() acts the same as createModel(...,false,...); and createEditModel is like createModel(...,true,...) So if you have your bean, the @NonVisual properties won't show up for editing or display. Using createDisplayModel will add all properties with a getter that aren't otherwise marked as @NonVisual, and using createEditModel will only add the properties will getters and setters. But once you have the model, you can manipulate it anyway you want. For example:

  BeanModel<MyBean> getModel() {
BeanModel<MyBean> model = beanModelSource.createDisplayModel(MyBean.class,messages);
      model.exclude("someProp");
      return model;
  }

Robert

On Jun 8, 2009, at 6/810:38 AM , Michael Gerzabek wrote:

Hi,

BeanModelSource now has deprecated create(..) in favor of createDisplayModel(..) and createEditModel(..). This is a nice feature leaving me with one question:

I want to edit a bean that has some properties that should not be displayed at all (@NonVisual), some properties that should be displayed but not enabled for editing. Those properties can have setters but some also don't have setters at all. And then there are some properties that should be editable. How would I achive this?

Thanks for your help,
Michael


---------------------------------------------------------------------
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