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.

10 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) 
  3. KKP Kumar

    Hi Prajesh,

    Can you please help with below scenario:

    I ha ve requirement like when user click on button it picks the position number based on position I am filling Qualification details, Here one field called Degree which is drop down, I want to modify this field property Read only and choose value. If position have degree level already in Org structure I need to set Degree field read only. If org structure don’t have value I have to enable that drop down to chose one.¬† I have kept below code it is working first time like if first time position chosen if it don’t have the value drop down coming, and if i chose which have the value it is setting to read only if I do again which don’t have degree level it setting to display only and not clearing old value.

    This code written in Java Script & Client and Serve level.

    if (xfa.resolveNode(“data.EmploymentAndEducation.Education.FIELD[1]”).rawValue != null) {
    xfa.resolveNode(“data.EmploymentAndEducation.Education.FIELD[1]”).access = “readOnly”;
    } else {xfa.resolveNode(“data.EmploymentAndEducation.Education.FIELD[1]”).access = “”;}

     

    Please help. Thanks

     

    (0) 

Leave a Reply