[richfaces-issues] [JBoss JIRA] (RF-12479) Unable to invoke action on command link or command button

Pavol Pitonak (JIRA) jira-events at lists.jboss.org
Wed Sep 12 08:01:35 EDT 2012


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

Pavol Pitonak resolved RF-12479.
--------------------------------

    Resolution: Cannot Reproduce Bug


I could not reproduce the bug. I tried RichFaces 4.2.2.Final and this use-case works fine (action listener was invoked and variable "text" contained the content of textarea).

However, I don't understand why a4j:ajax and a4j:actionListener are used. Both can be set as properties of a4j:commandButton like this:
{code:xml}
<h:panelGroup layout="block">
  
  <h:panelGroup layout="block" style="padding-bottom: 3px;">
    <h:inputTextarea id="postText" style="width: 420px;" maxlength="1000" cols="200" rows="3" />
  </h:panelGroup>

  <h:panelGroup layout="block" style="text-align: right; width: 430px; padding-bottom: 5px;">
    <a4j:commandButton value="#{msgs.share}" status="waitstatus" styleClass="commandButton" execute="@this postText" render="chatterFeed" actionListener="#{homeController.postItem}" />
  </h:panelGroup>

</h:panelGroup>
{code}

Another thing is that if h:inputTextarea specified attribute "value", it would not be necessary to use JSF API inside listener. Since listener sets input's value to empty string, command button should probably re-render textarea:
{code}
  <a4j:commandButton value="#{msgs.share}" status="waitstatus" styleClass="commandButton" execute="@this postText" render="chatterFeed postText" actionListener="#{homeController.postItem}" />
{code}

John, I'm closing this issue because I cannot reproduce it. Feel free to reopen it if you have more information and it still doesn't work for you.
                
> Unable to invoke action on command link or command button
> ---------------------------------------------------------
>
>                 Key: RF-12479
>                 URL: https://issues.jboss.org/browse/RF-12479
>             Project: RichFaces
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: component-a4j-core
>    Affects Versions: 4.2.2.Final
>            Reporter: John Herson
>            Assignee: Pavol Pitonak
>            Priority: Minor
>
> a4j:commandLink and a4j:commandButton with action works fine with RichFaces 4.2.0 but when I upgrade to 4.2.1 or above the action on a4j:commandButton and a4j:commandLink does not work. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the richfaces-issues mailing list