]> git.mxchange.org Git - jjobs-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:54 +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 7f8a7caf36d37c3ea279d90725986575167c9d34..17ae1be3057e8e4caf031c942e91645f032971b3 100644 (file)
@@ -396,3 +396,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 42060c924731a8919f3c6aecef98396a3723e4ed..65bff98d114a3dc13dfbe2c5716f77b8a25b54fe 100644 (file)
@@ -336,3 +336,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>