You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Martin Marinschek (JIRA)" <de...@myfaces.apache.org> on 2005/11/02 13:10:56 UTC

[jira] Closed: (MYFACES-774) UIComponentTagUtils.setActionProperty checks for UICommand instead of ActionSource

     [ http://issues.apache.org/jira/browse/MYFACES-774?page=all ]
     
Martin Marinschek closed MYFACES-774:
-------------------------------------

    Fix Version: Nightly
     Resolution: Fixed
      Assign To: Martin Marinschek

Thanks Nico for pointing this out.

> UIComponentTagUtils.setActionProperty checks for UICommand instead of ActionSource
> ----------------------------------------------------------------------------------
>
>          Key: MYFACES-774
>          URL: http://issues.apache.org/jira/browse/MYFACES-774
>      Project: MyFaces
>         Type: Bug
>   Components: General
>     Versions: 1.1.0, 1.0.9m9, 1.1.1, Nightly
>     Reporter: Nico Krijnen
>     Assignee: Martin Marinschek
>     Priority: Minor
>      Fix For: Nightly

>
> I built a custom component for internal use that acts as an ActionSource. Since myfaces can handle setting actio properties through org.apache.myfaces.taglib.UIComponentTagUtils#setActionProperty I decided to make use of that.
> My component does not inherit from UICommand, but does implement ActionSource. That should not be a problem was it not that UIComponentTagUtils#setActionProperty checks if the component passed as its second parameter is an instance of UICommand. Changing the lines:
> if (!(component instanceof UICommand))
> ((UICommand)component).setAction(mb);
> to
> if (!(component instanceof ActionSource))
> ((ActionSource) component).setAction(mb);
> should fix the problem. See:
> http://svn.apache.org/repos/asf/myfaces/share/trunk/src/java/org/apache/myfaces/taglib/UIComponentTagUtils.java

-- 
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