|
|
|
Darius Jazayeri-2
|
Hi All,
I just tried creating my first module with a dot in its name, and it seems like our module infrastructure needs to be updated to support this properly. Basically a module called ui.springmvc should put things in folders like .../ui/springmvc/..., but it actually puts things in folders like .../ui.springmvc/... Does that sound right to people? (I assume it's a quick fix, but I don't have net right now to create a ticket.) Specific errors I hit: * the default view for an annotated controller isn't right: @RequestMapping("/module/ui/springmvc/testing") public String test() { return null; // THIS IS BROKEN return "/module/ui.springmvc/testing"; // THIS WORKS } * Including a tld file doesn't work right. This <%@ taglib prefix="ui-taglib" uri="/WEB-INF/view/module/ui/springmvc/resources/ui.tld" %> fails with the error: File "/WEB-INF/view/module/ui/springmvc/resources/ui.tld" not found (I didn't try, but I assume calling it .../ui.springmvc/... would work * module resources don't go to the right place: This doesn't work: <openmrs:htmlInclude file="${pageContext.request.contextPath}/moduleResources/ui/springmvc/ui.css"/> * .tag files don't get put in the right place This doesn't work: <%@ taglib prefix="ui" tagdir="/WEB-INF/tags/module/ui/springmvc" %> -Darius [hidden email] from OpenMRS Developers' mailing list |
||||||||||||||||
|
Ben Wolfe
|
Some javascript/style in this post has been disabled (why?)
Theres zero handling of dot notation in module names now. I would assume its a quick fix for wherever the module folder is getting created (and hopefully its getting referenced from only a few places) Ben Darius Jazayeri wrote: Hi All, [hidden email] from OpenMRS Developers' mailing list |
||||||||||||||||
|
Darius Jazayeri-3
|
I assume if I make this fix it's okay to include it in the next 1.5 release? When is that coming by the way?
-Darius On Wed, Nov 4, 2009 at 4:28 AM, Ben Wolfe <[hidden email]> wrote:
[hidden email] from OpenMRS Developers' mailing list |
||||||||||||||||
|
Ben Wolfe
|
Some javascript/style in this post has been disabled (why?)
I think the only module with a dot in it is the serialization.xstream...and that doesn't provide any services that depend on folders like this. I would feel fine about this being backported to 1.5.x. I was waiting on two bugs to be fixed before releasing 1.5.1: windows install from 1.3 to 1.5: http://dev.openmrs.org/ticket/1820 (fixed now) setting constant uuids on core data: http://dev.openmrs.org/ticket/1842 (in review now) Once that second one is approved I can move forward with testing and releasing. Ben Darius Jazayeri wrote: I assume if I make this fix it's okay to include it in the next 1.5 release? When is that coming by the way? [hidden email] from OpenMRS Developers' mailing list |
||||||||||||||||
|
Justin Miranda
|
Some javascript/style in this post has been disabled (why?)
I'd like to get the quick fix for #1622 into that release as well. Is
that cool? If so, I'll commit the change to trunk and backport it to
1.5.x today.Ben Wolfe wrote:
[hidden email] from OpenMRS Developers' mailing list |
||||||||||||||||
|
Ben Wolfe
|
Some javascript/style in this post has been disabled (why?)
Yep, definitely. Justin Miranda wrote: I'd like to get the quick fix for #1622 into that release as well. Is that cool? If so, I'll commit the change to trunk and backport it to 1.5.x today. [hidden email] from OpenMRS Developers' mailing list |
||||||||||||||||
|
Darius Jazayeri-3
|
So, here's a question:
This: <openmrs:htmlInclude file="${pageContext.request.contextPath}/moduleResources/ui/springmvc/ui.css"/> hits ModuleResourceServlet, which looks in the "ui" module for "/web/resources/springmvc/ui.css". I can't think of a surefire way to know whether to treat "/ui/springmvc" as a module name or as a folder within a module. Option 1: allow the following: <openmrs:htmlInclude moduleId="/ui/springmvc" resource="ui.css"/> Option 2: progressively look at "ui" + "springmvc/ui.css", then "ui/springmvc" + "ui.css" until I find a match. Anyone have an opinion about which is right? -Darius On Wed, Nov 4, 2009 at 7:13 AM, Ben Wolfe <[hidden email]> wrote:
[hidden email] from OpenMRS Developers' mailing list |
||||||||||||||||
|
Darius Jazayeri-3
|
FYI- I implemented #2, and attached it as a patch to the ticket. http://dev.openmrs.org/ticket/1920
Awaiting code review before adding this to 1.4, sync, 1.5, and trunk. (Otherwise I will have to just rename my ui.springmvc module to uispringmvc.) -Darius On Wed, Nov 4, 2009 at 3:11 PM, Darius Jazayeri <[hidden email]> wrote: So, here's a question: [hidden email] from OpenMRS Developers' mailing list |
||||||||||||||||
|
Burke Mamlin
|
In reply to this post
by Darius Jazayeri-3
Some javascript/style in this post has been disabled (why?)
How about <openmrs:htmlInclude moduleId="ui.springmvc" resource="ui.css"/> or <openmrs:htmlInclude file="${pageContext.request.contextPath}/moduleResources/ui.springmvc/ui.css"/> either of which looks in the "ui.springmvc" module for "/web/resources/ui.css"? The moduleid is ui.springmvc, not ui/springmvc -Burke On Nov 4, 2009, at 6:11 PM, Darius Jazayeri wrote: So, here's a question: [hidden email] from OpenMRS Developers' mailing list |
||||||||||||||||
|
Darius Jazayeri-3
|
Yeah, sorry, typo on that one, I meant <openmrs:htmlInclude moduleId="ui.springmvc" resource="ui.css"/> with a dot in the moduleId.
For the second option that would be sufficient, but it seems confusing to me. I feel like having a moduleId with a dot, i.e. it's in the namespace org.openmrs.module.ui.springmvc should be in /module/ui/springmvc and have resources in /moduleResource/ui/springmvc. -Darius On Wed, Nov 4, 2009 at 5:17 PM, Burke Mamlin <[hidden email]> wrote:
[hidden email] from OpenMRS Developers' mailing list |
||||||||||||||||
|
Burke Mamlin
|
Some javascript/style in this post has been disabled (why?)
Ideally, we'd treat module names just like java packages are treated -- i.e., using dots in any references and translating to folders in the file system. If/when the module machinery moves/deleted modules from the file system, it'd need to handle the special case of module ids with dot-notation, only moving/deleting the parent folder(s) if no sibling exist. For example, after installing modules ui.springmvc and ui.foo, in the file system there would be a ui folder with springmvc & foo subfolders for the modules; if ui.springmvc was removed, ui/foo/ would need to stick around until the ui.foo module was removed as well. -Burke On Nov 4, 2009, at 8:43 PM, Darius Jazayeri wrote: Yeah, sorry, typo on that one, I meant <openmrs:htmlInclude moduleId="ui.springmvc" resource="ui.css"/> with a dot in the moduleId. [hidden email] from OpenMRS Developers' mailing list |
||||||||||||||||
| Free Embeddable Forum Powered by Nabble | Help |