3 Replies Latest reply on Sep 24, 2010 8:08 AM by Konstantin Mishin

    Richface: extendedDataTable split text

    snax92 Newbie

      Hi,

       

       

      i've a little problem with extendedDataTable.

       

      How can i split the text when it's too long. As example the table has width=100px and when the text is too long the it should split the text like in rich:DataTable.

       

       

      Thanks you.

       

      snax92

        • 1. Re: Richface: extendedDataTable split text
          Siva P Master

          can you show your code plz?

          • 2. Re: Richface: extendedDataTable split text
            snax92 Newbie

            CODE:

            -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

             

            <a4j:region renderRegionOnly="true">
                        <h:form id="form">
                       
                                <rich:extendedDataTable id="data_table_log"  value="#{log_Backing.allLogEntries}" var="entry" width="100%" height="320px" sortMode="single" selectionMode="none" rows="10" rowKeyVar="rkvar" reRender="scroll_log" style="white-space: pre;">
                                <!-- Date -->
                                <rich:column id="col_date" width="150px" headerClass="col-header" label="Date" sortable="true" sortBy="#{entry.logDate}" sortIconAscending="dataTableAscIcon" sortIconDescending="dataTableDescIcon">
                                    <f:facet name="header">
                                        <h:outputText value="#{lbls.label_logDate}" id="header_logDate" />
                                    </f:facet>
                                    <h:outputText value="#{entry.logDate}" id="log_date" >
                                        <f:convertDateTime pattern="#{lbls.date_pattern}" timeZone="#{log_Backing.timeZone}" />
                                    </h:outputText>
                                </rich:column>
                                <!-- Severity -->
                                <rich:column id="col_severity" width="100" headerClass="col-header" label="Severity" filterExpression="#{fn:containsIgnoreCase(entry.severity, log_Backing.filterSeverity)}" breakfor="true">
                                    <f:facet name="header">
                                        <h:outputText value="#{lbls.label_logSeverity}" id="header_logSeverity" />
                                    </f:facet>
                                    <f:facet name="filterValueInput">
                                            <h:selectOneMenu value="#{log_Backing.filterSeverity}" id="selectOne_severity" style="width:70">         
                                            <f:selectItems value="#{log_Backing.filterSeveritys}" />
                                            <a4j:support limitToList="true" event="onchange" reRender="data_table_log,scroll_log"></a4j:support>
                                        </h:selectOneMenu>
                                    </f:facet>
                                    <h:outputText value="#{entry.severity}" id="log_severity" />
                                </rich:column>
                                <!-- Source -->
                                <rich:column id="col_source" width="150" headerClass="col-header"  label="Source" filterBy="#{entry.source}" filterEvent="onblur">
                                    <f:facet name="header">
                                        <h:outputText value="#{lbls.label_logSource}" id="header_logSource" />
                                    </f:facet>
                                    <h:outputText value="#{entry.source}" id="log_source" />
                                </rich:column>
                                <!-- Messages -->
                                <rich:column id="col_messages" width="800" headerClass="col-header" label="Messages" sortable="false">
                                    <f:facet name="header">
                                        <h:outputText value="#{lbls.label_logMessage}" id="header_logMessage" />
                                    </f:facet>
                                    <h:outputText value="#{entry.message}" id="log_message" />
                                </rich:column>
                                <f:facet name="footer">
                                <rich:datascroller align="center" for="data_table_log" id="scroll_log" />
                            </f:facet>
                            </rich:extendedDataTable>               
                            </h:form>
                         </a4j:region>
            -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

             

            Look like picture below when i run it on server:

            extendedDataTable_2.PNG

            • 3. Re: Richface: extendedDataTable split text
              Konstantin Mishin Novice

              Try to use next CSS code:

              .extdt-cell-div {

                   white-space: normal;

              }