5 Replies Latest reply on May 18, 2010 4:25 AM by satyakatti

    Hello All, Needed help in wrapping text in ExtendedDataTable.

    satyakatti

      I am using 3.3.3 version of richfaces and also css looks like as below:

       

                       <rich:column  sortable="false" width="140px" label="Description">
                              <f:facet name="header">
                                  <h:outputText value="Description" />
                              </f:facet>
                              <h:outputText value="#{measurementStepAttr.description}" />
                              <rich:toolTip followMouse="true" direction="top-right" showDelay="300" styleClass="tooltip">
                                  <span style="white-space:nowrap">
                                      #{measurementStepAttr.description}
                                  </span>
                              </rich:toolTip>
                          </rich:column>

       

           .extdt-cell-div {
                -moz-box-sizing:border-box;
                cursor:default;
                font-weight:normal;
                overflow:hidden;
                white-space:normal;
                width:100%;
           }

        • 1. Re: Hello All, Needed help in wrapping text in ExtendedDataTable.
          satyakatti

          I am using "richfaces 3.3.3 final"  and the jars are:

               1. richfaces-api-3.3.3.Final.jar

               2. richfaces-impl-3.3.3.Final.jar

               3. richfaces-impl-jsf2-3.3.3.Final.jar

               4. richfaces-ui-3.3.3.Final.jar

           

          Code looks as shown below:

           

          If there is no width attribute specified for extendedDataTable then table wouldnt appear. Width attribute of the rich:column is not specified.

           

               <rich:panel id="measurementTablePanel" style="float: left">

                  <h:form>

                          <rich:extendedDataTable id="table" width="860px"

                          value="#{testMeasurementBean.measurementSteps}"

                          selection="#{testMeasurementBean.selection}"

                          var="measurementStepAttr"

                          sortMode="single"

                          selectionMode="single" >

           

                              <rich:column sortable="false"  label="Name">

                                  <f:facet name="header">

                                      <h:outputText value="Name" />

                                  </f:facet>

                                  <h:outputText value="#{measurementStepAttr.name}" />

                                  <rich:toolTip followMouse="true" direction="top-right" showDelay="300" styleClass="tooltip">

                                      <span style="white-space:nowrap">

                                          #{measurementStepAttr.name}

                                      </span>

                                  </rich:toolTip>

                              </rich:column>

           

                              <rich:column sortable="false"  label="Description">

                                  <f:facet name="header">

                                      <h:outputText value="Description" />

                                  </f:facet>

                                  <h:outputText value="#{measurementStepAttr.description}" />

                                  <rich:toolTip followMouse="true" direction="top-right" showDelay="300" styleClass="tooltip">

                                      <span style="white-space:nowrap">

                                          #{measurementStepAttr.description}

                                      </span>

                                  </rich:toolTip>

                              </rich:column>

           

                                   |

                                   |

                                   |

                                   |

           

                              <rich:column sortable="false"  label="Delete">

                                  <f:facet name="header">

                                      <h:outputText value="Delete" />

                                  </f:facet>

           

                                  <a4j:commandLink reRender="table, measurementPartPanel" >

                                      <h:graphicImage value="/img/iconDelete.gif" id="deleteIcon" />

                                      <f:param name="measurementId" value="#{measurementStepAttr.id}"/>

                                      <rich:componentControl for="measDeleteConfirm" attachTo="deleteIcon" operation="show" event="onclick"/>

                                  </a4j:commandLink>

           

                                  <rich:toolTip followMouse="true" direction="top-left" showDelay="300" styleClass="tooltip">

                                      <span style="white-space:nowrap">

                                          #{measurementStepAttr.name}

                                      </span>

                                  </rich:toolTip>

                              </rich:column>

           

                              <a4j:support event="onclick"

                              reRender="measurementPartPanel" requestDelay="400"

                              action="#{testMeasurementBean.takeSelection}" ajaxSingle="true" />

                           </rich:extendedDataTable>

                  </h:form>

                  </rich:panel>

           

          Appreciate any kind of help on this topic.

           

          Thanks and Best regards in advance,

          Satya

          • 2. Re: Hello All, Needed help in wrapping text in ExtendedDataTable.
            ilya_shaikovsky

            1) maybe not relates to the issue but could cause problems in general -

            I am using "richfaces 3.3.3 final"  and the jars are:

                 1. richfaces-api-3.3.3.Final.jar

                 2. richfaces-impl-3.3.3.Final.jar

                 3. richfaces-impl-jsf2-3.3.3.Final.jar

                 4. richfaces-ui-3.3.3.Final.jar

             

            only one impl jar should be included depending on JSF used.

             

            please remove your extdt-cell-div class redefinition and change span to div with just specifying size and overflow.

            • 3. Re: Hello All, Needed help in wrapping text in ExtendedDataTable.
              satyakatti

              Hello,

               

              I am using jsf 1.2 and used richfaces-impl-3.3.3.Final.jar and that still did not work for me.

               

              The generated code seems to be fine if i inspect via firebug and seems that colgroup is applied with correct style.

               

              But the cells are extended based on the content of the cell.

               

              Any other suggestions that I can try? or is it the default behaviour of extendedDataTable in richfaces 3.3.3 version?

               

              Regards,
              Satya

              • 4. Re: Hello All, Needed help in wrapping text in ExtendedDataTable.
                ilya_shaikovsky

                what about this suggestion ? have you tried?

                 

                please remove your extdt-cell-div class redefinition and change span to div with just specifying size and overflow.
                • 5. Re: Hello All, Needed help in wrapping text in ExtendedDataTable.
                  satyakatti

                  Yes, Yes, I tried that option too but no success.

                   

                  For the moment I tried with richfaces 3.3.0 and that works fine. Now I am guessing if it is problem with the 3.3.3 version of richfaces.

                   

                  The link can be refered: https://jira.jboss.org/browse/RF-5732