Dynamic table numeration (removeInstance problem)


hello guys,

 

i'm trying create dynamic table has column automatic numeration (some sort of index). each row has add / remove button , everytime add / remove row want recompute index column because want ordered.

 

everything works fine when add rows table when try remove row cannot recompute rows indexes, livecycle throws generic exception "generalerror: operation failed".

 

the code i'm using follows:

 

form1.#subform[0].table1.row1.subform1.add::click - (javascript, client)

 

var rownum = this.parent.parent.index + 1;

this.parent.parent.instancemanager.addinstance(rownum);

 

(i = 0; < this.parent.parent.instancemanager.count ; i++){

     xfa.resolvenode("row1[" + + "]").cell2.rawvalue = "" + (i + 1);

}

 

form1.#subform[0].table1.row1.subform1.remove::click - (javascript, client)

 

try

{

    var rownum = this.parent.parent.index;

    this.parent.parent.instancemanager.removeinstance(rownum);

 

     (i = 0; < this.parent.parent.instancemanager.count ; i++){

         xfa.resolvenode("row1[" + + "]").cell2.rawvalue = "" + (i + 1);

     }

 

}

catch(err)

{

    app.alert(err); 

}

 

i've noticed moment removeinstance, every operation @ table level gives me exception. livecycle newbie possible i'm missing basic here...

 

if want take of i'm talking have shared here http://wikisend.com/download/616276/test_dynamic_numeration.pdf

 

any highly appreciated

 

thanks!

ok,

 

i've found solution using event layout:ready here

 

https://acrobat.com/#d=tdpzltrl25yu2pkvgaqo9w

 

one problem less



More discussions in LiveCycle Designer


adobe

Comments

Popular posts from this blog

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support

After Effect warning: A problem occurred when processing OpenGL commands

Preconditions Failed. - Joomla! Forum - community, help and support