Form processing javabean

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.



Go Back   Webforumz.com > Main Forums > Program Your Website > PHP Forum

Notices


Closed Thread
 
LinkBack Thread Tools
  #1 (permalink)  
Old Aug 9th, 2004, 14:18
Junior Member
Join Date: Aug 2003
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to kinjiro
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

Closed Thread

Tags
form, processing, javabean

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

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


All times are GMT. The time now is 22:18.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43