I have a button to add a row in the table header of a LiveCycle dynamic form and would like to hide that button after someone clicks a 'Lock' button. The individual table elements are fine as are items in the master page. But, I don't see where I hide the Table elements that are repeated to subsequent pages (header/footer).
Can anyone help?
Solved! Go to Solution.
Views
Replies
Total Likes
On the button add the code app.alert(this.somExpression) This is only a temporary measure to allow you to see the expression that you must reference in your for loop. Now render your form and have the table span across multiple pages. Hit the button on a coupe of different pages. It ill diosplay the somExpression for the button that you have hit. Note the similarities in the name ...you will see that the Expressions are the same except for the Page Name occurance marked by [n]. This repeated occurance is what you need to find out ....so you can use the instanceManger,count to find out how many there are and then construct your for loop to loop through each occurance and change the presence of the button.
make sense?
Paul
Views
Replies
Total Likes
Either move the button out of the header (so it is not repeated on each page) or use a for loop to hide all ofthe occurances of the button starting at occurance 1 and ending at Header.instanceManager.count
Paul
Views
Replies
Total Likes
But, how do I reference the repeated button in each header?
It is in the first column of a table, called Table1, and is repeated on each page.
Views
Replies
Total Likes
On the button add the code app.alert(this.somExpression) This is only a temporary measure to allow you to see the expression that you must reference in your for loop. Now render your form and have the table span across multiple pages. Hit the button on a coupe of different pages. It ill diosplay the somExpression for the button that you have hit. Note the similarities in the name ...you will see that the Expressions are the same except for the Page Name occurance marked by [n]. This repeated occurance is what you need to find out ....so you can use the instanceManger,count to find out how many there are and then construct your for loop to loop through each occurance and change the presence of the button.
make sense?
Paul
Views
Replies
Total Likes
Makes perfect sense. I'll give it a try. Thanks.
Views
Replies
Total Likes
I got it working, but it wasn't using Header.instanceManager.count. Header.instanceManager.count seemed to be counting the number of header rows in the table, not the number of pages it rendered on. When I added enough table rows to get to 5 pages, it still only counted 1.
I used xfa.host.numPages to itterate throught the pages, now that I know where the button is stored.
It is working great. Thanks for your help.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies