//logger.info("SUBCOMPONENTS:" + subComponents.size());
int index = 0;
Iterator subComponentsIterator = subComponents.iterator();
while(subComponentsIterator.hasNext())
{
InfoGlueComponent subComponent = (InfoGlueComponent)subComponentsIterator.next();
if(subComponent != null)
{
component.getComponents().put(subComponent.getSlotName(), subComponent);
if(subComponent.getIsInherited() && subComponent.getPagePartTemplateComponent() == null)
{
//logger.info("Inherited..." + contentId);
String childComponentsString = decorateComponent(subComponent, templateController, repositoryId, siteNodeId, languageId, contentId/*, metainfoContentId*/, maxDepth, currentDepth + 1);
if(!this.getTemplateController().getDeliveryContext().getShowSimple()/* && !disableSlotDecoration */)
subComponentString += "<a id=\"" + index + "Comp\" name=\"" + index + "Comp\"></a><span id=\""+ id + index + "Comp\" class=\"inheritedslot\">" + childComponentsString + "</span>";
else
subComponentString += childComponentsString;
Document componentPropertiesDocument = getComponentPropertiesDOM4JDocument(templateController, siteNodeId, languageId, component.getContentId());
//this.propertiesDivs += getComponentPropertiesDiv(templateController, repositoryId, siteNodeId, languageId, contentId, new Integer(siteNodeId.intValue()*100 + subComponent.getId().intValue()), subComponent.getContentId(), componentPropertiesDocument, subComponent);
Document componentTasksDocument = getComponentTasksDOM4JDocument(templateController, siteNodeId, languageId, subComponent.getContentId());
//this.tasksDivs += getComponentTasksDiv(repositoryId, siteNodeId, languageId, contentId, subComponent, index, subComponents.size() - 1, componentTasksDocument, templateController);
}
else
{
//logger.info("Not inherited..." + contentId);
String childComponentsString = decorateComponent(subComponent, templateController, repositoryId, siteNodeId, languageId, contentId/*, metainfoContentId*/, maxDepth, currentDepth + 1);
//logger.info("childComponentsString:" + childComponentsString);
if(!this.getTemplateController().getDeliveryContext().getShowSimple() && !disableSlotDecoration)
{
String allowedComponentNamesAsEncodedString = null;
String disallowedComponentNamesAsEncodedString = null;
String allowedComponentGroupNamesAsEncodedString = null;
for(int i=0; i < subComponent.getParentComponent().getSlotList().size(); i++)
{
Slot subSlotBean = (Slot)subComponent.getParentComponent().getSlotList().get(i);
if(subSlotBean.getId() != null && subSlotBean.getId().equals(subComponent.getSlotName()))
{
allowedComponentNamesAsEncodedString = subSlotBean.getAllowedComponentsArrayAsUrlEncodedString();
disallowedComponentNamesAsEncodedString = subSlotBean.getDisallowedComponentsArrayAsUrlEncodedString();
allowedComponentGroupNamesAsEncodedString = subSlotBean.getAllowedComponentGroupsArrayAsUrlEncodedString();
subComponent.setContainerSlot(subSlotBean);
}
}
if(subComponent.getPagePartTemplateComponent() != null)
{
subComponent.setComponentDivId("" + id + index + "_" + subComponent.getPagePartTemplateComponent().getId() + "Comp");
subComponentString += "<a id=\"" + subComponent.getPagePartTemplateComponent().getId() + "Comp\" name=\"" + subComponent.getPagePartTemplateComponent().getId() + "Comp\"></a><span class=\"dragableComponent slotPosition\" id=\"" + id + index + "_" + subComponent.getPagePartTemplateComponent().getId() + "Comp\">" + childComponentsString + "<script type=\"text/javascript\">initializeComponentEventHandler('" + id + index + "_" + subComponent.getPagePartTemplateComponent().getId() + "Comp', '" + subComponent.getPagePartTemplateComponent().getId() + "', '" + id + "', " + templateController.getSiteNode().getRepositoryId() + ", " + templateController.getSiteNodeId() + ", " + templateController.getLanguageId() + ", " + templateController.getContentId() + ", " + subComponent.getPagePartTemplateComponent().getId() + ", " + subComponent.getPagePartTemplateComponent().getContentId() + ", '" + URLEncoder.encode(templateController.getOriginalFullURL(), "UTF-8") + "');</script></span>";
}
else
{
subComponent.setComponentDivId("" + id + index + "_" + subComponent.getId() + "Comp");
subComponentString += "<a id=\"" + subComponent.getId() + "Comp\" name=\"" + subComponent.getId() + "Comp\"></a><span class=\"dragableComponent slotPosition\" id=\"" + id + index + "_" + subComponent.getId() + "Comp\">" + childComponentsString + "<script type=\"text/javascript\">initializeComponentEventHandler('" + id + index + "_" + subComponent.getId() + "Comp', '" + subComponent.getId() + "', '" + id + "', " + templateController.getSiteNode().getRepositoryId() + ", " + templateController.getSiteNodeId() + ", " + templateController.getLanguageId() + ", " + templateController.getContentId() + ", " + subComponent.getId() + ", " + subComponent.getContentId() + ", '" + URLEncoder.encode(templateController.getOriginalFullURL(), "UTF-8") + "'); " + "registerOnMouseUp('" + id + index + "_" + subComponent.getId() + "Comp', " + templateController.getSiteNodeId() + ", " + templateController.getLanguageId() + ", " + templateController.getContentId() + ", '" + component.getId() + "', '" + id + "', false, '" + allowedComponentNamesAsEncodedString + "', '" + disallowedComponentNamesAsEncodedString + "','" + allowedComponentGroupNamesAsEncodedString + "', " + subComponent.getId() + ");</script></span>";
}
}
else
{
subComponentString += childComponentsString;
}
if(subComponent.getPagePartTemplateComponent() != null)
{
Document componentPropertiesDocument = getComponentPropertiesDOM4JDocument(templateController, siteNodeId, languageId, subComponent.getPagePartTemplateComponent().getContentId());
//this.propertiesDivs += getComponentPropertiesDiv(templateController, repositoryId, siteNodeId, languageId, contentId, subComponent.getPagePartTemplateComponent().getId(), subComponent.getPagePartTemplateComponent().getContentId(), componentPropertiesDocument, subComponent.getPagePartTemplateComponent());
Document componentTasksDocument = getComponentTasksDOM4JDocument(templateController, siteNodeId, languageId, subComponent.getPagePartTemplateComponent().getContentId());
//this.tasksDivs += getComponentTasksDiv(repositoryId, siteNodeId, languageId, contentId, subComponent.getPagePartTemplateComponent(), index, subComponents.size() - 1, componentTasksDocument, templateController);
}
else
{
Document componentPropertiesDocument = getComponentPropertiesDOM4JDocument(templateController, siteNodeId, languageId, subComponent.getContentId());
//this.propertiesDivs += getComponentPropertiesDiv(templateController, repositoryId, siteNodeId, languageId, contentId, subComponent.getId(), subComponent.getContentId(), componentPropertiesDocument, subComponent);
Document componentTasksDocument = getComponentTasksDOM4JDocument(templateController, siteNodeId, languageId, subComponent.getContentId());
//this.tasksDivs += getComponentTasksDiv(repositoryId, siteNodeId, languageId, contentId, subComponent, index, subComponents.size() - 1, componentTasksDocument, templateController);
}
}
}