You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Chris Howe (JIRA)" <ji...@apache.org> on 2006/10/09 22:17:20 UTC

[jira] Commented: (OFBIZ-370) Allow splitting of controller.xml

    [ http://issues.apache.org/jira/browse/OFBIZ-370?page=comments#action_12440964 ] 
            
Chris Howe commented on OFBIZ-370:
----------------------------------

We had discussed this a while back and at the time (and I think the point is still very valid) this approach makes troubleshooting more dificult.  When you get an error on a page, the way most troubleshoot it is to:

1) look at the uri
2) go to the controller.xml and find the uri
3) take it from there

if you use inserts or include file, it will become very dificult to track down where the uri is and thus more dificult to troubleshoot.  Compound this with the fact that name xml elements overwrite previous elements with the same name and you'll find it near impossible to find your uri to begin troubleshooting.

OFBIZ-77 attempts to take a merge approach so that the custom developer can easily keep track of his/her customizations when built in reference to an established app.  Not for use within the project, but rather for custom applications.

> 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
>            Priority: Minor
>         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