ItEr30S17ValidacionEProbasFuncionais: Reloading the data. Fixing bug #20.
This commit is contained in:
parent
e6315dd1ca
commit
e5b2a3b776
2 changed files with 17 additions and 8 deletions
|
|
@ -34,7 +34,7 @@ import org.zkoss.ganttz.extensions.ICommandOnTask;
|
|||
import org.zkoss.ganttz.resourceload.ScriptsRequiredByResourceLoadPanel;
|
||||
import org.zkoss.ganttz.util.OnZKDesktopRegistry;
|
||||
import org.zkoss.ganttz.util.script.IScriptsRegister;
|
||||
import org.zkoss.zk.ui.util.GenericForwardComposer;
|
||||
import org.zkoss.zk.ui.util.Composer;
|
||||
|
||||
/**
|
||||
* Controller for company planning view. Representation of company orders in the
|
||||
|
|
@ -44,13 +44,15 @@ import org.zkoss.zk.ui.util.GenericForwardComposer;
|
|||
*/
|
||||
@Component
|
||||
@Scope(BeanDefinition.SCOPE_PROTOTYPE)
|
||||
public class CompanyPlanningController extends GenericForwardComposer {
|
||||
public class CompanyPlanningController implements Composer{
|
||||
|
||||
@Autowired
|
||||
private ICompanyPlanningModel model;
|
||||
|
||||
private List<ICommandOnTask<TaskElement>> additional = new ArrayList<ICommandOnTask<TaskElement>>();
|
||||
|
||||
private Planner planner;
|
||||
|
||||
public CompanyPlanningController() {
|
||||
getScriptsRegister().register(ScriptsRequiredByResourceLoadPanel.class);
|
||||
}
|
||||
|
|
@ -61,9 +63,11 @@ public class CompanyPlanningController extends GenericForwardComposer {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void doAfterCompose(org.zkoss.zk.ui.Component comp) throws Exception {
|
||||
super.doAfterCompose(comp);
|
||||
Planner planner = (Planner) comp;
|
||||
public void doAfterCompose(org.zkoss.zk.ui.Component comp) {
|
||||
planner = (Planner) comp;
|
||||
}
|
||||
|
||||
public void setConfigurationForPlanner() {
|
||||
model.setConfigurationToPlanner(planner, additional);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -163,9 +163,8 @@ public class MultipleTabsPlannerController implements Composer {
|
|||
}
|
||||
|
||||
private ITab createGlobalPlanningTab() {
|
||||
return new CreatedOnDemandTab(ENTERPRISE_VIEW, new IComponentCreator() {
|
||||
IComponentCreator componentCreator = new IComponentCreator() {
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public org.zkoss.zk.ui.Component create(
|
||||
org.zkoss.zk.ui.Component parent) {
|
||||
|
|
@ -196,7 +195,13 @@ public class MultipleTabsPlannerController implements Composer {
|
|||
parent,
|
||||
args);
|
||||
}
|
||||
});
|
||||
};
|
||||
return new CreatedOnDemandTab(ENTERPRISE_VIEW, componentCreator) {
|
||||
@Override
|
||||
protected void afterShowAction() {
|
||||
companyPlanningController.setConfigurationForPlanner();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private ITab createOrderPlanningTab() {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue