| Author |
URGENT! Mulitbox problem!!
|
Thilothama Green
Greenhorn
Joined: May 13, 2004
Posts: 14
|
|
Hello everyone, I have a problem with multibox operations in my form.So please help me as soon as possible. Any help in this regard is greatly appreciated. I have a form with rows generated dynamically. for every row there is a checkbox and two text boxes associated with it. checkbox, textbox1, textbox2 are defines as arrays in actionform and I am getting the values in action class. I am using Struts Multibox to display the checkbox. At the beginning when the form is displayed all the checkboxes are not checked (unchecked) and I want all the text boxes to be disabled. upto this point I am getting the result.<html:text property="Amount" size="10" disabled="true"/> There is a save button in this form which saves the rows for which the checkbox is checked and textboxes are entered with values. ------------------------------------------------------- I am having difficulty doing these! Q1) when the user clicks the checkbox , the textboxes associated with that checkbox ( that is same row) should be enabled to enter some data. If the user clicks 2, 5, 6 checkboxes only textboxes for those rows should be enabled. if the user does not enter data in text boxes and tries to save it, it needs to pop up a message to enter data in the textbox first before saving. for this I am thinking of calling _javascript function in the <html:multibox property="saveselections" onfiltered="enabledTextFields()"> First of all is this approach right? how to write this in _javascript? Q2) what is the best approach to define the type of the text box in actionform when amount (ex $10,000.00) needs to be entered. In action class I need to convert to BigDecimal. so can I define it as BigDecimal in actionform itself? Thank you for your help!! Thilothama.
|
 |
 |
|
|
subject: URGENT! Mulitbox problem!!
|
|
|