JSF 1.1 DataTable Reuse - jsf

I am working on a project that the previous programmer(s) duplicate code everywhere. I need to make a change to some JSF code but don't want to duplicate my changes every where. I figure there has to be a better way.
Here is the scenario; There are multiple dataTable that show up on several different tabs, all on the same page. Each dataTable is the same in every way except that the id and value/data source is different. I need to use the same technology that this was built with so I can't change the version or anything.
Setup:
Websphere 7
Java 1.5
JSF 1.1
Tomahawk 1.1
How can I externalize the dataTable and define the id and value when the dataTable is included? That way I don't have to make the same change multiple times for each table.
Tabbed Panel where each Edit.jsp page contains the dataTable below.
<odc:tabbedPanel id="sampleTab" styleClass="tabbedPanel_3"
slantActiveRight="4" slantActiveLeft="4" slantInactiveRight="4"
slantInactiveLeft="4" width="100%" height="100%"
variableTabLength="true" showBackNextButton="true" showTabs="true">
<!-- Start Test panel -->
<odc:bfPanel id="testsDisplayPanel" name="IPA"
showFinishCancelButton="false">
<jsp:include flush="true" page="editHeader.jsp" />
<jsp:include flush="true" page="testEdit.jsp" />
</odc:bfPanel>
<!-- Start Elisa panel -->
<odc:bfPanel id="elisaDisplayPanel" name="ELISA"
showFinishCancelButton="false">
<jsp:include flush="true" page="editHeader.jsp" />
<jsp:include flush="true" page="elisaEdit.jsp" />
</odc:bfPanel>
<!-- Start NMO Tests panel -->
<odc:bfPanel id="nmoDisplayTestPanel" name="NMO IF"
showFinishCancelButton="false">
<jsp:include flush="true" page="editHeader.jsp" />
<jsp:include flush="true" page="nmoTestEdit.jsp" />
</odc:bfPanel>
<!-- Start IF Tests panel -->
<odc:bfPanel id="ifDisplayTestsPanel" name="PNEO IF"
showFinishCancelButton="false" >
<jsp:include flush="true" page="editHeader.jsp" />
<jsp:include flush="true" page="ifTestEdit.jsp" />
</odc:bfPanel>
<f:facet name="back">
<hx:commandExButton id="tabbedPanel1back" style="display:none"
type="submit" value="< Back" />
</f:facet>
<f:facet name="next">
<hx:commandExButton id="tabbedPanel1next" style="display:none"
type="submit" value="Next >" />
</f:facet>
<f:facet name="finish">
<hx:commandExButton id="tabbedPanel1finish" style="display:none"
type="submit" value="Finish" />
</f:facet>
<f:facet name="cancel">
<hx:commandExButton id="tabbedPanel1cancel" style="display:none"
type="submit" value="Cancel" />
</f:facet>
</odc:tabbedPanel>
Table Example (I shortened it, it really has 20 columns.)
<h:dataTable id="elisaTestResults" styleClass="data-entry"
value="#{pc_SampleEdit.sample.test.elisaTestResults}" var="elisaTestResults" border="0"
cellpadding="0" cellspacing="0" rowClasses="none, grey-highlight">
<!-- hidden input column -->
<h:column>
<h:inputHidden value="#{elisaTestResults.testResultsIk}" />
<h:inputHidden value="#{elisaTestResults.test.testIk}" />
<h:inputHidden value="#{elisaTestResults.dirty}" id="mustSaveT1" />
</h:column>
<!-- Ordered column -->
<h:column id="testResultsOrderedCol">
<f:facet name="header">
<h:outputText id="ot01" styleClass="outputText" value="" />
</f:facet>
<h:selectOneMenu id="ordered" styleClass="selectOneMenu"
rendered="#{elisaTestResults.ordered != null}"
value="#{elisaTestResults.ordered}"
onchange="setDirty(this, 'T1')"
converter="javax.faces.convert.IntegerConverter">
<f:selectItems value="#{pc_UtilRefLists.ordered}" />
</h:selectOneMenu>
</h:column>
<!-- Test Name Column -->
<h:column id="testResultsTestNameCol">
<f:facet name="header">
<h:outputText id="ot02" styleClass="outputText" value="Test Name" />
</f:facet>
<h:outputText id="testResultsTestName" style="font-weight: bold"
value="#{elisaTestResults.testName}" />
</h:column>
<!-- Result1 Column -->
<h:column id="testResultsResult1Col">
<f:facet name="header">
<h:outputText id="ot03" styleClass="outputText" value="Result1" />
</f:facet>
<t:inputText id="testResultsResult1" style="font-weight: bold"
value="#{elisaTestResults.result1}" size="7" maxlength="15"
onchange="setTestDate(this, 'T1')"
displayValueOnly="#{elisaTestResults.valid1 != null && elisaTestResults.valid1}"
displayValueOnlyStyleClass="outputText"/>
</h:column>
<!-- Date1 Column -->
<h:column id="testResultsDate1Col">
<f:facet name="header">
<h:outputText id="ot04" styleClass="outputText" value="Date" />
</f:facet>
<h:panelGroup rendered="#{!elisaTestResults.valid1}">
<h:inputText id="testResultsDate1__DT" styleClass="inputText"
value="#{elisaTestResults.date1}"
onchange="setDirty(this, 'T1')"
size="7">
<f:convertDateTime type="date" pattern="MM/dd/yyyy" />
</h:inputText>
<hx:graphicImageEx id="testResultsDate1__DTCal"
styleClass="graphicImageEx" value="/shared/images/schedule.gif" />
<h:message styleClass="error-message" for="testResultsDate1__DT" />
</h:panelGroup>
<h:outputText id="testResultsDate1" styleClass="outputText"
value="#{elisaTestResults.date1}" rendered="#{elisaTestResults.valid1}">
<f:convertDateTime type="date" pattern="MM/dd/yyyy" />
</h:outputText>
</h:column>
<!-- Valid Result1 Column -->
<h:column id="testResultsValid1Col">
<f:facet name="header">
<h:outputText id="ot05" styleClass="outputText" value="OK" />
</f:facet>
<h:selectBooleanCheckbox id="testResultsValid1"
onchange="setDirty(this, 'T1')"
styleClass="selectBooleanCheckbox" value="#{elisaTestResults.valid1}" />
</h:column>
<!-- Result2 Column -->
<h:column id="testResultsResult2Col">
<f:facet name="header">
<h:outputText id="ot06" styleClass="outputText" value="Result2" />
</f:facet>
<t:inputText id="testResultsResult2" style="font-weight: bold"
value="#{elisaTestResults.result2}" size="7" maxlength="15"
onchange="setTestDate(this, 'T1')"
displayValueOnly="#{elisaTestResults.valid2 != null && elisaTestResults.valid2}"
displayValueOnlyStyleClass="outputText"/>
</h:column>
</h:dataTable>

To solve this problem I broke up the jsf code into several jsp files and inserted them where needed.
dataTableElisa.jsp
<h:dataTable id="elisaTestResults" styleClass="data-entry"
value="#{pc_SampleEdit.sample.test.elisaTestResults}" var="elisaTestResults" border="0"
cellpadding="0" cellspacing="0" rowClasses="none, grey-highlight">
<jsp:include flush="true" page="innerTable.jsp"/>
</h:dataTable>
dataTableNmo.jsp
<h:dataTable id="nmoTestResults" styleClass="data-entry"
value="#{pc_SampleEdit.sample.test.nmoTestResults}" var="elisaTestResults" border="0"
cellpadding="0" cellspacing="0" rowClasses="none, grey-highlight">
<jsp:include flush="true" page="innerTable.jsp"/>
</h:dataTable>
innerTable.jsp
<!-- hidden input column -->
<h:column>
<h:inputHidden value="#{elisaTestResults.testResultsIk}" />
<h:inputHidden value="#{elisaTestResults.test.testIk}" />
<h:inputHidden value="#{elisaTestResults.dirty}" id="mustSaveT1" />
</h:column>
<!-- Ordered column -->
<h:column id="testResultsOrderedCol">
<f:facet name="header">
<h:outputText id="ot01" styleClass="outputText" value="" />
</f:facet>
<h:selectOneMenu id="ordered" styleClass="selectOneMenu"
rendered="#{elisaTestResults.ordered != null}"
value="#{elisaTestResults.ordered}"
onchange="setDirty(this, 'T1')"
converter="javax.faces.convert.IntegerConverter">
<f:selectItems value="#{pc_UtilRefLists.ordered}" />
</h:selectOneMenu>
</h:column>
<!-- Test Name Column -->
<h:column id="testResultsTestNameCol">
<f:facet name="header">
<h:outputText id="ot02" styleClass="outputText" value="Test Name" />
</f:facet>
<h:outputText id="testResultsTestName" style="font-weight: bold"
value="#{elisaTestResults.testName}" />
</h:column>
<!-- Result1 Column -->
<h:column id="testResultsResult1Col">
<f:facet name="header">
<h:outputText id="ot03" styleClass="outputText" value="Result1" />
</f:facet>
<t:inputText id="testResultsResult1" style="font-weight: bold"
value="#{elisaTestResults.result1}" size="7" maxlength="15"
onchange="setTestDate(this, 'T1')"
displayValueOnly="#{elisaTestResults.valid1 != null && elisaTestResults.valid1}"
displayValueOnlyStyleClass="outputText"/>
</h:column>
<!-- Date1 Column -->
<h:column id="testResultsDate1Col">
<f:facet name="header">
<h:outputText id="ot04" styleClass="outputText" value="Date" />
</f:facet>
<h:panelGroup rendered="#{!elisaTestResults.valid1}">
<h:inputText id="testResultsDate1__DT" styleClass="inputText"
value="#{elisaTestResults.date1}"
onchange="setDirty(this, 'T1')"
size="7">
<f:convertDateTime type="date" pattern="MM/dd/yyyy" />
</h:inputText>
<hx:graphicImageEx id="testResultsDate1__DTCal"
styleClass="graphicImageEx" value="/shared/images/schedule.gif" />
<h:message styleClass="error-message" for="testResultsDate1__DT" />
</h:panelGroup>
<h:outputText id="testResultsDate1" styleClass="outputText"
value="#{elisaTestResults.date1}" rendered="#{elisaTestResults.valid1}">
<f:convertDateTime type="date" pattern="MM/dd/yyyy" />
</h:outputText>
</h:column>
<!-- Valid Result1 Column -->
<h:column id="testResultsValid1Col">
<f:facet name="header">
<h:outputText id="ot05" styleClass="outputText" value="OK" />
</f:facet>
<h:selectBooleanCheckbox id="testResultsValid1"
onchange="setDirty(this, 'T1')"
styleClass="selectBooleanCheckbox" value="#{elisaTestResults.valid1}" />
</h:column>
<!-- Result2 Column -->
<h:column id="testResultsResult2Col">
<f:facet name="header">
<h:outputText id="ot06" styleClass="outputText" value="Result2" />
</f:facet>
<t:inputText id="testResultsResult2" style="font-weight: bold"
value="#{elisaTestResults.result2}" size="7" maxlength="15"
onchange="setTestDate(this, 'T1')"
displayValueOnly="#{elisaTestResults.valid2 != null && elisaTestResults.valid2}"
displayValueOnlyStyleClass="outputText"/>
</h:column>

Related

Error dataScroller

I am creating xhtml page with datascroller in another datascroller . the error that in the second datascrolle always doesn't show any thing.
this in index.xhtml
<p:dataScroller value="#{ideeBean.idees}" var="in" chunkSize="10" mode="inline" scrollHeight="500"
>
<f:facet name="header">
Les Idées
</f:facet>
<h:panelGrid columns="2" style="width:100%" columnClasses="logo,detail">
<!-- <p:graphicImage name="demo/images/car/#{car.brand}-big.gif" /> -->
<p:outputPanel>
<h:panelGrid columns="1" cellpadding="5">
<h:outputText value="#{msg['idee.titre']}" />
<h:outputText value="#{in.titre}" style="font-weight: bold"/>
<h:outputText value="#{msg['idee.description']}" />
<h:outputText value="#{in.description}" style="font-weight: bold"/>
<h:outputText value="#{msg['idee.theme']}" />
<h:outputText value="#{in.theme}" style="font-weight: bold"/>
<h:outputText value="#{msg['idee.type']}" />
<h:outputText value="#{in.type}" style="font-weight: bold"/>
<!-- ***************************comments******************** -->
<p:dataScroller value="#{avisBean.avisl}" var="a" chunkSize="10" mode="inline" scrollHeight="500">
<f:facet name="header">
commentaires
</f:facet>
<h:panelGrid columns="2" style="width:100%" columnClasses="logo,detail" >
<!-- <p:graphicImage name="demo/images/car/#{car.brand}-big.gif" /> -->
<!-- <f:facet name="loader"> -->
<!-- <p:commandButton type="button" value="More" icon="ui-icon-circle-triangle-s"/> -->
<!-- </f:facet> -->
<p:outputPanel>
<h:panelGrid columns="1" cellpadding="5">
<h:outputText value="Commentaire:" />
<h:outputText value="ggg" style="font-weight: bold"/>
</h:panelGrid>
</p:outputPanel>
</h:panelGrid>
</p:dataScroller>
<!-- ***************************************** -->
<h:inputText id="comment" value="#{avisBean.avis.commentaire}" />
<p:commandButton value="commenter" icon="ui-icon-check" action="#{avisBean.addAvis(in)}" />
</h:panelGrid>
</p:outputPanel>
</h:panelGrid>
</p:dataScroller>
and this is the result of the code
enter image description here

Why are the acceptedTypes not set in Richfaces Drag and Drop?

I've tested the Example from Richfaces DragandDrop draging is working correctly, but every time i try to drop an element at the dropzone, it's being rejected.
<rich:dragIndicator id="indicator" />
<h:panelGrid columnClasses="panelc" columns="2" width="100%">
<rich:panel>
<f:facet name="header">
<h:outputText value="Verfügbare Spalten" />
</f:facet>
<h:dataTable id="src" columns="1"
value="#{columnBean.possibleColumns}" var="col">
<h:column>
<a4j:outputPanel
style="width:100px;border:1px solid gray;padding:2px"
onmouseover="this.style.cursor='move'" layout="block">
<rich:dragSupport dragIndicator=":indicator" dragType="#{columnBean.test}"
dragValue="#{col}">
<rich:dndParam name="label" value="#{col.label}" />
</rich:dragSupport>
<h:outputText value="#{col.label}" />
<!-- <br />
<h:selectBooleanCheckbox id="#{col.id}Possible"
value="#{col.rendered}"
style="width:100%;margin-left:auto; margin-right:auto" />-->
</a4j:outputPanel>
</h:column>
<f:facet name="footer">
<a4j:commandButton value="Reset" action="#{columnBean.reset}"
reRender="src,activeColumns" />
</f:facet>
</h:dataTable>
</rich:panel>
<h:panelGrid columns="3" width="100%">
<rich:panel style="width:90%">
<f:facet name="header">
<h:outputText value="Aktive Spalten" />
</f:facet>
<rich:dropSupport acceptedTypes="#{columnBean.test}"
dropListener="#{columnBean.processDrop}"
reRender="activeColumn,src">
</rich:dropSupport>
<h:dataTable id="activeColumns" columns="1"
value="#{columnBean.columns}" var="column">
<h:column>
<h:outputText value="#{column.label}"
style="border:1px solid gray" />
</h:column>
</h:dataTable>
</rich:panel>
</h:panelGrid>
</h:panelGrid>
When I look in my browsers-developertools i can see that acceptedType is empty.
Even if I set the dragType and the acceptedType as a String.
I speculate that this error has something to do with lifreay 6.2.3 interfering the setting. Am I right?

How to show minimum 10 rows in rich faces extendedDataTable with a vertical scrollbar?

Suppose I have more than 10 rows of data to display in a richfaces extendedDataTable component and I want to show minimum 10 rows on initial load. And if the user wants to see the remaining rows, the user have to scroll down using the vertical scrollbar.
The code which I used is given below.
<rich:layout position="center" style="overflow:hidden">
<rich:layoutPanel position="center" >
<rich:extendedDataTable enableContextMenu="false"
style="vertical-align: top; horizontal-align: center; "
id="filtertable" value="#{dynamicBean.selectedData.filterDetList}"
var="bdata" height="#{reportDesignerBean.height}"
showWhenRendered="false" rowClasses="datatable-odd,datatable-even"
selectedClass="grid-selection-style"
noDataLabel="#{msg['bnp.common.extendedDataTable.noDataLabel']}">
<rich:column width="110px">
<f:facet name="header">
<h:outputLabel value="#{msg['bnp.reortdesign.customreport.sqlreports.columnname']}" />
</f:facet>
<h:panelGrid id="filterName">
<h:outputText value="#{bdata.columnLabel}" />
</h:panelGrid>
</rich:column>
<rich:column width="110px" style="text-align:center;" >
<f:facet name="header">
<h:outputLabel value="#{msg['bnp.reortdesign.customreport.sqlreports.isafilter']}" />
</f:facet>
<h:selectBooleanCheckbox id="checkOne" value="#{bdata.rowSelected}" >
<a4j:support event="onclick" ajaxSingle="true" limitToList="true">
<f:setPropertyActionListener target="#{bdata}" value="#{bdata}"/>
</a4j:support>
</h:selectBooleanCheckbox>
</rich:column>
<rich:column width="320px">
<f:facet name="header"><h:outputLabel value="#{msg['bnp.reortdesign.customreport.sqlreports.filtervalue']}" /></f:facet>
<h:panelGrid width="380px" id="filtervalue" columns="3">
${bdata.columnDataType}
<c:if test="#{bdata.columnDataType != 'Date'}">
<h:inputText value="#{bdata.value}" maxlength="150"
style="width:240px">
<a4j:support event="onchange" ajaxSingle="true" limitToList="true">
<f:setPropertyActionListener target="#{bdata}" value="#{bdata}"/>
</a4j:support>
</h:inputText>
</c:if>
<c:if test="#{bdata.columnDataType == 'Date'}" >
<rich:calendar id="fixedDateValue" datePattern="#{loginBean.userPrefVO.preferredDateFmt}"
value="#{bdata.value}" buttonIcon="true" showWeeksBar="false"
weekDayLabelsShort="Su,Mo,Tu,We,Th,Fr,Sa"
oninputfocus="#{rich:component('fixedDateValue')}.doExpand();"
onclick="#{rich:component('fixedDateValue')}.doExpand()" width="20px"
buttonClass="calendar-button-style">
<f:convertDateTime type="date" pattern="#{loginBean.userPrefVO.preferredDateFmt}" />
<f:facet name="header">
<h:panelGrid columns="3" width="50%"
columnClasses="fake, width100 talign">
<h:outputText value="{previousMonthControl}"
style="font-weight:bold;" />
<h:outputText value="{currentMonthControl}"
style="font-weight:normal;padding-left:15px; text-align:center; cursor:pointer"
disabled="true" />
<h:outputText value="{nextMonthControl}"
style="font-weight:bold;" />
</h:panelGrid>
</f:facet>
<f:facet name="fixedDateValue" style=""></f:facet>
</rich:calendar>
</c:if>
<rich:spacer width="20px" />
</h:panelGrid>
</rich:column>
<rich:column width="205px">
<f:facet name="header">
<h:outputLabel value="#{msg['bnp.reortdesign.customreport.sqlreports.datatype']}"/>
</f:facet>
<h:panelGrid id="filterdatatype">
<h:outputText value="#{bdata.columnDataType}" style="color:green;font-style: italic;font-size:10px;"/>
</h:panelGrid>
</rich:column>
</rich:extendedDataTable>
<!-- <a4j:outputPanel id="fScrollerPanel">
<rich:datascroller id="filterScroller" for="filtertable" ></rich:datascroller>
</a4j:outputPanel> -->
</rich:layoutPanel>
</rich:layout>
From the Richfaces showcase:
In order to turn on Ajax loading - you should just specify clientRows attribute with number of rows to be loaded on the client. In the sample below it's set to 15 or to 0 according to checkbox value. 0 value means load all the rows (or attribute could be just not defined at all).

Issue in displaying p:messages for converterMessage

I am using PrimeFaces but I have problem with display <p:messages> for converterMessage.
When I use JSF tag <h:message>, it works correctly or even when I insert it into columns, but when I change to <p:message> it does not show. Can anybody helps me? My page is:
<h:form id="form2" prependId="false" style="direction:rtl;width: 600;top: 300px ;position: absolute" >
<p:messages for="count"/>
<p:outputLabel value="sum credit :#{shoppingBean.sumcredit}"/><br/>
<p:outputLabel value="shopping list :"/>
<p:dataTable id="dataTbl2" var="selectedProduct" value="#{shoppingBean.selectedProduct}" emptyMessage="no data"
paginatorAlwaysVisible="true" selection="#{shoppingBean.selection2}"
rowKey="#{selectedProduct.id}" disabledSelection="false" rows="5" paginator="true" pageLinks="5">
<p:column style="color: blue">
<f:facet name="header">
<h:outputText value="brand" />
</f:facet>
<h:outputText value="#{selectedProduct.tblShopProduct.brand}" />
</p:column>
<p:column style="color: blue">
<f:facet name="header">
<h:outputText value="price" />
</f:facet>
<h:outputText value="#{selectedProduct.tblShopProduct.price}" />
</p:column>
<p:column style="color: blue" >
<f:facet name="header">
<h:outputText value="date" />
</f:facet>
<h:outputText value="#{shoppingBean.tblShopOrder.created.toString().substring(0,11)}" />
<h:outputText value="#{shoppingBean.tblShopOrder.created.toString().substring(11,19)}" />
</p:column>
<p:column style="color: blue" >
<f:facet name="header">
<h:outputText value="number" />
</f:facet>
<h:outputText value="#{selectedProduct.number}" />
</p:column>
<p:column style="color: blue" >
<f:facet name="header">
<h:outputText value="amount" />
</f:facet>
<h:outputText value="#{selectedProduct.amount}" />
</p:column>
<p:column style="color: blue">
<f:facet name="header">
<h:outputText value="edit"/>**<h:inputText id="count" converterMessage="you allowed only for using number value="#{shoppingBean.count}"/>**
</f:facet>
<h:commandButton value="sum" rendered="#{selectedProduct.number==null}" action="#{shoppingBean.addProductCount(selectedProduct)}" />
<h:commandButton value="confirm" disabled="true" rendered="#{selectedProduct.number!=null}" />
</p:column>
<p:column style="color: blue" >
<f:facet name="header">
<h:outputText value="delete" />
</f:facet>
<h:commandButton value="delete" action="#{shoppingBean.deleteBuyed(selectedProduct)}" />
</p:column>
<f:facet name="footer">
<h:commandButton value="final shopping" action="#{shoppingBean.finalShop(selectedProduct)}" />
</f:facet>
</p:dataTable>
</h:form>
Tohid Makari.
<h:outputText value="edit"/>**<h:inputText id="count" converterMessage="you allowed only for using number value="#{shoppingBean.count}"/>**
This line could not work. Fix this first.
You do not update your messages tag.
Try something like this :
<p:messages for="count" autoUpdate="true" />

Rerendered components don't work properly

I am creating a view in JSF where after executing some action with a4j:commandButton some elements are rerendered. For example I click on a button which invokes a backing bean method such as executeProcess (this adds a process to a list), and when it finishes updates a data table (shows the available processes). The data table also has some other buttons to execute specific actions over every process, but when I press one of this the page seems to reload entirely without invoking the action, then if I press the same button again it works. What is happening?
Component List an execute:
<div class="line_left" style="float:right">
<a4j:outputPanel id="execProcessPanel" layout="block"
ajaxRendered="true">
<ui:fragment rendered="#{tapeTapeForm.size > 0}">
<h:form id="executeProcess">
<h:outputText value="Ejecuta Proceso" />
<br />
<h:outputLabel id="inputFilesLabel" for="inputFile" value="Archivo" />
<h:selectOneListbox id="inputFile" size="5" required="true"
requiredMessage="Debes seleccionar un archivo"
value="#{tapeTapeForm.inputFile}">
<f:selectItems value="#{tapeTapeForm.inputFiles}" var="file"
itemLabel="#{file}" itemValue="#{file}" />
</h:selectOneListbox>
<br />
<h:message for="inputFile" errorClass="" />
<br />
<a4j:commandButton value="Ejecutar" styleClass="button"
action="#{tapeTapeForm.executeProcess}"
render="resultListPanel execProcessPanel messages"
limitRender="true">
<f:setPropertyActionListener value="0"
target="#{tapeTapeForm.tipoProceso}" />
</a4j:commandButton>
<a4j:commandButton value="Revisión" styleClass="button"
action="#{tapeTapeForm.executeProcess}"
render="resultListPanel execProcessPanel messages"
limitRender="true">
<f:setPropertyActionListener value="1"
target="#{tapeTapeForm.tipoProceso}" />
</a4j:commandButton>
</h:form>
</ui:fragment>
</a4j:outputPanel>
</div>
Component Data Table:
<a4j:outputPanel id="resultListPanel" layout="block"
ajaxRendered="true">
<h2>
<h:outputText value="Listado de Procesos Tape to Tape" />
</h2>
<rich:dataTable id="resultList" var="item" rows="0"
value="#{tapeTapeForm.processes}" noDataLabel="Sin Procesos">
<rich:column sortable="true" sortBy="#{item.id}">
<f:facet name="header">
<h:outputText value="ID" />
</f:facet>
<center>
<h:outputText value="#{item.id}" />
</center>
</rich:column>
<rich:column>
<f:facet name="header">
<h:outputText value="Nombre Archivo" />
</f:facet>
<center>
<h:outputText value="#{item.inputFileName}" />
</center>
</rich:column>
<rich:column>
<f:facet name="header">
<h:outputText value="Archivo Salida" />
</f:facet>
<center>
<h:outputText value="#{item.outputFileName}"
title="Clic para descargar el archivo de salida" />
</center>
</rich:column>
<rich:column>
<f:facet name="header">
<h:outputText value="Tipo Proceso" />
</f:facet>
<center>
<h:outputText value="Reporte"
title="Este proceso generará un reporte"
rendered="#{item.tipoProceso == 0}" />
<h:outputText value="Revisión"
title="Se realizará una revisión del archivo"
rendered="#{item.tipoProceso == 1}" />
</center>
</rich:column>
<rich:column>
<f:facet name="header">
<h:outputText value="Estatus" />
</f:facet>
<center>
<h:outputText value="#{item.status.description}"
title="#{item.status.detail}" />
</center>
</rich:column>
<rich:column>
<f:facet name="header">
<h:outputText value="Progreso" />
</f:facet>
<rich:progressBar value="#{item.avance}" minValue="0"
enabled="false" rendered="#{item.status.id == 3}"
maxValue="#{item.total}" label="#{item.avance} / #{item.total}" />
</rich:column>
<rich:column>
<f:facet name="header">
<h:outputText value="Detener" />
</f:facet>
<h:form rendered="#{item.status.id == 2 or item.status.id==3}">
<h:commandLink action="#{tapeTapeForm.stopProcess}" value="STOP"
onclick="#{rich:component('ajaxLoadingModalBox')}.show()">
<f:setPropertyActionListener target="#{tapeTapeForm.id}"
value="#{item.id}" />
</h:commandLink>
</h:form>
</rich:column>
<rich:column>
<f:facet name="header">
<h:outputText value="Eliminar" />
</f:facet>
<h:form rendered="#{item.status.id !=2 and item.status.id != 3}">
<h:commandLink action="#{tapeTapeForm.removeProcess}"
value="ELIMINAR">
<f:setPropertyActionListener target="#{tapeTapeForm.id}"
value="#{item.id}" />
</h:commandLink>
</h:form>
</rich:column>
</rich:dataTable>
</a4j:outputPanel>
I'm using RichFaces 4.2.2
Get rid of the multiple forms, wrap everything in one and then use if you need to limit the scope of execution.

Resources