show-client-config.xhtml 5.53 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:bw="http://www.scc.kit.edu/bwfacelets"
	xmlns:p="http://primefaces.org/ui">
<head>
<title></title>
</head>
<body>
<f:view>
	<f:metadata>
		<f:viewParam name="id" value="#{showOidcClientConfigurationBean.id}"/>
		<f:event type="javax.faces.event.PreRenderViewEvent"
            listener="#{showOidcClientConfigurationBean.preRenderView}" />
	</f:metadata>

<ui:composition template="/template/default-admin.xhtml">
	<ui:param name="title" value="#{messages.title}"/>

	<ui:define name="content">
	<h:form id="form">
		<h2><h:outputText value="#{messages.rp_config}: #{showOidcClientConfigurationBean.entity.name}"/></h2>
	
michael.simon's avatar
michael.simon committed
27
		<p:panel id="mainPanel" header="#{messages.rp_config}">
28
			<p:panelGrid id="baseData" columns="2">
29
			
30
31
		        <h:outputText value="#{messages.id}:"/>
		        <h:outputText value="#{showOidcClientConfigurationBean.entity.id}"/>
32
		
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
		        <h:outputText value="#{messages.name}:"/>
		        <h:outputText value="#{showOidcClientConfigurationBean.entity.name}"/>
	
		        <h:outputText value="#{messages.display_name}:"/>
		        <h:outputText value="#{showOidcClientConfigurationBean.entity.displayName}"/>
	
		        <h:outputText value="#{messages.secret}:"/>
		        <h:outputText value="#{showOidcClientConfigurationBean.entity.secret}"/>
	
		        <h:outputText value="#{messages.op_config}:"/>
		        <h:outputText value="#{showOidcClientConfigurationBean.entity.opConfiguration.name}"/>

		        <h:outputText value="#{messages.generic_store}:"/>
		        <h:panelGroup>
		        	<ul>
		        		<ui:repeat var="key" value="#{showOidcClientConfigurationBean.entity.genericStore.keySet().toArray()}">
			        		<li>
			        			<h:panelGrid id="newPropTable" columns="3" columnClasses="labelColumn, elementColumn">
					        		<h:outputText value="#{key}:"/> 
					        		<h:outputText value="#{showOidcClientConfigurationBean.entity.genericStore.get(key)}"/> 
				        			<h:commandLink value="(#{messages.delete})" action="#{showOidcClientConfigurationBean.removeGenericStore(key)}">
michael.simon's avatar
michael.simon committed
54
										<f:ajax render=":form:mainPanel" />
55
56
57
58
59
60
61
62
63
									</h:commandLink>
								</h:panelGrid>
							</li>
			        	</ui:repeat>
			        </ul>
					<h:panelGrid id="newPropTable" columns="3" columnClasses="labelColumn, elementColumn">
				        <h:inputText id="key_input" value="#{showOidcClientConfigurationBean.newKey}"/>
		       			<h:inputText id="value_input" value="#{showOidcClientConfigurationBean.newValue}"/>
						<h:commandLink value="#{messages.add}" action="#{showOidcClientConfigurationBean.addGenericStore()}">
michael.simon's avatar
michael.simon committed
64
							<f:ajax execute=":form:mainPanel" render=":form:mainPanel" />
65
66
67
68
69
70
71
72
						</h:commandLink>
					</h:panelGrid>
		        </h:panelGroup>
	
			</p:panelGrid>
			<h:link outcome="edit-client-config.xhtml" value="#{messages.edit}">
				<f:param name="id" value="#{showOidcClientConfigurationBean.entity.id}"/>
			</h:link>
73
		
74
		</p:panel>
75

michael.simon's avatar
michael.simon committed
76
		<p:panel id="scriptPanel" header="#{messages.attribute_scripts}">
77
		
78
			<ui:repeat var="scc" value="#{showOidcClientConfigurationBean.serviceOidcClientList}">
michael.simon's avatar
michael.simon committed
79
80
81
82
83
84
85
86
87
88
				<p:outputPanel>
					<h:outputText value="#{scc.script.name} (#{scc.script.id})" /> - 
					<h:outputText value="#{scc.service.name}" rendered="#{scc.service != null}"/>
					<h:outputText value="No service" rendered="#{scc.service == null}"/>
					<h:outputText value=" (wants elevation: #{scc.wantsElevation})" />
					<h:outputText value=" (order criteria: #{scc.orderCriteria}) " />
					<h:commandLink value="#{messages.delete}" action="#{showOidcClientConfigurationBean.removeSoce(scc)}">
						<f:ajax render=":form:scriptPanel" />
					</h:commandLink>
				</p:outputPanel>
89
			</ui:repeat>
90
		
michael.simon's avatar
michael.simon committed
91
92
93
94
95
96
97
98
99
			<p:panelGrid columns="2">
				<h:outputText value="#{messages.script}" />
		        <h:selectOneMenu value="#{showOidcClientConfigurationBean.newSoce.script}"
		        	converter="#{scriptConverter}">
		        	<f:selectItem itemLabel="Kein Script" itemValue="#{null}"/>
	            	<f:selectItems value="#{showOidcClientConfigurationBean.scriptList}" 
	            		var="script" itemLabel="#{script.name} (id #{script.id})" itemValue="#{script}"/>
	            </h:selectOneMenu>

michael.simon's avatar
typos    
michael.simon committed
100
				<h:outputText value="#{messages.service}" />
michael.simon's avatar
michael.simon committed
101
102
103
104
105
106
107
108
109
110
		        <h:selectOneMenu value="#{showOidcClientConfigurationBean.newSoce.service}"
		        	converter="#{serviceConverter}">
		        	<f:selectItem itemLabel="Kein Service" itemValue="#{null}"/>
	            	<f:selectItems value="#{showOidcClientConfigurationBean.serviceList}" 
	            		var="service" itemLabel="#{service.name} (id #{service.id})" itemValue="#{service}"/>
	            </h:selectOneMenu>

				<h:outputText value="#{messages.wants_elevation}" />
				<p:inputSwitch value="#{showOidcClientConfigurationBean.newSoce.wantsElevation}"/>

michael.simon's avatar
typos    
michael.simon committed
111
				<h:outputText value="#{messages.order_criteria}" />
michael.simon's avatar
michael.simon committed
112
113
114
115
116
117
				<p:inputText value="#{showOidcClientConfigurationBean.newSoce.orderCriteria}"/>
			</p:panelGrid>
			
			<h:commandLink value="#{messages.add}" action="#{showOidcClientConfigurationBean.addSoce()}">
				<f:ajax execute=":form:scriptPanel" render=":form:scriptPanel" />
			</h:commandLink>
118
119
120
121
122
123
124
125
		</p:panel>
	</h:form>

	</ui:define>
</ui:composition>
</f:view>		
</body>
</html>