com.liferay.faces.util.context.internal
Class PartialViewContextOnChangeImpl
java.lang.Object
javax.faces.context.PartialViewContext
javax.faces.context.PartialViewContextWrapper
com.liferay.faces.util.context.internal.PartialViewContextOnChangeImpl
- All Implemented Interfaces:
- javax.faces.FacesWrapper<javax.faces.context.PartialViewContext>
public class PartialViewContextOnChangeImpl
- extends javax.faces.context.PartialViewContextWrapper
This class is a wrapper around the PartialViewContext. Its purpose is to provide a way to provide a way
for components to handle validation for required fields with "onchange" behavior rather than "onblur" behavior. For
example, the ICEfaces ace:textEntry
component only suppors the "onblur" event when used with ace:ajax. In the case of required="true", the
JSF PROCESS_VALIDATIONS phase will add a EditableValueHolder#REQUIRED_MESSAGE_ID FacesMessage when
the user tabs-out of the field. By specifying the following in the WEB-INF/faces-config.xml descriptor, the
FacesMessages will be removed which approximates the behavior of the "onchange" event:
<partial-view-context-factory>com.liferay.faces.util.context.PartialViewContextFactoryOnChangeImpl</partial-view-context-factory>
- Author:
- Neil Griffin
| Fields inherited from class javax.faces.context.PartialViewContext |
ALL_PARTIAL_PHASE_CLIENT_IDS, PARTIAL_EXECUTE_PARAM_NAME, PARTIAL_RENDER_PARAM_NAME, RESET_VALUES_PARAM_NAME |
|
Constructor Summary |
PartialViewContextOnChangeImpl(javax.faces.context.PartialViewContext partialViewContext,
javax.faces.context.FacesContext facesContext)
|
|
Method Summary |
javax.faces.context.PartialViewContext |
getWrapped()
|
void |
processPartial(javax.faces.event.PhaseId phaseId)
|
void |
setPartialRequest(boolean isPartialRequest)
This method is missing from the PartialViewContextWrapper class so it must be implemented here. |
| Methods inherited from class javax.faces.context.PartialViewContextWrapper |
getExecuteIds, getPartialResponseWriter, getRenderIds, isAjaxRequest, isExecuteAll, isPartialRequest, isRenderAll, isResetValues, release, setRenderAll |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PartialViewContextOnChangeImpl
public PartialViewContextOnChangeImpl(javax.faces.context.PartialViewContext partialViewContext,
javax.faces.context.FacesContext facesContext)
processPartial
public void processPartial(javax.faces.event.PhaseId phaseId)
- Overrides:
processPartial in class javax.faces.context.PartialViewContextWrapper
setPartialRequest
public void setPartialRequest(boolean isPartialRequest)
- This method is missing from the
PartialViewContextWrapper class so it must be implemented here.
- Overrides:
setPartialRequest in class javax.faces.context.PartialViewContextWrapper
getWrapped
public javax.faces.context.PartialViewContext getWrapped()
- Specified by:
getWrapped in interface javax.faces.FacesWrapper<javax.faces.context.PartialViewContext>- Overrides:
getWrapped in class javax.faces.context.PartialViewContextWrapper
Copyright © 2015 Liferay, Inc.. All rights reserved.