Skip to content
This repository has been archived by the owner on Jan 8, 2025. It is now read-only.

Commit

Permalink
In vuet and qvt widgetTextValue macro handle case with drop-down that…
Browse files Browse the repository at this point in the history
… has dynamic-options plus list-options for pre-loaded values
  • Loading branch information
jonesde committed Aug 4, 2023
1 parent a7c0d84 commit f1cfde4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions template/screen-macro/DefaultScreenMacros.qvt.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -2115,6 +2115,7 @@ a => A, d => D, y => Y
<#t><#if widgetType == "drop-down">
<#assign ddFieldNode = widgetNode?parent?parent>
<#assign allowMultiple = ec.getResource().expandNoL10n(widgetNode["@allow-multiple"]!, "") == "true">
<#assign isListOptions = widgetNode["list-options"]?has_content>
<#assign isDynamicOptions = widgetNode["dynamic-options"]?has_content>
<#assign options = sri.getFieldOptions(widgetNode)>
<#assign currentValue = sri.getFieldValuePlainString(ddFieldNode, "")>
Expand All @@ -2127,7 +2128,7 @@ a => A, d => D, y => Y
<#if !optionsHasCurrent && widgetNode["@current-description"]?has_content><#assign currentDescription = ec.getResource().expand(widgetNode["@current-description"], "")></#if>
<#t><#if allowMultiple>
<#list currentValueList as listValue>
<#t><#if isDynamicOptions>
<#t><#if isDynamicOptions && !isListOptions>
<#assign doNode = widgetNode["dynamic-options"][0]>
<#assign transValue = sri.getFieldTransitionValue(doNode["@transition"], doNode, listValue, doNode["@label-field"]!"label", alwaysGet)!>
<#t><#if transValue?has_content>${transValue}<#elseif listValue?has_content>${listValue}</#if><#if listValue_has_next>, </#if>
Expand All @@ -2137,7 +2138,7 @@ a => A, d => D, y => Y
</#if><#t>
</#list>
<#else>
<#t><#if isDynamicOptions>
<#t><#if isDynamicOptions && !isListOptions>
<#assign doNode = widgetNode["dynamic-options"][0]>
<#assign transValue = sri.getFieldTransitionValue(doNode["@transition"], doNode, currentValue, doNode["@label-field"]!"label", alwaysGet)!>
<#t><#if transValue?has_content>${transValue}<#elseif currentValue?has_content>${currentValue}</#if>
Expand Down
5 changes: 3 additions & 2 deletions template/screen-macro/DefaultScreenMacros.vuet.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -1976,6 +1976,7 @@ ${sri.getFieldValueString(.node)?html}</textarea>
<#t><#if widgetType == "drop-down">
<#assign ddFieldNode = widgetNode?parent?parent>
<#assign allowMultiple = ec.getResource().expandNoL10n(widgetNode["@allow-multiple"]!, "") == "true">
<#assign isListOptions = widgetNode["list-options"]?has_content>
<#assign isDynamicOptions = widgetNode["dynamic-options"]?has_content>
<#assign options = sri.getFieldOptions(widgetNode)>
<#assign currentValue = sri.getFieldValuePlainString(ddFieldNode, "")>
Expand All @@ -1988,7 +1989,7 @@ ${sri.getFieldValueString(.node)?html}</textarea>
<#if !optionsHasCurrent && widgetNode["@current-description"]?has_content><#assign currentDescription = ec.getResource().expand(widgetNode["@current-description"], "")></#if>
<#t><#if allowMultiple>
<#list currentValueList as listValue>
<#t><#if isDynamicOptions>
<#t><#if isDynamicOptions && !isListOptions>
<#assign doNode = widgetNode["dynamic-options"][0]>
<#assign transValue = sri.getFieldTransitionValue(doNode["@transition"], doNode, listValue, doNode["@label-field"]!"label", alwaysGet)!>
<#t><#if transValue?has_content>${transValue}<#elseif listValue?has_content>${listValue}</#if><#if listValue_has_next>, </#if>
Expand All @@ -1998,7 +1999,7 @@ ${sri.getFieldValueString(.node)?html}</textarea>
</#if><#t>
</#list>
<#else>
<#t><#if isDynamicOptions>
<#t><#if isDynamicOptions && !isListOptions>
<#assign doNode = widgetNode["dynamic-options"][0]>
<#assign transValue = sri.getFieldTransitionValue(doNode["@transition"], doNode, currentValue, doNode["@label-field"]!"label", alwaysGet)!>
<#t><#if transValue?has_content>${transValue}<#elseif currentValue?has_content>${currentValue}</#if>
Expand Down

0 comments on commit f1cfde4

Please sign in to comment.