Skip to content

Commit

Permalink
When ERXWOComponentContent has a single children WODynamicElement, th…
Browse files Browse the repository at this point in the history
…is element is removed and only it's children are used.

This only occur when the single children is a dynamic element since they are subclass of WODynamicGroup. If a space or anything else exists before or after the element, a WODynamicGroup is created as the content container and the problem does not occur.
  • Loading branch information
spelletier committed Dec 12, 2015
1 parent 3b5c2a0 commit 0960e75
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ private WOElement template(WOComponent component) {
WOElement content = component._childTemplate();
WOElement result = null;
String templateName = (_templateName == null) ? null : (String) _templateName.valueInComponent(component);
if (content instanceof WODynamicGroup) {
if (content.getClass() == WODynamicGroup.class) {
WODynamicGroup group = (WODynamicGroup) content;
if (templateName == null) {
// MS: If you don't set a template name, then let's construct all the children of
Expand Down Expand Up @@ -190,7 +190,7 @@ private WOElement template(WOComponent component) {
if(name.equals(templateName)) {
result = template;
}
} else if (content instanceof WOHTMLBareString && templateName == null) {
} else if (templateName == null) {
result=content;
}
return result;
Expand Down

0 comments on commit 0960e75

Please sign in to comment.