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.
SOLVED

Change Color of Line Object

Avatar

Level 2

aLine.border.edge.color.value

="207,29,3";

This doesnt work.. any suggestions?

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

Give this a go....

xfa.resolveNode("aLine.value.line.edge.color").value= "207,29,3";

Steve

View solution in original post

6 Replies

Avatar

Correct answer by
Former Community Member

Give this a go....

xfa.resolveNode("aLine.value.line.edge.color").value= "207,29,3";

Steve

Avatar

Level 2

Thanks Steve it worked.

Do you also know how to change a Text Field value (not caption) font color?

xfa.resolveNodes("aTextbox.font.fill.color").value="130,0,60";

Avatar

Former Community Member

To change the fill color

xfa.resolveNode("aTextBox.ui.#textEdit.border.fill.color").value = "130,0,60";

To change the font color

aTextBox.font.fill.color.value = "130,0,60";

Avatar

Level 2

One last thing.

On Initialize of the Parent Subform a Table belongs in I change the Header Fill color based on a variable.  Other instances of this Table gets added with a button click.. everything works find interms of the add.

When I change the color though the new tables added do not take the new color of the initialize event.

Is there a way I can do it on the add event?

this.parent.instanceManager.addInstance(1);

this.parent.instanceIndex< ??? >.execInitialize();

Avatar

Level 1

I have a text field "RESULT" which is to display G/Y/R depending on value of EXPOSURE.

I need to color the background of RESULT accordingly.

The below works fine, except that the G/Y/R letter gets overwritten with the color value numbers.

What am I doing wrong?

if(EXPOSURE<5) then RESULT = "G"
  xfa.resolveNode("RESULT.ui.#textEdit.border.fill.color").value = "0,255,0";
elseif(EXPOSURE == 6) then RESULT="Y";
  xfa.resolveNode("RESULT.ui.#textEdit.border.fill.color").value = "255,255,0";
elseif(EXPOSURE > 6) then RESULT="R";
  xfa.resolveNode("RESULT.ui.#textEdit.border.fill.color").value = "207,29,3";
endif

Many thanks,

Norm

Avatar

Level 1

Simple Fix:

if(EXPOSURE<5) then
  xfa.resolveNode("RESULT.ui.#textEdit.border.fill.color").value = "0,255,0";
  RESULT = "G"
elseif(EXPOSURE == 6) then
  xfa.resolveNode("RESULT.ui.#textEdit.border.fill.color").value = "255,255,0";
  RESULT="Y";
elseif(EXPOSURE > 6) then
  xfa.resolveNode("RESULT.ui.#textEdit.border.fill.color").value = "207,29,3";
  RESULT="R";
endif

Thanks

Norm

The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----