• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

URGENT! Mulitbox problem!!

Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!!

You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic