Guys and Girls,
In a bit of situation and I am sure some (most) of you will sympathise. A senior developer at work decided to leave weeks before a release and I have been handed an almost complete interface written in
JSF using Primefaces. I am relatively new to
Java, around 6 months experience and even newer to JSF, around 4 weeks exposure. I come from a C++ background so I know programming, but with a deadline fast approaching I am having issues doing some very simple things. If anyone can give some advice or point me in the right direction it would be greatly appreciated.
Basically the tool I have is an Administrator interface that talks to a JAR that I wrote which in turn connects to SQL Server to perform administration on the database. Most of the development is done there is just a few usability issues I need to implement. What I mainly need to know is the following:
What is the best way to report an error to the user? For example I have a simple text entry form that pops when the user wants to add a record. Some fields are mandatory for the record to be successfully entered, if the user does not correctly enter these fields and then hits apply, it currently fails silently. How can I simply pop up a dialog to display an error or success message? I cannot see how JSF deals with a return value from the backing bean. All I need to do is check if true or false is returned and display a message accordingly. I thought of another way of doing this by disabling the apply button until all mandatory fields are entered, this proved difficult to do... I tried writing some JavaScript to do this (well I say write, find some code online and modify to what I need) but I have practically no experience in JavaScript so this venture didn't really get off the ground. Given a few more weeks I would grab a book and read from cover to cover but I just don't have that luxury at the moment.
If I can get this error reporting working I will fix 90% of the problems I have as everything just fails silently at the moment.
Thanks in advance for any help