Package masterinventory.controller
Class ModifyProductController
- java.lang.Object
-
- masterinventory.controller.ModifyProductController
-
- All Implemented Interfaces:
javafx.fxml.Initializable
public class ModifyProductController extends java.lang.Object implements javafx.fxml.Initializable
Class that provides the controller for the Modify Product UI view.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) ErrorHandling
error
(package private) javafx.scene.Parent
scene
(package private) javafx.stage.Stage
stage
-
Constructor Summary
Constructors Constructor Description ModifyProductController()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
initialize(java.net.URL url, java.util.ResourceBundle rb)
(package private) void
onActionAddAssoc(javafx.event.ActionEvent event)
Adds associated parts to the list of items to be associated with the product once save is clicked.(package private) void
onActionCancel(javafx.event.ActionEvent event)
Returns user to the main menu when "Cancel" is clicked(package private) void
onActionRemoveAssoc(javafx.event.ActionEvent event)
Removes part from the associated list(package private) void
onActionSaveAssoc(javafx.event.ActionEvent event)
Saves product after passing validation(package private) void
onActionSearchByPart(javafx.event.ActionEvent event)
Search for parts either by ID or partial String search on namestatic void
passParameters(Product item)
Passes saved product parameters from MainMenuController to ModifyProductController
-
-
-
Field Detail
-
stage
javafx.stage.Stage stage
-
scene
javafx.scene.Parent scene
-
error
ErrorHandling error
-
-
Method Detail
-
passParameters
public static void passParameters(Product item)
Passes saved product parameters from MainMenuController to ModifyProductController- Parameters:
item
-
-
onActionAddAssoc
void onActionAddAssoc(javafx.event.ActionEvent event) throws java.lang.Exception
Adds associated parts to the list of items to be associated with the product once save is clicked.- Parameters:
event
-- Throws:
java.lang.Exception
-
onActionCancel
void onActionCancel(javafx.event.ActionEvent event) throws java.lang.Exception
Returns user to the main menu when "Cancel" is clicked- Parameters:
event
-- Throws:
java.lang.Exception
-
onActionRemoveAssoc
void onActionRemoveAssoc(javafx.event.ActionEvent event)
Removes part from the associated list- Parameters:
event
-
-
onActionSaveAssoc
void onActionSaveAssoc(javafx.event.ActionEvent event) throws java.io.IOException
Saves product after passing validation- Parameters:
event
-- Throws:
java.io.IOException
- for NumberFormatException - displays error dialogue box
-
onActionSearchByPart
void onActionSearchByPart(javafx.event.ActionEvent event)
Search for parts either by ID or partial String search on name- Parameters:
event
-
-
initialize
public void initialize(java.net.URL url, java.util.ResourceBundle rb)
- Specified by:
initialize
in interfacejavafx.fxml.Initializable
-
-