JEditorPane: HTML Table: Wrong cells height calculation

<table>
    <tr>
        �<td width="200" height="5" bgcolor="red"><td>
    </tr>
    <tr>
        <td width="200" height="5" bgcolor="green"><td>
    </tr>
    <tr>
        <td width="200" height="5" bgcolor="blue"><td>
    </tr>
</table>
Just for last row I get the specified height "5", and two first ones have height "19". It is true for any height that less than 19. Is it a bug? How I can handle this and get the right behavior?

Hi Ruben,
you will have to implement adjustment of table cells yourself to achieve this. With the existing way JEditorPane et. al. render tables table cells always are sized either in default sizes or by attributes explicitly giving the size (such as attribute WIDTH).
Ulrich

Similar Messages

  • JEditorPane, html, tables and images

    I am trying to use jEditorPane to display an HTML document. If images are included into cells of a table, the width and height of the cells do not adjust to the size of the images (as it happens with common web browsers), no matter what parameters I use for TD and IMG tags.
    Do you experience the same problem? Is there a solution?
    Thanks.
    Ruben Razquin

    Hi Ruben,
    you will have to implement adjustment of table cells yourself to achieve this. With the existing way JEditorPane et. al. render tables table cells always are sized either in default sizes or by attributes explicitly giving the size (such as attribute WIDTH).
    Ulrich

  • JEditorPane Html Table Lines

    It seems if I load html containing tables into a JEditorPane, the format is less than great. The main problem I have is that none of the table lines show up. I was wondering if there was an option or something I'm overlooking, that would solve this problem. JEditorPane.showTheLinesSeperatingRowsAndColumnsInHtmlTables(true) for instance would be great.
    Thanks

    if the HTML source produces line, JEditorPane should shouw them as long as HTML 3.2 is used.
    Ulrich

  • Do you need to generate HTML table rows from XML in InDesign?

    General issue: you export XML and you get a bunch of content for xml elements that were a table in inDesign. But they don't have any rows, just cell after cell. What will make rows in your output?
    Solution: XSLT; you need to use the @aid:tcols attribute of exported XML to determine the number of columns that your table should be. This is written in XSLT 1.1 so it shoud work with an export from InDesign. If you have problems with using it on export of XML, try using it on the XML afetr it has been exported, in Oxygen or other XSLT processor. Best to save acopy of your files before using the XSLT with them.  Copy all of the plain text and past into a new file, save with your own filename, ending with .xsl file extension. Then when exporting XML from InDesign CS3-5, browse to your new .xsl file and select it. PLEASE read about XSLT files at w3c.schools or other resource if you want to understand what is going on with this file.
    BTW <!-- indicates comments in code -->
    <?xml version="1.0" encoding="UTF-8"?>
    <!-- NO WARRANTY that this example code will work as written for your XML file in InDesign. You can add more templates to the output to map your heading styles to h1, h2, etc. -->
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.1"
        xmlns:aid="http://ns.adobe.com/AdobeInDesign/4.0/"
        xmlns:aid5="http://ns.adobe.com/AdobeInDesign/5.0/" exclude-result-prefixes="xsl aid aid5">
        <xsl:output method="html" indent="yes" encoding="UTF-8"
            doctype-public="http://www.w3.org/TR/xhtml/DTD/xhtml-transitional.dtd"/>
    <!-- parameter to use the name of element with attribute aid:theader as the th output -->
        <xsl:param name="tableElem">//*[local-name()][@aid:table='table']</xsl:param>
        <xsl:param name="colheadStyle">
            <xsl:value-of select="//*[local-name()][@aid:theader][1]"/>
            <!-- i.e. colHead-->
        </xsl:param>
    <!-- parameter to use the name of element with attribute aid:cell but not aid:theader as the td  output -->
    <!--i.e. tabletext or whatever the name of your Cell level  element is in InDesign -->
        <xsl:param name="cellStyle">
            <xsl:value-of select="//*[local-name()][@aid:table='cell' and not(@aid:theader)][1]"/>
        </xsl:param>
        <!-- handles a Story element marked up with HTML-type elements, but uses the <Table> element of IDD  -->
        <!-- if a true HTML table is in the content, it will be passed through -->
        <xsl:template match="Story"><!-- make a basic HTML file from a Story -->
            <html>
                <head>
                    <title>Sample Table</title>
                </head>
                <body>
                    <xsl:apply-templates><!-- will handle direct text of the  <Story>, and <Table> -->
                        <xsl:with-param name="colheadStyle" select="$colheadStyle"/>
                        <xsl:with-param name="cellStyle" select="$cellStyle"/>
                    </xsl:apply-templates>  
                </body>
            </html>
        </xsl:template>
       <!-- use the styles to find the elements of IDD <Table> element -->
        <xsl:template match="Table">
            <xsl:param name="colheadStyle">
                <xsl:value-of select="$colheadStyle"/>
            </xsl:param>
            <xsl:param name="cellStyle">
                <xsl:value-of select="$cellStyle"/>
            </xsl:param>
            <xsl:variable name="cellsPerRow">
                <xsl:value-of select="@aid:tcols"/>
            </xsl:variable>
            <table><!-- start the table -->
                <!-- xhtml requires lower-case name for table element-->
                <tr>
                    <xsl:apply-templates select="*[@aid:theader='']">
                        <xsl:with-param name="colheadStyle" select="$colheadStyle"/>
                        <xsl:with-param name="cellStyle" select="$cellStyle"/>
                    </xsl:apply-templates>
                </tr>
                <!--  and @aid:style=$cellStyle -->
                <xsl:for-each
                    select="*[@aid:table='cell'][not(@aid:theader='')][position() mod $cellsPerRow = 1]">
    <!-- some code adapted with  permission, from http://www.computorcompanion.com/LPMArticle.asp?ID=202
    Building HTML Tables with XSL by James Byrd; please include this acknowledgement in all files that use his code -->
    <!-- this is the tricky bit of the code that James Byrd set up
    p-class-tabletext-[position() mod $cellsPerRow = 1 continues looping until the position of the active element divided by $cellperRow (@aid:tcols value) tried with [@aid:style=$cellStyle] has a remainder of 1 -->
    <!--  .|following-sibling::p-class-tabletext-[position() &lt;  $cellsPerRow] applies first to the currently selects cell with "." then continues with the following-siblings whose position is less than  the value of cells per row (@aid:tcols value) -->
                    <tr>
                        <xsl:apply-templates
                            select=".|following-sibling::*[@aid:table='cell'][not(@aid:theader='')][position() &lt; $cellsPerRow]"
                        />
                    </tr>
                </xsl:for-each>
            </table>
        </xsl:template>
        <xsl:template match="*">
            <xsl:param name="colheadStyle">
                <xsl:value-of select="$colheadStyle"/>
            </xsl:param>
            <xsl:param name="cellStyle">
                <xsl:value-of select="$cellStyle"/>
            </xsl:param>
            <xsl:variable name="cellsPerRow">
                <xsl:value-of select="parent::Table/@aid:tcols"/>
            </xsl:variable>
            <xsl:choose>
                <!-- colHead aid:table="cell" aid:theader=""-->
                <xsl:when test="parent::Table and @aid:theader">
                    <th>
                        <xsl:apply-templates>
                            <xsl:with-param name="colheadStyle" select="$colheadStyle"/>
                            <xsl:with-param name="cellStyle" select="$cellStyle"/>
                        </xsl:apply-templates>
                    </th>
                    <xsl:if test="(position() = last()) and (position() &lt; $cellsPerRow)">
                        <xsl:call-template name="FillerCells">
                            <xsl:with-param name="cellCount" select="$cellsPerRow - position()"/>
                        </xsl:call-template>
                    </xsl:if>
                </xsl:when>
                <xsl:when test="parent::Table and @aid:table='cell' and not(@aid:theader)">
                    <td>
                        <xsl:apply-templates>
                            <xsl:with-param name="colheadStyle" select="$colheadStyle"/>
                            <xsl:with-param name="cellStyle" select="$cellStyle"/>
                        </xsl:apply-templates>
                    </td>
                    <xsl:if test="(position() = last()) and (position() &lt; $cellsPerRow)">
                        <xsl:call-template name="FillerCells">
                            <xsl:with-param name="cellCount" select="$cellsPerRow - position()"/>
                        </xsl:call-template>
                    </xsl:if>
                </xsl:when>
    <!-- for non-table elements this generic element handler will  pick up an aid:pstyle (if present) and create a class attribute from it. Works for any element that has the same name as HTML element such as <p> but it doesn't add wrapper elements like <ul> or <ol> for lists. -->
                <xsl:otherwise>
                    <xsl:element name="{name()}">
                        <xsl:if test="@aid:pstyle">
                            <xsl:attribute name="class">
                                <xsl:value-of select="@aid:ptyle"/>
                            </xsl:attribute>
                        </xsl:if>
                        <xsl:apply-templates>
                            <xsl:with-param name="colheadStyle" select="$colheadStyle"/>
                            <xsl:with-param name="cellStyle" select="$cellStyle"/>
                        </xsl:apply-templates>
                    </xsl:element>
                </xsl:otherwise>
            </xsl:choose>
        </xsl:template>
        <!-- take care of text that is a direct child of the <Story> by wrapping it in a <p> to make valid HTML -->
        <xsl:template match="text()">
            <xsl:variable name="myString">
                <xsl:value-of select="string-length(normalize-space(.))"/>
            </xsl:variable>
            <xsl:choose>
                <xsl:when test="parent::Story">
                    <xsl:if test="$myString > 0">
                        <xsl:element name="p">
                            <xsl:attribute name="class">text</xsl:attribute>
                            <xsl:value-of select="normalize-space(.)"/>
                        </xsl:element>
                    </xsl:if>
                </xsl:when>
                <xsl:otherwise>
                    <xsl:value-of select="normalize-space(.)"/>
                </xsl:otherwise>
            </xsl:choose>
        </xsl:template>
       <!-- make br element conform to good HTML markup -->
        <xsl:template match="br">
            <br />
        </xsl:template>
        <!-- this recursive template calls itself until its test condition is satified -->
        <!-- it outputs a cell whose only content is a non-breaking space -->
        <!-- do not use   in place of Unicode &#160; for the non-breaking space -->
        <!-- the value of $cellCount is set in the main XSL template -->
        <xsl:template name="FillerCells">
            <xsl:param name="cellCount"/>
            <td>&#160;</td>
            <xsl:if test="$cellCount > 1">
                <xsl:call-template name="FillerCells">
                    <xsl:with-param name="cellCount" select="$cellCount - 1"/>
                </xsl:call-template>
            </xsl:if>
        </xsl:template>
    </xsl:stylesheet>
    Message was edited by: HoneoyeFalls
    Sample XML file exported from IDD
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <Story><Table xmlns:aid="http://ns.adobe.com/AdobeInDesign/4.0/" xmlns:aid5="http://ns.adobe.com/AdobeInDesign/5.0/" aid:table="table" aid:trows="2" aid:tcols="2"><colHead aid:table="cell" aid:theader="" aid:crows="1" aid:ccols="1" aid:ccolwidth="44">1 colHead</colHead><colHead aid:table="cell" aid:theader="" aid:crows="1" aid:ccols="1" aid:ccolwidth="56">2 colHead</colHead><tabletext aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="44">1 tabletext</tabletext><tabletext aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="56">2 tabletext</tabletext><tabletext aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="44">row 2 1 tabletext</tabletext><tabletext aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="56">row 2 2 tabletext</tabletext></Table>
    <table><tr><th>normal HTML table heading</th></tr>
    <tr><td>normal HTML table<br/>cell text</td></tr></table></Story>

    You can use RECORD type declaration:
    SQL> declare
      2   type rec_type is record (
      3    ename emp.ename%type,
      4    sal emp.sal%type
      5   );
      6   type rc is ref cursor return rec_type;
      7   rc1 rc;
      8   rec1 rec_type;
      9  begin
    10   open rc1 for select ename, sal from emp;
    11   loop
    12    fetch rc1 into rec1;
    13    exit when rc1%notfound;
    14    dbms_output.put_line(rec1.ename || ' ' || rec1.sal);
    15   end loop;
    16   close rc1;
    17  end;
    18  /
    SMITH 800
    ALLEN 1600
    WARD 1250
    JONES 2975
    MARTIN 1250
    BLAKE 2850
    CLARK 2450
    SCOTT 3000
    KING 5000
    TURNER 1500
    ADAMS 1100
    JAMES 950
    FORD 3000
    MILLER 1300or use, for example, VIEW to declare rowtype:
    SQL> create view dummy_view as select ename, sal from emp;
    View created.
    SQL> declare
      2   type rc is ref cursor return dummy_view%rowtype;
      3   rc1 rc;
      4   rec1 dummy_view%rowtype;
      5  begin
      6   open rc1 for select ename, sal from emp;
      7   loop
      8    fetch rc1 into rec1;
      9    exit when rc1%notfound;
    10    dbms_output.put_line(rec1.ename || ' ' || rec1.sal);
    11   end loop;
    12   close rc1;
    13  end;
    14  /
    SMITH 800
    ALLEN 1600
    WARD 1250
    JONES 2975
    MARTIN 1250
    BLAKE 2850
    CLARK 2450
    SCOTT 3000
    KING 5000
    TURNER 1500
    ADAMS 1100
    JAMES 950
    FORD 3000
    MILLER 1300 Rgds.

  • HTML table containing SQL output in cells

    Hello,
    This might be a built-in function, but I haven't figured out how to do this: I want to display an HTML table (2x3 table) and in each cell, I want to display the output from different SQL statements. Some of the SQL statements return multiple rows, some just one. The cell data comes from unjoined tables, that is there is no join condition between each one of the cell SQL statements, it's a bit random.

    After much head-banging, I have worked this out and it came down to just changing 2 style definitions in the page template. I'm not really a Web developer so that wasn't obvious to me (or easy, I've read quite a bit on Google about stylesheets while working this).
    Basically I wanted to display a 3x3 "grid", similar to a table, but the data coming out from the 3x3 regions (all SQL query regions) returned different numbers of rows, which meant my page "rows" didn't align horizontally, they were just rendered wherever the last region stopped (vertically they were rendered properly because I put the regions in Colums 1, 2 and 3, standard page functionality).
    Eventually I started looking at the HTML page source and noticed the regions were using style defintions coming from my theme (standard APEX theme #12). I made a copy of the page template this page was using, and modified the header block of the new page template to "rewrite" the driving styles
    <title>#TITLE#</title>
    <link rel="stylesheet" href="#IMAGE_PREFIX#themes/theme_12/theme_V3.css" type="text/css" />
    <style type="text/css">
    a.plain { font-family:arial; text-decoration:none}
    td.t12Header {height=12px;font: italic small-caps 900 12px arial}
    td.t12Body {background-image: url(#APP_IMAGES#lock.png);background-repeat: no-repeat;background-position: left top;vertical-align= middle;height= 250px}
    </style>
    ...So I re-wrote the td (or table TD style) for t12Header and t12Body, by adding my own style definitions into the header after the call to the main css sheet. I also played around with putting a background image into each cell, I'll probably remove that but it was fun to explore.
    This rendered my individual table cells (via td.t12Body) @ 250px (which as I've found out is otherwise not supported, there's no built-in TABLE spec for "height") -- exactly what I wanted, now all the regions render vertically and horizontally.
    I did not test this with any browser other than IE7.
    If you know an easier way to do this, please do post a follow-up.

  • Table cell height not correct

    I have a table with 21 rows. Every other row is used as a separator between the rows with content. These separator rows don't have anything in them and their height is set to 1 in the properties inspector. I'm assuming these heights and widths are in pixels, however, these rows don't appear to be 1px in design view nor on a live web page.They are more like 15px.
    How can I make these rows 1px in height?

    That site has badly malformed code.
    http://tinyurl.com/36z7sc8
    I'm guessing it's cobbled togather from various bits and pieces including the ChronoForm code?
    Regarding the cell heights, the code of a typical cell is:
    <td width="95" height="1"> </td>
    The code between the <td> tags  (known as a non-breaking space) is a space character (pressing the spacebar on your keyboard generates this code in the HTML).
    Removing the space from the code for each <td> will cause your cells to collapse. You may need to prop them open with a 1px high GIF as Murray suggested.

  • Urgent! HTML table cell - Flash movie display browser dependent

    Hi all,
    I wonder if anyone has experienced the same problem i have
    (note, Windows XP, Dreamweaver 4).
    Consider the (rough) HTML code attached: A simple HTML table
    of one column and two rows is constructed to hold an image banner
    link and a Flash movie banner link in each cell consecutively.
    The Flash movie works normally when the HTML page is viewed
    in IE and Opera, until that is, it is placed inside a table cell.
    Inside the cell the flash movie seems to disappear, though i
    suspect it collapses to an image 1 pixel in height, as this can
    just about be seen using Opera.
    Is there something that I am missing? The code of course
    seems correct to me - perhaps there is a browser setting i am
    missing?
    Any help apprceiated - as i need to implement this code ..
    Daz

    Hi Alan,
    Dont think that was the problem (percentages used to scale to
    users browser?) ... though you did set me thinking!
    Was tired before, so only just remembered that when i was
    experimenting with setting the Table Properties the image was
    actually occasionally visible!!
    Short version: When formatting a cell containing a Flash
    animation dont leave the H field blank or use % (even though you're
    suppose to be able to!), use pixels instead - otherwise the Flash
    image collapses/disappears. Blank and % are fine everywhere else
    (I did type a long answer before, but it got eaten by the
    forum monster
    Someone/i will probably figure out
    why this is so or maybe i've just rediscovered the wheel
    here - but thats not really important now - because my Flash
    animation now renders similarly across IE, Opera and FireFox !!
    So thanks for your help!
    Daren

  • Display HTML Tables In JEditorPane

    Hi all,
    I am Editing an HTML Document in a JEditorPane.I've Noticed that The HTMLEditorKit has many flaws.
    I tried to fill them by registering my own tag actions for some tags. Now the new problem that I am facing is how an html table is displayed : The cellborders ares not visible. So i can see the content of the table, but not its borders. What should I do to make them show out ?
    thanx

    I had some problems with using HTML Tables with JEditorPane (it's really flaky). What I found was you have to be very specific when you create the table. Meaning, the cells have to be set using exact pixel sizes, not relative sizes or percentages. This is a pain, but if you do that then it should work.
    <table width=400 border=1 cellspacing=0 cellpadding=1> etc.......m

  • Read Only and HTML Table Cell Attributes

    Hi Guys,
    I believe i have come accross a bug - i'm been working on a form that can be filled out and printed - when going into print for sake of the output looking nice i set the form element to read-only.
    As soon as an element such as a drop down box, text feild, text area, etc which display as "[selected value]" in plain text in read only mode, are changed to the read only mode apex seem to ignore the html table cell attributes.
    For example i have a id number in the top left and then a version number in the top right. Both use a text feild; the top left uses 'width="100%"' for it's HTML Table Cell Attribute to push the right cell to the right. and the right cell has 'align="right"'. Now this works fine when read only is off... but as soon as read only is on, both the width and the alignment are totally ignored, and i can't find any sign of them in the code.
    Because this is for printing; using the "disable" on the form element instead of "read only" function, isn't appropriate as disabled will make the elements faded and hard to read when printed, and keeping the elements as is will allow the user to edit information on the print screen - which is not appropriate.
    Is this a bug? Will it be fixed soon? Is there any work around?
    Cheers,
    Alex

    Use the "Read Only Element Table Cell(s) Attributes" in the Read Only region of the Item edit form.
    Scott

  • How to put flash as a table or cell background or put HTML elements on top of flash file?

    Hi Guys,
    Could anyone please suggest me that how to put flash file as a table or cell background. I want to design a website and want to put HTML elements like table, images, text on top of flash file. so its look like animation in background. please visit following websites for an example: http://www.gagudju-dreaming.com/ and http://disneyworld.disney.go.com/
    Please guide me ASAP, thanks a lot in advance.
    Nitz.

    Hi Nitz
    The first thing you must do is convert your layout from table based to css based, (tables are o/k for tabular data, but not layout) but if you have never used css for layout it may be a steep learning curve.
    My recommendation is to start with the following tutorial on converting a table based comp to a css layout -
    http://www.adobe.com/devnet/dreamweaver/articles/dw_fw_css_pt1.html
    More info on using css is available here - http://www.adobe.com/devnet/dreamweaver/css.html.
    Once you have converted your site the 'procedure' for using swf's as a background, (does not work well with flv's, but can be done using html5 video without a skin, to a limited extent) is the same as having a background-image resize automatically to the full browser view-port. The best way to learn how to do this is to view the code on a page using the background-image technique, view the code on this page - http://www.pziecina.com/indexold.php.
    However, instead of having a fluid layout I would recommend using a fixed layout size to start with, as this overcomes many problems. I have uploaded a basic test page to illustrate the idea to - http://www.pziecina.com/test_ideas/swfbg_test.html. As I said the page must be resized in this example in order to see the effect, (so do not forget to resize the browser, even if it is only by 1px), but if you use a fixed size layout and your swf's size fits the desired area correctly the resize should not be required.
    PZ
    www.pziecina.com

  • Stretch height in panelStretchLayout dont work inside html table?

    I need to put panelsplitter inside html table and i write something like this:
    <table width="100%" cellpadding="0" cellspacing="0" border="0" style="position:absolute; padding:0px 30px;">
    <tr><td>XXXX</td><td>yyyyy</td></tr>
    <tr><td>
    <af:panelStretchLayout id="pt_psl1" styleClass="AFStretchWidth">
    <f:facet name="center">
    <af:panelSplitter splitterPosition="165" id="pt_ps1"
    inlineStyle="background-color:White; padding:0px 15px;"
    styleClass="AFStretchWidth">
    <f:facet name="first">
    <af:facetRef facetName="1"/>
    </f:facet>
    </af:panelSplitter>
    </f:facet>
    </af:panelStretchLayout>
    </td></tr>
    </table>
    But panel splitter dont stretch inside table componenet... there is a way to make it work?
    thnxs

    Don't mix HTML tags with ADF Faces tags.
    Instead you should use the ADF layout components to achieve what you are looking for.
    Use a panelStretchLayout and at the top facet put the xxxx yyyy in output text components.
    then in the center use the panelSplitter.

  • Html document ... button in am html table

    Hi,
    I have been exploring the dd classes for some days now. I have a persistent problem which I can not find a way of resolving. I create an html table into which I want to put text and buttons. If for every column I only put in text, then the alignement is quite acceptable. That is the height of the cells are commensurate with the height of the text, or there does not appear to be any padding in the cells above or elow the texts.
    Now to add a button I first add a form area in the column which will contain the button. This works fine but then the height of the cell is no longer just the height of the button. I have tried the methods NO_LINEBREAK( start = 'X' ) and NO_LINEBREAK( end = 'X' ) at the begining and end of the column, that is before going to the next column.
    This has the effect of removing the first break only, so the top of the button is just below the cell top but the bottom of the button is one line break away from the bottom of the cell. So it would appear that a for area always ends with a line break.
    The only way I found to almost do this is to assign 'X' to the attribute line_with_layout. Which should not be done and adds a column to the table anyway.
    So how do I make a cell with the same height as the button taht is inside it.
    Many thanks,
    PD
    Surely there is some simple method.

    Hi,
    Let me send the code snippets. I have tried all that is available. Either there is something missing or I am doing this wrong :
    This first snippets works the best but adds two extra columns after each button. with lv_button = 2 this produces four columns even though I only created for 2.
    create the table
      CALL METHOD gobj_html_doc->add_table
        EXPORTING
          no_of_columns               = lv_columns
          width                       = '100%'
          cell_background_transparent = 'X'
          border                      = '0'
        IMPORTING
          table                       = lv_table_element
          tablearea                   = lv_table_area.
    add columns
      DO lv_columns TIMES.
        lv_width = lv_i MOD 2.
        IF lv_mod EQ 0.
          lv_str = '30%'.
        ELSE.
          lv_str = '70%'.
        ENDIF.
        ADD 1 TO lv_i.
        CALL METHOD lv_table_element->add_column
          EXPORTING
            width  = lv_width
          IMPORTING
            column = lv_column.
        APPEND lv_column TO lt_column.
      ENDDO.
    add buttons
      LOOP AT lt_column INTO lv_column.
        CALL METHOD lv_column->add_form
          IMPORTING
            formarea = lv_form_area.
        lv_form_area->is_line_with_layout = 'X'.
        CALL METHOD lv_form_area->add_button
          EXPORTING
            sap_icon = 'ICON_CHANGE'
          IMPORTING
            button   = lobj_button.
         CALL METHOD lv_table_element->new_row.
      ENDLOOP.
    the following does not work either but no extrra columns are added.
    add buttons
      LOOP AT lt_column INTO lv_column.
        CALL METHOD lv_column->add_form
          IMPORTING
            formarea = lv_form_area.
        lv_form_area->line_with_layout( start = 'X' ).
        CALL METHOD lv_form_area->add_button
          EXPORTING
            sap_icon = 'ICON_CHANGE'
          IMPORTING
            button   = lobj_button.
         CALL METHOD lv_table_element->new_row.
         lv_form_area->line_with_layout( end = 'X' ).
      ENDLOOP.
    and the folling does not help much either.
    add buttons
      LOOP AT lt_column INTO lv_column.
        CALL METHOD lv_column->add_form
          IMPORTING
            formarea = lv_form_area.
        lv_form_area->no_line_break( start = 'X' ).
        CALL METHOD lv_form_area->add_button
          EXPORTING
            sap_icon = 'ICON_CHANGE'
          IMPORTING
            button   = lobj_button.
         CALL METHOD lv_table_element->new_row.
         lv_form_area->no_line_with_layout( end = 'X' ).
      ENDLOOP.
    all I can tell is that there is always a <br> token at the end of the form area. Perhaps the answer is to redefine the method in a derived class?
    If you have more ideas I am certainly opened to them ...
    thanks,
    PD.

  • Stretching of HTML table in JLabel

    Hi all,
    I am trying to display an HTML table in a JLabel. The table uses width="100%", but the html table doesn't resize according to the size of the JLabel. Is this a know issue or am I doing something wrong?
      String html = "<html> <head> </head> <body> <table border=\"2\" width=100%> <tr> <td>  test  </td> <td> test </td> <td> test </td> </tr> </table> </body> </html>";
            JLabel label = new JLabel(html);
            getContentPane().add(label, BorderLayout.CENTER);kind regards,
    Christiaan

    The JTable uses a cell renderer to draw the JLabel.
    The cell renderer figures out the size of the table cell without reading the html. Which means it ignores the width=100% when it calculates the size of the table cell. If you want the cell to resize properly, you have to implement a table cell renderer, and make that renderer set the column size or row height accordingly. That means you have to calculate the cell size yourself.
    In my opnion, i would say this is a bug, as I've had numerous problems with it too.

  • Insert an HTML Table tag as a value in a Tree Table

    Hi helper,
    Can I insert an HTML Table tag inside a TreeTable (Hierarchical data) using AdvancedDataGrid as a value?
    I need to create a Tree table in flex and I have beside normal int values some cells that need to show a certain images in an HTML Table I will create.
    Is it possible?
    Please advice
    Thanks
    Jo

    <div class=Section1><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'>It depends on where you get the list of images<o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'><o:p> </o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'>Alex Harui<o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'>Flex SDK Developer<o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'><a href="http://www.adobe.com/"><span style='color:blue'>Adobe<br />Systems Inc.</span></a><o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'>Blog: <a href="http://blogs.adobe.com/aharui"><span<br />style='color:blue'>http://blogs.adobe.com/aharui</span></a><o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'><o:p> </o:p></span></p><br /><br /><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><br /><br /><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span<br />style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Yossi Bar<br />[mailto:[email protected]] <br><br /><b>Sent:</b> Monday, February 09, 2009 1:14 AM<br><br /><b>To:</b> [email protected]<br><br /><b>Subject:</b> Re: Insert an HTML Table tag as a value in a Tree Table<o:p></o:p></span></p><br /><br /></div><br /><br /><p class=MsoNormal><o:p> </o:p></p><br /><br /><p class=MsoNormal style='margin-bottom:12.0pt'>A new message was posted by<br />Yossi Bar in <br><br /><br><br /><b>Developers</b> --<br><br />  Insert an HTML Table tag as a value in a Tree Table<br><br /><br><br />Thanks Alex, <br><br />What is the way to implement HorizontalLIst of images for<br />AdvancedDataGridColumn? <br><br /><br><br />In the code here I create a tree table and in Actual column I show an image: <br><br /><br><br />&lt;mx:AdvancedDataGrid width=&quot;100%&quot; height=&quot;100%&quot;<br />folderClosedIcon=&quot;{null}&quot; folderOpenIcon=&quot;{null}&quot;<br />defaultLeafIcon=&quot;{null}&quot;&gt; <br><br /><br><br />&lt;mx:dataProvider&gt; <br><br />            &lt;mx:HierarchicalData<br />source=&quot;{dpHierarchy}&quot;/&gt; <br><br />        &lt;/mx:dataProvider&gt; <br><br />        &lt;mx:groupedColumns&gt; <br><br />         &lt;mx:AdvancedDataGridColumn<br />headerText=&quot;&quot; width=&quot;50&quot;/&gt; <br><br />            &lt;mx:AdvancedDataGridColumn<br />dataField=&quot;Region&quot; backgroundColor=&quot;haloSilver&quot;<br />headerText=&quot;Region title&quot;<br />headerRenderer=&quot;mx.controls.Label&quot;/&gt; <br><br />            &lt;mx:AdvancedDataGridColumnGroup<br />headerText=&quot;Group Header&quot;<br />headerRenderer=&quot;mx.controls.Label&quot;&gt; <br><br />&lt;mx:AdvancedDataGridColumn dataField=&quot;Territory_Rep&quot;<br />headerText=&quot;Territory Rep&quot;<br />headerRenderer=&quot;mx.controls.Label&quot;/&gt; <br><br />&lt;mx:AdvancedDataGridColumn dataField=&quot;Actual&quot;<br />headerText=&quot;Actual title&quot;<br />headerRenderer=&quot;mx.controls.Label&quot;&gt; <br><br />&lt;mx:itemRenderer&gt; <br><br />&lt;mx:Component&gt; <br><br />&lt;mx:VBox horizontalAlign=&quot;center&quot;&gt; <br><br />&lt;mx:Image width=&quot;50&quot; source=&quot;{data.Actual}&quot;/&gt; <br><br />&lt;/mx:VBox&gt; <br><br />&lt;/mx:Component&gt; <br><br />&lt;/mx:itemRenderer&gt; <br><br />&lt;/mx:AdvancedDataGridColumn&gt; <br><br /><br><br />&lt;mx:AdvancedDataGridColumn dataField=&quot;Estimate&quot;<br />headerText=&quot;Estimate title&quot; headerRenderer=&quot;mx.controls.Label&quot;/&gt;<br /><br><br />            &lt;/mx:AdvancedDataGridColumnGroup&gt;<br /><br><br />        &lt;/mx:groupedColumns&gt; <br><br />    &lt;/mx:AdvancedDataGrid&gt; <br><br /><br><br />Please advise, <br><br /><br><br />Thanks <br><br /><br><br />Jo <o:p></o:p></p><br /><br /><div class=MsoNormal><br /><br /><hr size=2 width=200 style='width:150.0pt' align=left><br /><br /></div><br /><br /><p class=MsoNormal style='margin-bottom:12.0pt'>View/reply at <a<br />href="http://www.adobeforums.com/webx?13@@.59b7d1ae/2">Insert an HTML Table tag<br />as a value in a Tree Table</a><br><br />Replies by email are OK.<br><br />Use the <a<br />href="http://www.adobeforums.com/webx?280@@.59b7d1ae!folder=.3c060fa3">unsubscribe</a>< br />form to cancel your email subscription.<o:p></o:p></p><br /><br /></div>

  • Creating table, two cells side by side but alignment in one cell throws off the other!

    Hello,
    I have a website that I am trying to display a table with two columns side by side and one column at the bottom.
    so I use the following:
    <table>
    <tr>
    <td></td>
    <td></td>
    </tr>
    <tr>
    <td></td>
    </tr>
    </table>
    My problem is that I can't get the alignment to work right wit the first two <td> columsn that are side by side.  i put text in both and an image but it doens't align properly even without the image. Every time press <return> it adjust the alignment in the other column. as you can see below, it doesn't align correctly. I can't get it to work right.  images don't align, button doens't align, and the text on top doesn't align either.
    If I press <return> in the right column at the bottom, then it moves the left column down and still doesn't align (auugh!)
    Here is my code:
    <table width="685">
                             <tr>
                             <td width="338" class="vline">
                             <p class="indentmain">Point 7.4 Service Pack 2 is available! </p>
                               <p class="indentpar">Point 7.4 SP2 (release date March 30, 2011), includes the newly required Anti-Steering disclosure along with other necessary compliance updates and functional enhancements<img src="../images/SideBar/customer_care.jpg" alt="" width="162" height="87" hspace="6" vspace="6" align="right" /></p>
                               <p class="indentpar"><strong>MyCalyx Administrators: </strong>Be sure to log into your <a href="https://www.mycalyx.com">MyCalyx</a> account and update the user's version of Point to 7.4SP2.</p>
                               <p class="indentpar"><strong>
                               Click</strong> for comlete release notes.</p>
                              <p class="indentpar">
                                 <input type="button" class="button_Download" value="Download Instructions" onclick="window.open('http://www.calyxsupport.com/downloads/index.htm?tab=1&col6=open#CollapsiblePanel6#TabbedPa nels1')" />
                               </p>
                              <p class="indentpar"> </p>
                             </td>
                             <td width="335">
                             <p class="indentmain">PointCentral 7.3 Server Update</p>
    <p class="indentpar">The PointCentral 7.3 Server Update is available for download, (released March 24, 2011). The server update addresses field mapping issues that causes data fields to <img src="../images/SideBar/page_in_book.jpg" alt="" width="162" height="87" hspace="6" vspace="6" align="right" />inaccurately appear when generating reports and adding the owner's title policy setting under the Utilities menu. </p>
                               <p class="indentpar"> </p>
                               <p class="indentpar"><a href="http://kb.calyxsupport.com/kb/article.php?id=557">Click here</a> for release notes.</p>
                               <p class="indentpar">
                                 <input type="button" class="button_Download" value="Download Instructions" onclick="window.open('http://www.calyxsupport.com/downloads/index.htm?tab=1&col6=open#CollapsiblePanel6#TabbedPa nels1')" />
                               </p>
                               <p class="indentpar"> </p>
                               </td>
                             </tr>
                             <tr>
              <td height="8" colspan="2"></td>
                </tr>
                            <tr>
                              <td style="display: inline" height="5" colspan="2"><img border="0" src="/images/bottom_border.gif" width="100%" height="5"></td></tr>
                           <tr>
                              <td height="8" colspan="2"></td>
                </tr>
                <tr>
                <td colspan="2"><p class="indentmain">What to look for in Point 7.4</p>
                  <p class="indentpar">There have been peculiar incidents with the Transmittal Summary and calculations on the Fees Worksheet, such as transfer taxes and up-front mortgage insurance. You can prevent or avoid such mishaps by understanding the  process that provoke or produce these incidents.</p>
                  <p class="indentpar">We also understand that since the release of MyCalyx.com and the non-distribution of an installation CD, installing and upgrading Point is new but still simple and easy, but just takes some getting use to.</p>
                  <p class="indentpar">We have provided a list of commonly used articles to help guide you through using MyCalyx.com and avoiding irregularities with the Fees Worksheet.</p>
                  <p class="indentpar">
                    <input type="button" class="button_Download" value="Download Instructions" onclick="window.open('http://www.calyxsupport.com/downloads/index.htm?tab=1&col6=open#CollapsiblePanel6#TabbedPa nels1')" />
                  </p></td>
                </tr>
                             </table>

    Tables work that way, that's why CSS styling is preferred for layouts.
    http://apptools.com/examples/pagelayout101.php
    If you must use tables, try nesting tables inside cells of an outer table .

Maybe you are looking for

  • Install win 8.1 pro pack

    In the process of Adding Features to Win 8.1 with the Microsoft Win8.1 Pro Pack, I was able to install the Microsoft license key - it accepted it, but the last step in the process fails with this error:  "Something went wrong.  Close this wizard and

  • No remote for Apple TV and its never been in my network will an Ethernet cable help

    My second hand Apple TV has no remote, therefor I know I can't get to the settings to find a network using the remote app because it is new but can I get an Ethernet cable, plug it in to the router and then use my phone?

  • My Sony Dvd recorder is not recognized

    Since I downloaded iMovie 09 I can get it to read my videos off of my Sony dvd camcorder. iMovie 08 worked well with the Sony but now I can't upload videos. Am I doing something wrong or is iMovie 09 not compatable

  • COPA settings

    Hi, What is COPA settings in Product hierarchy? Could you please explain the process. Thanks in adavance, Regards, MBKM

  • Scale Fit Not Working Correctly

    Hello, I have a front panel with a tab control containing 12 tabs. Each tab contains a cluster with one of the controls as an XY Graph. When I populate each of the graphs with data, I want to set the "Scale Fit"  or "ScaleFit" property to 1 so that e