Skip to content

Commit

Permalink
fixes to make post-authentication page work
Browse files Browse the repository at this point in the history
  • Loading branch information
KaterynaHonchar committed Mar 17, 2023
1 parent ff76a99 commit dc31a2a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ protected void populateItem(final ListItem<PrismContainerWrapper<?>> item) {
protected IModel<List<PrismContainerWrapper<? extends Containerable>>> createContainersModel() {
return new ReadOnlyModel<>(() -> {
PrismContainerValueWrapper<C> modelObject = getModelObject();
return modelObject.getContainers(getPanelConfiguration(), getPageBase());
return modelObject.getContainers(getPanelConfiguration(), getParentPage());
});
}

Expand All @@ -128,7 +128,7 @@ protected void populateNonContainer(ListItem<? extends ItemWrapper<?, ?>> item)
}

ItemPanelSettings settings = getSettings() != null ? getSettings().copy() : null;
Panel panel = getPageBase().initItemPanel("property", typeName, item.getModel(), settings);
Panel panel = getParentPage().initItemPanel("property", typeName, item.getModel(), settings);
panel.setOutputMarkupId(true);
item.add(new VisibleBehaviour(() -> itemWrapper.isVisible(getModelObject(), getVisibilityHandler())));
panel.add(AttributeAppender.replace("style", () -> getModelObject().isExpanded() ? "" : "display:none"));
Expand All @@ -147,7 +147,7 @@ protected void populateContainer(ListItem<PrismContainerWrapper<?>> container) {
PrismContainerWrapper<?> itemWrapper = container.getModelObject();
try {
ItemPanelSettings settings = getSettings() != null ? getSettings().copy() : null;
Panel panel = getPageBase().initItemPanel("container", itemWrapper.getTypeName(), container.getModel(), settings);
Panel panel = getParentPage().initItemPanel("container", itemWrapper.getTypeName(), container.getModel(), settings);
panel.add(AttributeAppender.replace("style", () -> getModelObject().isExpanded() ? "" : "display:none"));
panel.setOutputMarkupId(true);
container.add(new VisibleEnableBehaviour() {
Expand All @@ -169,7 +169,7 @@ public boolean isEnabled() {
}

private StringResourceModel getNameOfShowEmptyButton() {
return getPageBase().createStringResource("ShowEmptyButton.showMore.${showEmpty}", getModel());
return getParentPage().createStringResource("ShowEmptyButton.showMore.${showEmpty}", getModel());
}

private void onShowEmptyClick(AjaxRequestTarget target) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,7 @@
<div class="col-md-offset-2 col-md-8 col-lg-offset-2  col-lg-4">
<div class="panel panel-default">
<div class="box-body">
<form wicket:id="mainForm">
<div wicket:id="contentArea"></div>


</form>
<wicket:fragment wicket:id="staticContent">
<wicket:fragment wicket:id="staticContent">

<div wicket:id="wrapperContent">
<div wicket:id="main"/>
Expand All @@ -30,8 +25,6 @@
<div class="col-md-offset-6">
<div wicket:id="captcha" />

<a class="btn btn-default" wicket:id="back" /> <a
class="btn btn-primary" wicket:id="submitRegistration" />
</div>

</wicket:fragment>
Expand All @@ -41,8 +34,6 @@
<div class="col-md-offset-6">
<div wicket:id="captcha" />

<a class="btn btn-default" wicket:id="back" /> <a
class="btn btn-primary" wicket:id="submitRegistration" />
</div>


Expand Down

0 comments on commit dc31a2a

Please sign in to comment.