Hello:
I am trying to follow this guide:
http://struts.apache.org/2.0.6/docs/html-form-buttons-howto.html
To create a multiple button form. Unfortuntely, it is not
working for me.
I created a simple demo page at:
https://tweb.retcgroup.com/thymeleweb/test/FormTest.action
As you can see, press any button but the boolean states do
not change.
Here is my action class:
package test;
import com.opensymphony.xwork2.*;
public class FormTest extends ActionSupport {
private String message;
private boolean message1;
private boolean message2;
public String execute() throws Exception {
message = "States m1: "+message1+" m2: "+message2;
return INPUT;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public boolean isMessage1() {
return message1;
}
public void setMessage1(boolean message1) {
this.message1 = message1;
}
public boolean isMessage2() {
return message2;
}
public void setMessage2(boolean message2) {
this.message2 = message2;
}
}
Here is the jsp source:
<%@(protected)" %>
<h1>Form test</h1>
<s:actionerror/>
<s:form action="test/FormTest">
<s:property value="message"/>
<s:submit value="First Message" name="message1" />
<input type="submit" name="message1" value="Direct button">
<s:submit value="Second Message" name="message2" />
</s:form>
Any ideas why this is not working?
Thanks,
Neil
--
Neil Aggarwal, (214)986-3533, www.JAMMConsulting.com
FREE! Eliminate junk email and reclaim your inbox.
Visit http://www.spammilter.com for details.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)