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&lt;IncomeDetail>> 
currentIncomeList = new
PropertyModel<List&lt;IncomeDetail>>(sectionThreeModel, "incomes");
                        
                        final PropertyModel<List&lt;IncomeA>> 
populateIncomeList = new
PropertyModel<List&lt;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]

Reply via email to