You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Vietor Liu (JIRA)" <ji...@apache.org> on 2009/08/20 02:47:59 UTC
[jira] Work started: (WW-3218) Action lost parameter's sub-property
[ https://issues.apache.org/struts/browse/WW-3218?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Work on WW-3218 started by Vietor Liu.
> 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.