Hi

I'm currently developing a program to view different mixes of Data from several tables within a database.

I have created an application using the Netbeans wizard for JSF 2.0 and CRUD which created the basic view all databases which you can edit/view/delete individual rows.

I would however like to include a view dependent upon a certain entry in a table. So for instance I have a large table which lists all the parts on specific models, I would like to show the parts specific to one model in a table when users select the model number.

The idea is that they select the model out of the Show all Model Link >> then View the individual Model. From the individual model view have a link that lets them view all parts specific to that model.

The sql statement which satisfies my needs is this:

Java Code:
SELECT part_no, man_prt_no, description, qty FROM build, parts
    WHERE build.part_no = parts.parts_no
    AND build.model_no = "#{the_Model_Number_Selected}

I Know how to add the links into the relevant View.xhtml which then sends a message to the ModelController - where I need to create a function to grab the current model number - which i sort of have with a getSelected() function that was present. However where I go from here??!?!??!

The databases I have and the files I currently have are in the following screenshot:



Any help would be greatly appreciated as I'm totally stuck as to creating a different view.

Thanks