cancel
Showing results for 
Search instead for 
Did you mean: 

adobe livecycle designer - problem with multiple binding in distint pages

0 Kudos

I have a requirement to develop a form with

     multiple workers

     odd and even pages are diferente (even pages have footer and side bar )

     all the odd pages must have the name and company logo of the worker

     all the even pages must also have the workers name and company logo (and also a list of items for that worker)

I have created

     a table with all the workers and each line of that table has the name and logo

     two master pages (1 for odd, 1 for even pages)

     one page group

               starting at "even_page" page,

               after go to "even_page_content_area"

               overflow go to "even_page_content_area"

The problem is

     the worker name should appear on 2 fields (odd page master pager, and page group (used in even pages content) ) and the binding cannot be used twice or the first field will apeear empty.

     if the worker_name have diferent bindings (creating a new name field), after the overflow, the odd page will show a diferent worker name than the next even page.

     I cant use global field binding because if i do, all the workers will have the same name

Can somebody give me an ideia on how to address this problem?

Accepted Solutions (1)

Accepted Solutions (1)

Florian
Active Contributor
0 Kudos

Hi miguel,

just create a second flowarea for the name and logo. You know, so you can handle this stuff in the designview and a binding to multiply places are accepted.

Another solution is to create new fields in the interface and double your variables there, but that is not a "good" solution in case of the design-patterns of aif.

There are some more solutions in my mind, but I think two are enough to get you out of the situation

~Florian

BTW: There is a own space for AIF here:

0 Kudos

Hi Florian, thanks for your reply.

You mean creating a second flow in the page group? The problem is when one worker items cant fit on one page I'll have an overflow that will pass to the next page. The forms witch were already printed in the previous page will not be printed again.

I guess the 2nd solution you sugested is what i meant with "if the worker_name have diferent bindings (creating a new name field), after the overflow, the odd page will show a diferent worker name than the next even page." I created a new field in the interface and used it in the first page. The problem is the binding index, in case of overflow, is diferent for the odd and even pages. I suppose its because the odd page(page 1) was completed, but the even page(page 2) has an overflow (hence its not completed) - the overflow will create a new odd (3) and even page(4) but the page 3 has the "current" index at the 2nd  table line  and the page 4 still has the current index at the 1st line.

I wonder if there's a way of changing the page binding index at runtime, something like "this.bind = $.workers_table[1];"

PS: I also asked for this to be moved to Adobe Forms interface as suggested.

Best regards,

Miguel Arcanjo

Florian
Active Contributor
0 Kudos

Hi miguel,

I was thinking about something like that in my second thought. Interface wasn't the best description, what I got in my mind is a global variable in the form itself. You know, located at the properties.

(Javascript might not be complete, because I do not got a system available)

var workername;

workername = xfa....workers_table[1];

and with this snippet of coding you go print it in the sections you want it, masterpage or even designview subforms. It is your own variable in your contex you got full control about it.

~Florian

0 Kudos

when you say "created at properties", do you still need "var workername" in the javascript? arent this muttual exclusive?

when you say "xfa....workers_table[1]; " we'll be acessing a layout field from other page with a binding or the interface structure itsellf? Because on master page(page 1 and page 3) ill need to get the information that will show on page 2 and 4 (for example)

im kind of new in XFA.. ive done some interfaces and layout stuff but the xfa events and classes are still not very clear to me..

I created a properties variable lv_fullname, and ill fill it in the page form (:ready:form event)  using

     lv_fullname.value = this.GV_FULLNAME.rawValue ;

then int the masterpage (:ready:layout) i used

     this.GV_HDR_FULLNAME.rawValue = lv_fullname.value;

but it seems all the pages :ready:form  are getting processed before the masterpage (:ready:layout) because all the workers are having the same name.

it also seems the :ready:form events first for the masterpages and only then for the main pages because if use the same event for both, i get empty worker names.

i then tryed to create other variable name like an array. fill the array in design :ready:form events using

if (lt_fullname_array == null )

    {var lt_fullname_array = new array();

    }

lt_fullname_array.push(this.GV_FULLNAME.rawValue) ;

and fill the masterpage on the next event ready:layout using

     this.GV_HDR_FULLNAME.rawValue = lt_fullname_array[1];

but the arrays does not seem to work (altougth the script sintaxe verification doesnt show any error)

I'm clueless here

Florian
Active Contributor
0 Kudos

You don't need the var anymore. I just want to make my example more readable

Maybe you are using the wrong event?

Have a look at the official helpsite:

LiveCycle ES2 * Adobe LiveCycle Designer ES2

I think this will bring light to it. The sfa-node is the rootnode of your hole input, you are passing trough the interface. That's why you always can assign everything if you use it. You have to create a script, which tells you what data you are printing at each page, so you can assign the correct worker.

It is not that easy to understand, I know what you mean.

Hope this helps you to solve your problem.

~Florian

0 Kudos

Thanks again Florian,

That representes exactly what i understood about the events order.. Thanks for pointing it for me.

Since the javascript array does not work, how can i access that interface data using the xfa?

For acessing the ive tried these 5 options (master page ready:layout event) but nothing seems to work:

var workers_list = ref(xfa.record);

var worker = xfa.nodes.gt_workers[1];

var worker = $data.item(0).gt_workers[1];

var workers = $data.gt_workers; this.GV_HDR_FULLNAME.rawValue = workers.item(1).gv_fullname;

var workers= ref(xfa.record.gt_workers); this.GV_HDR_FULLNAME.rawValue = workers[1].gv_fullname;

Florian
Active Contributor
0 Kudos

Hi miguel,

here is a discussion which anser your question already.

That is a part of the answer, just in case the link is someday broken for a reason (It is javascript)

Data View:

PDFData

  +-- Classification (1-1)

        +-- ClassNode (0-n)

        |     +-- ClassLeaf (0-n)

        |     |     +-- value (attribute)

        |     +-- value  (attribute)

        |     +-- index (attribute)        

        +-- nodevalue (attribute)

        +-- leafvalue   (attribute)


//var selection --> you have assigned "VALVES"

  var onodeCN =  xfa.resolveNodes("xfa.record.Classification.ClassNode[*].value");

// get the node with the valves -->

               for (var i = 0; i < onodeCN.length ; i++) {

                    if ( onodeCN.item(i).value == selection ) {

                                     //get the Leaves of Node VALVES

                                     var onodeVALS = xfa.resolveNodes("xfa.record.Classification.ClassNode[+i+].ClassLeaf[*].value");

                                     for (var j = 0; j < onodeVALS.length ; j++) {

                                       // insert values of Leave to 2nd drop down

                            XXX.addItem(onodeVALS.item(j).value, onodeVALS.item(j).value);

                                  }

                     }

                    }

~Florian

Answers (0)