- java.lang.Object
-
- java.util.EventObject
-
- jakarta.faces.event.FacesEvent
-
- jakarta.faces.event.ValueChangeEvent
-
- org.omnifaces.event.HashChangeEvent
-
- All Implemented Interfaces:
Serializable
public class HashChangeEvent extends ValueChangeEvent
This event is fired by
<o:hashParam>when hash parameters have been changed in the client side. This is particularly useful in case you intend to (re)run some action based on the new hash parameters, before rendering takes place.Noted should be that the
<o:hashParam>fires this as a CDI event, not as a Faces event.- Since:
- 3.2
- Author:
- Bauke Scholtz
- See Also:
HashParam, Serialized Form
-
-
Field Summary
-
Fields inherited from class java.util.EventObject
source
-
-
Constructor Summary
Constructors Constructor Description HashChangeEvent(FacesContext context, String oldHashQueryString, String newHashQueryString)Constructs a new hash change event.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description UIViewRootgetComponent()Returns the current view root.StringgetNewValue()Returns the new hash query string value.StringgetOldValue()Returns the old hash query string value.-
Methods inherited from class jakarta.faces.event.ValueChangeEvent
isAppropriateListener, processListener
-
Methods inherited from class jakarta.faces.event.FacesEvent
getFacesContext, getPhaseId, queue, setPhaseId
-
Methods inherited from class java.util.EventObject
getSource, toString
-
-
-
-
Constructor Detail
-
HashChangeEvent
public HashChangeEvent(FacesContext context, String oldHashQueryString, String newHashQueryString)
Constructs a new hash change event.- Parameters:
context- The involved faces context.oldHashQueryString- The old hash query string.newHashQueryString- The new hash query string.
-
-
Method Detail
-
getComponent
public UIViewRoot getComponent()
Returns the current view root.- Overrides:
getComponentin classFacesEvent- Returns:
- The current view root.
-
getOldValue
public String getOldValue()
Returns the old hash query string value.- Overrides:
getOldValuein classValueChangeEvent- Returns:
- The old hash query string value.
-
getNewValue
public String getNewValue()
Returns the new hash query string value.- Overrides:
getNewValuein classValueChangeEvent- Returns:
- The new hash query string value.
-
-