Hi Dimitris, Thanks, but will it work, when i have list of properties to be added?
I am aware that we can add the property,like the way u have said or we can just have mymodel.add("propertyname") and hijack name cell in the tml for further actions. I havent given a try, just had a view looking into the approach. Regards Akshay On 30 Mar 2015 16:26, "Dimitris Zenios" <dimitris.zen...@gmail.com> wrote: > try myModel.addEmpty("propertyName"); > > > and in the tml class > you can do > <t:grid t:source="values" t:row="value" t:model="myModel"> > <p:propertyNameCell> > ${value.propertyName} > </p:propertyNameCell> > </t:grid> > > Regards > Dimitris Zenios > > On Mon, Mar 30, 2015 at 4:54 PM, akshay <akshayestat...@gmail.com> wrote: > > > Hi All, > > > > > > I am trying to add properties to the grid dynamically. Below I have > > described, what I try to acheive:- > > > > @Property > > private BeanModel<A> myModel; > > @Inject > > private BeanModelSource beanModelSource; > > > > > > myModel= beanModelSource.createDisplayModel(A.class, > > messages); > > > > //logic for including and re-ordering existing properties defined in > model > > class A. > > > > //some database calls and then we add the new properties based on > business > > logic > > > > myModel.add("new propertyName", "valueToBeShown"); > > > > The method used here is "add(String propertyName, String expression);" > > > > For ex:- The new property name can be "status" with the values as read > from > > db > > > > > > > > I get an exception stating that "Exception generating conduit for > > expression 'valueToBeShown': Class mint.abc.model.A does not contain a > > property (or public field) named 'valueToBeShown'. > > > > I think, I need to use Property Conduit somehow to fix this, I am unsure > > about the usage of the same . Any help will be appreciated. > > > > > > > > > > > > Best Regards! > > Akshay > > >