Version 6

    Update: working sample could be already checked live at richfaces-demo


    Note: code is untested and may not work!! Copy/pasted and modified some work stuff I can't post as is.


    Here is a quick howto for those of you who would like to click on a details link in table and have it show a modal panel with information loaded from the server.



    This example uses the Seam enhanced EL to set the proper object in the backing bean, but you should be able to use a4j:actionparam and lookup an identifier to achieve the same.


    What happens when show link is clicked the following:

    1. The MyBean instance for the clicked row is set on the backing bean

    2. The content inside "modalContent" is updated with values from the server

    3. The now updated modal panel is shown


    Backing bean:

    import java.util.ArrayList;
    import java.util.List;
    import org.jboss.seam.annotations.Name;
    import org.jboss.seam.annotations.Scope;
    import org.jboss.seam.ScopeType;
    public class MyBacking {
        private List<MyBean> someDataList = null;
        private MyBean detailed;
        public MyBacking(){
            //Add some dummy data to "someDataList"
        public String showDetails(MyBean aSelected){
            detailed = aSelected;
            return null;
        public MyBean getDetailed(){
            return detailed;
         public List<MyBean> getSomeDataList(){
             return someDataList;



    Value bean:

    public class MyBean{
      private String someData1;
      private String someData2;
      // Implement getters and setters yourself


    XHTML Code:

    <html xmlns=""
    <rich:modalPanel id="detailsMp" width="400" height="420" zindex="2000">
         <f:facet name="header">
         <f:facet name="controls">
              <a href="#" onclick="Richfaces.hideModalPanel('detailsMp')">X</a>
         <a4j:outputPanel id="modalContent" layout="inline">
              <h:panelGrid columns="2">
                   <h:outputText value="Some data1:"></h:outputText>
                   <h:outputText value="#{myBacking.detailed.someData1}"></h:outputText>
                   <h:outputText value="Some data2:"></h:outputText>
                   <h:outputText value="#{myBacking.detailed.someData2}"></h:outputText>
              <a href="#" onclick="Richfaces.hideModalPanel('detailsMp')">Close</a>
                   <f:facet name="header">
                        Some data1
                   <f:facet name="header">
                   <a4j:commandLink action="#{myBacking.showDetails(row)}"
                        oncomplete="Richfaces.showModalPanel('detailsMp',{width:450, top:200})">
         <rich:messages showDetail="true" showSummary="true"></rich:messages>