grails elfinder插件:在rootDir中使用占位符 [英] grails elfinder plugin: use placeholder in rootDir
问题描述
目录的路径如下所示:
grails.plugin.elfinder.rootDir =$ {userHome} / docm_patients_doc / {patientcf} /
其中 patientcf
是我应用程序中实体的ID。当我进入该实体的show.gsp页面时,我需要用相关值替换patientcf。
我该怎么做?
编辑:
我试图在显示elfinder的脚本和div之前修改占位符,但我注意到路径没有被修改。也许gsp不是可以修改占位符的地方...
我是elfinder插件的作者,虽然插件不是根据多根开发的。
你可以试试这个。插件注册一个名为elfinderFileManager的spring bean,它具有一个名为root的属性,该属性是根目录的路径。尝试在运行时设置根属性。这个bean可以注入到你的控制器/服务中,你可以尝试改变root属性。
in my Grails project I'm using elfinder plugin to manage files and directories. I want to have a dynamic root directory, because I use the plugin for different folders. The path of directory is like the following:
grails.plugin.elfinder.rootDir = "${userHome}/docm_patients_doc/{patientcf}/"
where patientcf
is the id of an entity in my application. When I enter into the show.gsp page of that entity, I need to replace the patientcf with the related value.
How can I do it?
EDIT: I've tried to modify the placeholder before the script and div that shows elfinder in gsp page, but I notice that the path is not modified. Maybe the gsp is not the place in which the placeholder can be modified...
I am author of elfinder plugin, though plugins isn't developed with multiple roots in mind.
You can try this. Plugin registers a spring bean with name elfinderFileManager which has a property with name ‘root’ which is path to your root directory. Try setting the root property at runtime. The bean can be injected in your controller/service and you can try changing the root property.
这篇关于grails elfinder插件:在rootDir中使用占位符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!