modal que sera aberto quando clicar na imagem da linha.
<f:view><rich:modalPanelid="modalUsuario"autosized="true"><f:facetname="header"><h:panelGroup><h:outputTextvalue="Cadastro de Usuário"></h:outputText></h:panelGroup></f:facet><f:facetname="controls"><h:panelGroup><h:graphicImagevalue="/images/close.png"id="hidelink"title="Close"/><rich:componentControlfor="modalUsuario"attachTo="hidelink"operation="hide"event="onclick"/></h:panelGroup></f:facet><h:formid="formUsu"><rich:toolBarid="mainBar"height="26"itemSeparator="line"style="font: normal 10pt Arial;"><rich:toolBarGrouplocation="left"><a4j:commandLinkid="linkNovo"title="Novo"action="#{usuarioMB.novo}"reRender="formUsu"ajaxSingle="true"><h:graphicImageid="imageNovo"url="/images/page_white.png"style="border:0; height: 17px;"/></a4j:commandLink></rich:toolBarGroup><rich:toolBarGrouplocation="left"><a4j:commandLinkid="linkSalvar"title="Salvar"action="#{usuarioMB.salvar}"><h:graphicImageid="imageSalvar"url="/images/disk.png"style="border:0; height: 17px;"/></a4j:commandLink></rich:toolBarGroup></rich:toolBar><rich:spacerwidth="100%"height="10"/><h:panelGridcolumns="2"border="0"style="font-family:verdana; font-size:11px; text-align:right"><h:outputTextvalue="#{msg.nome}:"/><h:inputTextvalue="#{usuarioMB.handUser.userName}"required="true"label=" Campo Nome"style="width:250px"/><h:outputTextvalue="#{msg.departamento}:"/><h:panelGridcolumns="2"border="0"cellspacing="0"><h:inputTextvalue="#{usuarioMB.handUser.department}"required="true"label=" Campo Departamento"/><a4j:commandLinkid="btnPesq"title="Pesquisar"action="#{pesquisaDepartment.destroy}"oncomplete="Richfaces.showModalPanel('panel')"reRender="panel"ajaxSingle="true"><h:graphicImageid="imageDP"url="/images/search.gif"style="border:0; height: 17px;"/></a4j:commandLink></h:panelGrid><h:outputLabelvalue="#{msg.usuario}:"/><h:inputTextstyle="width: 250px;"value="#{usuarioMB.handUser.user}"size="15"required="true"id="usuario"label=" Campo Usuario"/><h:outputLabelvalue="#{msg.senha}:"/><h:inputSecretstyle="width: 250px;"redisplay="true"value="#{usuarioMB.handUser.userPwd}"label="Campo Senha"size="15"required="true"id="senha"/><h:outputLabelvalue="#{msg.confirmSenha}:"/><h:inputSecretvalue="#{usuarioMB.confirmPWD}"style="width: 250px;"label=" Campo Confirma Senha"size="15"id="Confirmasenha"/></h:panelGrid><rich:spacerwidth="100%"height="20"/><h:panelGridcolumns="2"border="0"style="font-family:verdana; font-size:11px; width: 381px; "><h:column><h:selectBooleanCheckboxvalue="#{usuarioMB.handUser.status}"/><h:outputTextvalue="#{msg.ativado}"/></h:column><h:column><h:selectBooleanCheckboxvalue="#{usuarioMB.handUser.acessConf}"/><h:outputTextvalue="#{msg.appConfig}"/></h:column><h:column><h:selectBooleanCheckboxvalue="#{usuarioMB.handUser.acessAdm}"/><h:outputTextvalue="#{msg.appAdmin}"/></h:column><h:column><h:selectBooleanCheckboxvalue="#{usuarioMB.handUser.acessTratamento}"/><h:outputTextvalue="#{msg.appTratamento}"/></h:column></h:panelGrid></h:form>
Minha classe Java.
privateDataModeldt;privateList<Usuario>list;//GETTER AND SETTER DO dtpublicDataModelgetDt(){dt=newListDataModel(list);returndt;}publicvoidsetDt(DataModeldt){this.dt=dt;}publicvoideditUser(){HandUseruser=(HandUser)dt.getRowData();if(user!=null)this.handUser=user;}