### Create new RichFaces Documentation Jira issue

Summary
255 characters left
Description
Environment
This will launch the RichFaces Jira page - to complete your feedback please login if needed, and submit the Jira.

JBoss.org Community Documentation

- Prev
- Next

## 6.99. < rich:nodeSelectListener >

### 6.99.1. Description

The <rich:nodeSelectListener> represents an action listener method that is notified after selection of a node.

### 6.99.2. Key Features

- Allows to define some "nodeSelect" listeners for the component

Table 6.591. rich : nodeSelectListener attributes

Attribute Name | Description
--- | ---
binding | The attribute takes a value-binding expression for a component property of a backing bean
type | The fully qualified Java class name for the listener

Table 6.592. Component identification parameters

Name | Value
--- | ---
listener-class | org.richfaces.event.NodeSelectedListener
event-class | org.richfaces.event.NodeSelectedEvent
tag-class | org.richfaces.taglib.NodeSelectListenerTag

### 6.99.3. Creating the Component with a Page Tag

To create the simplest variant on a page use the following syntax:

Example:

    ...

        <rich:nodeSelectListener type="demo.Bean"/>

    ...

### 6.99.4. Creating the Component Dynamically Using Java

Example:

    package demo;

    public class ImplBean implements org.richfaces.event.NodeSelectListener{

        ...

    }

    import demo.ImplBean;

    ...

    ImplBean myListener = new ImplBean();

    ...

### 6.99.5. Details of Usage

The <rich:nodeSelectListener> is used as a nested tag with <rich:tree> and <rich:treeNode> components.

Attribute "type" defines the fully qualified Java class name for listener. This class should implement `org.richfaces.event.NodeSelectedListener` . interface

The typical variant of using:

    ...

    <rich:tree switchType="server" value="#{project.data}" var="item" nodeFace="#{item.type}">

        <rich:nodeSelectListener type="demo.ListenerBean"/>

        ...

        <!-- Tree nodes -->

        ...

    </rich:tree>

    ...

Java bean source:

    package demo;

    import org.richfaces.event.NodeSelectedEvent;

    public class ListenerBean implements org.richfaces.event.NodeSelectedListener{

    ...

        public void processSelection(NodeSelectedEvent arg0){

            //Custom Developer Code

        }

    ...

    }

### 6.99.6. Look-and-Feel Customization

<rich:nodeSelectListener> has no skin parameters and custom style classes, as the component isn't visual.

- Prev6.98. < rich:changeExpandListener > ...
- Top of page
- Front page
- Next6.100. < rich:treeNodesAdaptor >