Well Ive been developing a JSF interface, and using primefaces have managed to create two datatables which pull data from an SAP / oracle ondemand crm system. However all is not going so smooth, Im having trouble with the datatable in a number of area's.
I cannot seem to assign command buttons with unique ID's if I add them within a column in the datatable (cant use rowindexvar as it cannot be used for processing). Basically I need to set two buttons insert & Update as invisible until a row is selected in the second datatable in which time the button for the related table in the above datatable is then enabled and becomes clickable.
I cannot seem to get the highlight color of the rowselect to change its colour, it maintains a weird yellow indentation color, which isnt strong enough to really let the user know they have selected the row.
When I zoom in on the datatable, the columns overflow out of the datatable, (due to the number of columns) and i really really cannot find a work around.
All of these problems ive searched extensively to no avail so Im hoping that some1 here maybe even "Cagatay Civici" can try help me in some regard, I would really really appreciate the help.
Heres my XHTML
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:p="http://primefaces.prime.com.tr/ui"
xmlns:f="http://java.sun.com/jsf/core">
<h:head>
<p:themeSwitcher initialText="Change Skin" buttonPreText="Skin: "/>
<title>Elpone Facelet</title>
<style type="text/css">
td{ font-family:sans-serif; font-size: 10px;}
h{ font-family:sans-serif; font-size: 10px; font-weight: bold;}
body{background-color: grey;}
#bannerImage{width:100%; height:160px;}
.ui-datatable .ui-state-highlight {
background-color:#83AAB4;}
#buttonPanel{visibility:hidden;}
</style>
</h:head>
<h:body >
<div id="bannerContainer">
<h:graphicImage id="bannerImage" alt="ban_eloma" url="/resources/Eloma_banner1.jpg"/>
</div>
<h:form>
<p:panel header="SAP Accounts" id="sapPanel">
<p:growl id="growl" showDetail="true" />
<p:dataTable style="width:101%;"
scrollable="false"
rowIndexVar="rowID"
id="debTable"
var="debitors"
value="#{tableBean.deblst}"
paginator="true"
rows="8"
selection="#{tableBean.selectedRec}"
rowSelectListener="#{tableBean.onRowSelect}"
update="debAccTable"
selectionMode="single"
paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
rowsPerPageTemplate="8,15,20"
>
<p:column>
<f:facet name="header">
<h:outputText value="Kunnr" />
</f:facet>
<h:outputText value="#{debitors.debitorPK.kunnr}"/>
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="SAP gelöscht"/>
</f:facet>
<h:outputText value="#{debitors.loevm}"/>
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="Name1"/>
</f:facet>
<h:outputText value="#{debitors.name1}"/>
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="Name2"/>
</f:facet>
<h:outputText value="#{debitors.name2}"/>
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="Name3"/>
</f:facet>
<h:outputText value="#{debitors.name3}"/>
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="#{bundle.ListDebitorTitle_ort01}"/>
</f:facet>
<h:outputText value="#{debitors.ort01}"/>
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="#{bundle.ListDebitorTitle_pstlz}"/>
</f:facet>
<h:outputText value="#{debitors.pstlz}"/>
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="#{bundle.ListDebitorTitle_smtpaddr}"/>
</f:facet>
<h:outputText value="#{debitors.smtpaddr}"/>
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="#{bundle.ListDebitorTitle_stras}"/>
</f:facet>
<h:outputText value="#{debitors.stras}"/>
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="#{bundle.ListDebitorTitle_land1}"/>
</f:facet>
<h:outputText value="#{debitors.land1.country}"/>
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="#{bundle.ListDebitorTitle_telf1}"/>
</f:facet>
<h:outputText value="#{debitors.telf1}"/>
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="#{bundle.ListDebitorTitle_telfx}"/>
</f:facet>
<h:outputText value="#{debitors.telfx}"/>
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="Hauptzielgruppe"/>
</f:facet>
<h:outputText value="#{debitors.brsch.maintarget}"/>
</p:column>
<p:column >
<f:facet name="header">
<h:outputText value="Unterzielgruppe"/>
</f:facet>
<h:outputText value="#{debitors.brsch.subtarget}"/>
</p:column>
<p:column>
<h:panelGrid columns="2" styleClass="actions" id="buttonPanel">
<p:commandButton id="insertbutton" update=":form:display" value="Insert" title="Insert">
</p:commandButton>
<p:commandButton disabled="#{tableBean.isButtonDisabled}" id="var22" update=":form:display" value="Update" title="Update">
</p:commandButton>
</h:panelGrid>
</p:column>
</p:dataTable>
</p:panel>
<div style="background-color:#D01C2E; width:100%; height:12px;"></div>
<p:panel header="Related Accounts">
<p:dataTable id="debAccTable"
var="debAcc"
rows="5"
paginator="true"
update="debTable"
value="#{tableBean.debAcclst}"
selection="#{tableBean.selectedAccRec}"
rowSelectListener="#{tableBean.onDecAccSelect}"
selectionMode="single"
paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
rowsPerPageTemplate="3,5,10"
>
<p:column selectionMode="single">
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="#{bundle.ListDebAccTitle_id_row_id}"/>
</f:facet>
<h:outputText value="#{debAcc.id.row_id}"/>
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="#{bundle.ListDebAccTitle_accountname}"/>
</f:facet>
<h:outputText value="#{debAcc.accountname}"/>
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="#{bundle.ListDebAccTitle_streetaddress}"/>
</f:facet>
<h:outputText value="#{debAcc.streetaddress}"/>
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="#{bundle.ListDebAccTitle_odkundennummer}"/>
</f:facet>
<h:outputText value="#{debAcc.odkundennummer}"/>
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="#{bundle.ListDebAccTitle_plz}"/>
</f:facet>
<h:outputText value="#{debAcc.plz}"/>
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="#{bundle.ListDebAccTitle_city}"/>
</f:facet>
<h:outputText value="#{debAcc.city}"/>
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="#{bundle.ListDebAccTitle_name2}"/>
</f:facet>
<h:outputText value="#{debAcc.name2}"/>
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="#{bundle.ListDebAccTitle_name3}"/>
</f:facet>
<h:outputText value="#{debAcc.name3}"/>
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="#{bundle.ListDebAccTitle_hauptzielgruppe}"/>
</f:facet>
<h:outputText value="#{debAcc.hauptzielgruppe}"/>
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="#{bundle.ListDebAccTitle_unterzielgruppe}"/>
</f:facet>
<h:outputText value="#{debAcc.unterzielgruppe}"/>
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="#{bundle.ListDebAccTitle_email}"/>
</f:facet>
<h:outputText value="#{debAcc.email}"/>
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="#{bundle.ListDebAccTitle_tel}"/>
</f:facet>
<h:outputText value="#{debAcc.tel}"/>
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="#{bundle.ListDebAccTitle_saploeschen}"/>
</f:facet>
<h:outputText value="#{debAcc.saploeschen}"/>
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="#{bundle.ListDebAccTitle_fax}"/>
</f:facet>
<h:outputText value="#{debAcc.fax}"/>
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="#{bundle.ListDebAccTitle_deb}"/>
</f:facet>
<h:outputText value="#{debAcc.deb}"/>
</p:column>
</p:dataTable>
</p:panel>
</h:form>
</h:body>
</html>
I dont think you will need the Tablebean as the logic behind everything is working fine its just display problems and XHTML properties. However if required i will provide. Also take note that in the XHTML im currently messing around with a lot of things so there may be some redundant stuff in there.