[ 
http://jira.magnolia-cms.com/browse/MGNLUI-581?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Federico Grilli updated MGNLUI-581:
-----------------------------------

    Comment: was deleted

(was: After a brief chatting with Tobias we came to the conclusion that this 
issue is causing the problem I've just stumbled across.

I'd like to have a base action with some common functionality shared by 
ActivationAction and DeactivationAction.
This base action has the signature 
{code}public abstract class BaseActivationAction<D extends 
BaseActivationActionDefinition> extends ActionBase<ActionDefinition>{code}. The 
BaseActivationActionDefinition is defined as
{code}public interface BaseActivationActionDefinition extends 
ActionDefinition{code}
then I have
{code}public class ActivationAction extends 
BaseActivationAction<ActivationActionDefinition>{code}
and 
{code}public class DeactivationAction extends 
BaseActivationAction<DeactivationActionDefinition>{code}
Both ActivationActionDefinition and DeactivationActionDefinition implement 
BaseActivationActionDefinition. The mapping is
ActivationAction to ActivationActionDefinition and DeactivationAction to 
DeactivationActionDefinition.

Now, when trying to do a deactivation the activation is always performed 
instead.

According to Tobias {{FactoryBase#resolveImplementationClass}} should be 
looking at the class hierarchy and find the best/closest match.
)

> Lookup of an action implementation in BaseFactory based on the definition 
> type is completely random
> ---------------------------------------------------------------------------------------------------
>
>                 Key: MGNLUI-581
>                 URL: http://jira.magnolia-cms.com/browse/MGNLUI-581
>             Project: Magnolia UI
>          Issue Type: Bug
>      Security Level: Public
>          Components: framework
>            Reporter: Tobias Mattsson
>            Priority: Major
>             Fix For: 5.0 Alpha2 s012
>
>
> In info.magnolia.ui.model.builder.FactoryBase#resolveImplementationClass we 
> loop the mappings and goes with the first we find that is a match. Since the 
> mappings are in a HashMap the order is completely random.

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

        


----------------------------------------------------------------
For list details, see: http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <dev-list-unsubscr...@magnolia-cms.com>
----------------------------------------------------------------

Reply via email to