3 Replies Latest reply on Nov 5, 2009 4:34 PM by Roland Roberts

    rich:column width ignored?

    Roland Roberts Newbie

      I'm trying to set the width on my columns in a rich dataTable. First, I can't figure out what units to use, although I've tried both nothing, e.g., width="150" and pixels, width="150px" but neither seems to have any effect. I'd really like to use character count, something like width="150em", but that doesn't seem to work either. Here's my table without any widths specified. Is there something else in here that prevents the width from working on the rich:column elements?

      <!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:f="http://java.sun.com/jsf/core"
       xmlns:ui="http://java.sun.com/jsf/facelets"
       xmlns:fn="http://java.sun.com/jsp/jstl/functions"
       xmlns:a4j="http://richfaces.org/a4j"
       xmlns:rich="http://richfaces.org/rich">
      
      <ui:composition template="/WEB-INF/templates/common.xhtml">
       <ui:define name="pageTitle">FVIS 4.x Rich Security Listings</ui:define>
       <ui:define name="pageHead">FVIS 4.x Rich Security Listings</ui:define>
       <ui:define name="pageMenu">FVIS 4.x Rich Security Menu</ui:define>
       <ui:define name="pageBody">
       <h:form>
       <rich:dataTable sortMode="single"
       value="#{securityBean.securityList}" var="sec">
       <rich:column width="300px" sortBy="#{sec.identifierTypeCode}"
       filterBy="#{sec.identifierTypeCode}" filterEvent="onkeyup">
       <f:facet name="header">Type</f:facet>
       <h:outputText value="#{sec.identifierTypeCode}" />
       </rich:column>
       <rich:column sortBy="#{sec.primaryIdentifier}"
       filterBy="#{sec.primaryIdentifier}" filterEvent="onkeyup">
       <f:facet name="header">Identifier</f:facet>
       <h:outputText value="#{sec.primaryIdentifier}" />
       </rich:column>
       <rich:column sortBy="#{sec.live}" filterBy="#{sec.live}"
       filterEvent="onkeyup">
       <f:facet name="header">Live?</f:facet>
       <h:outputText value="#{sec.live}" />
       </rich:column>
       <rich:column sortBy="#{sec.securityTypeCode}"
       filterBy="#{sec.securityTypeCode}" filterEvent="onkeyup">
       <f:facet name="header">Type</f:facet>
       <h:outputText value="#{sec.securityTypeCode}" />
       </rich:column>
       <rich:column sortBy="#{sec.securityName}"
       filterBy="#{sec.securityName}" filterEvent="onkeyup">
       <f:facet name="header">Name</f:facet>
       <h:outputText value="#{sec.securityName}" />
       </rich:column>
       <rich:column sortBy="#{sec.issuerName}" filterBy="#{sec.issuerName}"
       filterEvent="onkeyup">
       <f:facet name="header">Issuer</f:facet>
       <h:outputText value="#{sec.issuerName}" />
       </rich:column>
       <rich:column sortBy="#{sec.exchangeCode}"
       filterBy="#{sec.exchangeCode}" filterEvent="onkeyup">
       <f:facet name="header">Exchange</f:facet>
       <h:outputText value="#{sec.exchangeCode}" />
       </rich:column>
       <rich:column sortBy="#{sec.micCode}" filterBy="#{sec.micCode}"
       filterEvent="onkeyup">
       <f:facet name="header">MIC</f:facet>
       <h:outputText value="#{sec.micCode}" />
       </rich:column>
       <rich:column sortBy="#{sec.defaultSectorCode}"
       filterBy="#{sec.defaultSectorCode}" filterEvent="onkeyup">
       <f:facet name="header">Sector</f:facet>
       <h:outputText value="#{sec.defaultSectorCode}" />
       </rich:column>
       <rich:column sortBy="#{sec.defaultGdrSecurityId}"
       filterBy="#{sec.defaultGdrSecurityId}" filterEvent="onkeyup">
       <f:facet name="header">GDR</f:facet>
       <h:outputText value="#{sec.defaultGdrSecurityId}" />
       </rich:column>
       <rich:column sortBy="#{sec.sharesOutstanding}"
       filterBy="#{sec.sharesOutstanding}" filterEvent="onkeyup">
       <f:facet name="header">Shares</f:facet>
       <h:outputText value="#{sec.sharesOutstanding}" />
       </rich:column>
       <rich:column sortBy="#{sec.lastPriceTime}"
       filterBy="#{sec.lastPriceTime}" filterEvent="onkeyup">
       <f:facet name="header">LPT</f:facet>
       <h:outputText value="#{sec.lastPriceTime}" />
       </rich:column>
       <rich:column sortBy="#{sec.pricesLastModifiedTime}"
       filterBy="#{sec.pricesLastModifiedTime}" filterEvent="onkeyup">
       <f:facet name="header">PLMT</f:facet>
       <h:outputText value="#{sec.pricesLastModifiedTime}" />
       </rich:column>
       <rich:column sortBy="#{sec.pricesLastValidatedTime}"
       filterBy="#{sec.pricesLastValidatedTime}" filterEvent="onkeyup">
       <f:facet name="header">PLVT</f:facet>
       <h:outputText value="#{sec.pricesLastValidatedTime}" />
       </rich:column>
       <rich:column sortBy="#{sec.activeOn}" filterBy="#{sec.activeOn}"
       filterEvent="onkeyup">
       <f:facet name="header">Activated</f:facet>
       <h:outputText value="#{sec.activeOn}" />
       </rich:column>
       <rich:column sortBy="#{sec.activeUntil}"
       filterBy="#{sec.activeUntil}" filterEvent="onkeyup">
       <f:facet name="header">Deactivated</f:facet>
       <h:outputText value="#{sec.activeUntil}" />
       </rich:column>
       </rich:dataTable>
       </h:form>
       </ui:define>
       <ui:define name="pageFoot">FVIS 4.x Rich Security Listings</ui:define>
      </ui:composition>
      
      </html>