Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Java Beans > Beans with JSF
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 3 Topic 1329 of 1403
Post > Topic >>

Beans with JSF

by csharpdotcom <cmsharp01@[EMAIL PROTECTED] > Nov 11, 2007 at 09:32 AM

I'm pretty new to programming with JSF and beans, and have been
reading up the do***entation in the book "Core JavaServer Faces"
by D.Geary and C. Horstmann as well as online, and managed to
get some simple programs to run, so at least I now understand
some of the basics.

However, I've got quite a lot of existing code in HTML and
JavaScript that works, although not fully cleaned up yet, and I want
to make as few changes as possible in order to modify it for using
beans with JSF.  Specifically, some months ago I wrote some
client-side code which is backed up online at
http://csharp.com/simulator/simulator.html,
which I'm in the process
of modifying for JSF.  The links at the bottom take you to
..../option1.html and .../option2.html, with the original source code
at
respectively .../option1.txt and .../option2.txt.  At the moment the
code is not linked to code on a server, so only the JavaScript works
with the forms.

The index page didn't need much work, with the main change being
to include the JSF tags at the top (I'm leaving work on the counter
until later).  The option1 page is mostly one large form, and what I
have since done is to keep the form as it is, except that it only
operates with JavaScript, with the post, action, and JavaScript
function calls at the beginning removed, together with the "Submit"
and "Reset" buttons at the end.  I put these two buttons together
with calls to the JavaScript in a JSF form immediately below the
end of original form, and after making a few changes to the
JavaScript, got the JavaScript to work correctly and validate the
form.

My question is how do I send to the server the contents of the
original form, including the hidden fields?  Do I have to create a
hidden field in the JSF form for each value entered in the main form,
and create a bean for each of these values, or is there some way
of sending the whole contents of the form to a bean, which can then
parse the values.  I want to avoid turning the original form into a
JSF form, as it would probably mean making many changes to the
JavaScript, which would require extra work and debugging.

Exactly the same will be done with the option2 page once option1
has been sorted out, and I would be most grateful for some advice.

Christopher Sharp
 




 3 Posts in Topic:
Beans with JSF
csharpdotcom <cmsharp0  2007-11-11 09:32:05 
Re: Beans with JSF
CK <claus@[EMAIL PROTE  2007-11-11 21:22:18 
Re: Beans with JSF
csharpdotcom <cmsharp0  2007-11-11 14:42:45 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Thu Dec 4 0:50:52 CST 2008.