replace location="${parameters.mainDecoratorLocation} with the actual location found in the web.xml
--------------------------------------------------------------------------------------------------- Key: OFBIZ-1531 URL: https://issues.apache.org/jira/browse/OFBIZ-1531 Project: OFBiz Issue Type: Improvement Affects Versions: SVN trunk Reporter: BJ Freeman Priority: Minor Fix For: SVN trunk 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. |
[ https://issues.apache.org/jira/browse/OFBIZ-1531?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12552489 ] BJ Freeman commented on OFBIZ-1531: ----------------------------------- This is a place to put patches as people do them, unless they already have commit privileges. > replace location="${parameters.mainDecoratorLocation} with the actual location found in the web.xml > --------------------------------------------------------------------------------------------------- > > Key: OFBIZ-1531 > URL: https://issues.apache.org/jira/browse/OFBIZ-1531 > Project: OFBiz > Issue Type: Improvement > Affects Versions: SVN trunk > Reporter: BJ Freeman > Priority: Minor > Fix For: SVN trunk > > > 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. |
In reply to this post by Nicolas Malin (Jira)
[ 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. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-1531?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] BJ Freeman resolved OFBIZ-1531. ------------------------------- Resolution: Fixed in then dev mailing list chris came up with a feasable solution this is from his email. You'll need to get put the <viewmap>@page value into the context and run a script in your main-decorator to determine the correct values if (page.like("component://partymgr") applicationMenuName = "Party"; elseif(page.like("component://product") applicationMenuName="Product"; etc parameters.put("applicationMenuName", applicationMenuName); then in your main-decorator, instead of having <set field="applicationMenuName" value="SetupMainMenu" global="true"/> you will have <set field="applicationMenuName" vlaue="${parameters.applicationMenuName}"/> etc > 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. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-1531?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12552587 ] bjfreeman edited comment on OFBIZ-1531 at 12/17/07 4:37 PM: ------------------------------------------------------------- in then dev mailing list chris came up with a feasable solution this is from his email. You'll need to get put the <viewmap>@page value into the context and run a script in your main-decorator to determine the correct values if (page.like("component://partymgr") applicationMenuName = "Party"; elseif(page.like("component://product") applicationMenuName="Product"; etc parameters.put("applicationMenuName", applicationMenuName); then in your main-decorator, instead of having <set field="applicationMenuName" value="SetupMainMenu" global="true"/> you will have <set field="applicationMenuName" vlaue="${parameters.applicationMenuName}"/> etc chris corrected : sorry, that should be page.startsWith("component://...") was (Author: bjfreeman): in then dev mailing list chris came up with a feasable solution this is from his email. You'll need to get put the <viewmap>@page value into the context and run a script in your main-decorator to determine the correct values if (page.like("component://partymgr") applicationMenuName = "Party"; elseif(page.like("component://product") applicationMenuName="Product"; etc parameters.put("applicationMenuName", applicationMenuName); then in your main-decorator, instead of having <set field="applicationMenuName" value="SetupMainMenu" global="true"/> you will have <set field="applicationMenuName" vlaue="${parameters.applicationMenuName}"/> etc > 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. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-1531?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jacques Le Roux closed OFBIZ-1531. ---------------------------------- > 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. |
Free forum by Nabble | Edit this page |