Solved

How do I get VisualWeb JSF form data into a database using Netbeans 6.7

Posted on 2009-07-03
1
1,093 Views
Last Modified: 2013-12-14
Hi

I'm trying to use the VisualWeb JSF framework on Netbeans 6.7 for the first time. I have created a simple form, have a MySQL database (which I can read data from to populate the part of the form), but can't find guides on how to

1. Get the form data passed on to the next page (i.e. what needs to happened event wise when the Submit button is clicked). I have a Page2.jsp to go to from my Page1.jsp.

2. In the response handling scenario, how do I get the data in the form stored into the database?

As the goal of this is for me to learn how to use the VisualWeb JSF plugin to netbeans to see if it can speed up future developments. For reference the auto-generated JSP code has been included here.



 
<?xml version="1.0" encoding="UTF-8"?>
<!-- 
    Document   : Page1
    Created on : 03-Jul-2009, 17:19:32
    Author     : Sirocco
-->
<jsp:root version="2.1" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:webuijsf="http://www.sun.com/webui/webuijsf">
    <jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>
    <f:view>
        <webuijsf:page id="page1">
            <webuijsf:html id="html1">
                <webuijsf:head id="head1">
                    <webuijsf:link id="link1" url="/resources/stylesheet.css"/>
                </webuijsf:head>
                <webuijsf:body id="body1" style="-rave-layout: grid">
                    <webuijsf:form id="form1">
                        <webuijsf:listbox id="listbox1" items="#{Page1.transcriptsDataProvider1.options['transcripts.display_name']}"
                            label="Transcript Database" style="left: 48px; top: 96px; position: absolute"/>
                        <webuijsf:textField id="textField_email" label="Your Email Address" style="left: 48px; top: 48px; position: absolute"/>
                        <webuijsf:button actionExpression="#{Page1.button1_action}" id="button1" style="left: 47px; top: 312px; position: absolute" text="Submit"/>
                    </webuijsf:form>
                </webuijsf:body>
            </webuijsf:html>
        </webuijsf:page>
    </f:view>
</jsp:root>

Open in new window

0
Comment
Question by:sunnystar
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 15

Accepted Solution

by:
spprivate earned 500 total points
ID: 24817928
Here is a complete step by step on using visualweb jsf and connecting to databases

http://www.netbeans.org/kb/60/web/intro.html
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
JUnit 4 @Before and @BeforeClass differences 3 77
session migration servlets 2 50
How  can  i  resolve  HTTP Status 404 -? 8 58
jsp error 6 43
I had a project requirement for a displaying a user workbench .This workbench would consist multiple data grids .In each grid the user will be able to see a large number of data. These data grids should allow the user to 1. Sort 2. Export the …
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question