Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.
SOLVED

use field value in xml binding expression

Avatar

Level 1

Hi all.

I'm trying to access dropdownlist selected value from a binding expression.

I have a dropdownlist called rooms which is bound to some XML data. When the selection changes I woud like to access that value in another dropdownlist called members which is also bound to some XML data.

The expression I tried is:

$record.room.[roomname==$form.company.mainform.rooms.rawValue].member[*]

I'm calling this code on the rooms.changed event (alsop tried on rooms.exit event):

     members.execCalculate();

Aparently $form.company.mainform.rooms.rawValue doesn't return the selected value of the rooms dropdownlist.

Is there a way to get the selected event from a different form and re-calculate binding of the field?

thanx

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

Binding is not dynamic ...meaning that it is set when the form is rendered and cannot be changed on the fly.

Paul

View solution in original post

2 Replies

Avatar

Correct answer by
Former Community Member

Binding is not dynamic ...meaning that it is set when the form is rendered and cannot be changed on the fly.

Paul

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] ----