Fix column hx:columnEx in hx:dataTableEx of JSF

In this case tried a lot of things but this is possible just by using properties of CSS !

In Jsp :: var portletNamespace = '<portlet:namespace/>';


<h:panelGroup id="panelGroupId" layout="block" style="overflow: scroll; width:1020px;" rendered="#{not empty bean.instrumentList}">
<hx:dataTableEx border="0" cellpadding="0" cellspacing="0" rendered="true"
    columnClasses="columnClass1" headerClass="headerClass"
    footerClass="footerClass" rowClasses="rowClass1, rowClass2"
    styleClass="dataTableEx" id="tableEx1"
    value="#{bean.instrumentList}" var="dataItem"
    cellpadding="2"    cellspacing="0" width="100%">

<hx:columnEx id="columnEx12"                               
nowrap="true" align="center" width="80" style="background-color:#ede4da;POSITION:relative;
LEFT:expression(document.getElementById('view'+portletNamespace+':formName:panelGroupId').scrollLeft-1);Z-INDEX:1">

    <f:facet name="header">
        <h:outputText id="text1" styleClass="outputText" value="Field1"></h:outputText>
    </f:facet>
    <h:outputText style="border:none;" value="#{varInstrument.name}"/>
</hx:columnEx>

</hx:dataTableEx>
</h:panelGroup>

0 comments: