You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Alex Rambau (JIRA)" <ji...@apache.org> on 2011/04/01 06:52:05 UTC

[jira] [Created] (WICKET-3583) java.lang.ArrayStoreException with AttributeModifier

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

[jira] [Resolved] (WICKET-3583) java.lang.ArrayStoreException with AttributeModifier

Posted by "Pedro Santos (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3583?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pedro Santos resolved WICKET-3583.
----------------------------------

    Resolution: Cannot Reproduce

> 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
>              Labels: wicket
>
> 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

[jira] [Commented] (WICKET-3583) java.lang.ArrayStoreException with AttributeModifier

Posted by "Alex Rambau (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3583?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13015254#comment-13015254 ] 

Alex Rambau commented on WICKET-3583:
-------------------------------------

Tested with 1.5-RC3 and the issue appears to have resolved itself.

> 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
>              Labels: wicket
>
> 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

[jira] [Commented] (WICKET-3583) java.lang.ArrayStoreException with AttributeModifier

Posted by "Pedro Santos (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3583?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13014528#comment-13014528 ] 

Pedro Santos commented on WICKET-3583:
--------------------------------------

The problem is at CompanySelectionPage line 68, the program is trying to assigin an AttributeModifier to an array of other type. How do code look like in there?
As it is not Wicket code, this error description fits better in user mailing list.

> 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
>              Labels: wicket
>
> 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