for the grid you can not do setItems( emptyListHere)?
Empty is fine but calling it with null is not allowed
but doesnt the if statement before it if(ticket=null) catch null
sorry im so confused
is this the area of code you are talking about
private void populateAssignedEmployeeGrid(Ticket ticket) {
// no ticket = close grid. Ticket exists, display grid
if (ticket == null) {
closeAssignedEmployeeGrid();
} else {
ticketForm.setTicket(ticket);
assignedEmployees.setItems(ticket.getEmployees());
assignedEmployees.setVisible(true);
}
}```
You aren’t passing tickets to the grid, you are passing the employees of the ticket to it
And the default employee list of a “new Ticket” is probably null
OMG
you were right
i made a new button “Add New Ticket” with a click listener that calls AddTicket() in my view file
private void addTicket() {
tickets.asSingleSelect().clear();
populateAssignedEmployeeGrid(new Ticket());
}```
now I can pass in the “new Ticket()” call you were talking about
Thank you so much @quirky-zebra !!!
i think ill finally be able to finish this project now TT_TT seriously thank you so much!