* Method called when lookup code is changed (also when is set to "" or null)
* @param parentVO lookup container v.o.
* @param parentChangedAttributes lookup container v.o. attributes
*/
public void codeChanged(ValueObject parentVO,Collection parentChangedAttributes) {
GridEmployeeVO vo = (GridEmployeeVO)empController.getLookupVO();
controlManagerCode.setValue(vo.getEmployeeCodeSCH01());
controlEmpName_1.setValue(vo.getName_1REG04());
controlEmpName_2.setValue(vo.getName_2REG04());
}
/**
* Method called before code validation and on lookup button click.
*/
public void beforeLookupAction(ValueObject parentVO) {
ScheduledActivityVO vo = (ScheduledActivityVO)form.getVOModel().getValueObject();
empDataLocator.getLookupFrameParams().put(ApplicationConsts.COMPANY_CODE_SYS01,vo.getCompanyCodeSys01SCH06());
}
/**
* Validation is forced.
*/
public void forceValidate() {}
});
controlActType.getComboBox().setSelectedIndex(0);
HashSet buttonsToDisable = new HashSet();
buttonsToDisable.add(editButton1);
buttonsToDisable.add(deleteButton1);
buttonsToDisable.add(insertButton1);
buttonsToDisable.add(reloadButton1);
form.addButtonsNotEnabled(buttonsToDisable,this);
// people lookup...
peopleDataLocator.setGridMethodName("loadSubjectPerName");
peopleDataLocator.setValidationMethodName("");
filterPeopleButton.setLookupController(peopleController);
peopleController.setLookupDataLocator(peopleDataLocator);
peopleController.setFrameTitle("people");
peopleController.setLookupValueObjectClassName("org.jallinone.subjects.java.PeopleVO");
peopleController.addLookup2ParentLink("progressiveREG04","progressiveReg04SubjectSCH06");
peopleController.addLookup2ParentLink("name_1REG04","subjectName_1SCH06");
peopleController.addLookup2ParentLink("name_2REG04","subjectName_2SCH06");
peopleController.setAllColumnVisible(false);
peopleController.setVisibleColumn("name_1REG04", true);
peopleController.setVisibleColumn("name_2REG04", true);
peopleController.setVisibleColumn("addressREG04", true);
peopleController.setVisibleColumn("cityREG04", true);
peopleController.setVisibleColumn("provinceREG04", true);
peopleController.setVisibleColumn("countryREG04", true);
peopleController.setVisibleColumn("zipREG04", true);
peopleController.setHeaderColumnName("addressREG04", "address");
peopleController.setHeaderColumnName("cityREG04", "city");
peopleController.setHeaderColumnName("provinceREG04", "prov");
peopleController.setHeaderColumnName("countryREG04", "country");
peopleController.setHeaderColumnName("zipREG04", "zip");
peopleController.setPreferredWidthColumn("name_1REG04", 120);
peopleController.setPreferredWidthColumn("name_2REG04", 120);
peopleController.setPreferredWidthColumn("addressREG04", 200);
peopleController.setPreferredWidthColumn("provinceREG04", 50);
peopleController.setPreferredWidthColumn("countryREG04", 70);
peopleController.setPreferredWidthColumn("zipREG04", 50);
peopleController.setFramePreferedSize(new Dimension(740,500));
peopleController.addLookupListener(new LookupListener() {
public void codeValidated(boolean validated) {}
public void codeChanged(ValueObject parentVO,Collection parentChangedAttributes) {
}
public void beforeLookupAction(ValueObject parentVO) {
ScheduledActivityVO vo = (ScheduledActivityVO)form.getVOModel().getValueObject();
peopleDataLocator.getLookupFrameParams().put(ApplicationConsts.COMPANY_CODE_SYS01,vo.getCompanyCodeSys01SCH06());
peopleDataLocator.getLookupFrameParams().put(ApplicationConsts.SUBJECT_TYPE,ApplicationConsts.SUBJECT_PEOPLE);
}
public void forceValidate() {}
});
// organization lookup...
orgDataLocator.setGridMethodName("loadSubjectPerName");
orgDataLocator.setValidationMethodName("");
filterOrgButton.setLookupController(orgController);
orgController.setLookupDataLocator(orgDataLocator);
orgController.setFrameTitle("organizations");
orgController.setLookupValueObjectClassName("org.jallinone.subjects.java.OrganizationVO");
orgController.addLookup2ParentLink("progressiveREG04","progressiveReg04SubjectSCH06");
orgController.addLookup2ParentLink("name_1REG04","subjectName_1SCH06");
orgController.addLookup2ParentLink("name_2REG04","subjectName_2SCH06");
orgController.setAllColumnVisible(false);
orgController.setVisibleColumn("name_1REG04", true);
orgController.setVisibleColumn("addressREG04", true);
orgController.setVisibleColumn("cityREG04", true);
orgController.setVisibleColumn("provinceREG04", true);
orgController.setVisibleColumn("countryREG04", true);
orgController.setVisibleColumn("zipREG04", true);
orgController.setHeaderColumnName("addressREG04", "address");
orgController.setHeaderColumnName("cityREG04", "city");
orgController.setHeaderColumnName("provinceREG04", "prov");
orgController.setHeaderColumnName("countryREG04", "country");
orgController.setHeaderColumnName("zipREG04", "zip");
orgController.setPreferredWidthColumn("name_1REG04", 150);
orgController.setPreferredWidthColumn("addressREG04", 200);
orgController.setPreferredWidthColumn("provinceREG04", 50);
orgController.setPreferredWidthColumn("zipREG04", 50);
orgController.setFramePreferedSize(new Dimension(740,500));
orgController.addLookupListener(new LookupListener() {
public void codeValidated(boolean validated) {}
public void codeChanged(ValueObject parentVO,Collection parentChangedAttributes) { }
public void beforeLookupAction(ValueObject parentVO) {
ScheduledActivityVO vo = (ScheduledActivityVO)form.getVOModel().getValueObject();
orgDataLocator.getLookupFrameParams().put(ApplicationConsts.COMPANY_CODE_SYS01,vo.getCompanyCodeSys01SCH06());
orgDataLocator.getLookupFrameParams().put(ApplicationConsts.SUBJECT_TYPE,ApplicationConsts.SUBJECT_ORGANIZATION);
}
public void forceValidate() {}
});
controlSubjectType.addItemListener(new ItemListener() {
public void itemStateChanged(ItemEvent e) {
if (e.getStateChange()==e.SELECTED) {
cardLayout2.show(cardPanel2, (String) controlSubjectType.getValue());
ScheduledActivityVO vo = (ScheduledActivityVO)form.getVOModel().getValueObject();
vo.setSubjectTypeReg04SubjectSCH06((String) controlSubjectType.getValue());
}
}
});
}