HTML Table lines limit

Hi,
We are displaying the trip details in a HTML page in ITS server.
It has been working fine until the upgrade to ECC 6.0.
Not when the trip has more line items (206 line items) the display gets
cutoff after 189. This number is not consistent, It varies depending on the
number of line items. There is no restriction on the number of pages.
So not sure why this is happening.We tried to increase the number of lines displayed in
a page , so as to display more line items, But even though those lines were displayed,
it was blank.
We tested the function Module that passes the line items in an internal table to the ITS ,
and that seems to be working fine. Not sure where else to check or how to fix this.
Any input is appreciated.
Thank you
Lalitha

Hi Lalitha,
This is due to frame size is the limit. the table is displayed in a frame. and here you are facing the issue.
Try to increase the frame size in SAP GUI. This problem will get solved.
Regards
satya

Similar Messages

  • 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

  • Please help me capturing data from HTML table

    Hello Everyone,
    Our Storage subsystem generates a html table containing all LUN allocation for printing. I am saving this html file on disk to collect all table infomation and to put it into a database.
    I am having problems extracting table information from the html file. I tried using regular expressions but still not going anywhere. Below is a sample few lines from the html file.
    Please your help is appreciated solving this problem how to collect this information from a HTML file or if Java has any class for this type of purpose.
    Please advice
    arsi
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <!-- saved from url=(0068)https://10.210.44.14/cgi/rsConfigPrintDisplay?200702121685061633,FS,2 -->
    <HTML><HEAD><TITLE>Volume Assignments</TITLE>
    <META http-equiv=Content-Type content="text/html; charset=windows-1252">
    <META content="MSHTML 6.00.2900.3020" name=GENERATOR></HEAD>
    <BODY><FONT face="Times New Roman,Times" size=2>
    <TABLE cellSpacing=1 cellPadding=3 border=2>
    <CAPTION>
    <H2>Volume Assignments</H2></CAPTION>
    <TBODY>
    <TR vAlign=top>
    <TH><FONT face="Times New Roman,Times" size=2>Volume</FONT></TH>
    <TH><FONT face="Times New Roman,Times" size=2>Location</FONT></TH>
    <TH><FONT face="Times New Roman,Times" size=2>LSS</FONT></TH>
    <TH><FONT face="Times New Roman,Times" size=2>Volume Type</FONT></TH>
    <TH><FONT face="Times New Roman,Times" size=2>Size</FONT></TH>
    <TH><FONT face="Times New Roman,Times" size=2>Storage Type</FONT></TH>
    <TH><FONT face="Times New Roman,Times" size=2>Host Port</FONT></TH>
    <TH><FONT face="Times New Roman,Times" size=2>Host Nicknames</FONT></TH></TR>
    <TR vAlign=top>
    <TD><FONT face="Times New Roman,Times" size=2>02A-25015</FONT></TD>
    <TD><FONT face="Times New Roman,Times" size=2>Device Adapter Pair 1</FONT>
    <BR><FONT face="Times New Roman,Times" size=2>Cluster 1, Loop A</FONT>
    <BR><FONT face="Times New Roman,Times" size=2>Array 2, Vol 042</FONT></TD>
    <TD><FONT face="Times New Roman,Times" size=2>0x10</FONT></TD>
    <TD><FONT face="Times New Roman,Times" size=2>Open System</FONT></TD>
    <TD><FONT face="Times New Roman,Times" size=2>000.9 GB</FONT></TD>
    <TD><FONT face="Times New Roman,Times" size=2>RAID-5 Array</FONT></TD>
    <TD><FONT face="Times New Roman,Times" size=2>Fibre Channel</FONT>
    <BR><FONT face="Times New Roman,Times" size=2>ID 00, LUN 502A</FONT></TD>
    <TD><FONT face="Times New Roman,Times" size=2>R1L01_0,</FONT> <BR><FONT
    face="Times New Roman,Times" size=2>R1L01_1,</FONT> <BR><FONT
    face="Times New Roman,Times" size=2>R2L08_1,</FONT> <BR><FONT
    face="Times New Roman,Times" size=2>R2L08_0,</FONT> <BR><FONT
    face="Times New Roman,Times" size=2>S3L06_0, S3L06_</FONT> <BR><FONT
    face="Times New Roman,Times" size=2>1, S4L06_0,</FONT> <BR><FONT
    face="Times New Roman,Times" size=2>S4L06_1</FONT></TD></TR>
    <TR vAlign=top>

    i wrote the programme for 2 stepper motor as attachment file below. they are run. but when the "start" button is ON then the "emergency stop" is not effects.
    for "emergency stop" functions, i used 4 limit contactors. if one of them is "on" then the programme will be stop.
    but in fact, when the system is running, i can not stop if one of the limit contacor is on.
    cuold you please help me to do with this problem.
    thanks
    Attachments:
    EMERGENCY STOP.vi ‏435 KB
    toolpaths-ut.vi ‏64 KB
    parallel program motor 1,2.vi ‏96 KB

  • Transfer of a HTML table value to corr. R/3 table

    I have a custom ESS service on which almost all Input fields are displayed using SAPgui for HTML, but one -- table control is done manually -- using pure HTML code;
       `SAP_DynproLayerBegin(024,017,014,001)`
       `SAP_InputField("WA32-ZZ_LICENSE2")`
       `SAP_DynproLayerEnd()`
    CUSTOM TABLE CONTROL ****    
      `SAP_DynproLayerBegin(004,019,083,006)`
     `#ZESS_WHO`
                   <!content table>
                   `if  ( TAB_PHONES-PTYPE.dim > 0 )`
    `repeat with j from 1 to TAB_PHONES-PTYPE.dim`
    `if ( CCODE.dim > 1 )`
    `elseif ( CCODE.dim == 1 )`
    `end`
    `if ( OKCODE == 'CHAN' )`
    `else`
    `end`
    `end`
    Phone type 
    Country Code 
    Area Code 
    Local Phone no. 
    Extension 
    `TAB_PHONES-PTYPE[j]` 
    `if ( OKCODE == 'CHAN' )`
    `CCODE` `CCODE_TXT` `else`
    `CCODE` `CCODE_TXT` `end`  `end`
    `CCODE_TXT[1]`
    `TAB_PHONES-ACODE[j]` 
    `TAB_PHONES-PHONE[j]` 
    `TAB_PHONES-EXT[j]` 
    `end`
          `SAP_DynproLayerEnd()`
    How do I get the value back from these HTML table control back to my actual R/3 table control -- like moving the new area code -- the user has entered to table control area code? And where do I write the code --ITS service side or corresponding R/3 tcode side? Please advise.

    Hi Kshitij,
    Not 100% sure if I understand this correctly, but do you have to use a table control on the R/3 side for it? You might also want to consider a Step-Loop instead. I used them a lot in cases when I had an undefinded number of lines with input fields and wanted to allow paging forwards backwards - like displaying 15 on each page.
    But I also can't see why this shouldn't work with a table control. What's the exact problem?
    Regards,
    Michael

  • I want to create an HTML table of img maps dynamically from DB retrieves...

    Hi,
    How do I build dynamic HTML code in a function and then populate a HTML region to render it.. (did I say that right?)
    I want to create an HTML table of img maps dynamically from DB retrieves...
    Thank you, Bill

    Vikas and Andy,
    Using Andy's code I'll go further...
    I want to create a function that returns HTML code that has been built dynamically.
    create or replace function "GET_CH_TABLE"
    return VARCHAR2
    is
    HTML_STRING VARCHAR2(2000); -- Create a string variable
    BEGIN
    HTML_STRING:= '<table align="center">' ||chr(10)||
    ' <tr>' ||chr(10)||
    ' <td> TEST ' ||chr(10)||
    ' /td>' ||chr(10)||
    ' /tr>' ||chr(10)||
    ' tr>' ||chr(10)||
    ' td>' ||chr(10)||
    ' a href=https:// ............etc. etc.. building the <TABLE> and <TD> cells having whatever I want... example.. changing the name of an image dependant on something else..
    return HTML_STRING; -- output the string to the region
    --also tried htp.p(HTML_STRING);
    END;
    =====================================
    Building the dynamic HTML is not my problem. It is how to get it into a region and to be read as HTML from a function call...
    I'd like the source of the region to be the returned HTML from a function call to GET_CH_TABLE();
    but it gives error:
    ORA-06550: line 1, column 7: PLS-00221: 'GET_CH_TABLE' is not a procedure or is undefined
    ORA-06550: line 1, column 7: PL/SQL: Statement ignored
    Debug:
    1: begin
    2: GET_CH_TABLE();
    3: end;
    I

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

  • Save as HTML - tables?

    Hello,
    we are trying to save the FM document as HTML using the built in save as functionality. The tables are exported, but no ruling/borders and straddling information is reflected in the output HTML.
    Does anybody know if there is a way to make FM to export tables with formatting information or any tool that is able to do that?
    Thanks in advance.
    Best regards,
    Viktor

    FM10.
    I don't have FM10, and haven't tried HTML generation since FM6 or so, but anyone who can help needs to know the version.
    but no ruling/borders and straddling information is reflected in the output HTML.
    The FM10 on-line help says, in the Troubleshooting and tips on HTML conversion
    Make sure the table formats you use have regular ruling lines defined for at least one body row. Otherwise, the HTML tables will have no lines around table cells.
    I would expect straddles to be converted to spans, since HTML has attributes for that.
    can you suggest some 3rd party sw?
    I'm not sure that's necessary or desired. Earlier versions of Frame used WebWorks Publisher. HTML generation is now built in. I don't know if you can even get WWP for FM10, or if it would provide any features not standard in FM10.

  • HTML table display issues in Safari and Firefox

    Hey,
    A few days ago, in both firefox and safari, i noticed that whenever i go to certain sites with (i'm assuming) what are HTML tables, they aren't displaying properly. The tables are going way bigger than they should.
    ex. When i go to craigslist.org and click on any link, each item on the page has way more space between lines than it should. To see what i mean check out these screen capture.
    http://www.killtheteleprompter.com/picture1.png
    http://www.killtheteleprompter.com/picture2.png
    Also, perhaps a related issue, in Firefox, the page scrolling isn't smooth anymore when i use my trackpad.
    I tried trashing the preferences for each browser in my library, to no avail. Any help would be awesome. thanks

    hey thanks. The links in the orgininal post are fixed. To view the difference, look at the captures, then type in the url that appears in the captures to see what it should look like.
    http://www.killtheteleprompter.com/picture1.png
    http://www.killtheteleprompter.com/picture2.png

  • Show results from the database to html tables?

    Hi,
    I am a PHP programmer and did a successful CMS program for a company. Now I have another project which is a web based system.
    I basically know how to do it and finish it in PHP.. but I am trying to do it using J2EE.. I am trying to learn J2EE now since I have been programming
    on J2SE for quite sometime..
    I am trying to show the results from a MySQL database on a table on J2EE but I am having hard time doing that. I am trying to research online and reading books but with no luck I can't find any resources on how to do that..If you guys can lead me into a resource where I can read how to do it? or just give any ideas on how to do it correctly I'll try to read and learn I will very much appreciate it.. here's my coding please look at it. Thank you very much
    I want to make it like this in a html table:
    userid username activated task
    1 alvin y delete(this will be a link to delete the user)
    Right now this is what I was able to do so far:
    Userid username activated task
    1
    alvin
    y
    Here are my codes... I am not even sure if I am doing it in the correct way...
    User.java
    mport java.sql.Connection;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Statement;
    import java.util.ArrayList;
    import java.util.List;
    public class Users {
    public List getUsers(){
    List names = new ArrayList();
    try{
    Connection con = DBConnect.getConnection();
    Statement stmt = con.createStatement();
    String sql = "select * from users";
    ResultSet rs = stmt.executeQuery(sql);
    while(rs.next())
    String userid = rs.getString("user_id");
    String usernames = rs.getString("user_name");
    String password= rs.getString("password");
    String activated= rs.getString("activated");
    names.add(userid);
    names.add(usernames);
    names.add(password);
    names.add(activated);
    catch(SQLException e)
    System.out.print(e);
    catch(Exception e)
    System.out.print(e);
    return names;
    UserServlet.java
    import java.io.IOException;
    import java.util.List;
    import javax.servlet.RequestDispatcher;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    public class UsersServ extends HttpServlet {
    private static final long serialVersionUID = 1L;
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    Users be =new Users();
    List result = be.getUsers();
    request.setAttribute("user_results", result);
    RequestDispatcher view = request.getRequestDispatcher("manage_users1.jsp");
    view.forward(request, response);
    manage_users1.jsp
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <%@page import = "java.util.*" %>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>Insert title here</title>
    </head>
    <body>
    <%
    List results = (List)request.getAttribute("user_results");
    Iterator it = results.iterator();
    out.print("<table border = 1>");
    out.print("<th>");
    out.print("userid");
    out.print("</th>");
    out.print("<th>");
    out.print("username");;
    out.print("</th>");
    while(it.hasNext()){
    out.print("<tr><td> " + it.next()+"</td></tr>");
    out.print("</table>");
    %>
    </body>
    </html>

    I suggest:
    1: you use this:
    e.printStackTrace()
    instead of this:
    System.out.print(e);
    so it will tell you what line it crashed on.
    2: In the code below,here is how you mix coding html tags and java scriptlets
    (you should never have to use out.print()):. In a later project, you can learn how to use JSTL
    instead of java scriplets (I suggest using java scriptlets for now until you have more JSP experience).
    FROM:
    <html>
    <%
    //some java code goes here
    out.print("<th>");
    //some more java code goes here
    out.print("<tr>");
    %>
    TO:
    <html>
    <% //some java code goes here%>
    <th>
    <%//some more java code goes here%>
    <tr>
    3: Put a lot of System.println() statements in your *.java classes to verify what its doing (you can learn how to use a debugger later).
    4: I highly recommend reading a book on JSP/servlets cover to cover.
    Here's a simple MVC design approach I previously posted:
    http://forums.sun.com/thread.jspa?messageID=10786901

  • How to change attributes of HTML table in HTMLDocument

    Hi
    I am trying to change background of table cell but unsuccessfully. First of all I did not found any suitable method in API so I have to inherit HTMLDocument and make my own
    public static class ExtendedHtmlDocument extends HTMLDocument {
    public void replaceAttributes(Element element, AttributeSet attributes, HTML.Tag tag) {
    try {
      writeLock();
      int offset = element.getStartOffset();
      int length = element.getEndOffset() - offset;
      MutableAttributeSet mutableAttributes = (MutableAttributeSet) element.getAttributes();
      mutableAttributes.removeAttributes(attributes.getAttributeNames());
      mutableAttributes.addAttributes(attributes);
      DefaultDocumentEvent changes = new DefaultDocumentEvent(offset, length, DocumentEvent.EventType.CHANGE);
      changes.addEdit(new AttributeUndoableEdit(element, attributes.copyAttributes(), true));
      changes.end();
      fireChangedUpdate(changes);
      fireUndoableEditUpdate(new UndoableEditEvent(this, changes));
    finally {
      writeUnlock();
    }When I usethis code and dump exisiting document I see changes, e.g. I changed background in cell:
    private void setCellBackground(Element element) {
      SimpleAttributeSet set = new SimpleAttributeSet();
      set.addAttribute("bgcolor", "black");
      doc.replaceAttributes(element, set, HTML.Tag.TD);
      doc.dump(System.out);
      //editor.setText(editor.getText());
    } and extract from dump
    <html
      name=html
    >
        <table
          width=100%
            <td
              bgcolor=black
              name=td
            >But I do not see changes in the view, cell has the same background. The view is updated only if I uncomment last line "editor.setText(editor.getText())", but I think it is not good to update this way.
    Thanks.

    Here I put an example and you can play with different strange aspects of HTMLDocument implementation
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.text.*;
    import javax.swing.text.html.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    public class TableEditor implements ActionListener {
        private JEditorPane editor;
        private ExtendedHtmlDocument doc;
        public TableEditor(JEditorPane editor, ExtendedHtmlDocument doc) {
            this.editor = editor;
            this.doc = doc;
        public void actionPerformed(ActionEvent e) {
            Element element = doc.getCharacterElement(editor.getCaretPosition());
            Element parent = element.getParentElement();
            while (parent != null && !parent.getName().equals("td")) {
                parent = parent.getParentElement();
            if (parent == null) {
                JOptionPane.showMessageDialog(null, "Select cell to edit properties");
            } else {
                SimpleAttributeSet attributes = new SimpleAttributeSet();
                attributes.addAttribute(HTML.Attribute.BGCOLOR, "gray");
                attributes.addAttribute(HTML.Attribute.ALIGN, "right");
                doc.replaceAttributes(parent, attributes);
    //            doc.replaceAttributes(parent, attributes);
    //            editor.setText(editor.getText());
                doc.dump(System.out);
        private static class ExtendedHtmlEditorKit extends HTMLEditorKit {
            public Document createDefaultDocument() {
                StyleSheet styles = getStyleSheet();
                StyleSheet styleSheet = new StyleSheet();
                styleSheet.addStyleSheet(styles);
                ExtendedHtmlDocument doc = new ExtendedHtmlDocument(styleSheet);
                doc.setParser(getParser());
                return doc;
        public static class ExtendedHtmlDocument extends HTMLDocument {
            public ExtendedHtmlDocument(StyleSheet styles) {
                super(styles);
            public void replaceAttributes(Element element, AttributeSet attributes) {
                try {
                    writeLock();
                    MutableAttributeSet mutableAttributes = (MutableAttributeSet) element.getAttributes();
                    mutableAttributes.removeAttributes(attributes.getAttributeNames());
                    mutableAttributes.addAttributes(attributes);
                    int offset = element.getStartOffset();
                    int length = element.getEndOffset() - offset;
                    DefaultDocumentEvent changes = new DefaultDocumentEvent(offset, length, DocumentEvent.EventType.CHANGE);
                    changes.addEdit(new AttributeUndoableEdit(element, attributes.copyAttributes(), true));
                    changes.end();
                    fireChangedUpdate(changes);
                    fireUndoableEditUpdate(new UndoableEditEvent(this, changes));
                finally {
                    writeUnlock();
        public static void main(String args[]) throws Exception {
            HTMLEditorKit kit = new ExtendedHtmlEditorKit();
            final ExtendedHtmlDocument doc = (ExtendedHtmlDocument) kit.createDefaultDocument();
            StringReader reader = new StringReader("<table border='1' width='100%'>\n" +
                    "    <tr>\n" +
                    "        <td>Cell1-1</td>\n" +
                    "        <td>Cell1-2</td>\n" +
                    "    </tr>\n" +
                    "    <tr>\n" +
                    "        <td>Cell2-1</td>\n" +
                    "        <td>Cell2-2</td>\n" +
                    "    </tr>\n" +
                    "    <tr>\n" +
                    "        <td>Cell3-1</td>\n" +
                    "        <td>Cell3-2</td>\n" +
                    "    </tr>\n" +
                    "</table><p>paragraph</p>");
            kit.read(reader, doc, 0);
            final JEditorPane editorPane = new JEditorPane();
            editorPane.setIgnoreRepaint(false);
            editorPane.setEditable(true);
            editorPane.setEditorKit(kit);
            editorPane.setDocument(doc);
            JScrollPane scrollPane = new JScrollPane(editorPane);
            JPanel menu = new JPanel(new FlowLayout(FlowLayout.LEFT));
            menu.add(new JButton(new AbstractAction("Cell properties") {
                public void actionPerformed(ActionEvent e) {
                    new TableEditor(editorPane, doc).actionPerformed(e);
            JFrame frame = new JFrame();
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.getContentPane().setLayout(new BorderLayout());
            frame.getContentPane().add(scrollPane, BorderLayout.CENTER);
            frame.getContentPane().add(menu, BorderLayout.NORTH);
            frame.setSize(800, 500);
            frame.setVisible(true);
    }Look at actionPerformed implemetation I am going to change cell background and alignment - background is changed but alignment is not, when you uncomment second doc.replaceAttributes(parent, attributes) - it will work. In both cases align attribute exists in cell (look at the dump in system.out)

  • Fix for PENDING in javax.swing.text.html.ParagraphView line #131

    Investigating source of HTMLEditorKit I found many PENDING things. That's fix for one of them - proper minimal necessary span detecting in table cells.
    Hope it will help to somebody else.
    import javax.swing.*;
    import javax.swing.text.html.*;
    import javax.swing.text.html.ParagraphView;
    import javax.swing.text.*;
    import java.awt.*;
    import java.text.*;
    import java.util.ArrayList;
    public class App extends JFrame {
        public static String htmlString="<html>\n" +
                "<body>\n" +
                "<p>The following table is used to illustrate the PENDING in javax.swing.text.html.ParagraphView line #131 fix.</p>\n" +
                "<table cellspacing=\"0\" border=\"1\" width=\"50%\" cellpadding=\"3\">\n" +
                "<tr>\n" +
                "<td>\n" +
                "<p>111111111111111111111111111111111<b>bold</b>22222222222222222222222222222</p>\n" +
                "</td>\n" +
                "<td>\n" +
                "<p>-</p>\n" +
                "</td>\n" +
                "</tr>\n" +
                "</table>\n" +
                "<p></p>\n" +
                "</body>\n" +
                "</html>";
        JEditorPane editor=new JEditorPane();
        JEditorPane editor2=new JEditorPane();
        public static void main(String[] args) {
            App app = new App();
            app.setVisible(true);
        public App() {
            super("HTML span fix example");
            setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            JSplitPane split=new JSplitPane(JSplitPane.VERTICAL_SPLIT, createFixedPanel(), createOriginalPanel());
            getContentPane().add(split);
            setSize(700, 500);
            split.setDividerLocation(240);
            setLocationRelativeTo(null);
        JComponent createOriginalPanel() {
            JPanel p=new JPanel(new BorderLayout());
            p.add(new JLabel("Original HTMLEditorKit"), BorderLayout.NORTH);
            HTMLEditorKit kit=new HTMLEditorKit();
            editor2.setEditorKit(kit);
            editor2.setContentType("text/html");
            editor2.setText(htmlString);
            p.add(new JScrollPane(editor2), BorderLayout.CENTER);
            return p;
        JComponent createFixedPanel() {
            JPanel p=new JPanel(new BorderLayout());
            p.add(new JLabel("Fixed HTMLEditorKit"), BorderLayout.NORTH);
            HTMLEditorKit kit=new MyHTMLEditorKit();
            editor.setEditorKit(kit);
            editor.setContentType("text/html");
            editor.setText(htmlString);
            p.add(new JScrollPane(editor), BorderLayout.CENTER);
            return p;
    class MyHTMLEditorKit extends HTMLEditorKit {
        ViewFactory defaultFactory=new MyHTMLFactory();
        public ViewFactory getViewFactory() {
            return defaultFactory;
    class MyHTMLFactory extends HTMLEditorKit.HTMLFactory {
        public View create(Element elem) {
            View v=super.create(elem);
            if (v instanceof ParagraphView) {
                v=new MyParagraphView(elem);
            return v;
    class MyParagraphView extends ParagraphView {
        public MyParagraphView(Element elem) {
            super(elem);
        protected SizeRequirements calculateMinorAxisRequirements(int axis, SizeRequirements r) {
            r = super.calculateMinorAxisRequirements(axis, r);
            float min=getLongestWordSpan();
            r.minimum = Math.max(r.minimum, (int) min);
            return r;
        public float getLongestWordSpan() {
            if (getContainer()!=null && getContainer() instanceof JTextComponent) {
                try {
                    int offs=0;
                    JTextComponent c=(JTextComponent)getContainer();
                    Document doc=getDocument();
                    int start=getStartOffset();
                    int end=getEndOffset()-1; //don't need the last \n
                    String text=doc.getText(start, end - start);
                    if(text.length() > 1) {
                        BreakIterator words = BreakIterator.getWordInstance(c.getLocale());
                        words.setText(text);
                        ArrayList<Integer> wordBounds=new ArrayList<Integer>();
                        wordBounds.add(offs);
                        int count=1;
                        while (offs<text.length() && words.isBoundary(offs)) {
                            offs=words.next(count);
                            wordBounds.add(offs);
                        float max=0;
                        for (int i=1; i<wordBounds.size(); i++) {
                            int wStart=wordBounds.get(i-1)+start;
                            int wEnd=wordBounds.get(i)+start;
                            float span=getLayoutSpan(wStart,wEnd);
                            if (span>max) {
                                max=span;
                        return max;
                } catch (BadLocationException e) {
                    e.printStackTrace();
            return 0;
        public float getLayoutSpan(int startOffset, int endOffset) {
            float res=0;
            try {
                Rectangle r=new Rectangle(Short.MAX_VALUE, Short.MAX_VALUE);
                int startIndex= layoutPool.getViewIndex(startOffset,Position.Bias.Forward);
                int endIndex= layoutPool.getViewIndex(endOffset,Position.Bias.Forward);
                View startView=layoutPool.getView(startIndex);
                View endView=layoutPool.getView(endIndex);
                int x1=startView.modelToView(startOffset,r,Position.Bias.Forward).getBounds().x;
                int x2=endView.modelToView(endOffset,r,Position.Bias.Forward).getBounds().x;
                res=startView.getPreferredSpan(View.X_AXIS)-x1;
                for (int i=startIndex+1; i<endIndex; i++) {
                    res+=layoutPool.getView(i).getPreferredSpan(View.X_AXIS);
                res+=x2;
            } catch (BadLocationException e) {
                e.printStackTrace();
            return res;
    }Regards,
    Stas

    I'm changing the foreground color with
    MutableAttributeSet attr = new SimpleAttributeSet();
    StyleConstants.setForeground(attr, newColor);
    int start=MyJTextPane..getSelectionStart();
    int end=MyJTextPane.getSelectionEnd();
    if (start != end) {
    htmlDoc.setCharacterAttributes(start, end, attr, false);
    else {
    MutableAttributeSet inputAttributes =htmlEditorKit.getInputAttributes();
    inputAttributes.addAttributes(attr);   

  • How do you write an output in columns to an html table?

    Ive written two programs. My first program compares the difference of two text files and prints the differences in an output. My second program creates a simple Html table. I would like to write my output to this table. How would I go about doing this in java?
    Thanks in advance for your help.

    Thanks guys for the insight. Im very new to java so I'm a complete novice when it comes to writing code. What I came to realize was I needed to do was build a dynamic table. My issue was that I was building a static table and I couldint populate the table with my results. Below is an example of the code I wrote for my table. My apologies if didnt format my code correctly.
    import java.io.BufferedWriter;
    import java.io.File;
    import java.io.FileWriter;
    import java.io.IOException;
    import java.util.Set;
    public class HtmlDataTable {
      public void writehtmltable(Set<String> filenameSet){
      //creates table in the following path
      File htmltable = new File("C:/Output.html");
      try {
      BufferedWriter bw = new BufferedWriter(new FileWriter(htmltable));
      //write html data table
      bw.write(htmltop);
      for (String jarfilename:filenameSet){
      String line="<tr>  <td> </td>      <td> </td> </td>      <td>"+jarfilename + " </tr>";
      bw.write(line);
      bw.write(htmlbottom);
      //close the resource
      bw.close();
      } catch (IOException e) {
      e.printStackTrace();
    private static String htmltop = "<!DOCTYPE html>\n"+
                                      "<html>\n"+
                                         "<head>"+
                                         "<title>Jar Filename Existance Check</title>"+
                                         "<style>"+
                                         "table, th, td {"+
                                         "    border: 2px solid black;"+
                                         "}"+
                                         "</style>"+
                                         "</head>"+
                                         "<body>"+
                                         "<table>\n"+
                                         "   <tr>     <th colspan='100'>" +
                                         "<h3><br>Jarfilename Existance Check</h3>      </th>   </tr>" +
                                         "<th>POM File Data</th> <th>Lib Directory Files</th> <th>Missing Jarfiles</th>";
      private static String htmlbottom = "</table></body></html>";
    public static void main(String[] args) {
      new HtmlDataTable().writehtmltable(null);

  • How to insert html table tag in flash.

              i am trying to insert my html table format into flash... but flash doesn't support that html table tags....
    i'm creating a filp book for help manual..  In that we use flash  and html tags... His there any other way to insert html table in to flash...
    give ur suggestions..
    thanks.

    As you say, Flash does not support html table tags.  Create your own tables using textfields and if you need borders around cells use either textfield borders or lines surrounding the textfields.

  • Region Source Line Limit?

    I have a plsql anonymous block which returns html code for the page.This reproduces the same page multiple times with page breaks between each one (for printing purposes).
    when the region source is more than 350 lines I cannot 'apply changes'. I just get redirected to 'page cannot be displayed' but if I reformat the code so it takes up fewer lines it apply's fine.
    Is there a line limit on the region source? If so is it documented and why is there no error message for such cases?
    Thanks
    Tom

    Hello,
    That's basically what Scott is telling him to do. Just store his code in a stored procedure in the database and that call the procedure from his region.
    It's a very good way to get all your custom plsql code in one place instead of spread around your application.
    Carl
    Message was edited by:
    Carl Backstrom

  • "Convert Text to Table" Size limit issue?

    Alphabetize a List
    I’ve been using this well known work around for years.
    Select your list and in the Menu bar click Format>Table>Convert Text to Table
    Select one of the column’s cells (1st click selects entire table, 2nd click selects individual cell)
    Open “Table Inspector” (Click Table icon at top of Pages document)
    Make sure “table” button is selected, not “format” button
    Choose Sort Ascending from the Edit Rows & Columns pop-up menu
    Finally, click Format>Table>Convert Table to Text.
    A few days ago I added items & my list was 999 items long, ~22 pages.
    Tonight, I added 4 more items. Still the same # pages but now 1,003 items long.
    Unable to Convert Text to Table! Tried for 45 minutes. I think there is a list length limit, perhaps 999 items?
    I tried closing the document w/o any changes. Re-opening Pages & re-adding my new items to the end of the list as always & once again when I highlight list & Format>Table>Convert Text to Table .....nothing happens! I could highlight part of the list up to 999 items & leave the 4 new items unhighlighted & it works. I pasted the list into a new doc and copied a few items from the middle of the list & added them to the end of my new 999 list to make it 1003 items long (but different items) & did NOT work. I even attempted to add a single new item making the list an even 1000 items long & nope, not working. Even restarted iMac, no luck.
    I can get it to work with 999 or fewer items easily as always but no way when I add even a single new item.
    Anyone else have this problem?  It s/b easy to test out. If you have a list of say, 100 items, just copy & repeatedly paste into a new document multiple times to get over 1,000 & see if you can select all & then convert it from text to table.
    Thanks!
    Pages 08 v 3.03
    OS 10.6.8

    G,
    Yes, Pages has a table size limit, as you have discovered. Numbers has a much greater capacity for table length, so if you do your sort in Numbers you won't have any practical limitation.
    A better approach than switching to Numbers for the sort would be to download, install and activate Devon Wordservice. Then you could sort your list without converting it to a table.
    Jerry

Maybe you are looking for

  • Help for a thick one

    I have inherited a Nokia 6630 from my Son and although I can connect it through a Dongle I cannot Sync it as I am running isync 1.5. Q. is there any way of upgrading 1.5 to 2.2 with out purchasing a completely new OSx package. please help as I would

  • Query rgdng hiding reports in obiee

    Hi, I have a section having 5 reports.I want to show only those reports which returns data.I want to hide altogether the reports which don not return any data.I don't even want to display any no result message.Also I want all these reports in one sin

  • Why are my old playlists are gone with the new iTunes?

    I think I know how to navigate the new iTunes interface now, but I cannot find the unique playlists I made of songs in my library. All the albums I made are there, but not "And Yet Another Oldies but Goodies" and those like it. What happened? Can I f

  • WLS doesn't start, plz help!!!

    Hello, I have been getting this nasty error when trying to start weblogic server through my newly created domain. The WebLogic Server did not start up properly. Reason: weblogic.security.SecurityInitializationException: Authentication denied: Boot id

  • Automatic date in variables

    Hi all!! I have this requeriment; Im using a WAD, and the user fill the variables for a range of dates; then the user can be save a view from the query and use it later. The view is saved with the values that the user fill in the variables; is possib