java.lang.ArrayStoreException with AttributeModifier
----------------------------------------------------
Key: WICKET-3583
URL: https://issues.apache.org/jira/browse/WICKET-3583
Project: Wicket
Issue Type: Bug
Components: wicket-core
Affects Versions: 1.5-RC2
Environment: Windows 7, x86-64, Java 6u24
Reporter: Alex Rambau
Receiving the following error:
java.lang.ArrayStoreException: org.apache.wicket.AttributeModifier
at
com.wagnerequipment.it.web.applications.portalmanagement.CompanySelectionPage$2.populateItem(CompanySelectionPage.java:68)
at
org.apache.wicket.markup.repeater.RefreshingView$1.newItem(RefreshingView.java:113)...
when executing code (adding the AttributeModifier to the item) that worked
previously under 1.4:
DataView<AccountCompany> dataView = new
DataView<AccountCompany>("pageable", new
AccountCompanyListDataProvider(filterCharacterInput)) {
@Override
protected void populateItem(final Item<AccountCompany> item) {
AccountCompany company = item.getModelObject();
item.add(new ActionPanel("actions", item.getModel()));
item.add(new Label("companyId",
String.valueOf(company.getCompanyId())));
item.add(new Label("companyName", company.getCompanyName()));
item.add(new AttributeModifier("class", true, new
AbstractReadOnlyModel<String>() {
@Override
public String getObject() {
return (item.getIndex() % 2 == 1) ? "even" : "odd";
}
}));
}
};
Removing the addition of AttributeModifier to the item causes the issue to go
away.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira