Update the tabview when select the row in datatable - jsf-2

In the below code i can update the tabview when i select the row in datatable.but here is one small problem is the editor in one of my tab is disable when select a row and the downlod is not working in first time if u click second time it will work correctly
<p:dataTable id="dataCall" var="call" value="#{calllist.mediumCallsModel}"
selection="#{calllist.selectedCall}" scrollRows="20" scrollHeight="350"
scrollWidth="150" liveScroll="true" selectionMode="single" paginator="true" rows="5"
widgetVar="callsTable" paginatorPosition="bottom" paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}" rowsPerPageTemplate="5,10,20,50">
<p:ajax event="rowSelect" listener="#{calllist.onRowSelect}" update=":MyListForm:showlist: :MyListForm:growl " />
<p:ajax event="rowUnselect" listener="#{calllist.onRowUnselect}" update=":MyListForm:growl"/>
<p:column headerText="Call ID">
<h:outputText value="#{call.callId}"/>
</p:column>
<p:column headerText="Created By">
<h:outputText value="#{call.createdBy}" />
</p:column>
<p:column headerText="Location">
<h:outputText value="#{call.location}" />
</p:column>
<p:column headerText="Status">
<h:outputText value="#{call.status}" />
</p:column>
<p:column headerText="Product">
<h:outputText value="#{call.product}" />
</p:column>
<p:column headerText="Module">
<h:outputText value="#{call.module}" />
</p:column>
<p:column headerText="Group Assigned">
<h:outputText value="#{call.groupAssigned}" />
</p:column>
<p:column headerText="Assigned to">
<h:outputText value="#{call.assignedTo}" />
</p:column>
<p:column headerText="Call creation">
<h:outputText value="#{call.callCreation}" />
</p:column>
</p:dataTable>
<h:panelGrid >
<p:tabView id="showlist" cache="true" style="font-size: 15px; height: 260px;width: 995px">
<p:tab id="tab1" title="Call Details">
<p:fieldset id="calldetails" style="background-color: lightgray; font-weight: bold;color: black;">
<table border="0" width="900px" align="left" style="font-size: 12px">
<tr>
<td width="100px"><h:outputText value="Status:"/></td>
<td width="80px"><p:selectOneMenu id="status" value="#{calllist.selectedCall.statusId}" style="width:114px; font-size: 12px">
<f:selectItem itemLabel="Select Status" itemValue="-1" />
<f:selectItems value="#{calllist.dyStatusList}" />
</p:selectOneMenu> </td>
</tr>
</table>
</p:fieldset>
</p:tab>
<p:tab title="Work log/Comments">
<table id="comment_table" width="900px" height="200px" border="0" style="font-size: 12px;">
<tr valign="top">
<td>
<div id="oldcomment" style="width:450px; height: 90px; background-color:lightgray;font-weight: bold;color: black;overflow: scroll;">
<ui:repeat value="#{calllist.oldComments}" var="item">
<table>
<tr>
<td><h:outputText value="User ID"/></td>
<td><h:outputText value="#{item.modifiedUserID}"/></td>
</tr>
</table>
<hr/>
</ui:repeat>
</div>
<div id="comment" style="width:450px; height: 90px; background-color:lightgray; font-weight: bold;color: black;" >
</div>
</td>
<td>
<p:editor id="editor" width="400" height="190" onchange="append_comment();" value="#{calllist.comments}"/>
</td>
</tr>
</table>
</p:tab>
<p:tab title="Attachments">
<h:form id="download_form">
<table id="download_list">
<tr>
<td>
<p:fileUpload id="upload" fileUploadListener="#{calllist.handleFileUpload}" mode="advanced" sizeLimit="100000" multiple="true" allowTypes="/(\.|\/)(gif|jpe?g|png|xls)$/" />
</td>
<td>
<p:selectOneListbox id="scroll" value="#{calllist.fileName}" style="width: 250px;">
<f:selectItem itemLabel="Select" itemValue="-1"/>
<f:selectItems value="#{calllist.attachment}"/>
</p:selectOneListbox>
</td>
</tr>
<tr>
<td></td>
<td align="center">
<p:commandButton id="downloadLink" value="Download" ajax="false" icon="ui-icon-arrowthick-1-s">
<p:fileDownload value="#{calllist.file}"/>
</p:commandButton>
</td>
</tr>
</table>
</h:form>
</p:tab>

Related

After Filtering Primefaces Datatable not show The Filtered Row Details in a dialog box

I use jsf 2.2 and Primefaces 4.0 in my project. but I faced a problem . After Filter Primefaces Datatable. I want to show the filtered Row ditails in a dialog but after filter, Row ditails not show dialog box . Even Until Reload the page don't show Row Details in the dialog box . My Jsf Code Is ..........
<h:form id="Form_showRequest" style="font-size: 10pt;">
<input type="text" id="search" placeholder="Search now..."></input>
<p:growl id="MSG_grl" autoUpdate="false" showDetail="true"/>
<p:dataTable id="TBL_data" var="List_request" value="#{allRequestBean.requestDetailsList}" scrollable="true" widgetVar="reTab"
paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
scrollHeight=" 460" style="font-size: 10pt; font-family: serif;margin-bottom:0;">
<p:column headerText="Mobile No" style="width: 80px;" filterBy="#{List_request.mobileNumber}" >
#{List_request.mobileNumber}
</p:column>
<p:column headerText="User Name" style="width: 80px;">
#{List_request.userName}
</p:column>
<p:column headerText="Amount" style="width: 50px;">
#{List_request.rechargeAmount}
</p:column>
<p:column headerText="Cost" style="width: 50px;">
#{List_request.costAmount}
</p:column>
<p:column headerText="Service" style="width: 100px;">
#{List_request.serviceName}
</p:column>
<p:column headerText="Bank " style="width: 50px;">
#{List_request.bankName}
</p:column>
<p:column headerText="Bank Tran Id" style="width: 100px;">
#{List_request.bankTrankId}
</p:column>
<p:column headerText="Date Time" style="width: 150px;" >
#{List_request.rechargeDate}
</p:column>
<p:column headerText="Conformation Id" style="width: 100px;">
#{List_request.conformationId}
</p:column>
<p:column headerText="Status" style="width: 80px;">
<h:outputText value="#{List_request.rechargeStatusName}"/>
</p:column>
<p:column id="op" headerText="Option" style="width: 100px">
<p:commandButton id="but" value="Action" action="#{actionBean.allReRowDetails()}"
update=":Form_showRequest:PNL_action" style=" font-size: 10px" onclick="PF('widget_action').show();"
ajax="true" disabled="#{List_request.rechargeStatusId eq 4 or List_request.rechargeStatusId eq 5}">
<f:setPropertyActionListener value="#{List_request}" target="#{actionBean.allRequestBeanValue}"/>
</p:commandButton>
<p:commandLink id="requestDetails" value="Details" action="#{allRequestDetailsBean.rowDetails()}"
update=":Form_showRequest:PNL_request" oncomplete="PF('widget_request').show();" ajax="true" >
<f:setPropertyActionListener value="#{List_request}" target="#{allRequestDetailsBean.allRequestBeanValue}" />
</p:commandLink>
</p:column>
</p:dataTable>
<p:dialog id="Dialog_acton" header="Action" widgetVar="widget_action" modal="true">
<h:panelGrid id="PNL_action" style="margin-bottom:10px; width: 300px;" cellpadding="10">
<p:selectOneRadio id="action" columns="1" value="#{actionBean.actionType}">
<f:selectItem itemLabel="Resend" itemValue="1" />
<f:selectItem itemLabel="Complete" itemValue="4" />
<f:selectItem itemLabel="Cancel" itemValue="5" />
</p:selectOneRadio><br/>
<p:outputLabel value="Reason" style="width:20px; "/>
<p:inputTextarea value="#{actionBean.confirmId}" style="width: 250px" />
</h:panelGrid>
<p:commandButton value="Ok" action="#{actionBean.action()}" update="Form_showRequest:TBL_data,MSG_grl"
oncomplete="widget_action.hide()" style="width: 200px; margin-left: 50px;"/>
</p:dialog>
<p:dialog id="Dialog_request" header="Request Details Information" widgetVar="widget_request" showEffect="clip" hideEffect="fold" resizable="false" >
<p:panelGrid id="PNL_request" columns="2" style="width: 450px" >
<p:outputLabel value="Recharge Id :"/>
<p:outputLabel value=" #{allRequestDetailsBean.rechargeId}"/>
<p:outputLabel value="User Name:"/>
<p:outputLabel value=" #{allRequestDetailsBean.userName}"/>
<p:outputLabel value="Mobile Number :"/>
<p:outputLabel value=" #{allRequestDetailsBean.mobileNumber}"/>
<p:outputLabel value="Recharge Amount:"/>
<p:outputLabel value=" #{allRequestDetailsBean.rechargeAmount}"/>
<p:outputLabel value="Cost :"/>
<p:outputLabel value=" #{allRequestDetailsBean.costAmount}"/>
<p:outputLabel value="Number Type:"/>
<p:outputLabel value=" #{allRequestDetailsBean.numberType}"/>
<p:outputLabel value="Operator :"/>
<p:outputLabel value=" #{allRequestDetailsBean.operatorName}"/>
<p:outputLabel value="Service :"/>
<p:outputLabel value=" #{allRequestDetailsBean.serviceName}"/>
<p:outputLabel value="Bank Nmae:"/>
<p:outputLabel value=" #{allRequestDetailsBean.bankName}"/>
<p:outputLabel value="Bank Transaction Id:"/>
<p:outputLabel value=" #{allRequestDetailsBean.bankTrankId}"/>
<p:outputLabel value="Ip Address:"/>
<p:outputLabel value=" #{allRequestDetailsBean.ipAddress}"/>
<p:outputLabel value="Time:"/>
<p:outputLabel value=" #{allRequestDetailsBean.rechargeDate}"/>
<p:outputLabel value="Invoice No:"/>
<p:outputLabel value=" #{allRequestDetailsBean.invoiceNo}"/>
<p:outputLabel value="Conformation Id:"/>
<p:outputLabel value=" #{allRequestDetailsBean.conformationId}"/>
<p:outputLabel value="Status:"/>
<p:outputLabel value=" #{allRequestDetailsBean.rechargeStatusName}"/>
</p:panelGrid>
</p:dialog>
</h:form>
I Solved it by this code write in p:dataTable tag ....
filteredValue="#{allRequestDetailsBean.filteredRequest}"
and also create a list in allRequestDetailsBean
private List<AllRequestBean> filteredRequest;

Primefaces Paginator with rowSelection ! paginator does not work unless after row selection?

I'm using primefaces with JSF2.1, tomcat7+ as an application server, Internet Explorer 8 as a browser, here's the case :
I have a 1000 records table inside a dialog, when i press a page link it changes records only once but the pressed page link does not get pressed (shaded as active) then the whole application does not respond. However when i select a row before using pageLinks everything works fine after that. Any Help?? here's a part of my xhtml page.
N.B: I cannot change IE8 as it is a customer requirement.
Here is the table part
<p:ajax global="false" event="close" listener="#{addConditionBean.handleClose}" update="conditionsDialog" />
<h:form id="conditionfrm">
<p:messages autoUpdate="true" showDetail="true" closable="true" severity="error"/>
<table style="text-align: center;">
<tr>
<td style="text-align: left; height: 100%; vertical-align: top;">
<p:growl id="infoMsg" showDetail="true" life="2000" autoUpdate="true" severity="info"/>
<p:dialog id="conditionsDialog" widgetVar="addCondition"
header="Add Condition" modal="true"
showEffect="fold" hideEffect="fold" closeOnEscape="true" height="400px" width="80%"
dynamic="true" style="display: none;" binding="#{addConditionBean.conditionDialog}">
<p:ajax global="false" event="close" listener="#{addConditionBean.handleClose}" update="conditionsDialog" />
<h:form id="conditionfrm">
<p:messages autoUpdate="true" showDetail="true" closable="true" severity="error"/>
<table style="text-align: center;">
<tr>
<td style="text-align: left; height: 100%; vertical-align: top;">
<p:growl id="infoMsg" showDetail="true" life="2000" autoUpdate="true" severity="info"/>
<p:dataTable id="ConditionsDT" value="#{addConditionBean.allConditionsData}" style="height: 90%;"
selectionMode="single"
selection="#{addConditionBean.selectedCondition}"
rowKey="#{condition.conditionId}"
paginator="true"
rows="50"
pageLinks="50"
var="condition" scrollable="true"
widgetVar="conditionsTable"
emptyMessage="No Conditions found with given criteria">
<p:ajax event="rowSelect" update="#form" oncomplete="slideShowPanel('displayDiv');" listener="#{addConditionBean.fillSelectedCondition}"/>
<f:facet id="facetId" name="header" >
<h:commandButton id="addNewCond" label="Add New Condition" image="/styling/images/add.png" style="height:15px;" >
<p:ajax global="false" event="click" update="#form" oncomplete="slideShowPanel('displayDiv');" listener="#{addConditionBean.showAddPanel()}"/>
</h:commandButton>
<br></br>
<!-- <p:outputPanel>
<p:inputText id="globalFilter" style="width:150px" value="" >
<p:ajax event="keyup" />
</p:inputText>
</p:outputPanel> -->
</f:facet>
<p:column style="height: 50%; text-align:left; width: 20%;" >
<h:commandButton value="Delete" image="/styling/images/Delete-icon.png" title="Delete condition" style="height: 20px" >
<p:ajax global="false" event="click" listener="#{addConditionBean.deleteCondition(condition)}" update="ConditionsDT" />
</h:commandButton>
</p:column >
<p:column headerText="Condition Name" style="height: 50%; text-align:left; width: 80%;" sortBy="#{condition.conditionName}" >
<h:outputText value="#{condition.conditionId} - #{condition.conditionName}"/>
</p:column>
</p:dataTable>
I guess my problem had nothing to do with rowSelection it concerned the scrollable attribute, I removed scrollable = true and scrollHeight and it all worked fine. I guess there was some kind of clash between scroll height and rows attributes of the datatable tag.

How to display contents in reverse order in <h:dataTable>

I am accepting data in Array and displaying it in the same screen using <h:dataTable>.
How can display contents in reverse order, i.e. show the latest entry in the first row?
Below is code can i display nonDox.non_List in reverse order
<h:body>
<h:panelGroup rendered="#{not empty dataBase}">
<h:form id="nonDoxScanForm">
<f:event listener="#{nonDox.validate_AccNo}" type="postValidate" />
<table border="0" class="InnerBox" width="55%">
<tr><th colspan="7" align="Center" class="clsTitle">Non Dox Add</th></tr>
<tr>
<td>Delivery Date</td>
<td >Consginee (F2) </td>
<td>Weight (F3)</td>
<td>SubBranch Code(F4)</td>
<td >Consignment No (F10)</td>
<td align="Center">(F12)</td>
</tr>
<tr>
<td> <p:calendar value="#{nonDox.delDate}" id="fDat" /> </td>
<td><h:inputText size="20" id="fcon" value="#{nonDox.consignee}" /> </td>
<td><h:inputText size="20" id="fweig" value="#{nonDox.weight}" >
</h:inputText> </td>
<td><h:inputText size="20" id="fsub" value="#{nonDox.subBranchCode}" >
<f:validateLength maximum="3"></f:validateLength>
</h:inputText> </td>`enter code here`
<td><h:inputText size="10" id="acno" value="#{nonDox.accNo}" onfocus="this.select()" >
</h:inputText>
</td>
<td> <h:commandButton value="Add" id="fAdd" action="#{nonDox.addAction}" onclick="return validate();" />
</td>
<td> <h:commandButton value="Save" action="#{nonDox.saveAction}" >
</h:commandButton>
</td>
</tr>
<tr>
<td colspan="7">
<h:message for="acno"/>
</td>
</tr>
</table>
<h:dataTable value="#{ nonDox.non_List}" var="o"
styleClass="order-table"
headerClass="order-table-header"
rowClasses="order-table-odd-row,order-table-even-row" width="55%"
>
<h:column>
<f:facet name="header">Del Date</f:facet>
#{o.cor_Date.substring(0, 10)}
</h:column>
<h:column>
<f:facet name="header">consignee</f:facet>
#{o.consignee}
</h:column>
<h:column>
<f:facet name="header">Weight</f:facet>
#{o.weight}
</h:column>
<h:column>
<f:facet name="header">Rate</f:facet>
#{o.rate}
</h:column>
<h:column>
<f:facet name="header">subBranchCode</f:facet>
#{o.subBranchCode}
</h:column>
<h:column>
<f:facet name="header" >POD No</f:facet>
#{o.accNo}
</h:column>
<h:column>
<f:facet name="header">Action</f:facet>
<h:commandLink value="Delete" action="#{nonDox.deleteAction(o)}" />
</h:column>
</h:dataTable>
</h:form>
<h:panelGroup >
<h:panelGroup rendered="#{empty dataBase}">
<h1>Session Expired</h1>
<h:link outcome="Login" target="CommonContent" >Login</h:link>
</h:panelGroup>
</h:body>
If you're using an List as in new ArrayList<Item>(), it's easy: use Collections#reverse():
private List<Item> data;
#PostConstruct
public void init() {
data = service.list();
Collections.reverse(data);
}
// ...
Just reference it in <h:dataTable value="#{bean.data}"> the usual way.
If you're using an array as in Item[], then you'd need to convert it to List first with help of Arrays#asList(), so that you can feed it to Collections#reverse():
private List<Item> data;
#PostConstruct
public void init() {
Item[] items = service.array();
data = Arrays.asList(items);
Collections.reverse(data);
}
// ...
Or just rewrite the service method in such way that you don't need to perform this conversion step in the backing bean.
Key is, you shouldn't expect to perform this job in the view. You should just prepare the model in such way that it's exactly as what the view expects. The <h:dataTable> itself doesn't provide any facilities like that.

Primefaces poll not updating panel

I can't figure out why my primefaces poll will not update any components.
<p:poll widgetVar="poll"
interval="#{messageBean.refreshInterval}"
listener="#{messageBean.refreshLiveData}"
update=":transactionLogForm:tabViewMain:liveViewPanel"/>
The refreshLiveData method gets called successfully but it refuses to update the outputText component (or any component for that matter).
<p:tab id="liveViewTab" title="Live View">
<h:panelGrid id="liveViewPanel" columns="6" cellpadding="5">
<h:outputText value="Live View Enabled: " />
<p:selectBooleanCheckbox value="#{messageBean.liveViewActive}">
</p:selectBooleanCheckbox>
<h:outputText value="Interval: " />
<p:spinner id="interval" value="#{transactionLogBean.refreshInterval}" />
<h:outputText value="Last Update:" />
<h:outputText id="lastUpdated" value="#{transactionLogBean.lastUpdated}" />
</h:panelGrid>
</p:tab>
Here is the full code from within the body tags:
<p:layout id="mainLayout" fullPage="true" style="height:100%" >
<h:form id="transactionLogForm">
<p:poll widgetVar="poll"
interval="#{messageBean.refreshInterval}"
listener="#{messageBean.refreshLiveData}"
update=":transactionLogForm:tabViewGrids:messageTable :transactionLogForm:tabViewGrids:timestatTable :transactionLogForm:tabViewMain:liveViewPanel"/>
<p:layoutUnit id="topHeader" position="north" size="178" >
<ui:include src="inc_menu.xhtml" />
</p:layoutUnit>
<p:layoutUnit id="center" position="center" >
<div>
<p style="font-size: 20px; font-weight: bold; padding: 0px 0px 0px 10px">Transaction Logs</p>
</div>
<p:tabView id="tabViewMain" orientation="top">
<p:tab title="Reference No">
<h:panelGrid columns="2" cellpadding="5">
<p:inputTextarea id="referenceNo" rows="1" cols="100" value="#{transactionBean.referenceNo}" style="width:300px"/>
<p:commandButton id="refreshBtnMain0" value="Search" action="#{transactionBean.searchTranLogDetails(true)}"
update=":transactionLogForm:transactionSearchTable" ajax="true"
oncomplete="txnDialog.show()"
style="vertical-align: baseline"/>
</h:panelGrid>
</p:tab>
<p:tab title="Log Id">
<h:panelGrid columns="2" cellpadding="5">
<p:inputText id="logID" value="#{transactionLogBean.logID}" style="width:300px"/>
<p:commandButton id="refreshBtnMain1" value="Refresh" action="#{transactionLogBean.refreshData}" update=":transactionLogForm:tabViewGrids:messageTable :transactionLogForm:tabViewGrids:timestatTable" ajax="true" />
</h:panelGrid>
</p:tab>
<p:tab title="Date Range">
<h:panelGrid columns="5" cellpadding="5">
<h:outputText value="Start Date:" />
<p:calendar id="StartDate" pattern="dd/MM/yyyy HH:mm:ss" navigator="true" value="#{transactionLogBean.startDate}" />
<h:outputText value="End Date:" />
<p:calendar id="EndDate" pattern="dd/MM/yyyy HH:mm:ss" navigator="true" value="#{transactionLogBean.endDate}" />
<p:commandButton id="refreshBtnMain2" value="Refresh" action="#{transactionLogBean.refreshData}" update=":transactionLogForm:tabViewGrids:messageTable :transactionLogForm:tabViewGrids:timestatTable" ajax="true" />
</h:panelGrid>
</p:tab>
<p:tab id="liveViewTab" title="Live View">
<h:panelGrid id="liveViewPanel" columns="6" cellpadding="5">
<h:outputText value="Live View Enabled: " />
<p:selectBooleanCheckbox value="#{messageBean.liveViewActive}">
</p:selectBooleanCheckbox>
<h:outputText value="Interval: " />
<p:spinner id="interval" value="#{transactionLogBean.refreshInterval}" />
<h:outputText value="Last Update:" />
<h:outputText id="lastUpdated" value="#{transactionLogBean.lastUpdated}" />
</h:panelGrid>
</p:tab>
</p:tabView>
<p:tabView id="tabViewGrids">
<p:tab title="Message Logs">
<ui:include src="inc_messagelogs.xhtml" />
</p:tab>
<p:tab title="Timestat Logs">
<ui:include src="inc_timestatlogs.xhtml" />
</p:tab>
</p:tabView>
<p:dialog header="Log Message" widgetVar="logDialog" id="logDlg" showEffect="fade">
<h:outputText id="msg" value="#{transactionLogBean.selectedLogMessage}"/>
</p:dialog>
<p:dialog header="Transaction Search Results" widgetVar="txnDialog" resizable="false" id="tranDlg"
showEffect="fade" modal="false" position="center">
<p:dataTable id="transactionSearchTable" value="#{transactionBean.tranlogList}"
var="t" widgetVar="tranSearchTable" rowKey="#{t.transactionId}"
selectionMode="single" selection="#{transactionBean.selectedTranlog}"
paginator="true" rows="10" style="font-size:14px"
rowStyleClass="#{t.rowColour}">
<p:ajax event="rowSelect" update=":transactionLogForm:tabViewGrids:messageTable :transactionLogForm:tabViewGrids:timestatTable"
listener="#{transactionLogBean.refreshData(transactionBean.selectedTranlog.logId)}"
oncomplete="txnDialog.hide()" global="false"/>
<p:column style="text-align: left">
<f:facet name="header">
Tran Id
</f:facet>
#{t.transactionId}
</p:column>
<p:column style="text-align: left" sortBy="#{t.dateCreated}">
<f:facet name="header">
Date/Time
</f:facet>
#{t.dateCreated}
</p:column>
<p:column style="text-align: left" sortBy="#{t.transactionType}">
<f:facet name="header">
Tran Type
</f:facet>
#{t.transactionType}
</p:column>
<p:column style="text-align: left">
<f:facet name="header">
Amount
</f:facet>
#{t.amount}
</p:column>
<p:column style="text-align: left">
<f:facet name="header">
Result
</f:facet>
#{t.externalMessageCode}
</p:column>
</p:dataTable>
</p:dialog>
</p:layoutUnit>
</h:form>
</p:layout>
I'm not getting any errors reported, so all the references must be ok - please help!!!
I'm using JSF 2.0, Primefaces 3.4.RC1
Extract from generated html:
<div id="transactionLogForm:tabViewMain:liveViewTab" class="ui-tabs-panel ui-widget-content ui-corner-bottom ui-helper-hidden" role="tabpanel" aria-hidden="true"><table id="transactionLogForm:tabViewMain:liveViewPanel" cellpadding="5">
<tbody>
<tr>
<td>Live View Enabled: </td>
<td><div id="transactionLogForm:tabViewMain:j_idt27" class="ui-chkbox ui-widget"><div class="ui-helper-hidden-accessible"><input id="transactionLogForm:tabViewMain:j_idt27_input" name="transactionLogForm:tabViewMain:j_idt27_input" type="checkbox" /></div><div class="ui-chkbox-box ui-widget ui-corner-all ui-state-default"><span class="ui-chkbox-icon"></span></div></div><script id="transactionLogForm:tabViewMain:j_idt27_s" type="text/javascript">PrimeFaces.cw('SelectBooleanCheckbox','widget_transactionLogForm_tabViewMain_j_idt27',{id:'transactionLogForm:tabViewMain:j_idt27'});</script></td>
<td>Interval: </td>
<td><span id="transactionLogForm:tabViewMain:interval" class="ui-spinner ui-widget ui-corner-all"><input id="transactionLogForm:tabViewMain:interval_input" name="transactionLogForm:tabViewMain:interval_input" type="text" class="ui-spinner-input ui-inputfield ui-state-default ui-corner-all" autocomplete="off" value="10" /><a class="ui-spinner-button ui-spinner-up ui-corner-tr ui-button ui-widget ui-state-default ui-button-text-only"><span class="ui-button-text"><span class="ui-icon ui-icon-triangle-1-n"></span></span></a><a class="ui-spinner-button ui-spinner-down ui-corner-br ui-button ui-widget ui-state-default ui-button-text-only"><span class="ui-button-text"><span class="ui-icon ui-icon-triangle-1-s"></span></span></a></span><script id="transactionLogForm:tabViewMain:interval_s" type="text/javascript">$(function(){PrimeFaces.cw('Spinner','widget_transactionLogForm_tabViewMain_interval',{id:'transactionLogForm:tabViewMain:interval',step:1.0});});</script></td>
<td>Last Update:</td>
<td><span id="transactionLogForm:tabViewMain:lastUpdated"></span></td>
</tr>
</tbody>
</table>
</div>
Problem solved - it was a backing bean issue after all and had nothing to do with the poll itself which was working fine.

A component which is hidden by another JSF/primefaces

hello,
I'am using JSF/primefaces 2.0
My problem is that I can't see the button "Add User" in the page,I think the problem is caused by the balise p:fileUpload because when I delete it I can see the button!!
<table border="1" align="center" cellpadding="0" cellspacing="0" width="1000" heighth="1800">
<tr>
<td>
<h:form>
<table border="0" align="center" cellpadding="0" cellspacing="0" width="600">
<tr> <td> <h:outputLabel style="font-size: 13px" value="Nom" /> </td><td><h:inputText value="#{AddPerson.nom}" /></td></tr>
<tr><td> <h:outputLabel value="Files"/></td><td><p:fileUpload fileUploadListener="#{AddPerson.fileUpload}" update="messages" sizeLimit="500000" allowTypes="/(\.|\/)(gif|jpe?g|png)$/"/> </td></tr>
<tr><td> <h:commandButton action="#{AddPerson.addUserDB}" value="Add User" /> </td></tr>
</table>
</h:form>
</td>
</tr>
</table>
The whole code:
<body>
<table border="1" style='width:auto;height:100px;' align="center" cellpadding="0" cellspacing="0" >
<tr><td>
<table border="1" style='width:auto;height:100px;' align="center" cellpadding="0" cellspacing="0" >
<tr >
<td><h:graphicImage width="100" url="/ONST.jpg"/> </td>
<td >
<h:graphicImage width="900" url="/banner_home.jpg" />
</td>
</tr>
</table>
<br></br><br></br><br></br>
<table border="1" align="center" style='width:auto;height:100px;' cellpadding="0" cellspacing="0" >
<tr>
<td>
<h:form>
<table border="1" style='width:auto;height:100px;' align="center" cellpadding="1" cellspacing="1" >
<tr> <td> <h:outputLabel style="font-size: 13px" value="Nom" /> </td><td><h:inputText value="#{AddPerson.nom}" /></td></tr>
<tr> <td> <h:outputLabel value="Prenom"/></td><td> <h:inputText value="#{AddPerson.prenom}" /></td></tr>
<tr> <td> <h:outputLabel value="Etat Civil"/></td>
<td> <h:selectOneMenu id="etatcivil" value="#{AddPerson.etatCivil}">
<f:selectItem itemValue="Monsieur" itemLabel="M"/>
<f:selectItem itemValue="Madam" itemLabel="Mme"/>
<f:selectItem itemValue="Madmoiselle" itemLabel="Mlle"/>
</h:selectOneMenu>
</td></tr>
<tr>
<td><h:outputLabel value="Date de naissance "/> </td>
<td>
<h:selectOneMenu id="jour" value="#{AddPerson.jour}">
<f:selectItem itemValue="00" itemLabel=""/>
<f:selectItem itemValue="01" itemLabel="01"/> <f:selectItem itemValue="02" itemLabel="02"/><f:selectItem itemValue="03" itemLabel="03"/>
<f:selectItem itemValue="04" itemLabel="04"/><f:selectItem itemValue="05" itemLabel="05"/><f:selectItem itemValue="06" itemLabel="06"/>
<f:selectItem itemValue="07" itemLabel="07"/><f:selectItem itemValue="08" itemLabel="08"/><f:selectItem itemValue="09" itemLabel="09"/>
<f:selectItem itemValue="10" itemLabel="10"/><f:selectItem itemValue="11" itemLabel="11"/><f:selectItem itemValue="12" itemLabel="12"/>
<f:selectItem itemValue="13" itemLabel="13"/><f:selectItem itemValue="14" itemLabel="14"/><f:selectItem itemValue="15" itemLabel="15"/>
<f:selectItem itemValue="16" itemLabel="16"/><f:selectItem itemValue="17" itemLabel="17"/><f:selectItem itemValue="18" itemLabel="18"/>
<f:selectItem itemValue="19" itemLabel="19"/><f:selectItem itemValue="20" itemLabel="20"/><f:selectItem itemValue="21" itemLabel="21"/>
<f:selectItem itemValue="22" itemLabel="22"/><f:selectItem itemValue="23" itemLabel="23"/><f:selectItem itemValue="24" itemLabel="24"/>
<f:selectItem itemValue="25" itemLabel="25"/><f:selectItem itemValue="26" itemLabel="26"/><f:selectItem itemValue="27" itemLabel="27"/>
<f:selectItem itemValue="28" itemLabel="28"/><f:selectItem itemValue="29" itemLabel="29"/><f:selectItem itemValue="30" itemLabel="30"/>
<f:selectItem itemValue="31" itemLabel="31"/>
</h:selectOneMenu>
<h:selectOneMenu id="mois" value="#{AddPerson.mois}">
<f:selectItem itemValue="00" itemLabel=""/>
<f:selectItem itemValue="01" itemLabel="Janvier"/> <f:selectItem itemValue="02" itemLabel="Fevrier"/><f:selectItem itemValue="03" itemLabel="Mars"/>
<f:selectItem itemValue="04" itemLabel="Avril"/><f:selectItem itemValue="05" itemLabel="May"/><f:selectItem itemValue="06" itemLabel="Juin"/>
<f:selectItem itemValue="07" itemLabel="Juillet"/><f:selectItem itemValue="08" itemLabel="Aout"/><f:selectItem itemValue="09" itemLabel="Septembre"/>
<f:selectItem itemValue="10" itemLabel="Octobre"/><f:selectItem itemValue="11" itemLabel="Novembre"/><f:selectItem itemValue="12" itemLabel="Decembre"/>
</h:selectOneMenu>
<h:selectOneMenu id="annee" value="#{AddPerson.annee}" >
<f:selectItem itemValue="1940" itemLabel="1940"/> <f:selectItem itemValue="1941" itemLabel="1941"/><f:selectItem itemValue="1942" itemLabel="1942"/><f:selectItem itemValue="1943" itemLabel="1943"/><f:selectItem itemValue="1944" itemLabel="1944"/><f:selectItem itemValue="1945" itemLabel="1945"/><f:selectItem itemValue="1946" itemLabel="1946"/><f:selectItem itemValue="1947" itemLabel="1947"/><f:selectItem itemValue="1948" itemLabel="1948"/><f:selectItem itemValue="1949" itemLabel="1949"/>
<f:selectItem itemValue="1950" itemLabel="1950"/><f:selectItem itemValue="1951" itemLabel="1951"/><f:selectItem itemValue="1952" itemLabel="1952"/><f:selectItem itemValue="1953" itemLabel="1953"/><f:selectItem itemValue="1954" itemLabel="1954"/><f:selectItem itemValue="1955" itemLabel="1955"/><f:selectItem itemValue="1956" itemLabel="1956"/><f:selectItem itemValue="1957" itemLabel="1957"/><f:selectItem itemValue="1958" itemLabel="1958"/><f:selectItem itemValue="1959" itemLabel="1959"/>
<f:selectItem itemValue="1960" itemLabel="1960"/><f:selectItem itemValue="1961" itemLabel="1961"/><f:selectItem itemValue="1962" itemLabel="1962"/><f:selectItem itemValue="1963" itemLabel="1963"/><f:selectItem itemValue="1964" itemLabel="1964"/><f:selectItem itemValue="1965" itemLabel="1965"/><f:selectItem itemValue="1966" itemLabel="1966"/><f:selectItem itemValue="1967" itemLabel="1967"/><f:selectItem itemValue="1968" itemLabel="1968"/><f:selectItem itemValue="1969" itemLabel="1969"/>
<f:selectItem itemValue="1970" itemLabel="1970"/><f:selectItem itemValue="1971" itemLabel="1971"/><f:selectItem itemValue="1972" itemLabel="1972"/><f:selectItem itemValue="1973" itemLabel="1973"/><f:selectItem itemValue="1974" itemLabel="1974"/><f:selectItem itemValue="1975" itemLabel="1975"/><f:selectItem itemValue="1976" itemLabel="1976"/><f:selectItem itemValue="1977" itemLabel="1977"/><f:selectItem itemValue="1978" itemLabel="1978"/><f:selectItem itemValue="1979" itemLabel="1979"/>
<f:selectItem itemValue="1980" itemLabel="1980"/><f:selectItem itemValue="1981" itemLabel="1981"/><f:selectItem itemValue="1982" itemLabel="1982"/><f:selectItem itemValue="1983" itemLabel="1983"/><f:selectItem itemValue="1984" itemLabel="1984"/><f:selectItem itemValue="1985" itemLabel="1985"/><f:selectItem itemValue="1986" itemLabel="1986"/><f:selectItem itemValue="1987" itemLabel="1987"/><f:selectItem itemValue="1988" itemLabel="1988"/><f:selectItem itemValue="1989" itemLabel="1989"/>
<f:selectItem itemValue="1990" itemLabel="1990"/><f:selectItem itemValue="1991" itemLabel="1991"/><f:selectItem itemValue="1992" itemLabel="1992"/><f:selectItem itemValue="1993" itemLabel="1993"/><f:selectItem itemValue="1994" itemLabel="1994"/><f:selectItem itemValue="1995" itemLabel="1995"/><f:selectItem itemValue="1996" itemLabel="1996"/><f:selectItem itemValue="1997" itemLabel="1997"/><f:selectItem itemValue="1998" itemLabel="1998"/><f:selectItem itemValue="1999" itemLabel="1999"/>
<f:selectItem itemValue="2000" itemLabel="2000"/><f:selectItem itemValue="2001" itemLabel="2001"/><f:selectItem itemValue="2002" itemLabel="2002"/><f:selectItem itemValue="2003" itemLabel="2003"/><f:selectItem itemValue="2004" itemLabel="2004"/><f:selectItem itemValue="2005" itemLabel="2005"/><f:selectItem itemValue="2006" itemLabel="2006"/><f:selectItem itemValue="2007" itemLabel="2007"/><f:selectItem itemValue="2008" itemLabel="2008"/><f:selectItem itemValue="2009" itemLabel="2009"/>
<f:selectItem itemValue="2010" itemLabel="2010"/><f:selectItem itemValue="2011" itemLabel="2011"/><f:selectItem itemValue="2012" itemLabel="2012"/>
</h:selectOneMenu>
</td>
</tr>
<tr><td><h:outputLabel value="email"/></td><td><h:inputText value="#{AddPerson.email}" /></td></tr>
<tr><td> <h:outputLabel value="numTelephone"/></td><td><h:inputText value="#{AddPerson.numTelephone}" /></td></tr>
<tr> <td> <h:outputLabel value="mobile"/></td><td><h:inputText value="#{AddPerson.mobile}" /></td></tr>
<tr><td> <h:outputLabel value="fax"/></td><td><h:inputText value="#{AddPerson.fax}" /></td></tr>
<tr><td> <h:outputLabel value="profession"/></td><td><h:inputText value="#{AddPerson.profession}" /></td></tr>
<tr><td> <h:outputLabel value="adresse"/></td><td><h:inputText value="#{AddPerson.adresse}" /></td></tr>
<tr><td> <h:outputLabel value="code Postal"/></td><td><h:inputText value="#{AddPerson.codePostal}" /></td></tr>
<tr><td> <h:outputLabel value="Ville"/></td><td><h:inputText value="#{AddPerson.ville}" /></td></tr>
<tr><td> <h:outputLabel value="Pays"/></td><td><h:inputText value="#{AddPerson.pays}" /></td></tr>
<tr><td> <h:outputLabel value="Domaine de Competence"/></td>
<td> <h:selectOneMenu value="#{AddPerson.domain}" id="domaine" >
<f:selectItem itemLabel="-- Select Domaine de Competence-- " itemValue="0"/>
<f:selectItems value="#{AddPerson.listDomaine}" />
</h:selectOneMenu></td></tr>
<tr><td><h:outputLabel value="login"/></td><td><h:inputText value="#{AddPerson.login}" /></td></tr>
<tr><td> <h:outputLabel value="password"/></td><td><h:inputText value="#{AddPerson.password}" /></td></tr>
<tr><td> <h:outputLabel value="Files"/></td> <td> <h:panelGroup style="display:inline-block"> <p:fileUpload fileUploadListener="#{AddPerson.fileUpload}" update="messages" sizeLimit="500000" allowTypes="/(\.|\/)(gif|jpe?g|png)$/" /></h:panelGroup></td></tr>
<tr><td> </td><td> <h:commandButton type="submit" value="Add User" action="#{AddPerson.addUserDB}" /> </td></tr>
</table>
</h:form>
</td>
</tr>
</table>
</td></tr></table>
</body>
Sorry, but I cannot reproduce your problem.
This is how your given code looks in FF 11 (and similar in IE9 and Chrome 18):
Maybe you have a stylesheet included somewhere else on your page that hides the button somehow..

Resources