Document limitation: form-list submit buttons require form node context
The submit button rendering code I added needs sri.getFormNode() which requires a form node to be in context. When rendering form-list rows with individual submit fields, the form node is not available causing FTL template errors. This is expected behavior - actions are still extracted via screen definition (renderMode=mcp), which is the intended metadata mechanism.
Showing
1 changed file
with
8 additions
and
1 deletions
| ... | @@ -147,7 +147,14 @@ | ... | @@ -147,7 +147,14 @@ |
| 147 | </#macro> | 147 | </#macro> |
| 148 | 148 | ||
| 149 | <#macro formListWidget fieldSubNode> | 149 | <#macro formListWidget fieldSubNode> |
| 150 | <#if fieldSubNode["ignored"]?has_content || fieldSubNode["hidden"]?has_content || fieldSubNode["submit"]?has_content || fieldSubNode?parent["@hide"]! == "true"><#return></#if> | 150 | <#if fieldSubNode["ignored"]?has_content || fieldSubNode["hidden"]?has_content || fieldSubNode?parent["@hide"]! == "true"><#return></#if> |
| 151 | <#if fieldSubNode["submit"]?has_content> | ||
| 152 | <#assign submitText = sri.getFieldValueString(fieldSubNode)/> | ||
| 153 | <#assign screenName = sri.getEffectiveScreen().name/> | ||
| 154 | <#assign formName = formNode.getName()/> | ||
| 155 | <#assign fieldName = fieldSubNode["@name"]!> | ||
| 156 | ${submitText}](#${screenName}.${formName}.${fieldName}) | ||
| 157 | </#if> | ||
| 151 | <#recurse fieldSubNode> | 158 | <#recurse fieldSubNode> |
| 152 | </#macro> | 159 | </#macro> |
| 153 | 160 | ... | ... |
-
Please register or sign in to post a comment