struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From prashid <pirzada.ras...@gmail.com>
Subject Re: struts2 disable validation on page load
Date Sun, 07 Oct 2012 13:39:29 GMT
Thanks. Everything is fine except url problem,

I have added as you have instructed me. *Only problem is URL. I still get
/processAdd in the url which should be /add after action recdirection as
below*.

 <s:form action="processAdd" method="POST">
<s:submit method="execute" value="#title"/>
 </s:form>

  public String execute() throws Exception {
        System.out.println("execute() executed");
        //Process form data
        return SUCCESS;
    }

    public String input() throws Exception {
        System.out.println("input() executed");
        //Prepare form data
        return INPUT;
    }

 <default-action-ref name="list"/>
        <action name="list" class="com.myapp.actions.StudentAction"
method="getAllStudents">
            <result name="success" type="tiles">/student.list.tiles</result>
        </action>

        <action name="add" class="com.myapp.actions.StudentAction"
method="input">
            <result name="input" type="tiles">/student.edit.tiles</result>
            <result name="failure" type="tiles">/student.edit.tiles</result>
        </action>

        <action name="processAdd" class="com.myapp.actions.StudentAction">
            <result name="success" type="redirectAction">list</result>
            <result name="input" type="tiles">/student.edit.tiles</result>
            <result name="failure" type="redirectAction">add</result>
        </action>




--
View this message in context: http://struts.1045723.n5.nabble.com/struts2-disable-validation-on-page-load-tp5710743p5710749.html
Sent from the Struts - User mailing list archive at Nabble.com.
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message