I'm using ECS v1.4.1 and I've come across a little problem.  When
I try and insert font tags inside TD tags I have the data for the TD tags
repeating in each TD tag.  Here's a code snippet to demonstrate what I
mean.

import org.apache.ecs.html.*;
import java.io.*;

public class Test {

    public static void main(String args[]) {

        Font f = new Font()
            .setFace("Times")
            .setSize("+2");

        Html p = new Html()
            .addElement(new Body()
                .addElement(new Table(1)
                    .addElement(new TR()
                        .addElement(new TD()
                            .addElement(f
                                        .addElement(new B()
                                            .addElement("One"))))
                        .addElement(new TD()
                            .addElement(f
                                        .addElement("tw"))))));

        try {
        FileWriter fout = new FileWriter("out.html");
        String str = p.toString();
        fout.write(str, 0, str.length());
        fout.flush();
        fout.close();
        } catch(Exception e) { System.out.println(e); }

    }  // end main()
} // end Test

The file out.html contains this:
<html><body><table border="1"><tr><td><font size="+2" 
face="Times"><b>One</b>tw</font></td><td><font size="+2" 
face="Times"><b>One</b>tw</font></td></tr></table></body></html

Now either I'm not doing something right, or this is some sort of bug.
Could someone please advise on how to get around this problem?

---
[EMAIL PROTECTED]
Sum Ergo Cogito



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to