Commit 500d5cf8 authored by michael.simon's avatar michael.simon
Browse files

More problems with ViewScope and Update to Wildfly 18

parent 4134a3d4
......@@ -87,11 +87,11 @@ public class GroupAdminAddLocalGroupBean implements Serializable {
groupFlag = groupFlagService.save(groupFlag);
return ViewIds.GROUP_ADMIN_INDEX + "?serviceId=" + serviceId + "&faces-redirect=true";
return ViewIds.GROUP_ADMIN_INDEX + "?serviceId=" + serviceEntity.getId() + "&faces-redirect=true";
}
public String cancel() {
return ViewIds.GROUP_ADMIN_INDEX + "?serviceId=" + serviceId + "&faces-redirect=true";
return ViewIds.GROUP_ADMIN_INDEX + "?serviceId=" + serviceEntity.getId() + "&faces-redirect=true";
}
public LocalGroupEntity getEntity() {
......
......@@ -47,20 +47,20 @@ public class GroupAdminListGroupsBean implements Serializable {
private Long serviceId;
public void preRenderView(ComponentSystemEvent ev) {
if (serviceEntity == null)
if (serviceEntity == null) {
serviceEntity = serviceService.findById(serviceId);
}
if (! authBean.isUserServiceGroupAdmin(serviceEntity))
throw new NotAuthorizedException("Nicht autorisiert");
if (groupFlagList == null)
groupFlagList = groupFlagService.findLocalGroupsForService(serviceEntity);
}
public List<ServiceGroupFlagEntity> getGroupFlagList() {
if (groupFlagList == null)
groupFlagList = groupFlagService.findLocalGroupsForService(serviceEntity);
return groupFlagList;
}
public ServiceEntity getServiceEntity() {
return serviceEntity;
}
......
......@@ -132,12 +132,10 @@ public class GroupAdminShowLocalGroupBean implements Serializable {
fireGroupChangeEvent();
messageGenerator.addResolvedInfoMessage("item_saved", "item_saved_long", true);
init();
}
public String editGroup() {
return ViewIds.GROUP_ADMIN_EDIT_LOCAL_GROUP + "?faces-redirect=true&serviceId=" + serviceId + "&groupId=" + groupId;
return ViewIds.GROUP_ADMIN_EDIT_LOCAL_GROUP + "?faces-redirect=true&serviceId=" + serviceEntity.getId() + "&groupId=" + entity.getId();
}
public String deleteGroup() {
......@@ -156,7 +154,7 @@ public class GroupAdminShowLocalGroupBean implements Serializable {
fireGroupChangeEvent();
return ViewIds.GROUP_ADMIN_INDEX + "?faces-redirect=true&serviceId=" + serviceId;
return ViewIds.GROUP_ADMIN_INDEX + "?faces-redirect=true&serviceId=" + serviceEntity.getId();
}
public void fireGroupChangeEvent() {
......
......@@ -33,13 +33,13 @@
</f:facet>
<h:outputText value="#{groupFlag.group.id}" />
</p:column>
<p:column>
<p:column sortBy="#{groupFlag.group.name}" filterBy="#{groupFlag.group.name}">
<f:facet name="header">
<h:outputText value="#{messages.name}" />
</f:facet>
<h:link outcome="show-local-group.xhtml" value="#{groupFlag.group.name}">
<f:param name="groupId" value="#{groupFlag.group.id}"/>
<f:param name="serviceId" value="#{groupAdminListGroupsBean.serviceId}"/>
<f:param name="serviceId" value="#{groupAdminListGroupsBean.serviceEntity.id}"/>
</h:link>
</p:column>
<p:column>
......
......@@ -23,7 +23,7 @@
<ui:define name="content">
<h:form id="form">
<h2><h:outputText value="#{messages.local_group}: #{groupAdminShowLocalGroupBean.entity.name}"/></h2>
<h2><h:outputText id="headerText" value="#{messages.local_group}: #{groupAdminShowLocalGroupBean.entity.name}"/></h2>
<p:messages id="messageBox" showDetail="true" />
......@@ -33,7 +33,7 @@
<h:outputText value="#{messages.name}:"/>
<p:inplace id="ajax" editor="true">
<p:ajax event="save" listener="#{groupAdminShowLocalGroupBean.handleSave}" update=":form:baseData :form:messageBox :form:btn" />
<p:ajax event="save" listener="#{groupAdminShowLocalGroupBean.handleSave}" update=":form:baseData :form:messageBox :form:btn :form:headerText" />
<p:inputText value="#{groupAdminShowLocalGroupBean.entity.name}" required="true" label="#{messages.name}" />
</p:inplace>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment