Hi all,
I need to force component update from javascript by using component's widgetVar. However, there are no methods 'update' or 'refresh' in p:inputText. Any ideas?
How to update component using client side api?
-
- Posts: 10
- Joined: 19 Oct 2012, 16:33
Hi, I am trying to update a selectOneRadio button by javascript... I want to disable it only in the client side. Is that possible?
I can use jQuery to do this, but the component in the form, that is built by PrimeFaces, doesn't get the effect.
I can use jQuery to do this, but the component in the form, that is built by PrimeFaces, doesn't get the effect.
-
- PrimeFaces Core Developer
- Posts: 3979
- Joined: 03 Dec 2010, 14:11
- Location: Bavaria, DE
- Contact:
try ith with remoteCommand.
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
-
- Posts: 10
- Joined: 19 Oct 2012, 16:33
I'd like to use the PrimeFaces client API (PF), but I will try the remoteCommand instead.
Thanks.
Thanks.
- andyba
- Expert Member
- Posts: 2473
- Joined: 31 Mar 2011, 16:27
- Location: Steinfeld, near Bremen/Osnabrück, DE
- Contact:
Remote command does what you want, it just looks like a server side component. In truth the necessary JavaScript is rendered to the page.felipecaparelli wrote:I'd like to use the PrimeFaces client API (PF), but I will try the remoteCommand instead.
Thanks.
You set the remoteCommand update attribute to the component(s) you want to update after the remoteCommand is executed.
The remoteCommand provides you with a JavaScript function with the same name as set in the remoteCommand name attribute. Call it and the necessary AJAX request(s) will be made to update the component(s) you want.
PF 4.x (Elite versions), PF 5, Pf 5.1, PF 6.0
Glassfish 4.1, Mojarra 2.x, Java 8, Payara 4.1.1.
If you haven't read the forum rules read them now
Glassfish 4.1, Mojarra 2.x, Java 8, Payara 4.1.1.
If you haven't read the forum rules read them now
-
- Information
-
Who is online
Users browsing this forum: No registered users and 38 guests