comparison src/main/webapp/events/transferEvent.xhtml @ 7:764f47286679

(none)
author jurzua
date Wed, 29 Oct 2014 14:28:34 +0000
parents
children 59f26a5ef2b3
comparison
equal deleted inserted replaced
6:ded3bccf2cf9 7:764f47286679
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 xmlns:ismi="http://java.sun.com/jsf/composite/components/ismi">
9
10 <body>
11 <ui:composition>
12
13 <a4j:commandButton value="Create new transfer event"
14 actionListener="#{Session.listenerCreateTransferEvent}" />
15
16 <h:panelGrid columns="2" styleClass="createPanel"
17 columnClasses="createPanelFirstColumn">
18
19 <h:outputLabel value="Own value" />
20 <h:outputLabel value="#{Session.transferEventForm.event.ownValue}" />
21
22 <h:outputLabel value="Text"/>
23 <h:panelGrid columns="1">
24 <ismi:autocomplete lo="#{Session.transferEventForm.textLo}" />
25
26 <a4j:outputPanel ajaxRendered="true">
27 <h:selectOneMenu
28 rendered="#{Session.transferEventForm.textLo.statusImage.ok}"
29 value="#{Session.transferEventForm.witnessId}"
30 valueChangeListener="#{Session.transferEventForm.listenerChangeWitness}">
31 <f:selectItems value="#{Session.transferEventForm.witnessList}" />
32 <a4j:ajax event="change" render="selectedWitness1" />
33 </h:selectOneMenu>
34
35 <h:panelGrid id="selectedWitness1" style="width: 500px;" columns="1"
36 rendered="#{Session.transferEventForm.witness != null}">
37 <h:outputLabel value="Witness associated:" />
38 <h:outputLabel
39 value="#{Session.transferEventForm.witness.ownValue} [ID=#{Session.transferEventForm.witness.id}]" />
40 </h:panelGrid>
41 <h:outputLabel rendered="#{Session.transferEventForm.witness != null}" />
42 </a4j:outputPanel>
43
44 </h:panelGrid>
45
46
47 <h:outputLabel value="From"/>
48 <h:panelGrid columns="1">
49 <a4j:commandLink
50 value="#{(Session.transferEventForm.selectedPersonFrom) ? 'Change to institution' : 'Change to person'}"
51 actionListener="#{Session.transferEventForm.listenerChangeSelectionFrom}"
52 render="fromPanel"/>
53
54 <h:panelGrid
55 columns="1"
56 id="fromPanel">
57
58 <h:panelGrid rendered="#{Session.transferEventForm.selectedPersonFrom}">
59 <h:outputLabel value="Person from whom transfer was made"/>
60 <ismi:autocomplete lo="#{Session.transferEventForm.personFromLo}" />
61 </h:panelGrid>
62
63 <h:panelGrid rendered="#{!Session.transferEventForm.selectedPersonFrom}">
64 <h:outputLabel value="Institution from which transfer was made"/>
65 <ismi:autocomplete lo="#{Session.transferEventForm.repositoryFromLo}" />
66 </h:panelGrid>
67 </h:panelGrid>
68
69
70 </h:panelGrid>
71
72 <h:outputLabel value="To"/>
73 <h:panelGrid columns="1">
74
75 <a4j:commandLink
76 value="#{(Session.transferEventForm.selectedPersonTo) ? 'Change to institution' : 'Change to person'}"
77 actionListener="#{Session.transferEventForm.listenerChangeSelectionTo}"
78 render="toPanel"/>
79
80 <h:panelGrid
81 columns="1"
82 id="toPanel">
83
84 <h:panelGrid rendered="#{Session.transferEventForm.selectedPersonTo}">
85 <h:outputLabel value="Person to whom transfer was made"/>
86 <ismi:autocomplete lo="#{Session.transferEventForm.personToLo}" />
87 </h:panelGrid>
88
89 <h:panelGrid rendered="#{!Session.transferEventForm.selectedPersonTo}">
90 <h:outputLabel value="Institution to which transfer was made"/>
91 <ismi:autocomplete lo="#{Session.transferEventForm.repositoryToLo}" />
92 </h:panelGrid>
93
94 </h:panelGrid>
95
96 </h:panelGrid>
97
98 <h:outputLabel value="Options for transfer"/>
99 <h:selectOneMenu
100 value="#{Session.transferEventForm.attributes['options_for_transfer']}">
101 <f:selectItems value="#{Session.transferEventForm.suggestedTransferOptions}"/>
102 </h:selectOneMenu>
103
104 <h:outputLabel value="Price"/>
105 <h:inputText value="#{Session.transferEventForm.attributes['price']}"/>
106
107 <h:outputLabel value="Original location"/>
108 <h:panelGrid columns="1">
109 <a4j:commandLink
110 value="#{(Session.transferEventForm.selectedPlaceOriginalLocation) ? 'Change to institution' : 'Change to place'}"
111 actionListener="#{Session.transferEventForm.listenerChangeSelectionOriginalLocation}"
112 render="originalLocationPanel"/>
113
114 <h:panelGrid columns="1"
115 id="originalLocationPanel">
116
117 <h:panelGrid rendered="#{Session.transferEventForm.selectedPlaceOriginalLocation}">
118 <h:outputLabel value="Place"/>
119 <ismi:autocomplete lo="#{Session.transferEventForm.placeOriginalLocationLo}" />
120 </h:panelGrid>
121
122 <h:panelGrid rendered="#{!Session.transferEventForm.selectedPlaceOriginalLocation}">
123 <h:outputLabel value="Institution"/>
124 <ismi:autocomplete lo="#{Session.transferEventForm.repositoryOriginalLocationLo}" />
125 </h:panelGrid>
126
127 </h:panelGrid>
128
129 </h:panelGrid>
130
131 <h:outputLabel value="New location"/>
132 <h:panelGrid columns="1">
133 <a4j:commandLink
134 value="#{(Session.transferEventForm.selectedPlaceNewLocation) ? 'Change to institution' : 'Change to place'}"
135 actionListener="#{Session.transferEventForm.listenerChangeSelectionNewLocation}"
136 render="newLocationPanel"/>
137
138 <h:panelGrid columns="1"
139 id="newLocationPanel">
140
141 <h:panelGrid rendered="#{Session.transferEventForm.selectedPlaceNewLocation}">
142 <h:outputLabel value="Place"/>
143 <ismi:autocomplete lo="#{Session.transferEventForm.placeNewLocationLo}" />
144 </h:panelGrid>
145
146 <h:panelGrid rendered="#{!Session.transferEventForm.selectedPlaceNewLocation}">
147 <h:outputLabel value="Institution"/>
148 <ismi:autocomplete lo="#{Session.transferEventForm.repositoryNewLocationLo}" />
149 </h:panelGrid>
150
151 </h:panelGrid>
152
153 </h:panelGrid>
154
155 <h:outputLabel value="Notes"/>
156 <h:inputTextarea cols="80" rows="5"
157 value="#{Session.transferEventForm.attributes['notes']}"/>
158
159 <h:outputLabel value="Date of Event"/>
160 <ismi:date date="#{Session.transferEventForm.date}"/>
161
162 <h:outputLabel/>
163 <h:commandButton
164 value="#{(empty Session.transferEventForm.event.id) ? 'Create' : 'Change'}"
165 actionListener="#{Session.transferEventForm.listenerSave}"/>
166
167
168 </h:panelGrid>
169
170 </ui:composition>
171 </body>
172 </html>