Skip to content

Commit

Permalink
Fixed problem where choice option would not be displayed on add butto…
Browse files Browse the repository at this point in the history
…ns of moved choice elements in the editor.
  • Loading branch information
gWestenberger committed Jan 17, 2019
1 parent f80ae60 commit f666794
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src-gwt/org/opencms/acacia/client/CmsAttributeHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
import org.opencms.gwt.client.dnd.CmsDNDHandler;
import org.opencms.gwt.client.dnd.CmsDNDHandler.Orientation;
import org.opencms.gwt.client.ui.CmsTabbedPanel;
import org.opencms.gwt.client.util.CmsDebugLog;
import org.opencms.gwt.client.util.CmsMoveAnimation;

import java.util.ArrayList;
Expand Down Expand Up @@ -730,7 +731,12 @@ public void moveAttributeValue(CmsAttributeValueView valueView, int currentPosit
valueWidget.setValueEntity(
m_widgetService.getRendererForAttribute(m_attributeName, getAttributeType()),
value);

if (getAttributeType().getAttributeType(CmsType.CHOICE_ATTRIBUTE_NAME) != null) {
List<CmsChoiceMenuEntryBean> menuEntries = CmsRenderer.getChoiceEntries(getAttributeType(), false);
for (CmsChoiceMenuEntryBean entry : menuEntries) {
valueWidget.addChoice(m_widgetService, entry);
}
}
}
m_attributeValueViews.remove(valueWidget);
m_attributeValueViews.add(targetPosition, valueWidget);
Expand Down

0 comments on commit f666794

Please sign in to comment.