[seam-commits] Seam SVN: r11940 - branches/community/Seam_2_2/src/pdf/org/jboss/seam/pdf/ui.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Fri Jan 8 12:29:57 EST 2010


Author: norman.richards at jboss.com
Date: 2010-01-08 12:29:57 -0500 (Fri, 08 Jan 2010)
New Revision: 11940

Modified:
   branches/community/Seam_2_2/src/pdf/org/jboss/seam/pdf/ui/UIChapter.java
   branches/community/Seam_2_2/src/pdf/org/jboss/seam/pdf/ui/UISection.java
Log:
JBSEAM-2578

Modified: branches/community/Seam_2_2/src/pdf/org/jboss/seam/pdf/ui/UIChapter.java
===================================================================
--- branches/community/Seam_2_2/src/pdf/org/jboss/seam/pdf/ui/UIChapter.java	2010-01-08 13:10:23 UTC (rev 11939)
+++ branches/community/Seam_2_2/src/pdf/org/jboss/seam/pdf/ui/UIChapter.java	2010-01-08 17:29:57 UTC (rev 11940)
@@ -8,7 +8,7 @@
    public static final String COMPONENT_TYPE = "org.jboss.seam.pdf.ui.UIChapter";
 
    Integer number = 1;
-   Integer numberDepth = 1;
+   String chapterTitle;
 
    public Chapter getChapter()
    {
@@ -19,11 +19,6 @@
    {
       this.number = number;
    }
-   
-   public void setNumberDepth(Integer numberDepth)
-   {
-      this.numberDepth = numberDepth;
-   }
 
    @Override
    public Object getITextObject()
@@ -38,7 +33,13 @@
    {
       number = (Integer) valueBinding(context, "number", number);
       numberDepth = (Integer) valueBinding(context, "numberDepth", numberDepth);
+      chapterTitle = (String) valueBinding(context, "chapterTitle", chapterTitle);
+
       section = new Chapter("", number);
       section.setNumberDepth(numberDepth);
+      
+      if (chapterTitle != null) {
+          section.setBookmarkTitle(chapterTitle);
+      }
    }
 }

Modified: branches/community/Seam_2_2/src/pdf/org/jboss/seam/pdf/ui/UISection.java
===================================================================
--- branches/community/Seam_2_2/src/pdf/org/jboss/seam/pdf/ui/UISection.java	2010-01-08 13:10:23 UTC (rev 11939)
+++ branches/community/Seam_2_2/src/pdf/org/jboss/seam/pdf/ui/UISection.java	2010-01-08 17:29:57 UTC (rev 11940)
@@ -9,12 +9,18 @@
 
    Section section;
    Integer numberDepth;
+   String sectionTitle;
 
    public void setNumberDepth(Integer numberDepth)
    {
       this.numberDepth = numberDepth;
    }
-
+      
+   public void setSectionTitle(String sectionTitle)
+   {
+      this.sectionTitle = sectionTitle;
+   }
+    
    public Section getSection()
    {
       return section;
@@ -56,6 +62,12 @@
       }
 
       section = sectionParent.addSection(new Paragraph(""), numberDepth);
+      
+      sectionTitle = (String) valueBinding(context, "sectionTitle", sectionTitle);
+      if (sectionTitle != null)
+      {
+         section.setBookmarkTitle(sectionTitle);
+      }
    }
 
    private int countSectionParents(UISection component, int level)



More information about the seam-commits mailing list