[
http://jira.nuxeo.org/browse/WEB-77?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sun Tan resolved WEB-77.
------------------------
Resolution: Fixed
Hi there, thanks for the report and sorry for the delay.
I've fixed it in webengine hg repository and hope it will not cause issues
somewhere else. Anyway it seems to be working well here.
Here are my changes :
- if (script == null) {
+ if (ad.script != null) {
script = ad.script;
}
- if (handlerClass == null) {
+ if (ad.handlerClass != null) {
handlerClass = ad.handlerClass;
}
- if (pd == null) {
+ if (ad.getGuard() != null) {
> Overriding script in actionDescriptor doesn't work
> --------------------------------------------------
>
> Key: WEB-77
> URL: http://jira.nuxeo.org/browse/WEB-77
> Project: Nuxeo Web Engine
> Issue Type: Bug
> Affects Versions: 1.0 Beta
> Reporter: Damien Metzler
> Assignee: Sun Tan
> Priority: Major
>
> When a WebObject extends another, overriding the script for an action is not
> possible.
> For instance
> <object id="PortalObject" extends="WebObject">
> <actions>
> <action id="create" enabled="true" script="common/create.groovy"
> handler="org.nuxeo.ecm.webengine.actions.CreateActionHandler">
> <permission expression="Write"/>
> </action>
> </actions>
> </object>
> <object id="SitePage" extends="PortalObject">
> <actions>
> <action id="create" enabled="true" script="Page/create.groovy"
> handler="org.nuxeo.ecm.webengine.actions.CreateActionHandler">
> <permission expression="Write"/>
> </action>
> </actions>
> </object>
> In the Site Page Object the "common/create.groovy" is called instead of the
> "Page/create.groovy"
> The problem is located in the copyFrom method of the ActionDescriptor. The
> script attribute is overidden only if the script attribute is not set.
> In this case, when deploying it's called thru
> ExtensibleContribution->getMergedContribution()
> WebOjectDescriptor->copyOver()
> ActionDescriptoir->copyFrom
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.nuxeo.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
ECM-tickets mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm-tickets