struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Musachy Barroso (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (WW-1922) Ajax remote form fail to bind nested bean property
Date Sun, 13 May 2007 22:52:43 GMT

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

Musachy Barroso resolved WW-1922.
---------------------------------

       Resolution: Cannot Reproduce
    Fix Version/s: 2.1.0

Please make sure you don't have validation for that class, or something else is wrong. I tried
to replicate this problem, changing AjaxTestAction in showcase to:

public class AjaxTestAction implements Action {

    private static int counter = 0;
    private InnerBean innerBean;

    public long getServerTime() {
        return System.currentTimeMillis();
    }

    public int getCount() {
        return ++counter;
    }

    public String execute() throws Exception {
        return SUCCESS;
    }

    public InnerBean getInnerBean() {
        return innerBean;
    }

    public void setInnerBean(InnerBean innerBean) {
        this.innerBean = innerBean;
    }

}

and creating InnerBean like:

public class InnerBean {
    private String data;

    public String getData() {
        return data;
    }

    public void setData(String data) {
        this.data = data;
    }
}

and the form:

<s:form id="form" action="AjaxTest">
  <input type=textbox name="innerBean.data">
  <sx:submit type="button" label="Update Content" targets="t1"  id="ajaxbtn"/>
</s:form>

and it works as expected.

> Ajax remote form fail to bind nested bean property
> --------------------------------------------------
>
>                 Key: WW-1922
>                 URL: https://issues.apache.org/struts/browse/WW-1922
>             Project: Struts 2
>          Issue Type: Bug
>          Components: API
>    Affects Versions: 2.0.6
>            Reporter: Stanley Cheng
>         Assigned To: Musachy Barroso
>             Fix For: 2.1.0
>
>
> public class TestAction extends ActionSupport {
> private TestBean myBean;
> ...
> }
> public class TestBean implements Serializable {
> private String name;
> ...
> }
> myTest.jsp
> <s:form id="testForm" ...>
> <input type="text" name="myBean.name" value="TEST_STRING"/>
> <s:submit value="Submit Normal"/>
> </s:form>
> <!-- submit button outside form -->
> <s:url id="ajaxSubmitFormTest" value="..." />
> <s:submit type="submit" theme="ajax" href="%{ajaxSubmitFormTest}" formId="testForm"
value="Submit Outside Form"/>
> The string "TEST_STRING" fail to bind to the field "myBean.name" inside the action class
when I use the ajax submit button to submit my form. But it work find with normal submit form
button.

-- 
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