Inventory System for school project Link to full code: https://www.dropbox.com/s/7dqfwmx6gwrenj4/MattNapper.zip?dl=0
not getting data from the InventoryController (ObservableList -Part- allParts) to correct "HomePageController" table(partsTable). Fake data uses InhousePart instance. InHousePart, and OutsourcedPart extends Part(abstract)
public class Inventory {
//declaring arrays for parts, and products
private ObservableList<Product> products = FXCollections.observableArrayList();
private ObservableList<Part> allParts = FXCollections.observableArrayList();
//fake data
InHousePart part1 = new InHousePart (1, 1, "pick", 10.00, 1, 1, 5 );
//adds fake data to "allParts" arraylist
public void addData() {
    allParts.add(part1);
}
 //return method for allParts
  public ObservableList<Part> getPartData() {
    return allParts;
}
HomepageController where table is located
**
 * Initializes the controller class.
 */
@Override
public void initialize(URL url, ResourceBundle rb) {
    partID.setCellValueFactory(cellData -> cellData.getValue().partIDProperty().asObject());
    partName.setCellValueFactory(cellData -> cellData.getValue().nameProperty());
    InvLvl.setCellValueFactory(cellData -> cellData.getValue().InStockProperty().asObject());
    pCPU.setCellValueFactory(cellData -> cellData.getValue().priceProperty().asObject());
}   
//private Inventory myInv;  is declared above at top
public void setPartsTable(Inventory myInv) {
    this.myInv = myInv;
    // Add array list data to the table
    partsTable.setItems(myInv.getPartData());
}
}
MainApp is calling showPartsView() in start. showPartsView() load Homepage over rootLayout, amd give homepage controller access to main app. juststill no data from Inventory Class
@Override
public void start(Stage stage) throws Exception {
    this.stage = stage;
    this.stage.setTitle("MattNapper");
//calling func
      initRootLayout();
      showPartsView();
}
/**
 * Initializes the root layout.
 */
public void initRootLayout() {
    try {
         //Load root layout from fxml file.
        FXMLLoader loader = new FXMLLoader();
        loader.setLocation(MainApp.class.getResource("View_Controller/RootLayout.fxml"));
        rootLayout = (BorderPane) loader.load();
        // Show the scene containing the root layout.
        Scene scene = new Scene(rootLayout);
        stage.setScene(scene);
        stage.show();
    } catch (IOException e) {
        e.printStackTrace();
    }
}
/**
 * Shows the animal overview inside the root layout.
 */
public void showPartsView() {
    try {
        // Load homepage overview.
        FXMLLoader loader = new FXMLLoader();
        loader.setLocation(MainApp.class.getResource("View_Controller/HomePage.fxml"));
        AnchorPane homepage = (AnchorPane) loader.load();
        // Set animal overview into the center of root layout.
        rootLayout.setCenter(homepage);
     // Give the controller access to the main app.
    HomePageController controller = loader.getController();
    controller.setPartsTable(inv);
    } catch (IOException e) {
        e.printStackTrace();
    }
}
