// set the graph value here
pb.setSelectedFile( selectedFile );
// Lay out the graph
pb.runLayout();
// Save the graph again
pb.saveGraph();
// Clear the original search info
newSearch();
// return the paintBean to the external context
FacesContext facesContext = FacesContext.getCurrentInstance();
ExternalContext ec = facesContext.getExternalContext();