[richfaces-issues] [JBoss JIRA] Resolved: (RF-8144) MethodExpression not active when command button is added to HtmlModalPanel facet

Nick Belaevski (JIRA) jira-events at lists.jboss.org
Wed Nov 18 07:54:29 EST 2009


     [ https://jira.jboss.org/jira/browse/RF-8144?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nick Belaevski resolved RF-8144.
--------------------------------

    Resolution: Won't Fix
      Assignee: Nick Belaevski


Put command component into form or use "domElementAttachment" attribute.

> MethodExpression not active when command button is added to HtmlModalPanel facet
> --------------------------------------------------------------------------------
>
>                 Key: RF-8144
>                 URL: https://jira.jboss.org/jira/browse/RF-8144
>             Project: RichFaces
>          Issue Type: Bug
>          Components: component-panels-layout-themes
>            Reporter: Achim Gundermann
>            Assignee: Nick Belaevski
>            Priority: Minor
>
> When I want to add by Java (backing bean) a close button  - which also does a bean action (a MethodExpression) to a modal panel - to the header by the facet "control", the bean action is not invoked. Only the modal panel is closed.
> Source code fragment:
> FacesContext context = FacesContext.getCurrentInstance();
> Application application = context.getApplication();
> ExpressionFactory expressionFactory = application.getExpressionFactory();
> ELContext elContext = FacesContext.getCurrentInstance().getELContext();
>         
> HtmlCommandButton errorButton =(HtmlCommandButton) application.createComponent(HtmlCommandButton.COMPONENT_TYPE);	
> errorButton.setId("errorDiialog_closeButton");
> MethodExpression errorMethod = expressionFactory.createMethodExpression(elContext, "#{errorLog.clearNewError}", String.class,
> new Class[] {});
> errorButton.setActionExpression(errorMethod);
> errorButton.setOnclick("Richfaces.hideModalPanel('errorPanel')");
> errorButton.setImage("/pages/img/close.bmp");
> errorButton.setType("submit");
> errorPanel.getFacets().put("controls", errorButton);
> The modal panel is closed, but the action method "clearNewError" is not invoked.
> When I add the errorButton to a form within the modal panel (but not at the header), both actions - closing the modal panel and invoking the bean action - will be executed.

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

        


More information about the richfaces-issues mailing list