HTML table border

is there a way to change the border color of a table to match the background color of the table? something besides white. thanks.

I still can't get the inside border to match. here is my code:
<html>
<body>
     <table width="760px" border="1" bordercolor="#99CCFF" bordercolorlight="#99CCFF" bordercolordark="#99CCFF" cellpadding="0" cellspacing="0">
          <tr bgcolor="#6699FF">
               <td width="40px"></td>
               <td colspan="3"><font size="+2">Optics</td>
               <td></td>
          </tr>
          <tr bgcolor="#99CCFF">
               <td width="40px"></td>
               <td width="600px"> </td>
               <td width="150px"valign="top">
                    no inputs for Optics at this time.
               </td>
               <td width="40" bgcolor="#99CCFF"> </td>
          </tr>
     </table>
</body>
</html>
there is a small, white, outline on the left of my table. i tried setting the border to "0" but the line is still there. Maybe there is a way to increase the cellpadding on only the far left and right so i wouldn't need the extra columns?

Similar Messages

  • Word to RH Responsive HTML: Table border missing

    Hi
    I am importing a Word 2007 doc into RH11 and publishing the responsive output.
    The Word doc is imported correctly as per the Settings file. However, when I publish the output, the table borders are missing completely.
    In RH editor:
    In Responsive output:
    What could be wrong?
    Sreekanth

    Bingo! You are right. I changed the CSS file name on master page from default.css to RHStyleMapping.css and it worked fine.
    However, the font has changed to Time New Roman.
    Sreekanth

  • Table border colors & Firefox/Safari

    I've noticed that when I set a table border color (using the
    Property Inspector), the color displays only in IE. Firefox and
    Safari do not display the border color like IE does. Why is this?
    How do I work around this--CSS?

    "csbridges" <[email protected]> wrote in
    message
    news:eushlq$5q7$[email protected]..
    > Yeah, that's what I thought. Thanks.
    >
    > Any idea, though, why FF doesn't recognize the HTML
    table border-color?
    > Seems odd that it wouldn't recognize this.
    Firefox recognises:
    .table {border: 1px solid #black}
    black being the border color.... so not sure why you say that
    it doesn't
    recognise it :)
    Nadia
    Adobe® Community Expert : Dreamweaver
    CSS Templates |Tutorials |SEO Articles
    http://www.DreamweaverResources.com
    ~ Customisation Service Available ~
    http://www.csstemplates.com.au
    ~ Forum Posting Guidelines ~
    http://www.adobe.com/support/forums/guidelines.html
    CSS Tutorials for Dreamweaver:
    http://www.adobe.com/devnet/dreamweaver/css.html

  • HTML Editor Table border colors, JavaScript Integration

    Hi,
    i have two questions regarding the HTML Editor in KM:
    1) How can I change the border color from tables?
    I have tried to change it with the adjustment from Tables
    in Theme Editor, but nothing happens.
    2) Can I add JavaScript Coding in HTML-Editor?
    For example to create icons with navigation (back, home)
    or print function.
    Thanks in advance
    Sascha

    Hi Sascha,
    You might be using the HTML Editor in KM for a particular KM Document right?
    Anyways, regarding question 1 you can change the border color of a html table using the bordercolor attribute e.g. bordercolor = "red"
    Regarding question 2, Yes you can add javascript code to your html; but please use the Text editor; its reliable in these matters.
    Regards,
    Prem.
    SAP GDC.

  • Drow dot-style table border in JEditorPane (editing HTML)

    Hi,
    I want to extend JEditorPane to display table border in dot style when
    displaying tables with border="0". (like most HTML editors)
    I extended HTMLEditor and it's ViewFactory and now maybe I have to write extended TableView class for rendering my tables.
    I tried to do that, but without any success.
    Can any one advice my how can I rewrite the paint method or some kind of example how to make it.
    Thanks in advance.

    Hi, i had advantage but i did it in a very stupid way. I copy/pased the
    original source and modified some inner classes.I do not remember exactlly what i did (right now i do not have the source).
    I modified BoxView and BoxPainter inner classes to achieve this effect.
    When i have the source I will paste it here.
    Have fun.

  • 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>

  • Please!!!!!!   How can i add rows in html table dynamically [use jsp,bean]

    hello, i am a fresher in jsp. i want to add new rows in html table dynamically.In my coding, just only shows in one row . please help my problem with correct coding and i don't want to use database. Thanks ...............!
    Here is my coding-------------------
    ---------------- form.jsp --------------------->
    <%@ page import="java.util.*,newtest1.Validation" %>
    <jsp:useBean id="mybean" scope="page" class="newtest1.Validation" />
    <jsp:setProperty name="mybean" property="name" param="name" />
    <jsp:setProperty name="mybean" property="age" param="age" />
    <% s[i][j] %>
    <html>
    <head><title>Form</title></head>
    <body>
    <form method="get">
    <table border="0" width="700">
    <tr>
    <td width="150" align="right">Name</td>
    <td width="550" align="left"><input type="text" name="name" size="35"></td>
    </tr>
    <tr>
    <td width="150" align="right">Age</td>
    <td width="550" align="left"><input type="text" name="age" size="35"></td>
    </tr>
    </table>
    <table width="100%" border="0" cellspacing="0" cellpadding="5">
    <tr><td> </td></tr>
    <tr><td><input type="submit" name="submit" value="ADD"></td></tr>
    <tr><td> </td></tr>
    <tr><td width="100%" align="center" border=1>
    <% int count=mybean.getStart();
    for(int i=count; i<count+1; i++) { %>
    <tr>
    <td><jsp:getProperty name="mybean" property="name" /></td>
    <td><jsp:getProperty name="mybean" property="age" /></td>
    <td><%= count %></td>
    <% count+=1; %>
    </tr>
    <% } %></td></tr>
    </table>
    </form>
    </body>
    </html>
    ----------------- Validation.java ----------------->
    package newtest1;
    import java.util.*;
    public class Validation {
    private String name;
    private String age;
    static int start=0;
    public Validation() {    name=null;
    age=null;
    ++start;}
    public void setName(String username) { if(username!="")
    name=username;
    public String getName() { return name;  }
    public void setAge(String userage) {  if (age!="")
    {age=userage;}
    public String getAge() {  return age;   }
    public int getStart() {
    return start; }

    Hi, Do you mean to say,
    You have an HTML page in which you have a text field and an add button. If you enter anything in that text field and click on Add button the text field contents should be displayed in the same HTML page and you should be able to go on entering new values into the text field and you should be able to retain and display all the previously entered values..
    and finally the list of added items are not stored in the database..
    If this is the case
    i. Your html form should be submitted to the same page.
    ii. You need to have a Vector which holds the entered values.
    iii. Bind the vector object to the request object and collect the same vector object from the request and display its contents...
    I think this would help...

  • Creating a selectable HTML table with Sahrepoint list data dind

    Hi All,
    I m creating an app for sharepoint2013 , on my app I want to read data from SP list and display on something like HTML table/ grid view.
    What I have done is as follows.
    <table cellpadding="0" cellspacing="0" border="0" class="display" id="TermList">
                        <thead>
                            <tr>
                                        <th>Start Date</th>
                                <th>End Date</th>
                                <th>Term Type(s)</th>
                                <th>Specialty</th>
                                <th width="12%">Sub Specialty</th>
                            </tr>
                        </thead>
                                            <tbody>
                            </tbody>
    </table>
    var context = SP.ClientContext.get_current();
    var user = context.get_web().get_currentUser();
    var Termsitems, web, hostcontext, currentusertitle;
    var hosturl;
    (function () {
    $(document).ready(function () {
        gethostdata();
        getUserName();
        $('#TermList').dataTable(
                        "sScrollY": 200,
                            This will enable jQuery UI theme
                        "bJQueryUI": true,
                            will add the pagination links
                        "sPaginationType": "full_numbers"
        getTermdetails();
    function gethostdata() {
        hosturl = decodeURIComponent(getQueryStringParameter("SPHostUrl"));
        context = new SP.ClientContext.get_current();
        hostcontext = new SP.AppContextSite(context, hosturl);
        web = hostcontext.get_web();
        context.load(web, 'Title');
        context.executeQueryAsync(onSiteLoadSuccess, onQueryFailed);
    function onSiteLoadSuccess(sender, args) {
        //   alert("site title : " + web.get_title());
    function onQueryFailed(sender, args) {
        alert('request failed ' + args.get_message() + '\n' + args.get_stackTrace());
    function getQueryStringParameter(urlParameterKey) {
        var params = document.URL.split('?')[1].split('&');
        var strParams = '';
        for (var i = 0; i < params.length; i = i + 1) {
            var singleParam = params[i].split('=');
            if (singleParam[0] == urlParameterKey)
                return decodeURIComponent(singleParam[1]);
    // This function prepares, loads, and then executes a SharePoint query to get the current users information
    function getUserName() {
        context.load(user);
        context.executeQueryAsync(onGetUserNameSuccess, onGetUserNameFail);
    // This function is executed if the above call is successful
    // It replaces the contents of the 'message' element with the user name
    function onGetUserNameSuccess() {
    currentusertitle= user.get_title();
      $('#message').text('Hello ' + user.get_title());
    // This function is executed if the above call fails
    function onGetUserNameFail(sender, args) {
        alert('Failed to get user name. Error:' + args.get_message());
    function getTermdetails() {
        var Termlist = web.get_lists().getByTitle("TraineeTermsSPlist");
        context.load(Termlist)
        var camlQuery = new SP.CamlQuery();
        camlQuery.set_viewXml('<View><Query><Where><Eq><FieldRef Name="Title" />' +
                                 '<Value Type="Text"> + currentusertitle + </Value></Eq></Where></Query></View>');
        Termsitems = Termlist.getItems(camlQuery);
        context.load(Termsitems);
        context.executeQueryAsync(getTermdetailsQuerySuccsess, getTermdetailsQueryFails)
    function getTermdetailsQuerySuccsess(sender, args) {
        var listEnumerator = Termsitems.getEnumerator();
        var datatable = document.getElementById("TermList");
        while (listEnumerator.moveNext()) {
            var oListItem = listEnumerator.get_current();
            var startdate = listEnumerator.get_current().get_item('startdate');
            var enddate = listEnumerator.get_current().get_item('Enddate');
            var termtype = listEnumerator.get_current().get_item('TermType');       
            var Specialty = listEnumerator.get_current().get_item('Specialty');
            var Specialty = listEnumerator.get_current().get_item('Subspecialty');
            $("#TermList").append("<tr align='middle'  class='gradeA'>" +
                                      "<td align='left'>" + startdate +
    "</td>" +
                                      "<td align='left'>" + enddate + "</td>"
    +
                                      "<td align='left'>" + termtype + "</td>"
    +
                                      "<td align='left'>" + Specialty +
    "</td>" +
                                      "<td align='left'>" + Specialty +
    "</td>" + "</tr>");
    function getTermdetailsQueryFails(sender, args) {
        alert(' Error:' + args.get_message());
    Now what I want to do is allow user to select rows on the table. Once they select a row I want to get that selected row and search SP list based on the selected value.  Also I would like to make this table with search area to search records.
    Can someone please help me to do this, or are there any easy way to do this. Sample code or useful link much appreciate.
    Thank you very much.
    d.n weerasinghe

    Instead of writing in dive each and every time directly,
    just have a div in html, and inside the while loop
    write and store in the variable like
      output += "<li><a href='#' style='display:none'>" + usernames[i] + " </a> "
                         + "<table id='results' width='100%'>"
                         + "
    <tr style='border-bottom:1px silver solid;'>"
                         + "
    <td style='width:60px;height:70px;' >"
                         + "
    <img alt=\"profile pic\" src= '" + pictureuri[i] + "'  style='width:60px;height:60px;'/>"
                         + "
    </td>"
                         + "
    <td >"
                         + "
    <table style='height:100%'>"
                         + "
    <tr>"
                         + "
    <td style='padding-padding-vertical-align:top;height:10px' >"
                         + "
    <a href='" + personaluri[i] + "' classq='ms-bold ms-subtleLink' style='color: gray; font-size: 12px; font-weight: bold;'>" + tempnames[i] + "</a>"
                         + "
    </td>"
                         + "
    </tr>"
                         + "
    <tr>"
                         + "
    <td  style='padding-vertical-align:top;height:50px;color:#ADAEAD;font-size:14px;' >" + deptNames[i]
                         + "
    </td>"
                         + "
    </tr>"
                         + "
    </table>"
                         + "
    </td>"
                         + "
    </tr>"
                         + "</table>"
                         + "</li>"
    and finaly oyutside the loop 
    $(#div).html(output);

  • How to populate a html table in a JSF page

    Hi, I need help on the following issue:
    My code calls an business layer API which returns me a string in html format which produces a html table. I have a JSF page with a bunch of other JSF components and I want to insert this html table at the bottom of this page. Is there a way to do it?

    OK
    Here is an example
    Drag an outputText component on to the Page. Check the properties of outputText and uncheck the escape property. Write this some where in the code when you want to display the HTML table on the page.
    String s = "<HTML><BODY><TABLE BORDER=2><TR><TD>No</TD><TD>Name</TD><TD>Age</TD></TR><TR><TD>1</TD><TD>John</TD><TD>30</TD></TR><TR><TD>2</TD><TD>Michael</TD><TD>20</TD></TR></TABLE></BODY></HTML>";
    outputText1.setValue(s);
    I am using the hardcoded value for String but in your case you get the string from some API.
    Hope this helps
    Thanks
    Creator Team

  • Table border is not over-riding cell formatting

    I'm using InDesign CS4. I've created a table and styled it with a Table Style which uses several cell styles. I have specified a table border in Table Setup, but it does not appear on my table. It maintains the formatting in the cells. "Preserve Local Formatting" is grayed out, so I cannot select or deselect it. The only way to get the border to show up is to manually apply a stroke using the Stroke palette. I do not want to use this solution. I want it to work in the Table Style.
    A similar problem was posted but not answered here: http://livedocs.adobe.com/en_US/InDesign/5.0/help.html?content=WSa285fff53dea4f86173837510 01ea8cb3f-6fbf.html
    Please help!

    Here is a useful bit of info from the InDesign CS4 online help:
    Formatting precedence in styles
    If a conflict occurs in formatting applied to a table cell, the following order of precedence determines which formatting is used:
    Cell style precedence
    1. Header/Footer 2. Left column/Right column 3. Body rows. For example, if a cell appears in both the header and the left column, the formatting from the header cell style is used.  
    Table style precedence
    1. Cell overrides 2. Cell style 3. Cell styles applied from a table style 4. Table overrides 5. Table styles. For example, if you apply one fill using the Cell Options dialog box and another fill using the cell style, the fill from the Cell Options dialog box is used.
    Mike Witherell in Maryland

  • How to design HTML Table in ADF

    I am new to ADF Tech,
    I would like to know, how to design the HTML Table Rows and Columns in ADF
    Ex:
    <TABLE width="100%" border="1">
    <TR>
         <TD>GUID</TD>
         <TD>123</TD>
         <TD>Name</TD>
         <TD>Mark Antony</TD>
         <TD>Version</TD>
         <TD>1.0</TD>
    </TR>
    <TR>
    <TD>Created</TD>
         <TD>Oracle</TD>
         <TD>Modified</TD>
         <TD>Oracle User</TD>
         <TD>Placements</TD>
         <TD>20</TD>
    </TR>
    </TABLE>
    Thanks in Advance

    Balaji,
    With JSF in general (and ADF Faces too), you should not think in terms of HTML output, but in terms of JSF components. ADF has an af:table component that renders things in rows-and-columns, but emits HTML that is much more complex than just a simple HTML table.
    John

  • 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.

  • XSLT - html table problem

    Hi,
    I'm having a real problem with trying to get my xslt stylesheet to produce a html table.
    I want the table to look something like the following:
    |radio-button description | radio-button description |
    |radio-button description | radio-button description |
    |_________________________________________|
    So that each table row has the following:
    <tr><td>radio-button</td><td>decsription</td>
    <td>radio-button></td><td>description</td></tr>
    The code in the stylesheet is as follows:
    <CODE>
    <xsl:template match="table-RdbDataOptions2" >
    <!-- Add the data options and user info -->
    <table width="100%" border="0" align="left">
              <xsl:for-each select="td">
    <tr>
                   <td colspan="2">
                             <xsl:choose>
                                  <xsl:when test="position()=1">
                                       <div align="left" class="subheading"><xsl:value-of select="." /></div>
                                  </xsl:when>
                                  <xsl:when test="position()=2">
                                       <div align="left"><xsl:value-of select="." /></div>
                                  </xsl:when>
                             </xsl:choose>
                        </td>
                   </tr>
              </xsl:for-each>
    <!-- now build a 2x row/2x cell table-->
    <xsl:for-each select="rdb-DataOption">
    <xsl:choose>
    <xsl:when test="not(@recfav='')">
    <xsl:choose>
    <!-- when an uneven number, start a new table row. Add unevens to this row -->
    <xsl:when test="position() mod 2=1">
    <tr>
    <xsl:choose>
    <xsl:when test="@dataseriescheck=''">
    <td> <input type="radio" name="rdbDataOptions" value="series" disabled="disabled"/></td>
    <td><div align="left"><xsl:value-of select="." /></div></td>
    </xsl:when>
    <xsl:otherwise>
    <td> <input type="radio" name="rdbDataOptions" value="series" disabled="disabled" checked="checked"/></td>
    <td><div align="left"><xsl:value-of select="." /></div></td>
    </xsl:otherwise>
    <xsl:when test="@aggregatecheck=''">
    <td> <input type="radio" name="rdbDataOptions" value="aggregate" disabled="disabled"/></td>
    <td><div align="left"><xsl:value-of select="." /></div></td>
    </xsl:when>
    <xsl:otherwise>
    <td><input type="radio" name="rdbDataOptions" value="series" disabled="disabled" checked="checked"/></td>
    <td><div align="left"><xsl:value-of select="." /></div></td>
    </xsl:otherwise>
    </xsl:choose>
    </tr>
    </xsl:when><!-- end of test position() mod 2 = 1 -->
    <xsl:otherwise><!-- Add new row for even numbers -->
    <tr>
    <xsl:choose>
    <xsl:when test="@cummulativecheck=''">
    <td> <input type="radio" name="rdbDataOption" value="cummulative" disabled="disabled"/></td>
    <td><div align="left"><xsl:value-of select="." /></div></td>
    </xsl:when>
    <xsl:otherwise>
    <td><input type="radio" name="rdbDataOption" value="cummulative" disabled="disabled" checked="checked"/></td>
    <td><div align="left"><xsl:value-of select="." /></div></td>
    </xsl:otherwise>
    <xsl:when test="@averagecheck=''">
    <td><input type="radio" name="rdbDataOption" value="Average" disabled="disabled"/></td>
    <td><div align="left"><xsl:value-of select="." /></div></td>
    </xsl:when>
    <xsl:otherwise>
    <td><input type="radio" name="rdbDataOption" value="Average" disabled="disabled" checked="checked"/></td>
    <td><div align="left"><xsl:value-of select="." /></div></td>
    </xsl:otherwise>
    </xsl:choose>
    </tr>
    </xsl:otherwise><!-- end of adding new row for even numbers -->
    </xsl:choose>
    </xsl:when>
    </xsl:choose><!-- end of check for not recents -->
    <xsl:otherwise><!-- Recent -->
    <xsl:choose>
    <!-- when an uneven number, start a new table row. Add unevens to this row -->
    <xsl:when test="position() mod 2=1">
    <tr>
    <xsl:choose>
    <xsl:when test="@dataseriescheck=''">
    <td><input type="radio" name="rdbDataOptions" value="series" disabled="disabled"/></td>
    <td><div align="left"><xsl:value-of select="." /></div></td>
    </xsl:when>
    <xsl:otherwise>
    <td> <input type="radio" name="rdbDataOptions" value="series" disabled="disabled" checked="checked"/></td>
    <td><div align="left"><xsl:value-of select="." /></div></td>
    </xsl:otherwise>
    <xsl:when test="@aggregatecheck=''">
    <td><input type="radio" name="rdbDataOptions" value="aggregate" disabled="disabled"/></td>
    <td><div align="left"><xsl:value-of select="." /></div></td>
    </xsl:when>
    <xsl:otherwise>
    <td><input type="radio" name="rdbDataOptions" value="series" disabled="disabled" checked="checked"/></td>
    <td><div align="left"><xsl:value-of select="." /></div></td>
    </xsl:otherwise>
    </xsl:choose>
    </tr>
    </xsl:when><!-- end of test position() mod 2 = 1 -->
    <xsl:otherwise><!-- Add new row for even numbers -->
    <tr>
    <xsl:choose>
    <xsl:when test="@cummulativecheck=''">
    <td><input type="radio" name="rdbDataOption" value="cummulative" disabled="disabled"/></td>
    <td><div align="left"><xsl:value-of select="." /></div></td>
    </xsl:when>
    <xsl:otherwise>
    <td> <input type="radio" name="rdbDataOption" value="cummulative" disabled="disabled" checked="checked"/></td>
    <td><div align="left"><xsl:value-of select="." /></div></td>
    </xsl:otherwise>
    <xsl:when test="@averagecheck=''">
    <td><input type="radio" name="rdbDataOption" value="Average" disabled="disabled"/></td>
    <td><div align="left"><xsl:value-of select="." /></div></td>
    </xsl:when>
    <xsl:otherwise>
    <td><input type="radio" name="rdbDataOption" value="Average" disabled="disabled" checked="checked"/></td>
    <td><div align="left"><xsl:value-of select="." /></div></td>
    </xsl:otherwise>
    </xsl:choose>
    </tr>
    </xsl:otherwise><!-- end of adding new row for even numbers -->
    </xsl:choose>
    </xsl:otherwise>
    </xsl:for-each>
    </table>
    </xsl:template>
    </CODE>
    The jsp creates the table in the following way:
    <CODE>
    <table-RdbDataOptions2>
    <td><%=Lang.get("DataOptions", User.getPrimary(), User.getFallback())%></td>
    <td><%=Lang.get("SelectDataOption", User.getPrimary(), User.getFallback())%></td>
    <rdb-DataOption recfav="<%=strDisabled %>" dataseriescheck="<%=strDataOption[0] %>" ><%=Lang.get("ShowDataSeries", User.getPrimary(), User.getFallback())%></rdb-DataOption>
    <rdb-DataOption recfav="<%=strDisabled %>" cumulativecheck="<%=strDataOption[1] %>" ><%=Lang.get("ShowCumulative", User.getPrimary(), User.getFallback())%></rdb-DataOption>
    <rdb-DataOption recfav="<%=strDisabled %>" aggregatecheck="<%=strDataOption[2] %>" ><%=Lang.get("ShowAggregate", User.getPrimary(), User.getFallback())%></rdb-DataOption>
    <rdb-DataOption recfav="<%=strDisabled %>" averagecheck="<%=strDataOption[3] %>" ><%=Lang.get("ShowDataSeriesAverage", User.getPrimary(), User.getFallback())%></rdb-DataOption>
    </table-RdbDataOptions>
    </CODE>
    The following is the error I'm receiving:
    javax.servlet.jsp.JspException: Error applying stylesheet..........
    I can easily produce a table with like this:
    |radio button description |
    |radio button description |
    |radio button description |
    |radio button description |
    |____________________|
    but unfortunately that's not what's req'd!
    Any help is disciplining the above stylesheet so that it does what its told would be greatly appreciated.
    Yours, with respect!
    Eddie.

    Well,
    Funny how just looking at your own posting can highlight pretty obvious errors.
    The reason for the stylesheet error msg was that the opening & closing table tags in the jsp didn't match!
    However, I now get an almost empty table. I get the table headers - in other words, this part of the stylesheet is working properly:
    <CODE>
    <xsl:for-each select="td">
    <tr>
                   <td colspan="2">
                             <xsl:choose>
                                  <xsl:when test="position()=1">
                                       <div align="left" class="subheading"><xsl:value-of select="." /></div>
                                  </xsl:when>
                                  <xsl:when test="position()=2">
                                       <div align="left"><xsl:value-of select="." /></div>
                                  </xsl:when>
                             </xsl:choose>
                        </td>
                   </tr>
              </xsl:for-each>
    </CODE>
    But the rest is returning 'empty'. So, it nows seems that one or more of my tests is not working properly.
    Onwards & upwards,
    Eddie

  • JSF component inside HTML table -- not rendering properly

    I have a HTML table like the one below. In one of those columns (td) I have a JSF component. When I run the app, the JSF component (even if its a simple inputText or panelGrid or panelGroup) is not getting inside the td. Instead, it forms a seperate table after this td.
    Code I have:
    <table border="0" cellpadding="0" cellspacing="0">
    <tbody>
    <tr>
    <td>... ..MULTIPLE Td's here - Deleted for simplicity </td>
    <td class="topNav">
    Blog Directory
    </td>
    <td>
    <img src="./images/top_button_right.gif"/>
    </td>
    <td class="topNav">
    <f:panelGroup>
    <h:inputText value="Username"/>
    <h:inputSecret value="Password"/>
    </f:panelGroup>
    </td>
    </tr>
    </tbody>
    </table>
    What I expected:
    username, passwd field inside the top level HTML table.
    What comes: (as a result of running thsi JSF page )
    <table> -- Original table
    <td> </td> -- -TD that had the inputText - comes empty here
    </table>
    <table>
    <tbody>
    <tr>
    <td><input type="text" name="_id1:header:EasyHeader:_id4" value="Username" /><input type="password" name="_id1:header:EasyHeader:_id5" value="" /></td>
    </tr>
    <tr>
    <td><table>
    I am a newbie to JSF & due to the complexity of the layout & page, I m unable to get rid of the HTML tags totally.
    Thanks in advance.
    Ganesh

    Found the solution to the problem.
    wrapped the entire HTML page till the JSF component ( panelGrid) under <f:verbatim>.
    something like this
    <f:verbatim>
    <table>
    <tr> <td>...</td>
    <td>
    </f:verbatim>
    <h:panelGrid> ... </h:panelGrid>
    <f:verbatim>
    </td>
    </table>
    </f:verbatim>

  • Outputting SQL statement into HTML table

    ok, my problem is that i can only output the first row from my table in my DB and i want to be able to display all the rows from that table which are of a particular type..maybe someone here can help..
    and if anyone thinks the code is a bit pants please say why..cheers
    import java.lang.*;
    import java.util.*;
    import java.io.*;
    import java.util.Vector;
    import java.sql.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class StockStats3 extends HttpServlet
         String totalStock = "";
         String itemName = "";
         int type = 0;
         int itemId = 0;
         Statement stmt = null;
         ResultSet rs = null;
         Connection con = null;
         String query;
         PrintWriter out;     
         String url = "jdbc:mysql://macneill.cs.tcd.ie/odriscoi_db";
         public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
                   out= response.getWriter();
                   response.setContentType("text/html");
                   out.println("<HTML>");
                   out.println("<HEAD>");
                   out.println("<TITLE> Check Current Stock </TITLE>");
                   out.println("</HEAD>");
                   out.println("<body bgcolor=#FFFFFF background=\"U:/back.jpg\" link = white vlink = white>");
                   out.println("<font color=#FFFFFF face=COMIC SANS MS size=3>");
                   out.print("<form action=\"");
                   out.print("StockStats3\" ");
                   out.println("method=POST>");
                   out.println("<TD><h3><LEFT><font color=#FFFFFF face=COMIC SANS MS size=5>Click on Relevant Button to view Current Stock: </h3></TD>");
                   out.println("<TD><h3><LEFT><font color=#FFFFFF face=COMIC SANS MS size=3>KITCHEN FOODS: </h3></TD>");
                   out.println("<input type=submit name=action value=\"Meat \">");
                   out.println("<input type=submit name=action value=\"Fish\">");
                   out.println("<input type=submit name=action value=\"Fruit\">");
                   out.println("<input type=submit name=action value=\"Veg\">");
                   out.println("<input type=submit name=action value=\"Dairy\">");
                   out.println("<input type=submit name=action value=\"Herbs\">");
                   out.println("<input type=submit name=action value=\"Pasta\">");
                   out.println("<input type=submit name=action value=\"Sauces\">");
                   out.println("<input type=submit name=action value=\"Condiments\">");
                   out.println("<input type=submit name=action value=\"Total Food\">");
                   out.println("<TD><h3><LEFT><font color=#FFFFFF face=COMIC SANS MS size=3>BAR DRINKS: </h3></TD>");
                   out.println("<input type=submit name=action value=\"Soda\">");
                   out.println("<input type=submit name=action value=\"Water\">");
                   out.println("<input type=submit name=action value=\"Beer\">");
                   out.println("<input type=submit name=action value=\"Wine\">");
                   out.println("<input type=submit name=action value=\"Total Drink\">");
                   out.println("<PRE>");
                   out.println("<CENTER><TH><h3><A HREF= \"ManageOption \"><FONT face=arial>Back to Options</FONT></A></h3></TH><BR>");
                   out.println("</PRE>");
                   out.println("<PRE>");
                   out.println("<CENTER><TH><h3><A HREF= \"log \"><FONT face=arial>logout</FONT></A></h3></TH><BR>");
                   out.println("</PRE>");
                   out.println("<BR>");
                   out.println("</TR>");
                   out.println("</BODY>");
              out.println("</HTML>");
              out.close();
         public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
                   String msg11 = "";
                   String msg12 = "";
                   String msg13 = "";
                   String msg14 = "";
                   String msg15 = "";
                   String msg16 = "";
              String msg17 = "";
              String msg18 = "";
              String msg19 = "";
              String msg20 = "";
                   String msg2 = "";
              String msg3 = "";
              String msg4 = "";
              String msg5 = "";
                   String msg6 = "";
                   String msg7 = "";
                   String msg8 = "";
                   String msg9 = "";
         if (request.getParameter("action").equals("Meat"))
                   msg11 = getItemName(1);
                   msg12 = getStock(1);               
                   msg13 = getItemName(1);
                   msg14 = getStock(1);
                   msg15 = getItemName(2);
                   msg16 = getStock(2);
                   msg17 = getItemName(3);
                   msg18 = getStock(3);
                   msg19 = getItemName(4);
                   msg20 = getStock(4);
              //im only trying to work on one table at the moment
         if (request.getParameter("action").equals("Fish"))
              msg2 = getStock(5);
         if (request.getParameter("action").equals("Fruit"))
              msg3 = getStock(6);
         if (request.getParameter("action").equals("Veg"))
              msg4 = getStock(7);
         if (request.getParameter("action").equals("Dairy"))
              msg5 = getStock(8);
         if (request.getParameter("action").equals("Herbs"))
              msg6 = getStock(9);
         if (request.getParameter("action").equals("Pasta"))
              msg7 = getStock(10);
         if (request.getParameter("action").equals("Sauces"))
              msg8 = getStock(11);
         if (request.getParameter("action").equals("Condiments"))
              msg9 = getStock(12);
                   response.setContentType("text/html");
                        PrintWriter out = response.getWriter();
                        out.println("<HTML>");
                        out.println("<HEAD>");
                        out.println("<TITLE>Stock Results </TITLE>");
                        out.println("</HEAD>");
                        out.println("<body bgcolor=#FFFFFF background=\"U:/back.jpg\" link = white vlink = white>");
                        out.println("<font color=#FFFFFF face=COMIC SANS MS size=3>");
                        out.print("<form action=\"");
                        out.print("StockStats3\" ");
                        out.println("method=POST>");
                        out.println("<BR>");
                        out.println("</H2><TABLE BORDER='1' CELLSPACING='2' CELLPADDING='2'>");
                        out.println("<font color=#FFFFFF face=COMIC SANS MS size=3>");
                        out.println("<TR><TH><B>Item Name</B></TH><TH><B>Portions</B></TH></TR>");
                        out.println("<TR><TD>"+getItemName(itemId)+"</TD><TD>"+getStock(itemId)+"</TD></TR>");
                        out.println("</TABLE>");
                        out.println("<BR>");
                        out.println("<CENTER><TH><h3><A HREF= \"StockStats3 \"><FONT face=arial>Back</FONT></A></h3></TH><BR>");
                        out.println("</PRE>");
                        out.println("<PRE>");
                        out.println("<CENTER><TH><h3><A HREF= \"ManageOption \"><FONT face=arial>Back to Options</FONT></A></h3></TH><BR>");
                        out.println("</PRE>");
                        out.println("<PRE>");
                        out.println("<CENTER><TH><h3><A HREF= \"log \"><FONT face=arial>logout</FONT></A></h3></TH><BR>");
                        out.println("</PRE>");
                        out.println("<BR>");
                        out.println("</FORM>");
                        out.println("");
                        out.println("</BODY>");
                        out.println("</HTML>");
    //This method is used to retrieve the total stock of each item
         private String getStock(int itemId) throws ServletException, IOException
              String result = "";     
              try
                   String driver = "org.git.mm.mysql.Driver";
                   try
                        Class.forName(driver).newInstance();
                        //out.println("Driver Called!");
                   catch(java.lang.ClassNotFoundException e)
              System.err.print("Couldn't find ClassNotFoundException: ");
              System.err.println(e.getMessage());
              out.println(e.getMessage());
                   catch(Exception ex)
                        ex.printStackTrace();
                   Connection con = DriverManager.getConnection(url, "odriscoi", "3vk7WgdO");
                   //out.println("Connection made!");
                   Statement stmt = con.createStatement();
                   //get stock of items
                   String query = "SELECT Portions FROM Kitchen WHERE Item_ID = '"+itemId+"';";
                   result = query;
                   ResultSet rs = stmt.executeQuery(query);
                   while(rs.next())
                        totalStock = rs.getString("Portions");
                   rs.close();
                   stmt.close();
         con.close();
         catch(SQLException ex)
         out.println("SQLException: " + ex.getMessage());
         return totalStock;
    //Ths method is used to retrieve the name of each item
         private String getItemName(int itemId) throws ServletException, IOException
              String result = "";     
              try
                   String driver = "org.git.mm.mysql.Driver";
                   try
                        Class.forName(driver).newInstance();
                        //out.println("Driver Called!");
                   catch(java.lang.ClassNotFoundException e)
              System.err.print("Couldn't find ClassNotFoundException: ");
              System.err.println(e.getMessage());
              out.println(e.getMessage());
                   catch(Exception ex)
                        ex.printStackTrace();
                   Connection con = DriverManager.getConnection(url, "odriscoi", "3vk7WgdO");
                   //out.println("Connection made!");
                   Statement stmt = con.createStatement();
                   //get name of item
                   String query = "SELECT item FROM Kitchen WHERE item_ID = '"+itemId+"';";
                   result = query;
                   ResultSet rs = stmt.executeQuery(query);
                   while(rs.next())
                        itemName = rs.getString("item");
                   rs.close();
                   stmt.close();
         con.close();
         catch(SQLException ex)
         out.println("SQLException: " + ex.getMessage());
         return itemName;

    the following is my code to retrieve a table, maybe it gives u some ideas.
    Wolf
    ==========================================================================
    import java.io.*;
    import java.sql.*;
    import javax.naming.*;
    import javax.sql.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class Test extends HttpServlet {
         public void service(ServletRequest request, ServletResponse response)
              throws ServletException, IOException {
              Context initCtx=null;
              Context envCtx=null;
              DataSource ds=null;
              Connection conn=null;
              Statement stmt=null;
              ResultSet rs=null;
              response.setContentType("text/html");
              PrintWriter out = response.getWriter();
              try {
                   initCtx = new InitialContext();
                   envCtx = (Context)initCtx.lookup("java:comp/env");
                   ds = (DataSource)envCtx.lookup("jdbc/Bookingcomputer");
                   conn = ds.getConnection();
                   stmt=conn.createStatement();
    //               rs=stmt.executeQuery("SELECT s_code, description FROM computer");
                   rs=stmt.executeQuery("SELECT * FROM computer");
                   out.println("<HTML><HEAD><TITLE>Computer List</TITLE></HEAD>");
                   out.println("<BODY>");
                   out.println("<UL>");
                   out.println("<CENTER><FONT SIZE=\"4\"><B>ERC Computer List</B></FONT></CENTER>");
                   out.println("<center><table border=\"1\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse: collapse\" bordercolor=\"#111111\" width=\"80%\" id=\"AutoNumber1\">");
                   while(rs.next()) {
                        out.println("<tr>");
                        out.print("<td width=\"10\">");
                        out.print("<LI>");
                        out.print("</td>");
                        out.print("<td width=\"25%\"><B>");
                        out.print(rs.getString("s_code"));
                        out.print("</B></td>");
                        out.print("<td width=\"50%\">");
                        out.print(rs.getString("description"));
                        out.print("</td>");
                        out.print("<td width=\"25%\">");
                        out.print(rs.getString("capacity"));
                        out.print("</td>");
    //                    out.println("<LI>"+rs.getString("s_code")+" "+rs.getString("description") );
                        out.println("</tr>");
                   out.println("</table></center>");
                   out.println("</UL>");
    //               out.println("Hi Arthur, How are you doing?");
                   out.println("</BODY></HTML>");
              catch(SQLException ex) {
                   System.err.println("SQLException:"+ex.getMessage());
              } catch (NamingException e) {
                   e.printStackTrace();
              finally {
                   try {
                        if (conn!=null)
                             conn.close();
                   }catch(SQLException e){
                        e.printStackTrace();

Maybe you are looking for