action « Bean « JSF Q&A

1. JSF MethodExpression isn't triggering my backing bean action

I have the problem that my code isn't triggering the action in my backing bean. The code is as follows:

HtmlCommandButton replyCommentButton = new HtmlCommandButton();
replyCommentButton.setId("replyCommentButton" + commentCounter);
replyCommentButton.setValue("Create reply");
String action = "#{Handler.action_replyToComment}";
MethodExpression methodExpression ...

2. JSF+Facelets treating bean action as property

Guys, for some reason EL is not telling actions from properties. I have this page test.xhtml:

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">

<html   xmlns=""

3. Unable to retrieve the value of inside my managed bean's action method

JSF view code:

            <h:inputText id="key" value="#{myManagedBean.key}"/>

4. Logging the invoked managed bean action in a PhaseListener

I am using Sun JSF 2.0 and wrote a phase listener extending javax.faces.event.PhaseListener. I am able to log source URI, target URI, total time and so on. But so far unable ...

6. JSF: Invoking action when bean destroyed

I have a Bean that runs some threads with database connections. What can I do to make sure those connections are closed when the user navigates away? Can I define some ...

7. Bean method getting invoked randomly from action property

I have the following in my JSP which is a popup window invoked from JSF page.

<h:commandButton id="cmd" value="Click" 
    action="#{bean.actionClick}" />
and in ...

9. JSF does not call action in managed bean

private HtmlSelectOneMenu advertSelectOneMenu; public HtmlSelectOneMenu getAdvertSelectOneMenu() { if (advertSelectOneMenu == null) advertSelectOneMenu = new HtmlSelectOneMenu(); final Collection list = new ArrayList(); list.add(new SelectItem("1", "first entry")); list.add(new SelectItem("2", "second entry")); final UISelectItems items = new UISelectItems(); items.setValue(list); advertSelectOneMenu.getChildren().add(items); return advertSelectOneMenu; } public String logDownload() { return "success"; } public String logView() { return "success"; } public void setAdvertSelectOneMenu(HtmlSelectOneMenu advertSelectOneMenu) { this.advertSelectOneMenu = ...