So you recommend instead of doing something like this:
Code:
WrapSpecEditor wrapSpecEditor = (WrapSpecEditor) FacesUtils.getManagedBean("WrapSpecEditor"); //at the top of the page
//tab change function
int wrap_spec_id = wrapSpecList.get(event.getRow()).getWrap_spec_id();
double benchmark = wrapSpecList.get(event.getRow()).getBenchmark();
int revolutions_benchmark = wrapSpecList.get(event.getRow()).getRevolutions_benchmark();
double lower_limit = wrapSpecList.get(event.getRow()).getLower_limit();
double upper_limit = wrapSpecList.get(event.getRow()).getUpper_limit();
double price = wrapSpecList.get(event.getRow()).getPrice();
String description = wrapSpecList.get(event.getRow()).getDescription();
String shortname = wrapSpecList.get(event.getRow()).getShortname();
int film_spec_id = wrapSpecList.get(event.getRow()).getFilm_spec_id();
WrapSpec wrapSpec = new WrapSpec(wrap_spec_id, benchmark, revolutions_benchmark, upper_limit, lower_limit, price, description, shortname, film_spec_id);
WrapSpec wrapSpecCopy = new WrapSpec(wrap_spec_id, benchmark, revolutions_benchmark, upper_limit, lower_limit, price, description, shortname, film_spec_id);
wrapSpecEditor.setWrapSpec(wrapSpec);
wrapSpecEditor.setWrapSpecDefault(wrapSpecCopy);
wrapSpecEditor.setBenchmarkChanged(false);
wrapSpecEditor.setRevolutionsChanged(false);
wrapSpecEditor.setLowerLimitChanged(false);
wrapSpecEditor.setUpperLimitChanged(false);
wrapSpecEditor.setDescriptionChanged(false);
wrapSpecEditor.setDateChanged(false);
PkgLoadDate pkg = new PkgLoadDate(wrapSpecList.get(event.getRow()).getWrap_spec_id());
wrapSpecEditor.setDate(pkg.getDate());
wrapSpecEditor.setDateCopy(pkg.getDate());
wrapSpecEditor.setNewDate(pkg.getDate());
wrapSpecEditor.setSubmitDisabled(true);
wrapSpecEditor.setDefaultsRendered(false);
do something like this:
Code:
wrapSpecEditor.setWrapSpecId(wrap_spec_id);
wrapSpecEditor.initialize();
or even just
wrapSpecEditor.initalize(wrap_spec_id);
And then have all the initialize code for the page in the initialize function for the wrapspeceditor bean.
I'm not sure why I didn't think of that before. Haha.