7
|
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
2 <html xmlns="http://www.w3.org/1999/xhtml"
|
|
3 xmlns:h="http://java.sun.com/jsf/html"
|
|
4 xmlns:f="http://java.sun.com/jsf/core"
|
|
5 xmlns:ui="http://java.sun.com/jsf/facelets"
|
|
6 xmlns:a4j="http://richfaces.org/a4j"
|
|
7 xmlns:rich="http://richfaces.org/rich">
|
|
8
|
|
9 <body>
|
|
10 <ui:composition template="/templates/privateTemplate.xhtml">
|
|
11
|
|
12 <ui:define name="privateContent">
|
|
13
|
|
14 <ui:include src="components/defEditorPopups.xhtml" />
|
|
15
|
|
16 <div id="pageTitle">
|
|
17 <h:outputText value="Definition Editor" />
|
|
18 </div>
|
|
19
|
|
20 <h:panelGrid rendered="#{Session.user != null}"
|
|
21 style="margin-left: auto; margin-right: auto; text-align: center; width: 700px">
|
|
22
|
|
23
|
|
24 <h:panelGrid id="defEditorPanel"
|
|
25 style="margin-left: auto; margin-right: auto; text-align: center; width: 200px">
|
|
26
|
|
27 <a4j:commandButton value="New Definition"
|
|
28 rendered="#{Session.defForm.selectedLWDefinition == null}"
|
|
29 actionListener="#{Session.defForm.createDefinition}"
|
|
30 render="defPanel" />
|
|
31
|
|
32 <rich:dataTable var="def" value="#{Session.defForm.defList}"
|
|
33 rendered="#{Session.defForm.selectedLWDefinition == null}"
|
|
34 style="width: 100%;">
|
|
35 <h:column>
|
|
36 <f:facet name="header">
|
|
37 <h:outputText value="Label" />
|
|
38 </f:facet>
|
|
39 <a4j:commandLink value="#{def.ownValue}"
|
|
40 actionListener="#{Session.defForm.listenerShowDefinition}"
|
|
41 render="defEditorPanel,defPanel" />
|
|
42 </h:column>
|
|
43 </rich:dataTable>
|
|
44
|
|
45
|
|
46 <a4j:commandButton value="Close"
|
|
47 actionListener="#{Session.defForm.listenerCancelEdition}"
|
|
48 rendered="#{Session.defForm.selectedLWDefinition != null}"
|
|
49 render="defEditorPanel,defPanel" />
|
|
50
|
|
51 </h:panelGrid>
|
|
52
|
|
53 <h:panelGrid id="defPanel">
|
|
54 <h:panelGrid
|
|
55 rendered="#{Session.defForm.selectedLWDefinition != null}">
|
|
56
|
|
57
|
|
58 <h:outputText value="Attributes"
|
|
59 styleClass="titlePanel"/>
|
|
60
|
|
61 <h:panelGrid columns="1">
|
|
62 <h:panelGrid columns="2">
|
|
63 <a4j:commandButton value="New attribute"
|
|
64 actionListener="#{Session.defForm.listenerCreateAttribute}"
|
|
65 render="defEditorPpPanel"/>
|
|
66 <a4j:commandButton value="Remove selected attributes"
|
|
67 rendered="#{!empty Session.defForm.attList}"
|
|
68 actionListener="#{Session.defForm.listenerDeleteAttributes}"
|
|
69 render="defPanel"
|
|
70 onclick="if(!confirm('Do you really want to remove the selected attributes?')){ return; };" />
|
|
71 </h:panelGrid>
|
|
72 <rich:dataTable var="attObj"
|
|
73 rendered="#{!empty Session.defForm.attList}"
|
|
74 value="#{Session.defForm.attList}" style="width:600px;">
|
|
75 <h:column>
|
|
76 <f:facet name="header">
|
|
77 <h:outputText value="id" />
|
|
78 </f:facet>
|
|
79 <h:outputLabel value="#{attObj.obj.id}" />
|
|
80 </h:column>
|
|
81 <h:column>
|
|
82 <f:facet name="header">
|
|
83 <h:outputText value="name" />
|
|
84 </f:facet>
|
|
85 <h:outputLabel value="#{attObj.obj.ownValue}"
|
|
86 style="width: 250px;" />
|
|
87 </h:column>
|
|
88 <h:column>
|
|
89 <f:facet name="header">
|
|
90 <h:outputText value="possible values" />
|
|
91 </f:facet>
|
|
92 <h:outputLabel value="#{attObj.obj.possibleValuesShort}"
|
|
93 style="width: 250px;" />
|
|
94 </h:column>
|
|
95 <h:column>
|
|
96 <f:facet name="header">
|
|
97 <h:outputText value="content type" />
|
|
98 </f:facet>
|
|
99 <h:outputLabel value="#{attObj.obj.contentType}" />
|
|
100 </h:column>
|
|
101 <h:column>
|
|
102 <f:facet name="header">
|
|
103 <h:outputText value="edit" />
|
|
104 </f:facet>
|
|
105 <a4j:commandButton value="submit"
|
|
106 actionListener="#{Session.defForm.listenerEditAttribute}"
|
|
107 render="defEditorPpPanel"/>
|
|
108 </h:column>
|
|
109 <h:column>
|
|
110 <f:facet name="header">
|
|
111 <h:outputText value="select" />
|
|
112 </f:facet>
|
|
113 <h:selectBooleanCheckbox value="#{attObj.selected}" />
|
|
114 </h:column>
|
|
115 </rich:dataTable>
|
|
116 </h:panelGrid>
|
|
117
|
|
118
|
|
119 <h:outputText value="Source relations"
|
|
120 styleClass="titlePanel"/>
|
|
121
|
|
122 <h:panelGrid columns="1">
|
|
123 <h:panelGrid columns="2">
|
|
124 <a4j:commandButton value="New source relation"
|
|
125 actionListener="#{Session.defForm.listenerCreateSourceRelation}"
|
|
126 render="defEditorPpPanel"/>
|
|
127 <a4j:commandButton
|
|
128 rendered="#{!empty Session.defForm.srcRelList}"
|
|
129 value="Remove selected source relations"
|
|
130 actionListener="#{Session.defForm.listenerDeleteSourceRelations}"
|
|
131 render="defPanel"/>
|
|
132 </h:panelGrid>
|
|
133 <rich:dataTable var="relObj"
|
|
134 rendered="#{!empty Session.defForm.srcRelList}"
|
|
135 value="#{Session.defForm.srcRelList}" style="width:600px;">
|
|
136 <h:column>
|
|
137 <f:facet name="header">
|
|
138 <h:outputText value="ID" />
|
|
139 </f:facet>
|
|
140 <h:outputLabel value="#{relObj.obj.id}" />
|
|
141 </h:column>
|
|
142 <h:column>
|
|
143 <f:facet name="header">
|
|
144 <h:outputText value="from this" />
|
|
145 </f:facet>
|
|
146 <h:outputLabel value="#{relObj.obj.source.ownValue}" />
|
|
147 </h:column>
|
|
148 <h:column>
|
|
149 <f:facet name="header">
|
|
150 <h:outputText value="name" />
|
|
151 </f:facet>
|
|
152 <h:outputLabel value="#{relObj.obj.ownValue}"
|
|
153 style="width: 250px;" />
|
|
154 </h:column>
|
|
155 <h:column>
|
|
156 <f:facet name="header">
|
|
157 <h:outputText value="to this" />
|
|
158 </f:facet>
|
|
159 <h:outputLabel value="#{relObj.obj.target.ownValue}" />
|
|
160 </h:column>
|
|
161 <h:column>
|
|
162 <f:facet name="header">
|
|
163 <h:outputText value="edit" />
|
|
164 </f:facet>
|
|
165 <a4j:commandButton value="submit"
|
|
166 actionListener="#{Session.defForm.listenerEditSourceRelation}"
|
|
167 render="defEditorPpPanel"/>
|
|
168 </h:column>
|
|
169 <h:column>
|
|
170 <f:facet name="header">
|
|
171 <h:outputText value="select" />
|
|
172 </f:facet>
|
|
173 <h:selectBooleanCheckbox value="#{relObj.selected}" />
|
|
174 </h:column>
|
|
175 </rich:dataTable>
|
|
176
|
|
177 </h:panelGrid>
|
|
178
|
|
179 <h:outputText value="Target relations"
|
|
180 styleClass="titlePanel"/>
|
|
181
|
|
182 <h:panelGrid columns="1">
|
|
183 <h:panelGrid columns="2">
|
|
184 <a4j:commandButton value="New target relation"
|
|
185 actionListener="#{Session.defForm.listenerCreateTargetRelation}"
|
|
186 render="defEditorPpPanel"/>
|
|
187 <a4j:commandButton
|
|
188 rendered="#{!empty Session.defForm.tarRelList}"
|
|
189 value="Remove selected source relations"
|
|
190 actionListener="#{Session.defForm.listenerDeleteTargetRelations}"
|
|
191 render="defPanel"/>
|
|
192 </h:panelGrid>
|
|
193 <rich:dataTable var="relObj"
|
|
194 rendered="#{!empty Session.defForm.tarRelList}"
|
|
195 value="#{Session.defForm.tarRelList}" style="width:600px;">
|
|
196 <h:column>
|
|
197 <f:facet name="header">
|
|
198 <h:outputText value="ID" />
|
|
199 </f:facet>
|
|
200 <h:outputLabel value="#{relObj.obj.id}" />
|
|
201 </h:column>
|
|
202 <h:column>
|
|
203 <f:facet name="header">
|
|
204 <h:outputText value="from this" />
|
|
205 </f:facet>
|
|
206 <h:outputLabel value="#{relObj.obj.source.ownValue}" />
|
|
207 </h:column>
|
|
208 <h:column>
|
|
209 <f:facet name="header">
|
|
210 <h:outputText value="name" />
|
|
211 </f:facet>
|
|
212 <h:outputLabel value="#{relObj.obj.ownValue}"
|
|
213 style="width: 250px;" />
|
|
214 </h:column>
|
|
215 <h:column>
|
|
216 <f:facet name="header">
|
|
217 <h:outputText value="to this" />
|
|
218 </f:facet>
|
|
219 <h:outputLabel value="#{relObj.obj.target.ownValue}" />
|
|
220 </h:column>
|
|
221 <h:column>
|
|
222 <f:facet name="header">
|
|
223 <h:outputText value="edit" />
|
|
224 </f:facet>
|
|
225 <a4j:commandButton value="submit"
|
|
226 actionListener="#{Session.defForm.listenerEditTargetRelation}"
|
|
227 render="defEditorPpPanel"/>
|
|
228 </h:column>
|
|
229 <h:column>
|
|
230 <f:facet name="header">
|
|
231 <h:outputText value="select" />
|
|
232 </f:facet>
|
|
233 <h:selectBooleanCheckbox value="#{relObj.selected}" />
|
|
234 </h:column>
|
|
235 </rich:dataTable>
|
|
236 </h:panelGrid>
|
|
237 </h:panelGrid>
|
|
238
|
|
239 </h:panelGrid>
|
|
240
|
|
241
|
|
242 </h:panelGrid>
|
|
243 </ui:define>
|
|
244 </ui:composition>
|
|
245 </body>
|
|
246 </html>
|