On Mon, Jun 2, 2008 at 2:35 PM, Jackie Oram <<a href="mailto:grndrt1@yahoo.com">grndrt1@yahoo.com</a>> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>I'm currently using Netbeans IDE 6.1 with GlassFish V2 to develop my project.  The error listing that I previously wrote about is not a server log.  My users will be reporting data that must adhere to error validation before loading into Oracle tables.  A report will be returned to the user stating information about their data submission:  number of records, elements flagged as errors, no errors found, etc... </div>
  <div></div></blockquote><div><br>I'm a bit confused as to what, exactly, the application does.  Is it simply reporting a list of errors currently stored in the database, or is it taking input from the users, validating it, and then reporting errors from that data set?<br>
<br>Either way, I think (and I know some people who are going to laugh at me) that JSF is a fine solution for that.  <br><br>Trying to sketch out the architecture over email is difficult at best, especially given the information we have, but I'll shoot from the hip.  My guess is that the user will be uploading a data file of some sort (since they will be told "the number of records").  If that's true (and I'm going to be making a BUNCH of guesses and assumptions here), then you have (or will have) a set of model classes to hold the data uploaded (the file is uploaded, and the data read and stored in one or more classes).  That's probably how I'd do it at least.  With the uploaded data, you'd probably have a List of data objects which you would then pass to the validation code.<br>
<br>This part of the code does what it should and stores validation errors...somewhere.  How you handle this will vary from developer to developer.  From the hip, you might create a ValidationError object that holds a reference to the data object that failed validation, with its attributes being something like myDataObject, validationErrorMessage.  If the list returned is non-null or non-empty, send the user to a page that lists the error message.  If desired, prefered, possible, etc., this table could then have a link to an edit page for the user to correct the validation error.  You may opt, though, to report which records have errors and require the user to fix them locally, and then reupload the data.  That requirement will be driven more by the business than any real technology question, as any web framework worth its salt can handle either scenario easily.<br>
<br>Either way, once the data passes with no validation errors, it can be passed, for example, to the data access layer for persisting in the database.  Up to this point, this data would likely be held in memory (if the dataset is not too long) as an instance variable on your session-scoped bean.  At any rate, the data is sent to its final destination, any instance vars holding state are cleaned up (or nulled out) and the user is sent to a "success" page.<br>
<br>How does that sound? :P  Like I said, it's from the hip, so it probably needs work, but should, I hope, give you a push in the right direction.  I helped, if ever so slightly, on a very similar system at IEC, for what that's worth.<br>
<br>I hope that helps (and doesn't overwhelm.  That's a lot of text. :)<br></div></div><br>-- <br>Jason Lee, SCJP<br>Software Architect -- Objectstream, Inc.<br>Mojarra and Mojarra Scales Dev Team<br><a href="https://mojarra.dev.java.net">https://mojarra.dev.java.net</a><br>
<a href="https://scales.dev.java.net">https://scales.dev.java.net</a><br><a href="http://blogs.steeplesoft.com">http://blogs.steeplesoft.com</a>