hi Primefaces
I'm using pf 5.3, i'm using default command component to handle user bahaviour when user hit enter key button. My requirement is user must hit to a positive button (like Next/Yes/OK/...) in that case. it work fine with normal form but not for dialog with no form or input.
That's dialog that just show one message with two button yes/no. user hit yes we just hide that dialog so which mean no need server-side dialog here.
Any suggestion for this case?
Thanks
DefaultCommand does not work without form
-
- PrimeFaces Core Developer
- Posts: 3979
- Joined: 03 Dec 2010, 14:11
- Location: Bavaria, DE
- Contact:
Yep, thats true.
Check line 20 here: https://github.com/primefaces/primeface ... command.js
We can probably make it configurable to allow configuration of the container. e.g.:
Default:
Your dialog:
Feel free to create a feature request.
Check line 20 here: https://github.com/primefaces/primeface ... command.js
We can probably make it configurable to allow configuration of the container. e.g.:
Default:
Code: Select all
<p:defaultCommand container="@form" />
Your dialog:
Code: Select all
<p:defaultCommand container="myDialog" />
Thomas Andraschko
PrimeFaces | PrimeFaces Extensions
Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE
Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko
PrimeFaces | PrimeFaces Extensions
Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE
Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko
Thanks @tandraschko
For moment i will overwrite that feature on Primefaces
Another thing, why we have to focus on input in order to use Enter key (by DefaultCommand), if i just open the page and press enter, notthing happen. I've tested on Chrome (latest).
For moment i will overwrite that feature on Primefaces
Another thing, why we have to focus on input in order to use Enter key (by DefaultCommand), if i just open the page and press enter, notthing happen. I've tested on Chrome (latest).
-
- Information
-
Who is online
Users browsing this forum: No registered users and 33 guests