Kollipara, Seshu-Babu (AMR:9T40) wrote: <snip> > Currently I am trying to put a @For tag into <td> element like this to > make the No. of columns more generic > > <td jwcid="@For" > source="ognl:tab.searchCriteriaOptions" > value="ognl:currentFilterGroup" > index="ognl:currentFilterGroupIndex"> > > Its from here: > http://jira.opensymphony.com/browse/OGNL-130 > > Do you think it will be good idea? I have to put the all the 3 column > elements into a list(source="ognl:tab.searchCriteriaOptions"). > Basically all these 3 bean fields: > private String hostAddress; > private String m_communityString; > private Integer port;
So, you have an AlarmTrapReciever class with these three attributes, right? After looking at ListPanel more closely, I don't really see an elegant way to add in support for extra columns in there. To do this, you are looking at creating a List of List of sources and a List of List of Validators (List<List<Validator>>), etc. And even after doing this, it's not as simple as passing in a List<AlarmTrapReciever>. You would have to compile a list of hostAddress, communityString, and port, from a list of AlarmTrapReciever, and put these together in a list and pass that along as a parameter. It just seems like too much work. IMO, the best option is to - Create a new BaseComponent, AlarmTrapRecieverPanel, which could accept a List<AlarmTrapReciever> as a parameter, and would define a custom table that works with the AlarmTrapReciever objects > > I was looking for a sample/reference code which could be used. Do you > suggest any in sipx/outside? > I was talking with Paul about this, and he pointed out SpeedDialPanel.java. We use this component to add/edit user speed-dials, and it is very similar to what you are looking to do. Arjun _______________________________________________ sipx-dev mailing list [email protected] List Archive: http://list.sipfoundry.org/archive/sipx-dev Unsubscribe: http://list.sipfoundry.org/mailman/listinfo/sipx-dev sipXecs IP PBX -- http://www.sipfoundry.org/
