Hey Guys,
I have good news, I made some tests with richfaces client side validation system and primefaces form inputs, and it works!
But there's a problem though with p:password.
p:password generates the input inside a span which keeps the ID you passed to the tag. the input receives a generated ID with the suffix "_input".
richfaces tries to access the value from the input using the ID you passed to the p:password component, since the component is span, it doesn't collect the correct value.
I suggest that the input keeps the ID and the span receives a suffix like "_container".
wdyt? Considering the interop feature of JSF2, do you think that is it worth to track this issue?
btw, I'm using prime 3.0.M3.
best regards
José Freitas
Issue when working with richfaces client side validation
I'm kinda lost here, how can a community member contribute to the project?
I cannot register an issue without discussing it in forum (and you don't seem to want to discuss it).
Since you guys are working with svn, I cannot make a pull request (I mean, I cannot contribute without being explicit a member of the project)
Is there another channel that I can use to help you improve the software?
I cannot register an issue without discussing it in forum (and you don't seem to want to discuss it).
Since you guys are working with svn, I cannot make a pull request (I mean, I cannot contribute without being explicit a member of the project)
Is there another channel that I can use to help you improve the software?
-
- PrimeFaces Core Developer
- Posts: 3979
- Joined: 03 Dec 2010, 14:11
- Location: Bavaria, DE
- Contact:
You could create an issue and attach an patch to the issue
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
Hi spinner,
What you described is not a PrimeFaces issue. It's a correct behavior. Many components are generated by this way. If you write span element with suffix "_container", the component can't be updated as whole.
If RichFaces can't access input field because it has Id <component-id>_input, then it's an RichFaces issue. They have to change their logic to find editable fields. We had a similar issue with p:focus, but it was fixed a couple of time ago. All what you (RichFaces) needs is to write a correct jQuery selector to find editable field under <component-id>. Look jQuery selector in Focus.java please. I mean this one
I hope I answered your question.
What you described is not a PrimeFaces issue. It's a correct behavior. Many components are generated by this way. If you write span element with suffix "_container", the component can't be updated as whole.
If RichFaces can't access input field because it has Id <component-id>_input, then it's an RichFaces issue. They have to change their logic to find editable fields. We had a similar issue with p:focus, but it was fixed a couple of time ago. All what you (RichFaces) needs is to write a correct jQuery selector to find editable field under <component-id>. Look jQuery selector in Focus.java please. I mean this one
Code: Select all
public final static String INPUT_SELECTOR = ":not(:submit):not(:button):input:visible:enabled:first"
PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
I agree with Oleg, using ids is not a good solution because it assumes client id belongs to an input which is usually not the case with rich components like autocomplete, spinner ...
I think they should improve it on their end with a jQuery selector that finds the input inside the client id target.
I think they should improve it on their end with a jQuery selector that finds the input inside the client id target.
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
Your suggesting will break ajax updates, a component should have it's clientId set to the main container for ajax updates.I suggest that the input keeps the ID and the span receives a suffix like "_container".
First of all, thanks for your answers and attention.
After your points, I must agree with you, maybe it's better to guarantee the interoperability of this feature building a way to find the input field (as Oleg stated), than to guarantee that all inputs would have the same id of the component.
p.s.: Although I'm sure you have your reasons for not accepting patches anymore, I'd suggest you to analyze github as a potenial code host for your project and its pull request system.
It's amazing how community can push the project forward.
After your points, I must agree with you, maybe it's better to guarantee the interoperability of this feature building a way to find the input field (as Oleg stated), than to guarantee that all inputs would have the same id of the component.
p.s.: Although I'm sure you have your reasons for not accepting patches anymore, I'd suggest you to analyze github as a potenial code host for your project and its pull request system.
It's amazing how community can push the project forward.
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
PrimeFaces is a conservative project
-
- Information
-
Who is online
Users browsing this forum: No registered users and 46 guests