[
https://issues.apache.org/jira/browse/OFBIZ-1531?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
BJ Freeman updated OFBIZ-1531:
------------------------------
Fix Version/s: Release Branch 4.0
Issue Type: Bug (was: Improvement)
Affects Version/s: Release Branch 4.0
Summary: implement a fix to solve the
location="${parameters.mainDecoratorLocation} giving an error. (was: replace
location="${parameters.mainDecoratorLocation} with the actual location found in
the web.xml)
To be sure we're all on the same page, the problem exists when screens are
nested as follows:
<screen name="GlobalDecorator">
<screen name="main-decorator">
<screen name="sub-decorator">
<screen name="actual-content">
...
</screen>
</screen>
</screen>
</screen>
and the location of the sub-decorator screen is defined as
${parameters.mainDecoratorLocation}. When a custom app tries to reuse the
actual-content screen, errors are generated because <decorator-screen
name="sub-decorator" location="${parameters.mainDecoratorLocation}"> evaluates
to the custom app's main decorator xml file, and the sub-decorator screen
doesn't exist there.
The solution to the problem is to avoid using
${parameters.mainDecoratorLocation} as a location for sub-decorators and either
have no location specified or use a different parameter for the sub-decorator's
location - like ${subDecoratorLocation}.
A good example of this approach is in AgreementScreens.xml in the Accounting
component. All of the Agreement screens share a common sub-decorator
(CommonAgreementDecorator) - and that decorator's location is specified as
${parameters.agreementDecoratorLocation}. The agreementDecoratorLocation
parameter isn't defined anywhere, so the location= expression evaluates to an
empty String - which causes the screen widget view handler to look for
CommonAgreementDecorator in the existing file.
A custom app that reuses one of the Agreement screens will only need to specify
the mainDecoratorLocation parameter. Since no agreementDecoratorLocation
parameter is defined in the custom app, the sub-decorator in
AgreementScreens.xml is used (same as above). If a custom app wanted to have a
custom sub-decorator, then it can specify that decorator's location in the
agreementDecoratorLocation parameter.
-Adrian
> implement a fix to solve the location="${parameters.mainDecoratorLocation}
> giving an error.
> -------------------------------------------------------------------------------------------
>
> Key: OFBIZ-1531
> URL: https://issues.apache.org/jira/browse/OFBIZ-1531
> Project: OFBiz
> Issue Type: Bug
> Affects Versions: SVN trunk, Release Branch 4.0
> Reporter: BJ Freeman
> Priority: Minor
> Fix For: SVN trunk, Release Branch 4.0
>
>
> Though not meant to be used for intra-apps
> the Include feature is being used that way in the controller for
> common-controller.
> there is a gotcha describe in the dev ML about
> .mainDecoratorLocation not being accessed when since it is in the context in
> the web.xml
> To remedy this
> all
> location="${parameters.mainDecoratorLocation}
> will be changed to the actual path found in the web.xml for each application.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.