]> git.mxchange.org Git - addressbook-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:16:23 +0000 (19:16 +0200)
Signed-off-by: Roland Häder <roland@mxchange.org>
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 41eb295983f08943ebc12a5b525fbcdb213257b4..eefde9527850e2efe4610b0dbcef731494a262a8 100644 (file)
@@ -426,3 +426,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 a09f136b1d4d162bde4b056ff0eb41a73cd79339..9e71e7e7c89cbfb6950283178cf07ec04ad2ceec 100644 (file)
@@ -366,3 +366,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 bb38e72f9041e094338d4d61df66af28efe3e62f..f5f1fcdc3451ce76c154c7b6d7520d498be9958f 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 cbe55b02c332404e0a6fa6ef859693554d9b8590..f7b9390306842053c46c5b3f1c862996b65eecdf 100644 (file)
@@ -5,8 +5,14 @@
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:ui="http://java.sun.com/jsf/facelets">
 
-       <h:selectOneMenu class="select" id="gender" value="#{userController.gender}">
-               <f:selectItem itemValue="" itemLabel="#{msg.NONE_SELECTED}" />
-               <f:selectItems value="#{gender.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:selectItem itemValue="" itemLabel="#{msg.NONE_SELECTED}" />
+                       <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>