Skip to content
Snippets Groups Projects
Commit 3e102703 authored by Michael Simon's avatar Michael Simon
Browse files

edit saml sp service configuration page

parent 87059d59
No related branches found
No related tags found
No related merge requests found
...@@ -57,16 +57,21 @@ public class EditSamlServiceSpBean implements Serializable { ...@@ -57,16 +57,21 @@ public class EditSamlServiceSpBean implements Serializable {
public String save() { public String save() {
entity = service.save(entity); entity = service.save(entity);
return "list-idp-configs.xhtml"; return "list-idp-configs.xhtml?faces-redirect=true";
} }
public String cancel() { public String cancel() {
return "list-idp-configs.xhtml"; return "list-idp-configs.xhtml?faces-redirect=true";
} }
public ServiceSamlSpEntity getEntity() { public ServiceSamlSpEntity getEntity() {
if (entity == null) { if (entity == null) {
entity = service.findById(id); if (getId() == null) {
entity = service.createNew();
}
else {
entity = service.findById(id);
}
} }
return entity; return entity;
} }
......
...@@ -51,4 +51,8 @@ public class ListIdpConfigurationBean implements Serializable { ...@@ -51,4 +51,8 @@ public class ListIdpConfigurationBean implements Serializable {
return serviceSpList; return serviceSpList;
} }
public void delete(ServiceSamlSpEntity serviceSamlSpEntity) {
serviceSamlSpService.delete(serviceSamlSpEntity);
serviceSpList = null;
}
} }
...@@ -17,55 +17,75 @@ ...@@ -17,55 +17,75 @@
<ui:define name="content"> <ui:define name="content">
<h:form id="form"> <h:form id="form">
<p:panel header="#{messages.saml_idp_configuration}">
<p:dataTable id="idpDataTable" var="entity" value="#{listIdpConfigurationBean.idpList}">
<p:column>
<f:facet name="header">
<h:outputText value="#{messages.id}" />
</f:facet>
<h:outputText value="#{entity.id}" />
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="#{messages.entity_id}" />
</f:facet>
<h:link outcome="show-idp-config.xhtml" value="#{entity.entityId}">
<f:param name="id" value="#{entity.id}"/>
</h:link>
</p:column>
</p:dataTable>
<h:link outcome="add-idp-config.xhtml" value="#{messages.add_idp_config}"/>
</p:panel>
<p:dataTable id="idpDataTable" var="entity" value="#{listIdpConfigurationBean.idpList}"> <p:panel header="#{messages.saml_sp_service_configuration}">
<p:column> <p:dataTable id="spDataTable" var="entity" value="#{listIdpConfigurationBean.serviceSpList}">
<f:facet name="header"> <p:column width="5%">
<h:outputText value="#{messages.id}" /> <f:facet name="header">
</f:facet> <h:outputText value="#{messages.id}" />
<h:outputText value="#{entity.id}" /> </f:facet>
</p:column> <h:link outcome="edit-saml-service-sp.xhtml" value="#{entity.id}">
<p:column> <f:param name="id" value="#{entity.id}"/>
<f:facet name="header"> </h:link>
<h:outputText value="#{messages.entity_id}" /> </p:column>
</f:facet> <p:column>
<h:link outcome="show-idp-config.xhtml" value="#{entity.entityId}"> <f:facet name="header">
<f:param name="id" value="#{entity.id}"/> <h:outputText value="#{messages.idp}" />
</h:link> </f:facet>
</p:column> <h:outputText value="#{(empty entity.idp.entityId ? 'All IDPs' : entity.idp.entityId)}" />
</p:dataTable> </p:column>
<p:column>
<h:link outcome="add-idp-config.xhtml" value="#{messages.add_idp_config}"/> <f:facet name="header">
<h:outputText value="#{messages.service}" />
<p:dataTable id="spDataTable" var="entity" value="#{listIdpConfigurationBean.serviceSpList}"> </f:facet>
<p:column> <h:outputText value="#{entity.service.name}" />
<f:facet name="header"> </p:column>
<h:outputText value="#{messages.id}" /> <p:column>
</f:facet> <f:facet name="header">
<h:link outcome="edit-saml-service-sp.xhtml" value="#{entity.id}"> <h:outputText value="#{messages.script}" />
<f:param name="id" value="#{entity.id}"/> </f:facet>
</h:link> <h:outputText value="#{entity.script.name}" />
</p:column> </p:column>
<p:column> <p:column>
<f:facet name="header"> <p:commandButton action="#{listIdpConfigurationBean.delete(entity)}" immediate="true" update="@form"
<h:outputText value="#{messages.idp}" /> value="#{messages.delete}">
</f:facet> <p:confirm header="#{messages.confirm_header}" escape="false"
<h:outputText value="#{(empty entity.idp.entityId ? 'All IDPs' : entity.idp.entityId)}" /> message="#{messages.delete_entry_confirm}" />
</p:column> </p:commandButton>
<p:column> <p:linkButton value="#{messages.edit}" outcome="edit-saml-service-sp.xhtml">
<f:facet name="header"> <f:param name="id" value="#{entity.id}"/>
<h:outputText value="#{messages.service}" /> </p:linkButton>
</f:facet> </p:column>
<h:outputText value="#{entity.service.name}" /> </p:dataTable>
</p:column>
<p:column> <h:link outcome="edit-saml-service-sp.xhtml" value="#{messages.add_sp_service_config}"/>
<f:facet name="header">
<h:outputText value="#{messages.script}" />
</f:facet>
<h:outputText value="#{entity.script.name}" />
</p:column>
</p:dataTable>
<p:confirmDialog global="true" showEffect="fade" hideEffect="fade" closable="false"
closeOnEscape="true" width="250">
<p:commandButton value="#{messages.yes}" type="button" styleClass="ui-confirmdialog-yes"/>
<p:commandButton value="#{messages.no}" type="button" styleClass="ui-confirmdialog-no"/>
</p:confirmDialog>
</p:panel>
</h:form> </h:form>
</ui:define> </ui:define>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment