[ http://issues.apache.org/jira/browse/OFBIZ-370?page=all ]

David E. Jones closed OFBIZ-370.
--------------------------------

    Fix Version/s: SVN trunk
       Resolution: Fixed

Thanks Peter, your changes are in SVN rev 476610.

This was a little aggressive on the cleanups, but I'm fine with that as all of 
those things really needed to be cleaned up.

I made one small change so that the include element is the first in the file 
instead of further down.

After reviewing this I noticed that only the request-map and view-map elements 
are included and it would be nice to include everything. So, now everything is 
included from the other file, but everything can also be overridden in the 
current file, including the event list blocks though those will override the 
entire event list from the other file, which is good because it is the only 
real way to "remove" an event from one of the lists. These changes are in SVN 
rev 476624.

BTW, I also changed the exception handler catch blocks to use the 
Debug.logError method instead of the printStackTrace method directly on the 
exception.

> Allow splitting of controller.xml
> ---------------------------------
>
>                 Key: OFBIZ-370
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-370
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: framework
>    Affects Versions: SVN trunk
>         Environment: Linux, java-sun-1.5
>            Reporter: Peter Goron
>         Assigned To: David E. Jones
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: site-conf-include.patch
>
>
> Controller.xml files become bigger and bigger and are complex to read. That 
> made a long time I was looking for a way to split these files and I finally 
> digged into ofbiz code to see how it can be implemented.
> What a surprise to see that this feature is already present in Ofbiz but is 
> not activated !
> You can test to insert <include file="another-controller.xml"/> in an 
> existing controller.xml. You should see a validation error because include 
> element is not declared in xsd but it does not prevent inclusion mechanism to 
> run.
> However there is good chance you also obtain an exception report because it 
> doesn't find the file you try to include. To be consistent with other places 
> in ofbiz, I've slightly modified inclusion mechanism to use FlexibleResolver 
> (see attached patch, ex: <include 
> location="component://component/webapp/component/WEB-INF/another-controller.xml"/>)
> I hope you will be as enthousiast as me about this feature. I think it opens 
> nice perspectives :
> - the possibility to share common request-map & view-map (login, logout, 
> setLocale, Lookups, etc)
> - the possibility to split a big controller.xml by functional subdomain (like 
> for servicedef)
> Peter
> PS: I'm not sure if it's related to OFBIZ-77 issue

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to