]> git.mxchange.org Git - pizzaservice-war.git/commitdiff
as the template gender_selection_box.tpl is generic, the controller needs to be repla...
authorRoland Haeder <roland@mxchange.org>
Mon, 11 Apr 2016 17:14:25 +0000 (19:14 +0200)
committerRoland Haeder <roland@mxchange.org>
Mon, 11 Apr 2016 17:14:25 +0000 (19:14 +0200)
src/java/org/mxchange/localization/bundle_de_DE.properties
src/java/org/mxchange/localization/bundle_en_US.properties
web/WEB-INF/templates/admin/admin_form_personal_data.tpl
web/WEB-INF/templates/generic/form_personal_data.tpl
web/WEB-INF/templates/generic/gender_selection_box.tpl

index a566a756bac4b3c419860156858d9b556e271071..08d2ce09090094047286ff915706ed35deede8ec 100644 (file)
@@ -338,3 +338,4 @@ ADMIN_LIST_COUNTRY_DATA_COUNTRY_NAME=Land:
 #@TODO Please fix German umlauts!
 ADMIN_LINK_EDIT_DELETE_COUNTRY_TITLE=Aendern oder loeschen der Laenderdaten
 COUNTRY_GERMANY=Deutschland
+ERROR_TARGET_CONTROLLER_PARAMETER_NOT_SET=Fehler: Der Parameter 'targetController' ist nicht gesetzt.
index 7902a639ef3a9666d4f7d2651c33dcf324661b7d..fdd7cf5041366dbb895c702547d4ebf110643fea 100644 (file)
@@ -297,3 +297,4 @@ ADMIN_LIST_COUNTRY_DATA_COUNTRY_EXTERNAL_DIAL_PREFIX=Dial prefix outside:
 ADMIN_LIST_COUNTRY_DATA_COUNTRY_NAME=Country:
 ADMIN_LINK_EDIT_DELETE_COUNTRY_TITLE=Edit or delete country
 COUNTRY_GERMANY=Germany
+ERROR_TARGET_CONTROLLER_PARAMETER_NOT_SET=Error: The parameter 'targetController' is not set.
index fad545df04b90a83aa88c695e7647dbcdb2c02b3..3f98abadf73de1dc8bf2ff6f3d84127f73f97702 100644 (file)
@@ -19,7 +19,9 @@
                                </div>
 
                                <div class="table_right">
-                                       <ui:include src="/WEB-INF/templates/generic/gender_selection_box.tpl" />
+                                       <ui:include src="/WEB-INF/templates/generic/gender_selection_box.tpl">
+                                               <ui:param name="targetController" value="#{adminUserController}" />
+                                       </ui:include>
                                </div>
 
                                <div class="clear"></div>
index 21ab7c37a1523ce13c89c4a4b70cbf9d0c4b478e..11858fb23cd3c486e104a4cc5e6d4b1e4df26a65 100644 (file)
@@ -19,7 +19,9 @@
                                </div>
 
                                <div class="table_right">
-                                       <ui:include src="/WEB-INF/templates/generic/gender_selection_box.tpl" />
+                                       <ui:include src="/WEB-INF/templates/generic/gender_selection_box.tpl">
+                                               <ui:param  name="targetController" value="#{userController}" />
+                                       </ui:include>
                                </div>
 
                                <div class="clear"></div>
index 294151e0ab76eb9a4e47d3d5320c043ebcfd6f40..0d24d20fc57527baf5bcbd7ebfc4adb786b8b584 100644 (file)
@@ -5,7 +5,13 @@
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:ui="http://java.sun.com/jsf/facelets">
 
-       <h:selectOneMenu class="select" id="gender" value="#{customerController.gender}">
-               <f:selectItems value="#{genderController.selectableGenders}" var="g" itemValue="#{g}" itemLabel="#{msg[g.messageKey]}" />
-       </h:selectOneMenu>
+       <ui:fragment rendered="#{not empty targetController}">
+               <h:selectOneMenu class="select" id="gender" value="#{targetController.gender}">
+                       <f:selectItems value="#{genderController.selectableGenders}" var="g" itemValue="#{g}" itemLabel="#{msg[g.messageKey]}" />
+               </h:selectOneMenu>
+       </ui:fragment>
+
+       <ui:fragment rendered="#{empty targetController}">
+               <h:outputText class="errors" value="#{msg.ERROR_TARGET_CONTROLLER_PARAMETER_NOT_SET}" />
+       </ui:fragment>
 </ui:composition>