package org.mxchange.addressbook.beans.mobileprovider;
import java.text.MessageFormat;
-import java.util.Collections;
import java.util.List;
import javax.annotation.PostConstruct;
import javax.enterprise.context.SessionScoped;
}
@Override
- public List<MobileProvider> allMobileProvider () {
- return Collections.unmodifiableList(this.mobileProviders);
- }
-
- @Override
- public boolean hasMobileProvider () {
- return (!this.mobileProviders.isEmpty());
+ @SuppressWarnings ("ReturnOfCollectionOrArrayField")
+ public List<MobileProvider> allMobileProviders () {
+ return this.mobileProviders;
}
/**
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" ?>
+<ui:composition
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
+
+ <h:outputText styleClass="errors" value="#{msg.ERROR_BEAN_HELPER_MOBILE_NUMBER_NOT_SET}" rendered="#{empty beanHelper.mobileNumber}" />
+
+ <div class="para">
+ <fieldset class="fieldset" id="mobile_data">
+ <legend title="#{msg.ADMIN_MOBILE_NUMBER_DATA_LEGEND_TITLE}">
+ <h:outputText value="#{msg.ADMIN_MOBILE_NUMBER_DATA_LEGEND}" />
+ </legend>
+
+ <div class="table_row">
+ <div class="table_left_medium">
+ <h:outputLabel for="mobileNumberId" value="#{msg.ADMIN_SHOW_PHONE_ID}" />
+ </div>
+
+ <div class="table_right_medium">
+ <h:outputText id="mobileNumberId" value="#{beanHelper.mobileNumber.phoneId}" />
+ </div>
+
+ <div class="clear"></div>
+ </div>
+
+ <div class="table_row">
+ <div class="table_left_medium">
+ <h:outputLabel for="mobileProvider" value="#{msg.ADMIN_EDIT_MOBILE_PROVIDER}" />
+ </div>
+
+ <div class="table_right_medium">
+ <h:selectOneMenu styleClass="select" id="mobileProvider" value="#{adminPhoneController.mobileProvider}" required="true" requiredMessage="#{msg.ADMIN_MOBILE_PROVIDER_REQUIRED}">
+ <f:converter converterId="MobileProviderConverter" />
+ <f:selectItem itemValue="" itemLabel="#{msg.NONE_SELECTED}" />
+ <f:selectItems value="#{mobileProviderController.allMobileProviders()}" var="mobileProvider" itemValue="#{mobileProvider}" itemLabel="#{mobileProvider.providerCountry.countryExternalDialPrefix}#{mobileProvider.providerDialPrefix} (#{mobileProvider.providerName})" />
+ </h:selectOneMenu>
+ </div>
+
+ <div class="clear"></div>
+
+ <div class="error_container">
+ <h:message for="mobileProvider" errorClass="errors" fatalClass="errors" warnClass="errors" />
+ </div>
+ </div>
+
+ <div class="table_row">
+ <div class="table_left_medium">
+ <h:outputLabel for="mobileNumber" value="#{msg.ADMIN_EDIT_MOBILE_NUMBER}" />
+ </div>
+
+ <div class="table_right_medium">
+ <h:inputText styleClass="input" id="mobileNumber" size="10" maxlength="20" value="#{adminPhoneController.phoneNumber}" required="true" requiredMessage="#{msg.ADMIN_MOBILE_NUMBER_REQUIRED}">
+ <f:validator for="mobileNumber" validatorId="PhoneNumberValidator" />
+ </h:inputText>
+ </div>
+
+ <div class="clear"></div>
+
+ <div class="error_container">
+ <h:message for="mobileNumber" errorClass="errors" fatalClass="errors" warnClass="errors" />
+ </div>
+ </div>
+ </fieldset>
+ </div>
+</ui:composition>
<h:selectOneMenu styleClass="select" id="cellphoneCarrier" value="#{targetController.cellphoneCarrier}">
<f:converter converterId="MobileProviderConverter" />
<f:selectItem itemValue="" itemLabel="#{msg.NONE_SELECTED}" />
- <f:selectItems value="#{mobileProviderController.allMobileProvider()}" var="mobileProvider" itemValue="#{mobileProvider}" itemLabel="#{mobileProvider.providerCountry.countryExternalDialPrefix}#{mobileProvider.providerDialPrefix} (#{mobileProvider.providerName})" />
+ <f:selectItems value="#{mobileProviderController.allMobileProviders()}" var="mobileProvider" itemValue="#{mobileProvider}" itemLabel="#{mobileProvider.providerCountry.countryExternalDialPrefix}#{mobileProvider.providerDialPrefix} (#{mobileProvider.providerName})" />
</h:selectOneMenu>
<h:inputText styleClass="input" id="cellphoneNumber" size="10" maxlength="20" value="#{targetController.cellphoneNumber}">