You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Lukasz Lenart (JIRA)" <ji...@apache.org> on 2018/02/01 06:36:00 UTC

[jira] [Commented] (WW-4913) when using an custom array as a filed in struts 2 action form textfiled data from jsp page in not populating into custom array but populating in String array or array list

    [ https://issues.apache.org/jira/browse/WW-4913?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16348089#comment-16348089 ] 

Lukasz Lenart commented on WW-4913:
-----------------------------------

Did you provide a converter to convert incoming Strings into {{ValueHolder}}s? Without that Struts do not know how to create the {{ValueHolder}} object.

> when using an custom array as a filed in struts 2 action form textfiled data from jsp page in not populating into custom array but populating in String array or array list
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: WW-4913
>                 URL: https://issues.apache.org/jira/browse/WW-4913
>             Project: Struts 2
>          Issue Type: Task
>            Reporter: amol
>            Priority: Major
>             Fix For: 2.5.15
>
>
> 1> action form MembersPersonalDetailsForm.java
> {code:java}
> public class MembersPersonalDetailsForm extends QAValidatorForm {
>     private ValueHolder[] forename = new ValueHolder[17];
> }
> {code}
> 2> ValueHolder.java
> {code:java}
> public class ValueHolder implements Serializable {
> private static final long serialVersionUID = 7813961312803493438L;
> private Object value = ""; //$NON-NLS-1$
> public ValueHolder() {
>  super();
>  }
>  
>  public ValueHolder(Object val) {
>  this();
>  this.value = val;
>  }
> public Object getValue() {
>  return value;
>  }
>  
>  public void setValue(Object value) {
>  this.value = value;
>  }
> }
> {code}
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)