I believe it is not possible You have to create listview, each item will have model of IncomeDetail. Then you can map IncomeA
WBR, Maxim (from mobile, sorry for the typos) On Jul 29, 2017 13:57, "extraquoo" <[email protected]> wrote: Hi , I have a xml class MC216 which has below object @XmlElement(required = true) protected IncomeInformation section3; and IncomeInformation class have below list object protected List<IncomeDetail> incomes; and this IncomeDetail class has below list object protected List<IncomeA> incomeEstimate; Then, how to map the incomeEstimate by using PropertyModel. My code is below final PropertyModel<IncomeInformation> sectionThreeModel = new PropertyModel<IncomeInformation>(mc216Model, "section3"); final WebMarkupContainer populateIncomeInfo = new WebMarkupContainer("populateIncomeInfo"); final PropertyModel<List<IncomeDetail>> currentIncomeList = new PropertyModel<List<IncomeDetail>>(sectionThreeModel, "incomes"); final PropertyModel<List<IncomeA>> populateIncomeList = new PropertyModel<List<IncomeA>>(currentIncomeList, "incomeEstimate"); if (populateIncomeList.getObject() == null) { populateIncomeList.setObject(new ArrayList<IncomeA>()); } Here the currentIncomeList can be mapped correctly while populateIncomeList can't. It throws exception when calling getObject(). *[ERROR] org.apache.wicket.RequestCycle | RequestCycle.logRuntimeException(1531) | The expression 'incomeEstimate' is neither an index nor is it a method or field for the list class java.util.ArrayList org.apache.wicket.WicketRuntimeException: The expression 'incomeEstimate' is neither an index nor is it a method or field for the list class java.util.ArrayList* -- View this message in context: http://apache-wicket.1842946. n4.nabble.com/how-to-map-list-model-within-another-list- model-by-propertyModel-tp4678350.html Sent from the Users forum mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
