Bug #9454
If condition in viewhelper attribute
Status: | Rejected | Start date: | 2010-08-25 | |
---|---|---|---|---|
Priority: | Won't have this time | Due date: | ||
Assigned To: | Adrian Föder | % Done: | 0% |
|
Category: | ViewHelpers | |||
Target version: | - | |||
Has patch: | No | Affected Flow version: | FLOW3 1.0.0 |
Description
It should be possible to set an attribute in a viewhelper by an if condition.
For example i want to set the attribute onchange conditional by an object property:
<f:form.checkBox name="name" value="value" additionalAttributes="{f:if (condition: '{object.submitOnChange}', then: '{onchange : \'submit()\'}')}" />
Fluid throws the exception: #1237900529: The argument "additionalAttributes" was registered with type "array", but is of type "string".
Related issues
History
#1 Updated by Karsten Dambekalns almost 4 years ago
- Affected Flow version set to FLOW3 1.0.0
#2 Updated by Adrian Föder over 2 years ago
- Category changed from Core to ViewHelpers
- Status changed from New to Rejected
- Assigned To set to Adrian Föder
- Priority changed from Should have to Won't have this time
- Has patch set to No
compare to #42474; since you want to omit the attribute at all, you have no other choice than to make the whole tag conditional.