Skip to Content

in this dynamic world, client need all thing dynamic, changes according to the situation. and also want to reduce all manual efforts.

As our adobe having many types of controls (fields), requirement may come like change this or that according to this or that value. Here i want to deliver some javascript code and expenations for looping all fields including master pages and body pages.

pageContent() Method

pageContent( INTEGER param1 [, STRING param2 [, BOOLEAN param3 ] ] )

Where,

param1 : page index

param2 : control type (field, draw, subform, area, pageArea, contentArea, empty (default))

param3 : 0 (scan body page), 1 (scan master page)

for detailed information read pageContent() Documentation: Adobe LiveCycle Designer ES2.


For all intrective controls in Body Page:

Button, Check Box, Date/Time Field, Drop-down List, Signature Field, Image Field, List Box, Numeric Field, Password Field, Radio Button, and Text Field.

var oNodes = xfa.layout.pageContent(this.layout.page(this)-1, "field", 0);
var oNodesCount = oNodes.length;
for (var i = 0; i < oNodesCount; i++) {
  oNodes.item(i).<any property name> = <new value>;
}

For all intrective controls in Body Page:

Circle, Line, Rectangle, Static Image, and Static Text.

var oNodes = xfa.layout.pageContent(this.layout.page(this)-1, "draw", 0);
var oNodesCount = oNodes.length;
for (var i = 0; i < oNodesCount; i++) {
  oNodes.item(i).<any property name> = <new value>;
}

For all intrective controls in Master Page:

Button, Check Box, Date/Time Field, Drop-down List, Signature Field, Image Field, List Box, Numeric Field, Password Field, Radio Button, and Text Field.

var oNodes = xfa.layout.pageContent(this.layout.page(this)-1, "field", 1);
var oNodesCount = oNodes.length;
for (var i = 0; i < oNodesCount; i++) {
  oNodes.item(i).<any property name> = <new value>;
}

For all static controls in Master Page:

Circle, Line, Rectangle, Static Image, and Static Text.

var oNodes = xfa.layout.pageContent(this.layout.page(this)-1, "draw", 1);
var oNodesCount = oNodes.length;
for (var i = 0; i < oNodesCount; i++) {
  oNodes.item(i).<any property name> = <new value>;
}

Hope this helps.

To report this post you need to login first.

6 Comments

You must be Logged on to comment or reply to a post.

  1. Sap abap

    Hi Prajesh,

    I want a help from you on a issue of Page Numbering.

    it is a adobe form issue- I have nested table and based on the index change of first table there is a page break now the requirement is if there is page break then page number shoulf reset say for first iteration it has 2 pages then it will print as 1 of 2 2 of 2, after page break say there are 3 pages then 1 of 3 2 of 3 3of 3 like,,,i m not able to find solution for this..could you pls help me

    (0) 
  2. Uday M

    Hi Prajesh,

    First I want to thank for this blog.

    Please help me for the below scenario.

    I have a deep table with multiple header records and each header record in that table is having it’s own item table. I want to print header data in master page since it has to print in top of all the pages. Please help me to make the header fields to be filled dynamically based on the first item records printing on the each page.

    All the data should print in single PDF document.

    Thanks in advance.

     

    Uday

    (0) 

Leave a Reply