How to Add Command Buttons to Data Tables with RichFaces 3.3.x


<?xml version="1.0"?>
<faces-config version="1.2" xmlns="" xmlns:xsi="" xsi:schemaLocation="">
    <managed-bean-scope>session</managed-bean-scope> <!-- required as mentioned in -->


<?xml version="1.0" encoding="ISO-8859-1"?>
<ui:composition xmlns="" xmlns:f="" xmlns:h="" xmlns:rich="" xmlns:ui="">
    <rich:dataTable value="#{sample.itemList}" var="item">
        <f:facet name="header">
          <h:outputText value="Message" />
        <h:outputText value="#{item.msg}" />
        <f:facet name="header">
          <h:outputText value="Action" />
        <h:commandButton action="#{sample.sendMessage}" value="Say Hello">
          <f:setPropertyActionListener target="#{sampleBean.msg}" value="#{item.msg}" />

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.