Skip to content

Commit

Permalink
Minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
tchrapovic committed Apr 5, 2024
1 parent 36c2195 commit 088bfd4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@ public class PrismContainerPanel<C extends Containerable, PCW extends PrismConta

public PrismContainerPanel(String id, IModel<PCW> model, ItemPanelSettings settings) {
super(id, model, settings);

if (getModelObject() != null) {
getModelObject().setExpanded(true);
}
}

@Override
Expand All @@ -56,25 +52,24 @@ protected Component createValuesPanel() {
valueContainer.add(AttributeAppender.append(
"aria-label",
() -> {
if (getModelObject() == null) {
return null;
}
if (getModelObject().isMultiValue()) {
if (getHeader() == null) {
return getParentPage().createStringResource(
"PrismContainerPanel.container");
}
return getParentPage().createStringResource(
"PrismContainerPanel.container", getHeader().createLabelModel().getObject())
"PrismContainerPanel.container", getHeader().createLabelModel().getObject())
.getString();
}
return null;
}));
valueContainer.add(AttributeAppender.append(
"tabindex",
() -> getModelObject().isMultiValue() ? "0" : null));
() -> getModelObject() != null && getModelObject().isMultiValue() ? "0" : null));
return valueContainer;
}

private PrismContainerHeaderPanel getHeader() {
return (PrismContainerHeaderPanel) get(ID_HEADER);
return (PrismContainerHeaderPanel)get(ID_HEADER);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public static <T extends ObjectType> String createDefaultColoredIcon(QName objec
return GuiStyleConstants.CLASS_ROLE_ANALYSIS_CLUSTER_ICON;
} else if (QNameUtil.match(RoleAnalysisSessionType.COMPLEX_TYPE, objectType)) {
return GuiStyleConstants.CLASS_ROLE_ANALYSIS_SESSION_ICON;
}else {
} else {
return "";
}
}
Expand Down

0 comments on commit 088bfd4

Please sign in to comment.