[richfaces-issues] [JBoss JIRA] (RF-12112) inputText not putting in data from rich:popupPanel

Brian Leathem (JIRA) jira-events at lists.jboss.org
Mon Apr 16 16:59:17 EDT 2012


    [ https://issues.jboss.org/browse/RF-12112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12684264#comment-12684264 ] 

Brian Leathem edited comment on RF-12112 at 4/16/12 4:58 PM:
-------------------------------------------------------------

I have a version like that and it still doesn't produce desired effect.  But... it turns out that the real problem is somewhat different than what I described.  It becomes apparent when you remove the "onclick" event from the Save button thereby not closing the window on the first click.  Click once...nothing. Click twice and everything works as expected.  Here is the simplest version of the code I can come up with.

{code}
<h:form id="f1">
  <a4j:commandButton render="editPanel" value="Pop up"
    oncomplete="#{rich:component('editPanel')}.show()" />
</h:form>

<rich:popupPanel id="editPanel">
   <h:form id="f2">
      <h:outputText value="Name: " />
      <h:inputText value="#{userBean.name}" />
      <a4j:commandButton id="cb" actionListener="#{userBean.save}" value="Save" />
      <a4j:commandButton value="Cancel"
        onclick="#{rich:component('editPanel')}.hide()" />r
    </h:form>
</rich:popupPanel>
{code}

{code}
@ManagedBean
@ViewScoped
public class UserBean implements Serializable {
    
    String name;

    public String getName() {
        System.out.println("getName");
        return name;
    }

    public void setName(String name) {
        System.out.println("setNAme "+name);
        this.name = name;
    }
    
    public void save(){
        System.out.println("save() is firing, but name is "+name);
    }

}
{code}
                
      was (Author: daxxy):
    I have a version like that and it still doesn't produce desired effect.  But... it turns out that the real problem is somewhat different than what I described.  It becomes apparent when you remove the "onclick" event from the Save button thereby not closing the window on the first click.  Click once...nothing. Click twice and everything works as expected.  Here is the simplest version of the code I can come up with.

<h:form id="f1">
  <a4j:commandButton render="editPanel" value="Pop up"
    oncomplete="#{rich:component('editPanel')}.show()" />
</h:form>


<rich:popupPanel id="editPanel">
   <h:form id="f2">
      <h:outputText value="Name: " />
      <h:inputText value="#{userBean.name}" />
      <a4j:commandButton id="cb" actionListener="#{userBean.save}" value="Save" />
      <a4j:commandButton value="Cancel"
        onclick="#{rich:component('editPanel')}.hide()" />r
    </h:form>
</rich:popupPanel>



@ManagedBean
@ViewScoped
public class UserBean implements Serializable {
    
    String name;

    public String getName() {
        System.out.println("getName");
        return name;
    }

    public void setName(String name) {
        System.out.println("setNAme "+name);
        this.name = name;
    }
    
    public void save(){
        System.out.println("save() is firing, but name is "+name);
    }

}
                  
> inputText not putting in data from rich:popupPanel
> --------------------------------------------------
>
>                 Key: RF-12112
>                 URL: https://issues.jboss.org/browse/RF-12112
>             Project: RichFaces
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: component-input
>    Affects Versions: 4.2.0.Final
>         Environment: Windows Vista, EAP 6beta, eclipse indigo
>            Reporter: Tanya Ruttenberg
>              Labels: richfaces
>         Attachments: richfaces-tdr.zip
>
>
> a rich:popupPanel containing h:inputText does not input the data for either an a4j:commandButton or h:commandButton.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the richfaces-issues mailing list