bryanpollack
11 years agoAce
Permission error?
For some reason, when I'm not signed in I can't seem to view my custom component. I get "This widget could not be displayed." I think I've tracked it down to the following lines: <#attempt> <#as...
- 11 years ago
Hi Bryan,
Without seeing more of the code in context, it's difficult to say exactly what might be causing the error.
One thing I would suggest is setting a default value on the assign, using the default value operator in FreeMarker (http://freemarker.org/docs/dgui_template_exp.html#dgui_template_exp_missing_default). There could be a case where perhaps you're not getting back the value you'd expect from env.context.component.getParameter('pageNum') but if an exception isn't thrown then it wouldn't make it into the recover block and get assigned there. So instead, you might want to try something like this:
<#attempt> <#assign pageNum = env.context.component.getParameter('pageNum')!1 /> <#recover> <#assign pageNum = 1 /> </#attempt>
I hope this helps!