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

        
_______________________________________________
richfaces-issues mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/richfaces-issues

Reply via email to