• Post Reply Bookmark Topic Watch Topic
  • New Topic

Getting null values from XHTML page to Java code

 
Karolis Kalanta
Greenhorn
Posts: 7
Android Eclipse IDE MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear JavaRanch cowboys,

I am new to JSP, JSF, javascript and primefaces (web app development in general) so please, don't bully me. I would like you to present you with my project. My project consists of a web app where a user can select a area from a picture and f.e. if it is a office layout he can input the worker name and any peace of hardware that the area might have. In this case there are two categories: Hardware and Computer. Hardware - it has 5 dropdown lists consisting of printer, scanner and etc. Computer - like Hardware consists of many dropdown lists which add up to components such as processor, motherboard and etc. For me, considering this is my first ever web app project, is a huge step towards web development, I have used various mixes of Java, javascript and primefaces code.
My current problem: When a user selects an area he gets a dialog box where he is prompted to select his desired input, afterwards the user clicks the 'save' button and get's another dialogbox which has a resume of what he has selected so he could check out his input and save it by clicking the 'save' button in the resume box. My problem is that when the user clicks the save button the button calls a method which takes all the input and creates an Area object (Area object consists of various objects such as: Coordinates, Dimensions, Employee, ComputerList and HardwareList) and sends a query to the database, but all the values I get is null.

XHTML code:



SendInput class:



 
J. Kevin Robbins
Bartender
Posts: 1801
28
Chrome Eclipse IDE Firefox Browser jQuery Linux MySQL Database Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Karolis Kalanta wrote:I am new to JSP, JSF, javascript and primefaces (web app development in general) so please, don't bully me.

We don't bully around here. We do, however, nitpick.
First nitpick, please keep your line lengths to 80 characters maximum so we don't have to scroll back and forth to read your code.
Second, please create a SSCE. That's a Small Self-Contained Example which demonstrates the problem. Few people are going to be willing to analyze almost 800 lines of code to find the problem.

I hope you don't consider that bullying. It's certainly not intended as such.

On the plus side, thanks for using code tags.

I haven't tried to digest all that code yet because of the sheer volume, but have you used a debugger to look at variables or the post parameters?

And welcome to The Ranch!
 
Karolis Kalanta
Greenhorn
Posts: 7
Android Eclipse IDE MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Robbins,

Thanks for the welcoming, but I think it would be better if you would delete the post, as I failed to located the edit button and I will try a different approach as I spent countless hours for this issue.
 
J. Kevin Robbins
Bartender
Posts: 1801
28
Chrome Eclipse IDE Firefox Browser jQuery Linux MySQL Database Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As a general rule we don't delete posts in the hope that they will help others in the future. We're happy to help with this one, too.

Don't worry about editing the original post; we would rather you create a new post with new code so that the thread has continuity. Try creating a SSCE by removing most of the fields. You only need one or two to test with. You'll find that taking this approach is a good exercise in debugging. You'll often find the problem as you create the SSCE.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!