6 Replies Latest reply on Jan 25, 2011 6:36 AM by ppitonak

    rich:dataTable style not applied ? - 4.0.0 M5

    jerarckill

      Hello,

       

      I am making use of a <rich:dataTable> in the form below in my application.

       

      <rich:dataTable var="currentEvent"

                  rendered="#{!empty multiCriteriaSearchBean.results}"

                  value="#{multiCriteriaSearchBean.results}" style="width: 100%;">

               

                // Definition of column and column headers here.  All works fine


      </rich:dataTable>

       

      The inline style I am passing to the table does not make it to the final page in the <table> tag but inside it, in the <tbody> tag only.  Under firefox, this does not make my table fit to the width of the available space.

       

      Is it still possible to pass a style to the table element itself?

       

      Thank you for your help,

        • 1. rich:dataTable style not applied ? - 4.0.0 M5
          ilya40umov

          Hi,

          rich:dataTable has width attribute so that you don't need to pass it with css.

          • 2. rich:dataTable style not applied ? - 4.0.0 M5
            jerarckill

            Tested 4.0.0 M5) and not working either.

            What I have tested that works is adding a styleClass attribute, with an inline style defined jsut above (like the examples do in the showcase).

             

            <style>

                     .fullSize{

                            width: 100%;

                        }

                    </style>

             

                    <rich:dataTable var="currentEvent"

                        rendered="#{!empty multiCriteriaSearchBean.results}"

                        value="#{multiCriteriaSearchBean.results}" styleClass="fullSize">

             

                 /// Some code for column definitions

            </rich:dataTable>         

             

             

            What is curious is that the styleClass attribute will apply the style to the Table generated whereas the style attribute applies it to the tbody only.

            Also, checking the "rich.taglib.xml" file for M5, I didn't find any attribute definition for style and width.  Is there some trick here to see all the possible attributes available?

             

            Thank you for your help again!

            • 3. rich:dataTable style not applied ? - 4.0.0 M5
              ilya_shaikovsky

              please try with latest snapshot. We fixed issues with classes and styles applied in the end of previous week.

              • 4. rich:dataTable style not applied ? - 4.0.0 M5
                ilya40umov

                Hm. Actually I thought that this attribute should be present because it always worked in RF 3.x_x. So I think that RF team will answer you better on this question. =)

                • 5. rich:dataTable style not applied ? - 4.0.0 M5
                  jerarckill

                  Tried the latest snapshot but it does not perform correctly: seems like my ajax events are not sent correctly (Partial page rerendering does not work where it was working with M5). 

                  By the way, in order to have JBoss start with the latest snapshot, I had to add a new dependency to the pack: javax.validation.validation-api : 1.0.0.GA

                   

                  Anyway, a different matter then.  I'll just stick to the M5 with the "styleClass" alternative for now.

                  • 6. rich:dataTable style not applied ? - 4.0.0 M5
                    ppitonak

                    Hi,

                     

                    I've just verified that attribute style doesn't work in snapshot. I reported the issue in Jira https://issues.jboss.org/browse/RF-10290. It will be fixed asap.

                     

                    Regards,

                    Palo