Forum Discussion
nathan
Executive
Haven't come across this issue before, but my guess would be that component parameters only accept certain data types. You could probably get around the issue by wrapping the values in a basic hashmap object.
Have you tried something like this?
<@component id="Message" message=starter customParams={"numReplies": numReplies, "showSubject": true} />
<#attempt>
<#assign showSubject = (env.context.component.getParameter('customParams').showSubject) />
<#recover>
<#assign showSubject = true />
</#attempt>
<#attempt>
<#assign numReplies = env.context.component.getParameter('customParams').numReplies />
<#recover>
<#assign numReplies = 0 />
</#attempt>
bryanpollack
11 years agoAce
I seem to get the same null/missing error when I try to pass the object. I tried assigning the object to a variable, and then accessing the object before I call the component, and that seems to work fine. Do you know if there's a way to create an XML object (or whatever kind of object is created by restadmin), as that seems to be the only kind of object I can pass, aside from a string.
Related Content
- 4 years agoInactive User
- 3 months ago