Hi guys,

My Action has property which is an array of Strings. I'm rendering html
table using this property. What is correct way to update this property from
jsp?

I tried the following but it doesn't work:

1. JSP
<s:iterator value="entityList" status="rowstatus">
    <s:textfield name="selectedItems[%{#rowstatus.index}]"/>

2. Action
    private String[] selectedItems;

    public String[] getSelectedItems(){
        return selectedItems;
    }

    public void setSelectedItems(String[] selectedItems){
        this.selectedItems = selectedItems;
    }

Exception is
[ERROR] 23:11:16,750 InstantiatingNullHandler | Could not create and/or set
value back on to object |
com.opensymphony.xwork2.util.InstantiatingNullHandler.nullPropertyValue(
InstantiatingNullHandler.java:110)| nullPropertyValue
java.lang.InstantiationException: [Ljava.lang.String;
    at java.lang.Class.newInstance0(Unknown Source)

I will appreciate any help.

Thanks,
Andriy

Reply via email to