Tim Holloway wrote:If what you are talking about is a homogeneous table with fixed rows and columns, just bind the list of Apples to a JSF datatable tag. When you submit the form containing the datatable, all of its input controls will automatically update the list (Model), providing that all items on the form have valid values.
Tim Holloway wrote:
If the table is heterogeneous (rows have different sets of columns), there's no simple way to do that, since you'd need to set up a table with dynamically-defined rows. Which isn't too hard to do if you use a control binding, but it does require logic in the backing bean to properly layout the various controls within the display structure. Once that was done and the backing data model properties mapped to their respective controls, once again JSF would automatically transfer data from the model to the view and automatically transfer changes from the view back to the model.
Chan Ag wrote:Synchronized blocks just create a guarded section. They do not guard the resource. But if you are accessing the resource that you want to protect, outside the guarded section, well it's not protected.
Anayonkar Shivalkar wrote:By default the ResultSet object contains a cursor pointing to beginning and it moves forward only. Also, it can be iterated only once. Thus, to add more functionality (e.g. to move backwards, or to iterate it more than once), 'scrollable' comes into picture.
Matthew Brown wrote:What you'll find is that although these are both in the source file D.java, the compiled files will be D1.class and D2.class.