The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

Prasad MVL (2) [Avatar] Offline
#1
Hi,
We are implementing Struts2 in our project.
For that we need to convert the following tag to struts2.
------------------------------------------------------------------------------------
<form action=''url" id="myForm" method="POST">
<input type="hidden" name="perform">
</form>
using the following javascript, we are sending the req:

sendData(){
document.getElementById("myForm").perform.value="xxx";
document.getElementById("myForm").submit();
}
------------------------------------------------------------------------------------

We converted this to:
------------------------------------------------------------------------------------
<s:form action=''url" id="myForm" method="POST">
??????
</s:form>

and corresponding javascript looks same as shown here:

sendData(){
document.getElementById("myForm").perform.value="xxx";
document.getElementById("myForm").submit();
}
------------------------------------------------------------------------------------

Can any one tell on how to use the hidden form field with <s:form> as there seems to be no hidden form fields in Struts2 tag library (Correct me if I'm wrong pls)???

Prasad MVL
Sr Software Engineer,
Satyam Computer Services,
B'lore, India