View RSS Feed

Event

JSF Event

  1. JSF Event Listeners

    by
    JSF
    , 07-07-2012 at 04:56 PM
    When a link or button is clicked by a user, values present in a field get changed or a selection is made in list so that the application might react. Interface components of JSF User would signal certain user action when an event is fired that is being handled by the code.

    Event listeners that are very commonly used are value change and action. Others like phase or data model would not be discussed over here. In separate listener or managed bean, it is possible to declare the listeners. ...
    Categories
    Event
  2. JSF Action Events

    by
    JSF
    , 07-07-2012 at 04:54 PM
    For UI Command objects, emission of the action events takes place. When Command button is pressed by a user or a hyper link is clicked, generation of such events take place. Number of listeners could be attached to the source. For instance, let us consider the given code:

    Java Code:
    <h:commandButton value = "Test Action Listener"
    actionListener = "#{testActionListener.doSomeAction}" />
    An attribute known as actionListener is defined ...
    Categories
    Event
  3. JSF Event Classes

    by
    JSF
    , 07-07-2012 at 04:52 PM
    Interfaces which are related with JSF events are present in package'javax.faces.event'. All Events present in JSF shall be extending the javax.faces.event.FacesEvent. This class’s constructor has argument UIComponent that would be making it specific that this Event is for which UI component.

    Java Code:
    UIComponent someComponent = new UIComponent();
    MyFacesEvent event = new MyFacesEvent(someComponent);
    UIComponent sourceCompoenent = event.getComponent();
    ...
    Categories
    Event
  4. Handling Events in JSF

    by
    JSF
    , 07-07-2012 at 04:51 PM
    JSF event model is basically based upon the Event driven programming of Java that is available typically just along with the GUI applications. In case you have familiarity to the swing programming, this could be understood easily the event handling models present in JSF framework. Concept present behind this event model is that user interfaced objects have a listerner’s list. Such listeners get notified when an event is generated by the user interface objects. This shows that when a component is ...
    Categories
    Event
  5. JSF Events Handling

    by
    JSF
    , 01-02-2012 at 06:48 PM
    JSF components trigger events and these events are process by the JSF application. User generates these events by interacting with the application. For example, Click a button event is generated and triggered by the user. Programmer is responsible to handle all such events in code. You can write event listeners for this purpose.

    Following JSF code is written to create a button.

    Java Code: This is example of a JSF Button
    <h:commandButton value="Login“
    actionListener=“#{customer.loginActionListener}”
    ...

    Updated 01-14-2012 at 06:28 PM by JSF

    Categories
    Event