- h:outputText was wrong where it should be h:panelGroup, now the guest menue is being shown again
- feature controller is no longer causing and then catching NPE (bad code style)
- sorted web.xml
- reformated some files
Signed-off-by: Roland Häder <roland@mxchange.org>
* Setter for controller type
* <p>
* @param controllerType Controller type
+ * <p>
* @deprecated Don't use this method.
*/
@Deprecated
String unlinkMobileContactData ();
/**
- * Links given contact instance with set fax number or entered data. If
- * both is set, a proper exception is thrown as this is an invalid state.
+ * Links given contact instance with set fax number or entered data. If both
+ * is set, a proper exception is thrown as this is an invalid state.
* <p>
* @param contact Contact instance to link with existing/new data
* <p>
String doLinkAddFaxNumber (final Contact contact);
/**
- * Links given contact instance with set land-line number or entered
- * data. If both is set, a proper exception is thrown as this is an invalid
- * state.
+ * Links given contact instance with set land-line number or entered data.
+ * If both is set, a proper exception is thrown as this is an invalid state.
* <p>
* @param contact Contact instance to link with existing/new data
* <p>
String doLinkAddLandLineNumber (final Contact contact);
/**
- * Links given contact instance with set mobile or entered data. If both
- * is set, a proper exception is thrown as this is an invalid state.
+ * Links given contact instance with set mobile or entered data. If both is
+ * set, a proper exception is thrown as this is an invalid state.
* <p>
* @param contact Contact instance to link with existing/new data
* <p>
* Setter for whether the local dial prefix is required for local calls
* <p>
* @param countryIsLocalPrefixRequired Whether the local dial prefix is
- * required
+ * required
*/
void setCountryIsLocalPrefixRequired (final Boolean countryIsLocalPrefixRequired);
// Default is not enabled
boolean isEnabled = false;
- // Try it as an NPE may come
- try {
- // Get value from property
- String contextParameter = this.getStringContextParameter(String.format("is_feature_%s_enabled", feature)); //NOI18N
+ // Get value from property
+ String contextParameter = this.getStringContextParameter(String.format("is_feature_%s_enabled", feature)); //NOI18N
+ //System.out.println(MessageFormat.format("isFeatureSet: feature={0},contextParameter[]={1}", feature, Objects.toString(contextParameter))); //NOI18N
+ // Is the context parameter found?
+ if (contextParameter instanceof String) {
// Is it set?
isEnabled = (Boolean.parseBoolean(contextParameter) == Boolean.TRUE);
- } catch (final NullPointerException ex) {
- // Ignored
}
- // Return value
+ // Return status
return isEnabled;
}
import org.mxchange.jusercore.events.logout.ObservableUserLogoutEvent;
/**
- * A session-scoped bean for handling localization/internationalization changes. This
- * class is based on an example at [1] from mkyong.
+ * A session-scoped bean for handling localization/internationalization changes.
+ * This class is based on an example at [1] from mkyong.
* <p>
* 1: http://www.mkyong.com/jsf2/jsf-2-internationalization-example/
* <p>
private JobsWebRequestHelperController beanHelper;
/**
- * fax number
+ * fax number
*/
private DialableFaxNumber choosenFaxNumber;
/**
- * land-line number
+ * land-line number
*/
private DialableLandLineNumber choosenLandLineNumber;
/**
- * mobile number
+ * mobile number
*/
private DialableMobileNumber choosenMobileNumber;
/**
* Getter for choosen fax number
* <p>
- * @return fax number
+ * @return fax number
*/
DialableFaxNumber getFaxNumber ();
/**
* Setter for choosen fax number
* <p>
- * @param choosenFaxNumber fax number
+ * @param choosenFaxNumber fax number
*/
void setFaxNumber (final DialableFaxNumber choosenFaxNumber);
/**
* Getter for choosen land-line number
* <p>
- * @return land-line number
+ * @return land-line number
*/
DialableLandLineNumber getLandLineNumber ();
/**
* Setter for choosen land-line number
* <p>
- * @param choosenLandLineNumber land-line number
+ * @param choosenLandLineNumber land-line number
*/
void setLandLineNumber (final DialableLandLineNumber choosenLandLineNumber);
/**
* Getter for choosen mobile number
* <p>
- * @return mobile number
+ * @return mobile number
*/
DialableMobileNumber getMobileNumber ();
/**
* Setter for choosen mobile number
* <p>
- * @param choosenMobileNumber mobile number
+ * @param choosenMobileNumber mobile number
*/
void setMobileNumber (final DialableMobileNumber choosenMobileNumber);
if (null == event) {
// Throw NPE
throw new NullPointerException("event is null"); //NOI18N
- } else if (event.getDeletedFaxNumber()== null) {
+ } else if (event.getDeletedFaxNumber() == null) {
// Throw NPE again
throw new NullPointerException("event.deletedFaxNumber is null"); //NOI18N
} else if (event.getDeletedFaxNumber().getPhoneId() == null) {
if (null == event) {
// Throw NPE
throw new NullPointerException("event is null"); //NOI18N
- } else if (event.getDeletedLandLineNumber()== null) {
+ } else if (event.getDeletedLandLineNumber() == null) {
// Throw NPE again
throw new NullPointerException("event.deletedLandLineNumber is null"); //NOI18N
} else if (event.getDeletedLandLineNumber().getPhoneId() == null) {
if (null == event) {
// Throw NPE
throw new NullPointerException("event is null"); //NOI18N
- } else if (event.getDeletedMobileNumber()== null) {
+ } else if (event.getDeletedMobileNumber() == null) {
// Throw NPE again
throw new NullPointerException("event.deletedMobileNumber is null"); //NOI18N
} else if (event.getDeletedMobileNumber().getPhoneId() == null) {
throw new NullPointerException("event.contact.contactId is null");
} else if (event.getContact().getContactId() < 1) {
// Throw again ...
- throw new NullPointerException("event.contact.contactId="+ event.getContact().getContactId() + " is invalid");
+ throw new NullPointerException("event.contact.contactId=" + event.getContact().getContactId() + " is invalid");
} else if (event.getContact().getContactFaxNumber() == null) {
// Throw again ...
throw new NullPointerException("event.contact.contactFaxNumber is null");
throw new NullPointerException("event.contact.contactFaxNumber.phoneId is null");
} else if (event.getContact().getContactFaxNumber().getPhoneId() < 1) {
// Throw again ...
- throw new NullPointerException("event.contact.contactFaxNumber.phoneId="+event.getContact().getContactFaxNumber().getPhoneId() + " is invalid");
+ throw new NullPointerException("event.contact.contactFaxNumber.phoneId=" + event.getContact().getContactFaxNumber().getPhoneId() + " is invalid");
} else if (event.getLinkedFaxNumber() == null) {
// Throw again ...
throw new NullPointerException("event.linkedFaxNumer is null");
throw new NullPointerException("event.contact.contactId is null");
} else if (event.getContact().getContactId() < 1) {
// Throw again ...
- throw new NullPointerException("event.contact.contactId="+ event.getContact().getContactId() + " is invalid");
+ throw new NullPointerException("event.contact.contactId=" + event.getContact().getContactId() + " is invalid");
} else if (event.getContact().getContactLandLineNumber() == null) {
// Throw again ...
throw new NullPointerException("event.contact.contactLandLineNumber is null");
throw new NullPointerException("event.contact.contactLandLineNumber.phoneId is null");
} else if (event.getContact().getContactLandLineNumber().getPhoneId() < 1) {
// Throw again ...
- throw new NullPointerException("event.contact.contactLandLineNumber.phoneId="+event.getContact().getContactLandLineNumber().getPhoneId() + " is invalid");
+ throw new NullPointerException("event.contact.contactLandLineNumber.phoneId=" + event.getContact().getContactLandLineNumber().getPhoneId() + " is invalid");
} else if (event.getLinkedLandLineNumber() == null) {
// Throw again ...
throw new NullPointerException("event.linkedLandLineNumer is null");
throw new NullPointerException("event.contact.contactId is null");
} else if (event.getContact().getContactId() < 1) {
// Throw again ...
- throw new NullPointerException("event.contact.contactId="+ event.getContact().getContactId() + " is invalid");
+ throw new NullPointerException("event.contact.contactId=" + event.getContact().getContactId() + " is invalid");
} else if (event.getContact().getContactMobileNumber() == null) {
// Throw again ...
throw new NullPointerException("event.contact.contactMobileNumber is null");
throw new NullPointerException("event.contact.contactMobileNumber.phoneId is null");
} else if (event.getContact().getContactMobileNumber().getPhoneId() < 1) {
// Throw again ...
- throw new NullPointerException("event.contact.contactMobileNumber.phoneId="+event.getContact().getContactMobileNumber().getPhoneId() + " is invalid");
+ throw new NullPointerException("event.contact.contactMobileNumber.phoneId=" + event.getContact().getContactMobileNumber().getPhoneId() + " is invalid");
} else if (event.getLinkedMobileNumber() == null) {
// Throw again ...
throw new NullPointerException("event.linkedMobileNumer is null");
if (null == event) {
// Throw NPE
throw new NullPointerException("event is null"); //NOI18N
- } else if (event.getUpdatedFaxNumber()== null) {
+ } else if (event.getUpdatedFaxNumber() == null) {
// Throw NPE again
throw new NullPointerException("event.updatedFaxNumber is null"); //NOI18N
} else if (event.getUpdatedFaxNumber().getPhoneId() == null) {
if (null == event) {
// Throw NPE
throw new NullPointerException("event is null"); //NOI18N
- } else if (event.getUpdatedLandLineNumber()== null) {
+ } else if (event.getUpdatedLandLineNumber() == null) {
// Throw NPE again
throw new NullPointerException("event.updatedLandLineNumber is null"); //NOI18N
} else if (event.getUpdatedLandLineNumber().getPhoneId() == null) {
if (null == event) {
// Throw NPE
throw new NullPointerException("event is null"); //NOI18N
- } else if (event.getUpdatedMobileNumber()== null) {
+ } else if (event.getUpdatedMobileNumber() == null) {
// Throw NPE again
throw new NullPointerException("event.updatedMobileNumber is null"); //NOI18N
} else if (event.getUpdatedMobileNumber().getPhoneId() == null) {
// Debug message
//* NOISY-DEBUG: */ System.out.println(MessageFormat.format("{0}.createUserInstance: contact={1}", this.getClass().getSimpleName(), contact));
-
// Set contact in user
user.setUserContact(contact);
}
// Trace message
//* NOISY-DEBUG: */ System.out.println(MessageFormat.format("{0}.createUserInstance: user={1} - EXIT!", this.getClass().getSimpleName(), user));
-
// Return it
return user;
}
// Trace message
//* NOISY-DEBUG */ System.out.println(MessageFormat.format("{0}.createUserLogin: user={1} - EXIT!", this.getClass().getSimpleName(), user));
-
// Return the new instance
return user;
}
* <p>
* @return User instance
* <p>
- * @throws UserEmailAddressNotFoundException If the user's email address is not found
+ * @throws UserEmailAddressNotFoundException If the user's email address is
+ * not found
*/
User lookupUserByEmailAddress (final String emailAddress) throws UserEmailAddressNotFoundException;
xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
<div class="menu_outer">
- <h:outputText styleClass="menu">
+ <h:panelGroup styleClass="menu" layout="block">
<div class="menu_header">
<h:outputText value="#{msg.MENU_HOME_TITLE}" />
</div>
</li>
</ui:fragment>
</ul>
- </h:outputText>
+ </h:panelGroup>
</div>
</ui:composition>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Development</param-value>
</context-param>
+ <context-param>
+ <description>Whether the date converter's default timezone is system's timezone.</description>
+ <param-name>javax.faces.DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE</param-name>
+ <param-value>true</param-value>
+ </context-param>
<context-param>
<description>Whether the multi-page registration page or a single registration page is active</description>
<param-name>is_feature_user_register_multiple_page_enabled</param-name>
<param-name>is_feature_user_resend_confirmation_link_enabled</param-name>
<param-value>true</param-value>
</context-param>
- <context-param>
- <description>Whether default timezone is set from system's timezone</description>
- <param-name>javax.faces.DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE</param-name>
- <param-value>true</param-value>
- </context-param>
- <context-param>
- <description>Whether the guest menu is enabled/shown to the user.</description>
- <param-name>is_feature_guest_menu_enabled</param-name>
- <param-value>true</param-value>
- </context-param>
- <context-param>
- <description>Whether recovery of user passwords is enabled.</description>
- <param-name>is_feature_user_password_recovery_enabled</param-name>
- <param-value>true</param-value>
- </context-param>
- <context-param>
- <description>Wether the gender is required for using the general contact controller.</description>
- <param-name>is_feature_general_gender_enabled</param-name>
- <param-value>true</param-value>
- </context-param>
<context-param>
<description>Whether registration page is enabled.</description>
<param-name>is_feature_user_registration_enabled</param-name>
<param-name>is_debug_register_enabled</param-name>
<param-value>false</param-value>
</context-param>
- <context-param>
- <param-name>javax.faces.DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE</param-name>
- <param-value>true</param-value>
- </context-param>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>