Event handlers for tabbed panels
Many Faces components have events associated with them. For example, a Command - Button component has events such as onclick and onmousedown associated with it. Using the Quick Edit view for a selected Faces component, you can define actions for specific events.
Once you select an event in the left pane of the Quick Edit view for the component, you can enter JavaScript code in the right pane of the Quick Edit view. This code represents the actions performed when an event is called.
The following table includes events for the tabbed panel component and for the panels in the tabbed panel component.
Event Description Supported component oncancel Fired when the user clicks Cancel, if it has been enabled. With the event handler for this event, you can add arbitrary business logic, such as clearing values filled in by the user in some input fields. The event object has one property. tabpanelForm - the HTML form, if any, surrounding the tabbed panel . Tabbed panel onenter Fired when a panel in a Tabbed Panel is entered. If the event handler returns true, then the tabbed panel can enter the new panel; otherwise, the focus remains on the previous panel. With the event handler for this event, you can do things such as verify information that the user enters or prepare information displayed in the panel. The event object has one property. tobeEnterPanel - the ID of the panel that is going to be entered. Panel in a tabbed panel onexit Fired when a panel in a Tabbed Panel is exited. The event handler can return three different values, A panel ID, which will be the next entered panel instead of the default next panel. True, the default next panel will be displayed. False or doesn't return anything, the focus remains on the current panel. With the event handler for this event, you can add arbitrary business logic like verifying input by the user and refusing to leave the panel if verification fails or controlling the flow to the next panel. This event handler can be used to create complex flows when the Tabbed Panel is used with the Next and Previous buttons. The event object has one property. tobeExitPanel - the ID of the panel that is going to be entered. Panel in a tabbed panel onfinish The onfinish event is supported by the Tabbed Panel control and is fired when the user presses Finish, if it has been enabled. With the event handler for this event, you can add arbitrary business logic like verifying information input by the user and submitting a form. The event object has one property tabpanelForm - the HTML form, if any, surrounding the tabbed panel . Tabbed panel oninitialpanelshow This event is fired before the tabbed panel is rendered on the page. The return value from this event handler determines which panel will be initially active. If there is no return value then the first panel will be displayed. If the user wants a panel other than the first panel to be displayed initial the return value must be the id of that panel. Tabbed panel onpanelenter The onpanelenter event is supported by the Tabbed Panel control and is fired when the user enters any panel in the tabbed panel. If the panel already has an event handler for its onenter event, then that event will be called before this. If the event handler returns true, then the tabbed panel will be able to enter the new panel; otherwise, the focus remains on the previous panel. With the event handler for this event, you can add some common business logic which needs to be invoked when entering any panel. The event object has one property. tobeEnterPanel - the ID of the panel that is going to be entered. Tabbed panel onpanelexit The onpanelexit event is supported by the Tabbed Panel control and is fired when the user exits any panel in the tabbed panel. If the panel already has an event handler for its onexit event, then that event will be called before this. If the event handler returns true, then the tabbed panel will be able to exit the panel; otherwise, the focus remains on the current panel. With the event handler for this event, you can add some common business logic which needs to be invoked when exiting any panel. The event object has one property. tobeExitPanel - the ID of the panel that is going to be exited. Tabbed panel