9

I have defined a string attribute like

<aura:attribute name="pageParams" type="String" default="" access="global" />

and in the design

<design:attribute name="pageParams" label="Custom Parameters"   description="..." />

Now it works fine, but I can't set it to values like "{!aValue}" in the designer. I only get the Error message

You don't have the permission to user expressions. Remove all text that includes {!}.

enter image description here

Can this protective feature be turn off? NOTE: I don't expect the platform to handle replacements for me. I'm doing token-replacements on my end in a complex way - but I don't want to introduce a new token-syntax like [!] or {{}} or {$} because admins are used to the common standard-notation like {!}

I would like a switch or a setting or something to allow unhandled token notations in designer attributes.

Any ideas?

  • I'm afraid this is currently as designed to prevent conflicts/errors when the product at some point in the future supports built in expressions (I'm on the App Builder team at Salesforce). Also up to a couple of releases ago using expressions like this in app builder properties caused another set of issues/conflicts with Aura/Lightning Components built in expression support. – Kristian Apr 25 '18 at 4:37
  • It would be great, if a compo could turn this protective feature on and off. Since there is no usable expression support now, I've build my own and this safety is forcing me to invent a new token syntax. – Uwe Heim Apr 25 '18 at 6:06
  • @Kristian it would also help me a lot, if the designer would have an option for multi line string input. At this time entering complex and long strings is absolutely no fun. Obviously it's not intended to use huge parametrization in single aura attributes, but the power in conjunction with my own expressions is massive. less code, huge reusability. Could be an attribute in the design file for each aura attribute like "visible lines" or so. – Uwe Heim Apr 25 '18 at 6:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.