instanceGroup.put(instance.getInstanceId(), instance);
}
final String language = currentLocale.getLanguage();
JavascriptTree tree = new JavascriptTree("Panels", 0);
URLMarkupGenerator umkg = UIServices.lookup().getUrlMarkupGenerator();
for (Iterator itGroups = groups.keySet().iterator(); itGroups.hasNext();) {
String providerGroupName = (String) itGroups.next();
Map providerGroup = (Map) groups.get(providerGroupName);
JavascriptTree providerGroupTree = new JavascriptTree(providerGroupName, 0);
for (Iterator itProviders = providerGroup.keySet().iterator(); itProviders.hasNext();) {
String providerId = (String) itProviders.next();
JavascriptTree providerTree = new JavascriptTree(providerId, 0);
Map instanceGroups = (Map) providerGroup.get(providerId);
for (Iterator itInstanceGroups = instanceGroups.keySet().iterator(); itInstanceGroups.hasNext();) {
String instanceGroupName = (String) itInstanceGroups.next();
if ("".equals(instanceGroupName)) {
Map instancesInGroup = (Map) instanceGroups.get(instanceGroupName);
for (Iterator itInstance = instancesInGroup.keySet().iterator(); itInstance.hasNext();) {
Long instanceId = (Long) itInstance.next();
PanelInstance instance = (PanelInstance) instancesInGroup.get(instanceId);
// Refactoring. The components system manages the actions by a configuration tree.
// with this condition we mantain the compatibility with the old configuration system.
String linkStr = "";
if ((request.getAttribute("configType") == null) || (request.getAttribute("configType").equals(STANDARD_CONFIG))){
Map params = new HashMap();
params.put("id=" , instance.getInstanceId());
linkStr = umkg.getMarkup("PanelsHandler", "createPanel", params);
}
else if (request.getAttribute("configType").equals(TREE_CONFIG))
linkStr = "javascript: submitForm(" + instanceId.toString() + ");";
String title = LocalizeTag.getLocalizedValue(instance.getTitle(), language, true);