7 Replies Latest reply: Nov 21, 2003 5:40 PM by 55663 RSS

    10g TableLayout no height?

    4996
      If, as the documentation says, <tableLayout> "is a thin wrapper around the HTML<table> element", why doesn't it have a 'height' attribute? I gave up on getting it to work how I wanted using <spacer> as I saw in the examples, and just replaced my attempts to use <tableLayout> and <rowLayout> with <html:table>, <html:tr>, and <html:td>. What could I do with <tableLayout> that I can't do with <html:table>? That is, what would make it worth trying to figure out how to get along without a 'height' attribute?
        • 1. Re: 10g TableLayout no height?
          4996
          I hope that didn't come off as rude. I was a little frustrated when I wrote it, but I do actually presume that someone writing a wrapper for the HTML <table> tag must have had a reason for not including the height attribute, and I'm wondering what it was?
          • 2. Re: 10g TableLayout no height?
            55663
            Maybe I am misunderstanding but an html table doesn't
            have a height attribute:
            http://www.w3.org/TR/html401/struct/tables.html

            The th and td elements do have height but it is marked
            as deprecated. The cellFormat UIX tag which I believe
            is the equivalent has the height attribute.
            • 3. Re: 10g TableLayout no height?
              4996
              Strange... Maybe it's one of those things that's not in the standard but that enough people use so the browsers support it anyway? Both IE and Mozilla definitely respect the presence of a height attribute on table and render the table accordingly.
              • 4. Re: 10g TableLayout no height?
                55663
                UIX supports only the standards and tries to avoid adding
                extra attributes that only certain browsers respect so
                I guess your out of luck here. If you use the HTML
                editor in JDev you'll also notice that there is no height
                attribute on table either...
                • 5. Re: 10g TableLayout no height?
                  4996
                  I generally use HomeSite, which does have the height attribute in the properties sheet for table. But, let's go with the standards thing and see how we can do this with the tableLayout tags. If I try the following, neither renders to the full height of the browser window:
                  <table width="100%" border=1 >
                       <tr>
                            <td width="100%" height="100%">
                            </td>
                       </tr>
                  </table>
                  
                  <tableLayout borderWidth="1" width="100%" >
                      <contents>
                          <rowLayout>
                              <contents>
                                  <cellFormat width="100%" height="100%">
                                      <contents>
                          
                                      </contents>
                                  </cellFormat>
                              </contents>
                          </rowLayout>
                      </contents>
                  </tableLayout>
                  In the HTML sample, I can use the non-standard height attribute on the table tag to make this fill the browser both horizontally and vertically. How do I do this with tableLayout -- or, for that matter, in HTML without using the table height attribute?
                  • 6. Re: 10g TableLayout no height?
                    55663
                    I was about to give up and tell you this wasn't possible
                    but if you use the code editor and you stick a height
                    attribute on the tableLayout manually it seems like UIX
                    is passing this attribute to the HTML and it is used
                    by the browser. So if you don't care about using a non
                    standard attribute that might not work on all browsers
                    you can try that.
                    • 7. Re: 10g TableLayout no height?
                      55663
                      I was about to give up and tell you this wasn't possible
                      but if you use the code editor and you stick a height
                      attribute on the tableLayout manually it seems like UIX
                      is passing this attribute to the HTML and it is used
                      by the browser. So if you don't care about using a non
                      standard attribute that might not work on all browsers
                      you can try that.