// containers.put(container.getId(), (Container) container);
// }
// }
//loop all containers and add them to their parent, (at the right position)
for (String containerId : containers.keySet()) {
Container container = containers.get(containerId);
// TODO: for each container just get its parent from containers and
// add it to the right place (see code in getContainers)
// container.setElements(getContainers(container.getAutoId()));
if (null != container.getParentId()) {
//using parentd as they are stored against that to eliminate duplicates
containers
.get(container.getParentId())
.setElementOnPosition(container, container.getOrderNo());
}
//add all vars to the current container
try {
//using autoid to get right one for this container
Collection<VarvarBean> varBeanCol = VarvarFinder.findByParentautoid(con, container.getAutoId());
for(VarvarBean varBean : varBeanCol) {
// Populate (make an instance) of the element
StandardVariable variable = (StandardVariable) instanciateElement(varBean);
// Set the row name
// variable.setParentId(varBean.getParentid());
variable.setDataId(varBean.getDataid());
// Set the help text ID, and description ID
//TODO: read text based on what
variable.setHelpTextID(variable.getId() + "_H");
variable.setDescriptionID(variable.getId() + "_D");
// set scripts, intervals, services, attributes
populateDynamics(con, variable);
//todo: add variable to container..... sdflkasjf
container.setElementOnPosition(variable, variable.getOrderNo());
}
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();