action « Bean « JSF Q&A





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

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    stackoverflow.com

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" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html   xmlns="http://www.w3.org/1999/xhtml"
    ...

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

JSF view code:

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

4. Logging the invoked managed bean action in a PhaseListener    stackoverflow.com

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    stackoverflow.com

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    stackoverflow.com

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

<h:commandButton id="cmd" value="Click" 
    onclick="document.getElementById('frm_name:hiddenInput').value=test();"
    action="#{bean.actionClick}" />
and in ...

9. JSF does not call action in managed bean    coderanch.com

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