aspose file tools
The moose likes Struts and the fly likes struts and java script Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Frameworks » Struts
Reply Bookmark "struts and java script" Watch "struts and java script" New topic
Author

struts and java script

vidya mahavadi
Ranch Hand

Joined: Nov 24, 2004
Posts: 34
Hi,

I have a jsp where I am displaying a table with some transactions and next to each transaction I have a checkbox. I got my jsp working.. But I also need to add a small java script to add the amount in that transaction row to a text feild (another form field). Here is the code snippet..

public class PolicyTrnsDisplayObject implements Serializable{

private PolicyTrns policyTrns;
private boolean checked;

//getters and setters are also included
}

public class AdjustmentRequestActionForm extends ActionForm {
private List policyTransactions = new ArrayList();
//list of displayObjects.

//getters and setters are also included
}

in jsp,


< html:text name="adjustmentRequestForm" property="amount" />


< logic:iterate id="policyTrnsDisplayObject" name="adjustmentRequestForm" property="policyTransactions" type="PolicyTrnsDisplayObject" indexId="ctr" />

...transaction parameters included here

< html:text name="policyTrnsDisplayObject" property="policyTrns.amount" />


< html:checkbox property='< %= "policyTrnsDisplayObject[" + ctr + "].checked"% >' on/click="" /<

< logic:iterate />

What I need to do is, pass the amount in that row to the javascript! I appriciate any idea to get to work..

Thanks!
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: struts and java script
 
Similar Threads
Indexed Properties with List of Strings
Generate Radio Buttons
using indexId
how to use indexid of logic:iterate tag in struts
struts and java script