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.