How to retrieve the actually selected ApplicationMenuItem title?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

How to retrieve the actually selected ApplicationMenuItem title?

Bruno Busco
Hi devs,
I need to retrieve, from a ftl file, the title of the actually
selected item in the actual Application menu.

Could someone give some pointer?

Many thanks,
-Bruno
Reply | Threaded
Open this post in threaded view
|

Re: How to retrieve the actually selected ApplicationMenuItem title?

Scott Gray-2
Hi Bruno,

You could do something like:
<#assign appTitle =  
Static
["org
.ofbiz
.base.component.ComponentConfig"].getWebAppInfo(parameters._serverId,  
parameters._CONTEXT_ROOT_).getTitle() />

That's all that comes to mind, there may be a better way.

Regards
Scott
HotWax Media
http://www.hotwaxmedia.com


On 6/11/2009, at 12:25 PM, Bruno Busco wrote:

> Hi devs,
> I need to retrieve, from a ftl file, the title of the actually
> selected item in the actual Application menu.
>
> Could someone give some pointer?
>
> Many thanks,
> -Bruno


smime.p7s (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: How to retrieve the actually selected ApplicationMenuItem title?

Bruno Busco
Thank you Scott, I have tryied it but it results in error (see below).

What I am trying to do is to have the title of the actually selected
xxxAppBar menu.

So,
for instance, if we are in the accounting application and the
"Invoices" menu is selected (headerItem is equal to "invoices") I
would like the "Invoices" string being returned.
If we are in the catalog application and the "Features" menu is
selected (headerItem is equal to "featurecats") I would like the
"Features" string being returned.

Thank you for any help.
-Bruno


This is the error I get.

Expression Static["org.ofbiz.base.component.ComponentConfig"].getWebAppInfo(parameters._serverId,
parameters._CONTEXT_ROOT_) is undefined on line 19, column 21 in
component://newlight/includes/appbarClose.ftl. The problematic
instruction: ---------- ==> assignment:
appTitle=Static["org.ofbiz.base.component.ComponentConfig"].getWebAppInfo(parameters._serverId,
parameters._CONTEXT_ROOT_).getTitle() [on line 19, column 1 in
component://newlight/includes/appbarClose.ftl] ---------- Java
backtrace for programmers: ----------
freemarker.core.InvalidReferenceException: Expression
Static["org.ofbiz.base.component.ComponentConfig"].getWebAppInfo(parameters._serverId,
parameters._CONTEXT_ROOT_) is undefined on line 19, column 21 in
component://newlight/includes/appbarClose.ftl. at
freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:124)
at freemarker.core.TemplateObject.invalidTypeException(TemplateObject.java:134)
at freemarker.core.Dot._getAsTemplateModel(Dot.java:78) at
freemarker.core.Expression.getAsTemplateModel(Expression.java:89) at
freemarker.core.MethodCall._getAsTemplateModel(MethodCall.java:86) at
freemarker.core.Expression.getAsTemplateModel(Expression.java:89) at
freemarker.core.Assignment.accept(Assignment.java:90) at
freemarker.core.Environment.visit(Environment.java:209) at
freemarker.core.MixedContent.accept(MixedContent.java:92) at
freemarker.core.Environment.visit(Environment.java:209) at
freemarker.core.Environment.process(Environment.java:189) at
org.ofbiz.base.util.template.FreeMarkerWorker.renderTemplate(FreeMarkerWorker.java:205)
at org.ofbiz.widget.screen.HtmlWidget.renderHtmlTemplate(HtmlWidget.java:205)
at org.ofbiz.widget.screen.HtmlWidget$HtmlTemplate.renderWidgetString(HtmlWidget.java:250)
at org.ofbiz.widget.screen.HtmlWidget.renderWidgetString(HtmlWidget.java:110)
at org.ofbiz.widget.screen.ModelScreenWidget$PlatformSpecific.renderWidgetString(ModelScreenWidget.java:1043)
at org.ofbiz.widget.screen.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:180)
at org.ofbiz.widget.screen.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:271)
at org.ofbiz.widget.screen.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:180)
at org.ofbiz.widget.screen.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:271)
at org.ofbiz.widget.screen.ModelScreen.renderScreenString(ModelScreen.java:393)
at org.ofbiz.widget.screen.ModelScreenWidget$IncludeScreen.renderWidgetString(ModelScreenWidget.java:605)
at org.ofbiz.widget.screen.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:180)
at org.ofbiz.widget.screen.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:271)
at org.ofbiz.widget.screen.ModelScreen.renderScreenString(ModelScreen.java:393)
at org.ofbiz.widget.screen.ModelScreenWidget$IncludeScreen.renderWidgetString(ModelScreenWidget.java:605)
at org.ofbiz.widget.screen.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:180)
at org.ofbiz.widget.screen.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:271)
at org.ofbiz.widget.screen.ModelScreen.renderScreenString(ModelScreen.java:393)
at org.ofbiz.widget.screen.ModelScreenWidget$DecoratorScreen.renderWidgetString(ModelScreenWidget.java:701)
at org.ofbiz.widget.screen.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:180)
at org.ofbiz.widget.screen.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:271)
at org.ofbiz.widget.screen.ModelScreen.renderScreenString(ModelScreen.java:393)
at org.ofbiz.widget.screen.ModelScreenWidget$DecoratorScreen.renderWidgetString(ModelScreenWidget.java:701)
at org.ofbiz.widget.screen.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:180)
at org.ofbiz.widget.screen.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:271)
at org.ofbiz.widget.screen.ModelScreen.renderScreenString(ModelScreen.java:393)
at org.ofbiz.widget.screen.ScreenRenderer.render(ScreenRenderer.java:134)
at org.ofbiz.widget.screen.ScreenRenderer.render(ScreenRenderer.java:96)
at org.ofbiz.widget.screen.MacroScreenViewHandler.render(MacroScreenViewHandler.java:114)
at org.ofbiz.webapp.control.RequestHandler.renderView(RequestHandler.java:825)
at org.ofbiz.webapp.control.RequestHandler.doRequest(RequestHandler.java:550)
at org.ofbiz.webapp.control.ControlServlet.doGet(ControlServlet.java:216)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.ofbiz.webapp.control.ContextFilter.doFilter(ContextFilter.java:265)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:568)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619) Error rendering included
template at location [component://newlight/includes/appbarClose.ftl]:
freemarker.core.InvalidReferenceException: Expression
Static["org.ofbiz.base.component.ComponentConfig"].getWebAppInfo(parameters._serverId,
parameters._CONTEXT_ROOT_) is undefined on line 19, column 21 in
component://newlight/includes/appbarClose.ftl.



2009/11/6 Scott Gray <[hidden email]>:

> Hi Bruno,
>
> You could do something like:
> <#assign appTitle =
> Static["org.ofbiz.base.component.ComponentConfig"].getWebAppInfo(parameters._serverId,
> parameters._CONTEXT_ROOT_).getTitle() />
>
> That's all that comes to mind, there may be a better way.
>
> Regards
> Scott
> HotWax Media
> http://www.hotwaxmedia.com
>
>
> On 6/11/2009, at 12:25 PM, Bruno Busco wrote:
>
>> Hi devs,
>> I need to retrieve, from a ftl file, the title of the actually
>> selected item in the actual Application menu.
>>
>> Could someone give some pointer?
>>
>> Many thanks,
>> -Bruno
>
>
Reply | Threaded
Open this post in threaded view
|

Re: How to retrieve the actually selected ApplicationMenuItem title?

Scott Gray-2
Ah okay, forget that code sample then, I thought you were after  
something else.

I can't think of any way to do what you are attempting without changes  
to the framework.

Regards
Scott

On 6/11/2009, at 7:22 PM, Bruno Busco wrote:

> Thank you Scott, I have tryied it but it results in error (see below).
>
> What I am trying to do is to have the title of the actually selected
> xxxAppBar menu.
>
> So,
> for instance, if we are in the accounting application and the
> "Invoices" menu is selected (headerItem is equal to "invoices") I
> would like the "Invoices" string being returned.
> If we are in the catalog application and the "Features" menu is
> selected (headerItem is equal to "featurecats") I would like the
> "Features" string being returned.
>
> Thank you for any help.
> -Bruno
>
>
> This is the error I get.
>
> Expression  
> Static
> ["org
> .ofbiz
> .base.component.ComponentConfig"].getWebAppInfo(parameters._serverId,
> parameters._CONTEXT_ROOT_) is undefined on line 19, column 21 in
> component://newlight/includes/appbarClose.ftl. The problematic
> instruction: ---------- ==> assignment:
> appTitle
> =
> Static
> ["org
> .ofbiz
> .base.component.ComponentConfig"].getWebAppInfo(parameters._serverId,
> parameters._CONTEXT_ROOT_).getTitle() [on line 19, column 1 in
> component://newlight/includes/appbarClose.ftl] ---------- Java
> backtrace for programmers: ----------
> freemarker.core.InvalidReferenceException: Expression
> Static
> ["org
> .ofbiz
> .base.component.ComponentConfig"].getWebAppInfo(parameters._serverId,
> parameters._CONTEXT_ROOT_) is undefined on line 19, column 21 in
> component://newlight/includes/appbarClose.ftl. at
> freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:124)
> at  
> freemarker
> .core.TemplateObject.invalidTypeException(TemplateObject.java:134)
> at freemarker.core.Dot._getAsTemplateModel(Dot.java:78) at
> freemarker.core.Expression.getAsTemplateModel(Expression.java:89) at
> freemarker.core.MethodCall._getAsTemplateModel(MethodCall.java:86) at
> freemarker.core.Expression.getAsTemplateModel(Expression.java:89) at
> freemarker.core.Assignment.accept(Assignment.java:90) at
> freemarker.core.Environment.visit(Environment.java:209) at
> freemarker.core.MixedContent.accept(MixedContent.java:92) at
> freemarker.core.Environment.visit(Environment.java:209) at
> freemarker.core.Environment.process(Environment.java:189) at
> org
> .ofbiz
> .base
> .util.template.FreeMarkerWorker.renderTemplate(FreeMarkerWorker.java:
> 205)
> at  
> org
> .ofbiz.widget.screen.HtmlWidget.renderHtmlTemplate(HtmlWidget.java:
> 205)
> at org.ofbiz.widget.screen.HtmlWidget
> $HtmlTemplate.renderWidgetString(HtmlWidget.java:250)
> at  
> org
> .ofbiz.widget.screen.HtmlWidget.renderWidgetString(HtmlWidget.java:
> 110)
> at org.ofbiz.widget.screen.ModelScreenWidget
> $PlatformSpecific.renderWidgetString(ModelScreenWidget.java:1043)
> at  
> org
> .ofbiz
> .widget
> .screen
> .ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:180)
> at org.ofbiz.widget.screen.ModelScreenWidget
> $Section.renderWidgetString(ModelScreenWidget.java:271)
> at  
> org
> .ofbiz
> .widget
> .screen
> .ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:180)
> at org.ofbiz.widget.screen.ModelScreenWidget
> $Section.renderWidgetString(ModelScreenWidget.java:271)
> at  
> org
> .ofbiz.widget.screen.ModelScreen.renderScreenString(ModelScreen.java:
> 393)
> at org.ofbiz.widget.screen.ModelScreenWidget
> $IncludeScreen.renderWidgetString(ModelScreenWidget.java:605)
> at  
> org
> .ofbiz
> .widget
> .screen
> .ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:180)
> at org.ofbiz.widget.screen.ModelScreenWidget
> $Section.renderWidgetString(ModelScreenWidget.java:271)
> at  
> org
> .ofbiz.widget.screen.ModelScreen.renderScreenString(ModelScreen.java:
> 393)
> at org.ofbiz.widget.screen.ModelScreenWidget
> $IncludeScreen.renderWidgetString(ModelScreenWidget.java:605)
> at  
> org
> .ofbiz
> .widget
> .screen
> .ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:180)
> at org.ofbiz.widget.screen.ModelScreenWidget
> $Section.renderWidgetString(ModelScreenWidget.java:271)
> at  
> org
> .ofbiz.widget.screen.ModelScreen.renderScreenString(ModelScreen.java:
> 393)
> at org.ofbiz.widget.screen.ModelScreenWidget
> $DecoratorScreen.renderWidgetString(ModelScreenWidget.java:701)
> at  
> org
> .ofbiz
> .widget
> .screen
> .ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:180)
> at org.ofbiz.widget.screen.ModelScreenWidget
> $Section.renderWidgetString(ModelScreenWidget.java:271)
> at  
> org
> .ofbiz.widget.screen.ModelScreen.renderScreenString(ModelScreen.java:
> 393)
> at org.ofbiz.widget.screen.ModelScreenWidget
> $DecoratorScreen.renderWidgetString(ModelScreenWidget.java:701)
> at  
> org
> .ofbiz
> .widget
> .screen
> .ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:180)
> at org.ofbiz.widget.screen.ModelScreenWidget
> $Section.renderWidgetString(ModelScreenWidget.java:271)
> at  
> org
> .ofbiz.widget.screen.ModelScreen.renderScreenString(ModelScreen.java:
> 393)
> at org.ofbiz.widget.screen.ScreenRenderer.render(ScreenRenderer.java:
> 134)
> at org.ofbiz.widget.screen.ScreenRenderer.render(ScreenRenderer.java:
> 96)
> at  
> org
> .ofbiz
> .widget
> .screen.MacroScreenViewHandler.render(MacroScreenViewHandler.java:114)
> at  
> org
> .ofbiz.webapp.control.RequestHandler.renderView(RequestHandler.java:
> 825)
> at  
> org
> .ofbiz.webapp.control.RequestHandler.doRequest(RequestHandler.java:
> 550)
> at org.ofbiz.webapp.control.ControlServlet.doGet(ControlServlet.java:
> 216)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:690) at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at
> org
> .apache
> .catalina
> .core
> .ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:
> 290)
> at  
> org
> .apache
> .catalina
> .core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> at  
> org.ofbiz.webapp.control.ContextFilter.doFilter(ContextFilter.java:
> 265)
> at  
> org
> .apache
> .catalina
> .core
> .ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:
> 235)
> at  
> org
> .apache
> .catalina
> .core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> at  
> org
> .apache
> .catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:
> 233)
> at  
> org
> .apache
> .catalina.core.StandardContextValve.invoke(StandardContextValve.java:
> 175)
> at  
> org
> .apache
> .catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
> at  
> org
> .apache
> .catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
> at  
> org
> .apache
> .catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:
> 109)
> at  
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:
> 568)
> at  
> org
> .apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:
> 286)
> at  
> org
> .apache.coyote.http11.Http11Processor.process(Http11Processor.java:
> 844)
> at org.apache.coyote.http11.Http11Protocol
> $Http11ConnectionHandler.process(Http11Protocol.java:583)
> at org.apache.tomcat.util.net.JIoEndpoint
> $Worker.run(JIoEndpoint.java:447)
> at java.lang.Thread.run(Thread.java:619) Error rendering included
> template at location [component://newlight/includes/appbarClose.ftl]:
> freemarker.core.InvalidReferenceException: Expression
> Static
> ["org
> .ofbiz
> .base.component.ComponentConfig"].getWebAppInfo(parameters._serverId,
> parameters._CONTEXT_ROOT_) is undefined on line 19, column 21 in
> component://newlight/includes/appbarClose.ftl.
>
>
>
> 2009/11/6 Scott Gray <[hidden email]>:
>> Hi Bruno,
>>
>> You could do something like:
>> <#assign appTitle =
>> Static
>> ["org
>> .ofbiz
>> .base.component.ComponentConfig"].getWebAppInfo(parameters._serverId,
>> parameters._CONTEXT_ROOT_).getTitle() />
>>
>> That's all that comes to mind, there may be a better way.
>>
>> Regards
>> Scott
>> HotWax Media
>> http://www.hotwaxmedia.com
>>
>>
>> On 6/11/2009, at 12:25 PM, Bruno Busco wrote:
>>
>>> Hi devs,
>>> I need to retrieve, from a ftl file, the title of the actually
>>> selected item in the actual Application menu.
>>>
>>> Could someone give some pointer?
>>>
>>> Many thanks,
>>> -Bruno
>>
>>


smime.p7s (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: How to retrieve the actually selected ApplicationMenuItem title?

Bruno Busco
Hi Scott,
finally I found out how to do it (thanks to Angelo Matarazzo).
I used this code:
<#assign appModelMenu =
Static["org.ofbiz.widget.menu.MenuFactory"].getMenuFromLocation(applicationMenuLocation,applicationMenuName,delegator,dispatcher)>

${appModelMenu.getModelMenuItemByName(headerItem).getTitle(context)}

Thank you,
Bruno

2009/11/6 Scott Gray <[hidden email]>:

> Ah okay, forget that code sample then, I thought you were after something
> else.
>
> I can't think of any way to do what you are attempting without changes to
> the framework.
>
> Regards
> Scott
>
> On 6/11/2009, at 7:22 PM, Bruno Busco wrote:
>
>> Thank you Scott, I have tryied it but it results in error (see below).
>>
>> What I am trying to do is to have the title of the actually selected
>> xxxAppBar menu.
>>
>> So,
>> for instance, if we are in the accounting application and the
>> "Invoices" menu is selected (headerItem is equal to "invoices") I
>> would like the "Invoices" string being returned.
>> If we are in the catalog application and the "Features" menu is
>> selected (headerItem is equal to "featurecats") I would like the
>> "Features" string being returned.
>>
>> Thank you for any help.
>> -Bruno
>>
>>
>> This is the error I get.
>>
>> Expression
>> Static["org.ofbiz.base.component.ComponentConfig"].getWebAppInfo(parameters._serverId,
>> parameters._CONTEXT_ROOT_) is undefined on line 19, column 21 in
>> component://newlight/includes/appbarClose.ftl. The problematic
>> instruction: ---------- ==> assignment:
>>
>> appTitle=Static["org.ofbiz.base.component.ComponentConfig"].getWebAppInfo(parameters._serverId,
>> parameters._CONTEXT_ROOT_).getTitle() [on line 19, column 1 in
>> component://newlight/includes/appbarClose.ftl] ---------- Java
>> backtrace for programmers: ----------
>> freemarker.core.InvalidReferenceException: Expression
>>
>> Static["org.ofbiz.base.component.ComponentConfig"].getWebAppInfo(parameters._serverId,
>> parameters._CONTEXT_ROOT_) is undefined on line 19, column 21 in
>> component://newlight/includes/appbarClose.ftl. at
>> freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:124)
>> at
>> freemarker.core.TemplateObject.invalidTypeException(TemplateObject.java:134)
>> at freemarker.core.Dot._getAsTemplateModel(Dot.java:78) at
>> freemarker.core.Expression.getAsTemplateModel(Expression.java:89) at
>> freemarker.core.MethodCall._getAsTemplateModel(MethodCall.java:86) at
>> freemarker.core.Expression.getAsTemplateModel(Expression.java:89) at
>> freemarker.core.Assignment.accept(Assignment.java:90) at
>> freemarker.core.Environment.visit(Environment.java:209) at
>> freemarker.core.MixedContent.accept(MixedContent.java:92) at
>> freemarker.core.Environment.visit(Environment.java:209) at
>> freemarker.core.Environment.process(Environment.java:189) at
>>
>> org.ofbiz.base.util.template.FreeMarkerWorker.renderTemplate(FreeMarkerWorker.java:205)
>> at
>> org.ofbiz.widget.screen.HtmlWidget.renderHtmlTemplate(HtmlWidget.java:205)
>> at
>> org.ofbiz.widget.screen.HtmlWidget$HtmlTemplate.renderWidgetString(HtmlWidget.java:250)
>> at
>> org.ofbiz.widget.screen.HtmlWidget.renderWidgetString(HtmlWidget.java:110)
>> at
>> org.ofbiz.widget.screen.ModelScreenWidget$PlatformSpecific.renderWidgetString(ModelScreenWidget.java:1043)
>> at
>> org.ofbiz.widget.screen.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:180)
>> at
>> org.ofbiz.widget.screen.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:271)
>> at
>> org.ofbiz.widget.screen.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:180)
>> at
>> org.ofbiz.widget.screen.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:271)
>> at
>> org.ofbiz.widget.screen.ModelScreen.renderScreenString(ModelScreen.java:393)
>> at
>> org.ofbiz.widget.screen.ModelScreenWidget$IncludeScreen.renderWidgetString(ModelScreenWidget.java:605)
>> at
>> org.ofbiz.widget.screen.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:180)
>> at
>> org.ofbiz.widget.screen.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:271)
>> at
>> org.ofbiz.widget.screen.ModelScreen.renderScreenString(ModelScreen.java:393)
>> at
>> org.ofbiz.widget.screen.ModelScreenWidget$IncludeScreen.renderWidgetString(ModelScreenWidget.java:605)
>> at
>> org.ofbiz.widget.screen.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:180)
>> at
>> org.ofbiz.widget.screen.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:271)
>> at
>> org.ofbiz.widget.screen.ModelScreen.renderScreenString(ModelScreen.java:393)
>> at
>> org.ofbiz.widget.screen.ModelScreenWidget$DecoratorScreen.renderWidgetString(ModelScreenWidget.java:701)
>> at
>> org.ofbiz.widget.screen.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:180)
>> at
>> org.ofbiz.widget.screen.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:271)
>> at
>> org.ofbiz.widget.screen.ModelScreen.renderScreenString(ModelScreen.java:393)
>> at
>> org.ofbiz.widget.screen.ModelScreenWidget$DecoratorScreen.renderWidgetString(ModelScreenWidget.java:701)
>> at
>> org.ofbiz.widget.screen.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:180)
>> at
>> org.ofbiz.widget.screen.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:271)
>> at
>> org.ofbiz.widget.screen.ModelScreen.renderScreenString(ModelScreen.java:393)
>> at org.ofbiz.widget.screen.ScreenRenderer.render(ScreenRenderer.java:134)
>> at org.ofbiz.widget.screen.ScreenRenderer.render(ScreenRenderer.java:96)
>> at
>> org.ofbiz.widget.screen.MacroScreenViewHandler.render(MacroScreenViewHandler.java:114)
>> at
>> org.ofbiz.webapp.control.RequestHandler.renderView(RequestHandler.java:825)
>> at
>> org.ofbiz.webapp.control.RequestHandler.doRequest(RequestHandler.java:550)
>> at org.ofbiz.webapp.control.ControlServlet.doGet(ControlServlet.java:216)
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:690) at
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at
>>
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>> at
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>> at org.ofbiz.webapp.control.ContextFilter.doFilter(ContextFilter.java:265)
>> at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>> at
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>> at
>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
>> at
>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
>> at
>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
>> at
>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
>> at
>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>> at
>> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:568)
>> at
>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
>> at
>> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
>> at
>> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
>> at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
>> at java.lang.Thread.run(Thread.java:619) Error rendering included
>> template at location [component://newlight/includes/appbarClose.ftl]:
>> freemarker.core.InvalidReferenceException: Expression
>>
>> Static["org.ofbiz.base.component.ComponentConfig"].getWebAppInfo(parameters._serverId,
>> parameters._CONTEXT_ROOT_) is undefined on line 19, column 21 in
>> component://newlight/includes/appbarClose.ftl.
>>
>>
>>
>> 2009/11/6 Scott Gray <[hidden email]>:
>>>
>>> Hi Bruno,
>>>
>>> You could do something like:
>>> <#assign appTitle =
>>>
>>> Static["org.ofbiz.base.component.ComponentConfig"].getWebAppInfo(parameters._serverId,
>>> parameters._CONTEXT_ROOT_).getTitle() />
>>>
>>> That's all that comes to mind, there may be a better way.
>>>
>>> Regards
>>> Scott
>>> HotWax Media
>>> http://www.hotwaxmedia.com
>>>
>>>
>>> On 6/11/2009, at 12:25 PM, Bruno Busco wrote:
>>>
>>>> Hi devs,
>>>> I need to retrieve, from a ftl file, the title of the actually
>>>> selected item in the actual Application menu.
>>>>
>>>> Could someone give some pointer?
>>>>
>>>> Many thanks,
>>>> -Bruno
>>>
>>>
>
>