Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9148317
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T11:14:27+00:00 2026-06-17T11:14:27+00:00

The action and actionlistener of <p:commandButton> are not called when <p:inputText> is added. Here’s

  • 0

The action and actionlistener of <p:commandButton> are not called when <p:inputText> is added.

Here’s my view:

<?xml version="1.0" encoding="UTF-8"?>
<!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"
    xmlns:f="http://java.sun.com/jsf/core"      
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:p="http://primefaces.org/ui"
    xmlns:ui="http://java.sun.com/jsf/facelets">
    <h:body>    
        <h:form>    
            <h:outputText value="Respuesta" />
                <p:inputText                
                    required="true"
                    value=" #{respuestaOficioBean.mrString}"/>
                <p:commandButton          
                    action="#{respuestaOficioBean.clearRespuesta}"
                    actionListener= "#{respuestaOficioBean.listener}"
                    update="growl"
                    value="s ss ssssssss ss ssszzs #{respuestaOficioBean.respuesta}"/>              
            <p:growl id="growl" showDetail="false" sticky="true" />  
        </h:form>
    </h:body>
</html>

Here’s my bean:

private String mrString;

public String getMrString() {
    return mrString;
}

public void setMrString(String mrString) {
    this.mrString = mrString;
}

public String clearRespuesta() {
    setRespuesta(new RespuestaOficio());
    return null;
}

public void listener (ActionEvent event) {
    System.out.println("uuu");
}

If I remove the <p:inputText> from the view, then “uuu” is printed and the breakpoint in clearRespuesta() is invoked. However if I leave the <p:inputText>, none of the former happens.

How is this caused and how can I solve it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T11:14:30+00:00Added an answer on June 17, 2026 at 11:14 am

    I didn’t immediately see the cause of your problem, so I copypasted your code into my environment (which has the OmniFaces FullAjaxExceptionHandler configured) and I got an error page with the following rather self-explaining stacktrace:

    javax.el.PropertyNotWritableException: /index.xhtml @30,44 value=" #{respuestaOficioBean.mrString}": Illegal Syntax for Set Operation
        at com.sun.faces.facelets.el.TagValueExpression.setValue(TagValueExpression.java:136)
        at javax.faces.component.UIInput.updateModel(UIInput.java:818)
        at javax.faces.component.UIInput.processUpdates(UIInput.java:735)
        at javax.faces.component.UIForm.processUpdates(UIForm.java:281)
        at javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1242)
        at javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1242)
        at javax.faces.component.UIViewRoot.processUpdates(UIViewRoot.java:1232)
        at com.sun.faces.lifecycle.UpdateModelValuesPhase.execute(UpdateModelValuesPhase.java:78)
        at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
        at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)
    

    This was also visible in the server log.

    The cause of your problem is a dangling leading space in the value attribute of the <p:inputText>. This is invalid syntax for a setter method call.

    Remove it:

    <p:inputText                
        required="true"
        value="#{respuestaOficioBean.mrString}"/>
    

    In the future pay a bit more attention to the server log and the response body of the ajax request (which you can see in the HTTP traffic monitor of the webbrowser’s developer toolset). The error information was visible in there.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is the submit button: <h:commandButton actionListener=#{regBean.findReg} action=#{regBean.navigate} value=Search /> This is the form:
I've been read this article : commandButton/commandLink/ajax action/listener method not invoked or input value
I have an ActionListener for a JSF button as follows, <h:commandButton id=id1 action=#{Mybean.Submit} value=Click>
I added an action listener to my button: myButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent
Sometimes, when using <h:commandLink> , <h:commandButton> or <f:ajax> , the action , actionListener or
Here is the problem: actionlistener does not want to be fired @ManagedBean(name=hotelsController) @SessionScoped public
i try to fix unmanagable code like this: <a4j:commandButton action=dia_ok actionListener=#{...} ajaxSingle=true .../> i
This is my jsf code :- <h:commandButton id=cmdLogin value=Login actionListener=#{indexBean.login}> <f:ajax execute=@form render=@all />
<h:form> <h:commandButton value=Buy styleClass=button-buy actionListener=#{basketCount.incrementBasketCount} immediate=true> </h:commandButton> </h:form> jsf2 part: <li class=basket> #{basketCount.basketCount} </li>
Possible Duplicate: Issues with ActionListener (Java) I am trying to implement action listener on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.