Solved

Developing Business logic in Netbeans Visual JSF Web Application

Posted on 2008-06-17
3
1,240 Views
Last Modified: 2013-12-14
Hello,

I am a beginning developer trying to develop a very simple, basic store using Netbeans Visual JSF Web Application.  I've already developed the layout and design of the page, but I'm having some trouble implementing the business logic.

Specifically, what I'm trying to accomplish is passing numbers enter in the Order Quanity fields for each item to an "Order Summary" page that displays the items ordered, quantity ordered, and pricing for each.
How can I pass the data from my main page to my summary page when the user clicks the "Submit Order" button?  Then, how can I calculate the data and then display the results on that Order Summary page?  Specific advice or relevant examples would be greatly appreciated!  

Thanks in advance!
0
Comment
Question by:SpeedsterZ28
3 Comments
 
LVL 13

Expert Comment

by:MicheleMarcon
ID: 21810428
0
 
LVL 10

Accepted Solution

by:
Nellios earned 500 total points
ID: 21810819
When working with "Visual JSF Web Application" by default you have an Application Bean, a Session Bean, a Request Bean and a Baking Bean for the first page.

You can use the Session Bean and the Request Bean to pass information among the whole session (using the session bean) or just a request (using the request bean). More details here http://www.netbeans.org/kb/60/web/scopes.html.

The business logic for caluclation can reside inside the page bean. For example int page bean of the summary page inside the preprocess method you can fetch the data from your session/request beans do the calculations.

In general a lot of usefull examples can be found in: http://www.netbeans.org/kb/60/web/index.html

I would suggest you to review all of them if you intend to use visual jsf.
0
 

Author Closing Comment

by:SpeedsterZ28
ID: 31468023
Very helpful...thank you!
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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
SHA2 certs for IIS AND Java? 2 113
Tomcat: Unable to run tomcat service. 2 23
Convert from a json string array to a Java object 3 53
Java program running SQL query 5 37
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:

838 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