struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wes Wannemacher (JIRA)" <j...@apache.org>
Subject [jira] Closed: (WW-3218) Action lost parameter's sub-property
Date Mon, 21 Sep 2009 15:26:48 GMT

     [ https://issues.apache.org/struts/browse/WW-3218?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Wes Wannemacher closed WW-3218.
-------------------------------

    Resolution: Not A Problem

closing since it appears that you figured out the nature of your problem. If there is still
an issue, feel free to reopen with more details.

> Action lost parameter's sub-property
> ------------------------------------
>
>                 Key: WW-3218
>                 URL: https://issues.apache.org/struts/browse/WW-3218
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Actions
>    Affects Versions: 2.1.6
>         Environment: JDK 1.6
> Tomcat 6.0.18
> Eclipse 3.4
>            Reporter: Vietor Liu
>            Assignee: Vietor Liu
>
> Test files list:
> ====index.html====
> <form action="Test" method="post">
> 	<input type="text" id="value1" name="params.value1" value="1111" /> 
> 	<input type="text" id="value2" name="params.value2" value="2222" /> 
> 	<input type="text" id="value3" name="params.value3" value="3333" /> 
> 	<input type="submit" value="Submit" />
> </form>
> ====Params.java====
> private Integer value1;
> private String value2;
> private String value3;
> public *get*
> public *set*
> ====TestAction.java====
> private Params params;
> public void setParams(Params params) {
> 	this.params = params;
> }
> public String execute() throws Exception {
> 		if (params != null) {
> 			System.out.println("struts2 value1:" + params.getValue1()
> 					+ " value2:" + params.getValue2() + " value3:"
> 					+ params.getValue3());
> 			System.out.println("request value1:"
> 					+ request.getParameter("params.value1") + " value2:"
> 					+ request.getParameter("params.value2") + " value3:"
> 					+ request.getParameter("params.value3"));
> 		}
> 		return super.execute();
> 	}
> ====console output ====
> struts2 value1:null value2:null value3:3333
> request value1:1111 value2:2222 value3:3333
> ====
> the parameter "params",it was lost two sub-property.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message