You are viewing a plain text version of this content. The canonical link for it is here.
Posted to adffaces-issues@incubator.apache.org by "Adam Winer (JIRA)" <ad...@incubator.apache.org> on 2006/06/19 21:41:31 UTC

[jira] Created: (ADFFACES-24) Using autoSubmit on a text field suppresses the ActionEvent on a button

Using autoSubmit on a text field suppresses the ActionEvent on a button
-----------------------------------------------------------------------

         Key: ADFFACES-24
         URL: http://issues.apache.org/jira/browse/ADFFACES-24
     Project: MyFaces ADF-Faces
        Type: Bug

    Reporter: Adam Winer


First reported on OTN for ADF Faces:

http://forums.oracle.com/forums/thread.jspa?threadID=390427&tstart=0

... but presumably applies to Trinidad too.  The report:

"Adding an InputText component on the page that has autosubmit set to true and
a value change listener attached will suppress a button action event if the
user directly clicks onto the button when leaving the field

To reproduce:

- Create ADF Faces page with backing bean
- Add InputText components to ADF Faces page
- Set autosubmit property in the InputText to true
- Add CommanButton to ADF Faces page
- Create action method for command button (double click on the button to
create the method
- Add System.out.println("Action event fired"); into the method
- create a ValueChange listener for the textfield and put
  System.out.println("Value Change Listener fired"); into it
- Run the ADF Faces page
- Type hello into teh textfield and hit the button

The output you see is "Value Change Listener fired". Pressing the button
twice shows "Action event fired" as well. Obviously an event on a autosubmit
InputText overrides the event on the component that is clicked on."

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (ADFFACES-24) Using autoSubmit on a text field suppresses the ActionEvent on a button

Posted by "Pierre-Luc Archambault (JIRA)" <ad...@incubator.apache.org>.
    [ http://issues.apache.org/jira/browse/ADFFACES-24?page=comments#action_12419544 ] 

Pierre-Luc Archambault commented on ADFFACES-24:
------------------------------------------------

Did a quick test to verify this and it appears that the attribute doesn't fix the bug finally. The PPR event still block the Action fired from the commandButton.

> Using autoSubmit on a text field suppresses the ActionEvent on a button
> -----------------------------------------------------------------------
>
>          Key: ADFFACES-24
>          URL: http://issues.apache.org/jira/browse/ADFFACES-24
>      Project: MyFaces ADF-Faces
>         Type: Bug

>     Reporter: Adam Winer

>
> First reported on OTN for ADF Faces:
> http://forums.oracle.com/forums/thread.jspa?threadID=390427&tstart=0
> ... but presumably applies to Trinidad too.  The report:
> "Adding an InputText component on the page that has autosubmit set to true and
> a value change listener attached will suppress a button action event if the
> user directly clicks onto the button when leaving the field
> To reproduce:
> - Create ADF Faces page with backing bean
> - Add InputText components to ADF Faces page
> - Set autosubmit property in the InputText to true
> - Add CommanButton to ADF Faces page
> - Create action method for command button (double click on the button to
> create the method
> - Add System.out.println("Action event fired"); into the method
> - create a ValueChange listener for the textfield and put
>   System.out.println("Value Change Listener fired"); into it
> - Run the ADF Faces page
> - Type hello into teh textfield and hit the button
> The output you see is "Value Change Listener fired". Pressing the button
> twice shows "Action event fired" as well. Obviously an event on a autosubmit
> InputText overrides the event on the component that is clicked on."

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (ADFFACES-24) Using autoSubmit on a text field suppresses the ActionEvent on a button

Posted by "Simon Lessard (JIRA)" <ad...@incubator.apache.org>.
    [ http://issues.apache.org/jira/browse/ADFFACES-24?page=comments#action_12419551 ] 

Simon Lessard commented on ADFFACES-24:
---------------------------------------

Then this is a bug in <afh:body/>'s firstClickPassed property.

> Using autoSubmit on a text field suppresses the ActionEvent on a button
> -----------------------------------------------------------------------
>
>          Key: ADFFACES-24
>          URL: http://issues.apache.org/jira/browse/ADFFACES-24
>      Project: MyFaces ADF-Faces
>         Type: Bug

>     Reporter: Adam Winer

>
> First reported on OTN for ADF Faces:
> http://forums.oracle.com/forums/thread.jspa?threadID=390427&tstart=0
> ... but presumably applies to Trinidad too.  The report:
> "Adding an InputText component on the page that has autosubmit set to true and
> a value change listener attached will suppress a button action event if the
> user directly clicks onto the button when leaving the field
> To reproduce:
> - Create ADF Faces page with backing bean
> - Add InputText components to ADF Faces page
> - Set autosubmit property in the InputText to true
> - Add CommanButton to ADF Faces page
> - Create action method for command button (double click on the button to
> create the method
> - Add System.out.println("Action event fired"); into the method
> - create a ValueChange listener for the textfield and put
>   System.out.println("Value Change Listener fired"); into it
> - Run the ADF Faces page
> - Type hello into teh textfield and hit the button
> The output you see is "Value Change Listener fired". Pressing the button
> twice shows "Action event fired" as well. Obviously an event on a autosubmit
> InputText overrides the event on the component that is clicked on."

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (ADFFACES-24) Using autoSubmit on a text field suppresses the ActionEvent on a button

Posted by "Matthias Weßendorf (JIRA)" <ad...@incubator.apache.org>.
     [ https://issues.apache.org/jira/browse/ADFFACES-24?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matthias Weßendorf updated ADFFACES-24:
---------------------------------------

    Affects Version/s: 1.0.1-incubating-core-SNAPSHOT

> Using autoSubmit on a text field suppresses the ActionEvent on a button
> -----------------------------------------------------------------------
>
>                 Key: ADFFACES-24
>                 URL: https://issues.apache.org/jira/browse/ADFFACES-24
>             Project: MyFaces ADF-Faces
>          Issue Type: Bug
>    Affects Versions: 1.0.1-incubating-core-SNAPSHOT
>            Reporter: Adam Winer
>
> First reported on OTN for ADF Faces:
> http://forums.oracle.com/forums/thread.jspa?threadID=390427&tstart=0
> ... but presumably applies to Trinidad too.  The report:
> "Adding an InputText component on the page that has autosubmit set to true and
> a value change listener attached will suppress a button action event if the
> user directly clicks onto the button when leaving the field
> To reproduce:
> - Create ADF Faces page with backing bean
> - Add InputText components to ADF Faces page
> - Set autosubmit property in the InputText to true
> - Add CommanButton to ADF Faces page
> - Create action method for command button (double click on the button to
> create the method
> - Add System.out.println("Action event fired"); into the method
> - create a ValueChange listener for the textfield and put
>   System.out.println("Value Change Listener fired"); into it
> - Run the ADF Faces page
> - Type hello into teh textfield and hit the button
> The output you see is "Value Change Listener fired". Pressing the button
> twice shows "Action event fired" as well. Obviously an event on a autosubmit
> InputText overrides the event on the component that is clicked on."

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ADFFACES-24) Using autoSubmit on a text field suppresses the ActionEvent on a button

Posted by "Adam Winer (JIRA)" <ad...@incubator.apache.org>.
    [ http://issues.apache.org/jira/browse/ADFFACES-24?page=comments#action_12419558 ] 

Adam Winer commented on ADFFACES-24:
------------------------------------

Note: firstClickPassed is in an obsolete codebase and is unused;  afh:body does not have a firstClickPassed property, so this is not relevant to this issue.

> Using autoSubmit on a text field suppresses the ActionEvent on a button
> -----------------------------------------------------------------------
>
>          Key: ADFFACES-24
>          URL: http://issues.apache.org/jira/browse/ADFFACES-24
>      Project: MyFaces ADF-Faces
>         Type: Bug

>     Reporter: Adam Winer

>
> First reported on OTN for ADF Faces:
> http://forums.oracle.com/forums/thread.jspa?threadID=390427&tstart=0
> ... but presumably applies to Trinidad too.  The report:
> "Adding an InputText component on the page that has autosubmit set to true and
> a value change listener attached will suppress a button action event if the
> user directly clicks onto the button when leaving the field
> To reproduce:
> - Create ADF Faces page with backing bean
> - Add InputText components to ADF Faces page
> - Set autosubmit property in the InputText to true
> - Add CommanButton to ADF Faces page
> - Create action method for command button (double click on the button to
> create the method
> - Add System.out.println("Action event fired"); into the method
> - create a ValueChange listener for the textfield and put
>   System.out.println("Value Change Listener fired"); into it
> - Run the ADF Faces page
> - Type hello into teh textfield and hit the button
> The output you see is "Value Change Listener fired". Pressing the button
> twice shows "Action event fired" as well. Obviously an event on a autosubmit
> InputText overrides the event on the component that is clicked on."

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (ADFFACES-24) Using autoSubmit on a text field suppresses the ActionEvent on a button

Posted by "Simon Lessard (JIRA)" <ad...@incubator.apache.org>.
    [ http://issues.apache.org/jira/browse/ADFFACES-24?page=comments#action_12419517 ] 

Simon Lessard commented on ADFFACES-24:
---------------------------------------

Here's a little follow-up on this issue.

I found the following property in org.apache.myfaces.adfinternal.ui.UIConstants

  // Allow the first click to go through in certain instances? When a PPR event
  // occurs, we block all user input until it completes. However, there may be
  // instances where the client wants to receive the very first click. For
  // example, If the user has entered text in a textInput with a ClientAction
  // attached, then immediately clicked a submit button, the click would get
  // consumed by the blocking code. This attribute (on the BodyBean), allows
  // the client to force the delivery of the first click.
  public static final AttributeKey FIRST_CLICK_PASSED_ATTR = new AttributeKey("firstClickPassed");

It seems to be a property of the <afh:body/> tag. We should test to see if setting the property to true fix the issue, and if it's the case, maybe use true as the default value instead of false.

> Using autoSubmit on a text field suppresses the ActionEvent on a button
> -----------------------------------------------------------------------
>
>          Key: ADFFACES-24
>          URL: http://issues.apache.org/jira/browse/ADFFACES-24
>      Project: MyFaces ADF-Faces
>         Type: Bug

>     Reporter: Adam Winer

>
> First reported on OTN for ADF Faces:
> http://forums.oracle.com/forums/thread.jspa?threadID=390427&tstart=0
> ... but presumably applies to Trinidad too.  The report:
> "Adding an InputText component on the page that has autosubmit set to true and
> a value change listener attached will suppress a button action event if the
> user directly clicks onto the button when leaving the field
> To reproduce:
> - Create ADF Faces page with backing bean
> - Add InputText components to ADF Faces page
> - Set autosubmit property in the InputText to true
> - Add CommanButton to ADF Faces page
> - Create action method for command button (double click on the button to
> create the method
> - Add System.out.println("Action event fired"); into the method
> - create a ValueChange listener for the textfield and put
>   System.out.println("Value Change Listener fired"); into it
> - Run the ADF Faces page
> - Type hello into teh textfield and hit the button
> The output you see is "Value Change Listener fired". Pressing the button
> twice shows "Action event fired" as well. Obviously an event on a autosubmit
> InputText overrides the event on the component that is clicked on."

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (ADFFACES-24) Using autoSubmit on a text field suppresses the ActionEvent on a button

Posted by "Pierre-Luc Archambault (JIRA)" <ad...@incubator.apache.org>.
    [ http://issues.apache.org/jira/browse/ADFFACES-24?page=comments#action_12422769 ] 
            
Pierre-Luc Archambault commented on ADFFACES-24:
------------------------------------------------

I made a little more search throught the code (mostly java script now) about this issue, and its seems that in the : 
Core.js
on the branch adf-faces\adf-faces-impl\src\main\javascript\META-INF\adf\jsLibs

there is a var named _pprFirstClickPass that is set to false. From the comment it seemed this variable was manipulated through the FirstClickPassed from the body element. (the one which Adam said it was now deprecated)

When manually setting this var to TRUE, I did some test with the example how to reproduce the 'bug' and its turn out that the behavior for the bug is *somewhat* solved. While testing I'd say about 3/4 of the click I tried to do moderately fast, (ilke a normal click) were detected and both event fired, at the opposite of when the var was at FALSE. However, it seems that sometimes even with the var at TRUE, only the onChange event get executed and the onClick event is lost.

Overall, what I'm sure of is that if this _pprFirstClickPass var is at TRUE, the behavior of clicking on a button right after a inputText value change is really better than when at FALSE. Most of the time, the bug isn't apparent, even tought, sometimes its still occured.

> Using autoSubmit on a text field suppresses the ActionEvent on a button
> -----------------------------------------------------------------------
>
>                 Key: ADFFACES-24
>                 URL: http://issues.apache.org/jira/browse/ADFFACES-24
>             Project: MyFaces ADF-Faces
>          Issue Type: Bug
>            Reporter: Adam Winer
>
> First reported on OTN for ADF Faces:
> http://forums.oracle.com/forums/thread.jspa?threadID=390427&tstart=0
> ... but presumably applies to Trinidad too.  The report:
> "Adding an InputText component on the page that has autosubmit set to true and
> a value change listener attached will suppress a button action event if the
> user directly clicks onto the button when leaving the field
> To reproduce:
> - Create ADF Faces page with backing bean
> - Add InputText components to ADF Faces page
> - Set autosubmit property in the InputText to true
> - Add CommanButton to ADF Faces page
> - Create action method for command button (double click on the button to
> create the method
> - Add System.out.println("Action event fired"); into the method
> - create a ValueChange listener for the textfield and put
>   System.out.println("Value Change Listener fired"); into it
> - Run the ADF Faces page
> - Type hello into teh textfield and hit the button
> The output you see is "Value Change Listener fired". Pressing the button
> twice shows "Action event fired" as well. Obviously an event on a autosubmit
> InputText overrides the event on the component that is clicked on."

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira