> -----Original Message----- > From: news [mailto:[EMAIL PROTECTED] Behalf Of Chuck Chopp > Sent: Monday, July 26, 2004 1:30 PM > To: [EMAIL PROTECTED] > Subject: JSP / ActionForm / Action design quesetion > >
<snip> > Currently, a lot of of the data that gets entered is for > fixed length > fields, and when the data input results in one field being > full, the focus > automatically jumps to the next field as if the TAB key had > been hit. When > all of the fields of data have been entered, simply hitting > the ENTER key > results in the screen full of data fields being submitted, > validated and > then the screen is "reset" to empty field values again for > additional data > entry. Most of the data is numeric and the data entry is > done via the > numeric keypad. You can set a max length on each <html:text field for the fixed length fields. You would have to add some javascript to get the fields to jump once they were full. With <html:cancel you can set the accessKey to a keyboard character, but which one that would be for the ESC key I don't know. You might see what the w3c.org folks have to say, since it's a required field for the control. Most of what you're looking for is sorta outside the scope of Struts, and falls into the javascript and html side of things. Struts provides some really nice tags, as does the JSTL and JSF. > > I need to know if it is possible to set up a JSP to work in > the same way. > Is it possible to set up a JSP such that quick data entry can > be done with > the focus automatically forwarding from one field to the next > as the fields > are filled up with fixed length data w/o having to hit the > TAB key and with > the ENTER key resulting in posting the form data to the applet? > > I can already handle the ActionForm programming for data > validation and the > success/failure forwarding so that the successfully validated > data is fed > into the model and then the controller forwards back to the > same JSP / > ActionForm combination again for additional data entry. > > I'm not sure if I can code things so that some other single > keystroke can be > used in place of clicking a "CANCEL" button on the form, such > as hitting the > ESC key and having that trigger an event in the JSP that is > the same as > clicking the "CANCEL" button. In the green screen > application, hitting ESC > results in leaving the data entry screen and returning to a > higher level > menu. I'd like to preserve as much of the legacy > application's quick data > entry functionality while putting a more modern web-enabled > frontend onto > the application. > > > TIA, > > Chuck > -- > Chuck Chopp > > ChuckChopp (at) rtfmcsi (dot) com http://www.rtfmcsi.com > > RTFM Consulting Services Inc. 864 801 2795 voice & voicemail > 103 Autumn Hill Road 864 801 2774 fax > Greer, SC 29651 > > Do not send me unsolicited commercial email. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]