You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Adrian Crum <ad...@hlmksw.com> on 2006/11/24 18:19:56 UTC
dispatcher.runSync() in FTL file question
I'm trying to execute the following statement in an FTL file:
<#assign testPrefMap = dispatcher.runSync("getUserPreferenceGroup",
Static["org.ofbiz.base.util.UtilMisc"].toMap("userPrefGroupId",
"EXAMPLE_APP_DEMO_SCREEN"))/>
but I keep getting exceptions thrown that basically boil down to there being no
userLogin entity in the context when the service is invoked.
What am I doing wrong?
Re: dispatcher.runSync() in FTL file question
Posted by "A. Zeneski" <ja...@ofbiz.org>.
You will need to manually place the userLogin object into the context.
This object *should* be available to the FTL file, so add:
Static["org.ofbiz.base.util.UtilMisc"].toMap("userPrefGroupId",
"EXAMPLE_APP_DEMO_SCREEN", "userLogin", userLogin)
Andy
Adrian Crum wrote:
> I'm trying to execute the following statement in an FTL file:
>
> <#assign testPrefMap = dispatcher.runSync("getUserPreferenceGroup",
> Static["org.ofbiz.base.util.UtilMisc"].toMap("userPrefGroupId",
> "EXAMPLE_APP_DEMO_SCREEN"))/>
>
> but I keep getting exceptions thrown that basically boil down to there
> being no userLogin entity in the context when the service is invoked.
>
> What am I doing wrong?
Re: dispatcher.runSync() in FTL file question
Posted by Adrian Crum <ad...@hlmksw.com>.
Thanks Chris!
Chris Howe wrote:
> #assign testPrefMap
> =dispatcher.runSync("getUserPreferenceGroup",
> Static["org.ofbiz.base.util.UtilMisc"].toMap("userPrefGroupId",
> "EXAMPLE_APP_DEMO_SCREEN", "userLogin", userLogin))/>
>
> --- Adrian Crum <ad...@hlmksw.com> wrote:
>
>
>>I'm trying to execute the following statement in an
>>FTL file:
>>
>><#assign testPrefMap =
>>dispatcher.runSync("getUserPreferenceGroup",
>>
>
> Static["org.ofbiz.base.util.UtilMisc"].toMap("userPrefGroupId",
>
>>"EXAMPLE_APP_DEMO_SCREEN"))/>
>>
>>but I keep getting exceptions thrown that basically
>>boil down to there being no
>>userLogin entity in the context when the service is
>>invoked.
>>
>>What am I doing wrong?
>>
>
>
>
Re: dispatcher.runSync() in FTL file question
Posted by Chris Howe <cj...@yahoo.com>.
#assign testPrefMap
=dispatcher.runSync("getUserPreferenceGroup",
Static["org.ofbiz.base.util.UtilMisc"].toMap("userPrefGroupId",
"EXAMPLE_APP_DEMO_SCREEN", "userLogin", userLogin))/>
--- Adrian Crum <ad...@hlmksw.com> wrote:
> I'm trying to execute the following statement in an
> FTL file:
>
> <#assign testPrefMap =
> dispatcher.runSync("getUserPreferenceGroup",
>
Static["org.ofbiz.base.util.UtilMisc"].toMap("userPrefGroupId",
>
> "EXAMPLE_APP_DEMO_SCREEN"))/>
>
> but I keep getting exceptions thrown that basically
> boil down to there being no
> userLogin entity in the context when the service is
> invoked.
>
> What am I doing wrong?
>