Hello...
I have a list of people [ shown on a ui:repeat component that I created), and I have some fields (like, name, age, city...).
What my code those is this: when the person finishes typing in a field, that list of people is update (identifing people with a level of similarity).
The logic is this:
blur event -> executes AJAX that refreshes the LIST (and updates the component).
What happens is when I finish typing a word (the field has focus), and click directly on the save button (field looses focus),
it doesn´t submit. Of course it doesn´t!! Because the ajax will execute before. Its a normal behaivier
So I need a way to bypass that situation. Maybe use another AJAX event on the fields (like on change, or on keyup)...
But that also doesn´t make me happy, because the database was millions of rows... So, the ajax that is executing is a little bit slow!
Any ideias of how I could do it ?
thank you!
Ajax and Events - User Experience problem
-
- Posts: 193
- Joined: 01 Nov 2012, 04:48
INFO: Starting Servlet Engine: Apache Tomcat/7.0.12
INFO: Initializing Mojarra 2.1.10
INFO: Running on PrimeFaces 3.5
INFO: Running on PrimeFaces Extensions 0.6.1
INFO: Initializing Mojarra 2.1.10
INFO: Running on PrimeFaces 3.5
INFO: Running on PrimeFaces Extensions 0.6.1
-
- Posts: 6144
- Joined: 10 Sep 2011, 21:10
+1 exactly, normal behavior.d34d_d3v1l wrote:What happens is when I finish typing a word (the field has focus), and click directly on the save button (field looses focus), it doesn´t submit. Of course it doesn´t!! Because the ajax will execute before. Its a normal behaivier
1. stackoverflow balusc command before inputtext ajaxd34d_d3v1l wrote:So I need a way to bypass that situation. Maybe use another AJAX event on the fields (like on change, or on keyup)...
But that also doesn´t make me happy, because the database was millions of rows... So, the ajax that is executing is a little bit slow!
Any ideias of how I could do it ?
thank you!
2. found the following in the list of 'google search results':
Deactivating commandButton functionality if inputText validation fails or ajax call starts
almost any/every question has been asked already and possibly answered already, too. So, search 'instead' of asking questions. that's what I do.
Howard
PrimeFaces 6.0, Extensions 6.0.0, Push (Atmosphere 2.4.0)
TomEE+ 1.7.4 (Tomcat 7.0.68), MyFaces Core 2.2.9, JDK8
JUEL 2.2.7 | OmniFaces | EclipseLink-JPA/Derby | Chrome
Java EE 6 Tutorial|NetBeans|Google|Stackoverflow|PrimeFaces|Apache
PrimeFaces 6.0, Extensions 6.0.0, Push (Atmosphere 2.4.0)
TomEE+ 1.7.4 (Tomcat 7.0.68), MyFaces Core 2.2.9, JDK8
JUEL 2.2.7 | OmniFaces | EclipseLink-JPA/Derby | Chrome
Java EE 6 Tutorial|NetBeans|Google|Stackoverflow|PrimeFaces|Apache
-
- Posts: 193
- Joined: 01 Nov 2012, 04:48
I did some searching...
but anyhow, figured out..
used remoteCommand + javascript
(onKeyDown event with delay)
thank you !!!
but anyhow, figured out..
used remoteCommand + javascript
(onKeyDown event with delay)
thank you !!!
INFO: Starting Servlet Engine: Apache Tomcat/7.0.12
INFO: Initializing Mojarra 2.1.10
INFO: Running on PrimeFaces 3.5
INFO: Running on PrimeFaces Extensions 0.6.1
INFO: Initializing Mojarra 2.1.10
INFO: Running on PrimeFaces 3.5
INFO: Running on PrimeFaces Extensions 0.6.1
-
- Information
-
Who is online
Users browsing this forum: No registered users and 15 guests