Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Color changes applied to new instances

Avatar

Level 2

On Initialize of a table it changes the HeaderRow fill color, works properly.  This Table is wraped in a Sub Form that can have additiona instances (copies).  The new instances do not capture the new fill color but rather the original color.

Should I try to set the HeaderRow color of the new instance when I execute the addinstance function?

this.parent.instanceManager.addInstance(1);

var

groupCount = this.parent.instanceManager.count;

xfa.resolveNodes("aSubForm["+groupCount+"].aTable.HeaderRow.border.fill.color").value="255,255,0";

2 Replies

Avatar

Former Community Member

If I were you, I'd use a script object.  Put a script object in the repeatable subform.  Put the script that changes the header row of the table in a function in that script object.  Then make a call to that function from the initialize event of the repeatable subform.

That gives you a lot more flexibility and helps you control the events a lot more closely.

Hope this helps!

Ryan D. Lunka

Cardinal Solutions Group

rlunka@cardinalsolutions.com

Avatar

Level 2

how do you call a function from an object?  actually where do you place the function in the object?