This is a discussion on "Form processing javabean" within the PHP Forum section. This forum, and the thread "Form processing javabean are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
Form processing javabean
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
Form processing javabean
I hope someone can point me in the right direction.
I'm currently writing a javabean to cope with form processing, in particular obtaining the information from an HTTP post and retrieving the parameters from the request object. To that end, I have a javabean that does the following: <font color="red">package classes; public class CandRegForm{ String title = ""; String initials = ""; String firstname = ""; public void setTitle( String value ) { title = value; } public void setInitials( String value ) { initials = value; } public void setFirstname( String value ) { firstname = value; } public String getTitle() { return title; } public String getInitials() { return initials; } public String getFirstname() { return firstname; } } </font id="red"> Now as you can imagine this gets very laborious on a page that needs to get a large number of form elements. What i'm looking for is a way to change the getTitle etc methods and request it by name eg <font color="red">public getField(String TheName) { return TheName.value }</font id="red"> Now this doesn't work, it returns null, i imagine as there is no reference to the request object. I there a way to do this? It would be good to just have the one metho to handle all form fields. Cheers Neil |
|
|
![]() |
| Tags |
| form, processing, javabean |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Ah form processing doing my head in! | 1840dsgn | PHP Forum | 7 | Jul 17th, 2007 23:14 |
| Processing application and agreement form | beerboi | PHP Forum | 1 | Jun 26th, 2006 14:36 |
| problems with form processing | tooie | Classic ASP | 3 | Apr 26th, 2006 17:34 |
| Processing Form ASP using GET method to Email | rbrown1972 | Classic ASP | 2 | Feb 25th, 2005 05:23 |
| Template Processing | vor | Classic ASP | 3 | Sep 10th, 2003 00:01 |