comparison src/main/webapp/entry/place.xhtml @ 89:a142159f09c1

working on better place editing.
author casties
date Mon, 10 Oct 2016 19:58:35 +0200
parents 3e620f32ed5e
children 99f9a55a4957
comparison
equal deleted inserted replaced
88:8d93f3a0108f 89:a142159f09c1
9 9
10 <body> 10 <body>
11 <ui:composition> 11 <ui:composition>
12 12
13 <h:panelGrid> 13 <h:panelGrid>
14 <h:outputText value="City - #{CurrentCity.entity.ownValue}" 14 <h:outputText value="Place - #{CurrentCity.entity.ownValue}"
15 rendered="#{!empty CurrentCity.entity.ownValue}" 15 rendered="#{!empty CurrentCity.entity.ownValue}"
16 styleClass="titlePanel"/> 16 styleClass="titlePanel"/>
17 <h:outputText value="City" 17 <h:outputText value="Place"
18 rendered="#{empty CurrentCity.entity.ownValue}" 18 rendered="#{empty CurrentCity.entity.ownValue}"
19 styleClass="titlePanel"/> 19 styleClass="titlePanel"/>
20 </h:panelGrid> 20 </h:panelGrid>
21 21
22 <h:panelGrid columns="3" styleClass="createPanel" 22 <h:panelGrid columns="3" styleClass="createPanel"
23 columnClasses="createPanelFirstColumn" id="placePanel"> 23 columnClasses="createPanelFirstColumn" id="placePanel">
24 24
25 <h:outputText value="Country/is part of " /> 25 <h:outputText id="name" value="Name" />
26 <ismi:autocomplete lo="#{CurrentCity.countryLo}" />
27 <h:panelGrid>
28 <h:commandButton alt="edit" image="#{ApplicationBean1.editImage}"
29 rendered="#{!empty CurrentCity.countryLo.entity.id}"
30 actionListener="#{CurrentCity.editThisCountryAction}" />
31 </h:panelGrid>
32
33 <h:outputText id="name" value="City/Place Name" />
34 <h:inputText size="100" value="#{CurrentCity.attributes['name']}" /> 26 <h:inputText size="100" value="#{CurrentCity.attributes['name']}" />
35 <h:outputText /> 27 <h:outputText />
36 28
37 <h:outputText value="Type (choose region for country)" /> 29 <h:outputText value="Type" />
38 <h:selectOneListbox size="4" partialSubmit="true" 30 <h:selectOneListbox size="4" partialSubmit="true"
39 value="#{CurrentCity.attributes['type']}"> 31 value="#{CurrentCity.attributes['type']}">
40 <f:selectItems value="#{CurrentCity.suggestedTypes}" /> 32 <f:selectItems value="#{CurrentCity.suggestedTypes}" />
41 </h:selectOneListbox> 33 </h:selectOneListbox>
42 <h:outputText /> 34 <h:outputText />
43 35
44 <h:outputText value="Places part of this"/> 36 <h:outputText value="This place is part of" />
37 <ismi:autocomplete lo="#{CurrentCity.countryLo}" />
38 <h:panelGrid>
39 <h:commandButton alt="edit" image="#{ApplicationBean1.editImage}"
40 rendered="#{!empty CurrentCity.countryLo.entity.id}"
41 actionListener="#{CurrentCity.editThisCountryAction}" />
42 <h:commandButton alt="edit" image="#{ApplicationBean1.imgRemove16}"
43 rendered="#{!empty CurrentCity.countryLo.entity.id}"
44 actionListener="#{CurrentCity.removeThisCountryAction}" />
45 </h:panelGrid>
46
47 <h:outputText value="Places that are part of this"/>
45 <h:panelGrid columns="2" id="placePartOfThisPanel"> 48 <h:panelGrid columns="2" id="placePartOfThisPanel">
46 <rich:dataGrid var="place" style="border:none;" 49 <rich:dataGrid var="place" style="border:none;"
47 value="#{CurrentCity.placesPartOfThis}"> 50 value="#{CurrentCity.placesPartOfThis}">
48 <h:column style="border:none;"> 51 <h:column style="border:none;">
49 <h:selectBooleanCheckbox 52 <h:selectBooleanCheckbox
59 value="Remove" 62 value="Remove"
60 actionListener="#{CurrentCity.listenerRemovePlacesPartOfThis}" 63 actionListener="#{CurrentCity.listenerRemovePlacesPartOfThis}"
61 render="placePartOfThisPanel" 64 render="placePartOfThisPanel"
62 rendered="#{!empty CurrentCity.placesPartOfThis}"/> 65 rendered="#{!empty CurrentCity.placesPartOfThis}"/>
63 </h:panelGrid> 66 </h:panelGrid>
64
65 <h:outputText value="People, who lived here"/>
66 <h:panelGrid columns="2" id="peopleLivedInPanel">
67 <rich:dataGrid var="place" style="border:none;"
68 value="#{CurrentCity.peopleLivedIn}">
69 <h:column style="border:none;">
70 <h:selectBooleanCheckbox
71 value="#{place.selected}" />
72 </h:column>
73 <h:column>
74 <h:outputText value="#{place.label}" />
75 </h:column>
76 <h:column>
77 <h:outputLink value="#{ApplicationBean1.root}/search/displayAuthor.xhtml?personId=#{place.obj.id}"
78 title="Display this person">
79 <h:graphicImage url="#{ApplicationBean1.displayImage}" />
80 </h:outputLink>
81 </h:column>
82 </rich:dataGrid>
83
84 </h:panelGrid>
85 <h:panelGrid columns="1">
86 <a4j:commandButton
87 value="Remove"
88 actionListener="#{CurrentCity.listenerRemovePeopleLivedIn}"
89 render="peopleLivedInPanel"
90 rendered="#{!empty CurrentCity.peopleLivedIn}"/>
91 </h:panelGrid>
92 67
93
94
95 </h:panelGrid> 68 </h:panelGrid>
96 69
97 <ismi:refWidget entityForm="#{CurrentCity}" /> 70 <ismi:refWidget entityForm="#{CurrentCity}" />
98 71
99 <h:commandButton value="#{CurrentCity.saveButtonLabel}" 72 <h:commandButton value="#{CurrentCity.saveButtonLabel}"
103 <h:commandButton value="Clear Form" 76 <h:commandButton value="Clear Form"
104 action="#{CurrentCity.clearAction}" 77 action="#{CurrentCity.clearAction}"
105 onclick="#{ApplicationBean1.JSConfirmationCleanForm}" /> 78 onclick="#{ApplicationBean1.JSConfirmationCleanForm}" />
106 79
107 <h:outputText rendered="#{CurrentCity.create_error}" 80 <h:outputText rendered="#{CurrentCity.create_error}"
108 value="City already exists - not saved!" /> 81 value="Place already exists - not saved!" />
109 82
110 <!-- Unity Warning --> 83 <!-- Unity Warning -->
111 <h:panelGrid id="placeUnityWarningPP"> 84 <h:panelGrid id="placeUnityWarningPP">
112 <h:panelGroup 85 <h:panelGroup
113 rendered="#{CurrentCity.renderUnityCheckerDialog}"> 86 rendered="#{CurrentCity.renderUnityCheckerDialog}">