Class BaseActionEventInvoke

java.lang.Object
java.util.EventObject
javax.faces.event.FacesEvent
javax.faces.event.ActionEvent
org.eclnt.jsfserver.elements.BaseActionEvent
org.eclnt.jsfserver.elements.events.BaseActionEventInvoke
All Implemented Interfaces:
Serializable, IBaseActionEvent

public class BaseActionEventInvoke extends BaseActionEvent
Event information that is associated with a simple invoke event on client side. If (and only in this case!) the event was caused by a component that used the attribute INVOKEEVENT (e.g. with the IMAGE component), then x,y,width,heigh information is associated with the event. In all other cases the corresponding methods of this event-class will return "-1".
See Also:
  • Field Details

  • Constructor Details

    • BaseActionEventInvoke

      public BaseActionEventInvoke(javax.faces.component.UIComponent component, String type)
  • Method Details

    • getX

      public int getX()
      This information is only present if the invoke was part of a click processing on client side.
      Returns:
      The x-position of the click, relative to the coordinates of the associated component. "-1" is returned in case no specific coordinates are associated with the event.
    • getY

      public int getY()
      Returns:
      The y-position of the click, relative to the coordinates of the associated component. "-1" is returned in case no specific coordinates are associated with the event.
    • getWidth

      public int getWidth()
      Returns:
      The pixel width of the component on which the invoke was invoked. "-1" is returned in case no specific coordinates are associated with the event.
    • getHeight

      public int getHeight()
      Returns:
      The pixel height of the component on which the invoke was invoked. "-1" is returned in case no specific coordinates are associated with the event.
    • getClickCount

      public int getClickCount()
      Returns:
      The click count of the operation that caused the invoke event on client side. "1" for single click, "2" for double click. "-1" is returned in case no specific click count was passed from client side.
    • isAltKeyPressed

      public boolean isAltKeyPressed()
      This information is only present if the invoke was part of a click processing on client side.
    • isShiftKeyPressed

      public boolean isShiftKeyPressed()
      This information is only present if the invoke was part of a click processing on client side.
    • isCtrlKeyPressed

      public boolean isCtrlKeyPressed()
      This information is only present if the invoke was part of a click processing on client side.
    • getMouseButton

      public int getMouseButton()
      Returns:
      0 if mouse button was not part of the event data. 1 for left mouse button (default mouse button), 3 for right mouse button (secondary mouse button), 2 for middle mouse button

      Please pay attention: on browser side the number values for the mouse button are different, so if you are compare to JavaScript events then you will recognize that here the mouse buttons are exactly the browser's value plus 1.

      There are the constants MOUSEBUTTON_LEFT, MOUSEBUTTON_RIGHT and MOUSEBUTTON_MIDDLE which you may use to compare the value of this method in proper way.
    • getClickDuration

      public int getClickDuration()
      Returns:
      Returns duration in milliseconds between the mouse/touch down and the mouse/touch up event. In case of actions initiated e.g. by keyboard the value "-1" is returned.
    • isLongClick

      public boolean isLongClick()
      Certain components support the attribute WITHLONGCLICK so that the component triggers the action event after the user having presse the component for a certain while as well. This method indicates if the action was triggered by a normal click or by a long click.
    • getLongPollingId

      public String getLongPollingId()
      In case the action was caused by a WEBSOCKETPOLLING component: the id of the server side long polling instance.
    • getLongPollingWakeupStamp

      public long getLongPollingWakeupStamp()
      In case the action was caused by a WEBSOCKETPOLLING component: the stamp of sending the message which is just processed as action.