Problem with RequestContext.addCallbackParam

UI Components for JSF
Post Reply
ybendek
Posts: 102
Joined: 05 Aug 2011, 17:52

22 Nov 2014, 04:04

Hi...

Currently I'm having an issue using RequestContext.addCallbackParam method, if the object added is including an String with '&' character (ex "m&m") the args variable returned to client is "undefined", any idea how could I solve that? I'm using PF 3.4

thanks in advance

kukeltje
Expert Member
Posts: 9605
Joined: 17 Jun 2010, 13:34
Location: Netherlands

22 Nov 2014, 12:30

Did you try a newer version?

ybendek
Posts: 102
Joined: 05 Aug 2011, 17:52

22 Nov 2014, 20:30

kukeltje wrote:Did you try a newer version?
Unfortunately at the moment I cannot try a new version, this is an application builded with PF 3.4, I will have lot of compilation issues if try this with other releases like 4 or 5... do you know if it could be solved in a newer version?

kukeltje
Expert Member
Posts: 9605
Joined: 17 Jun 2010, 13:34
Location: Netherlands

23 Nov 2014, 12:49

Yes you can TRY.. i never said to use it inproduction (why do people always think that) But if a newer version has a fix, you can look at that source and maybe create a patch for 3.4

User avatar
andyba
Expert Member
Posts: 2473
Joined: 31 Mar 2011, 16:27
Location: Steinfeld, near Bremen/Osnabrück, DE
Contact:

25 Nov 2014, 11:07

ybendek wrote:Hi...

Currently I'm having an issue using RequestContext.addCallbackParam method, if the object added is including an String with '&' character (ex "m&m") the args variable returned to client is "undefined", any idea how could I solve that? I'm using PF 3.4

thanks in advance
You may need to URL Encode the parameter values.
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

Eva Mariam
Posts: 6
Joined: 20 Nov 2014, 06:28

02 Dec 2014, 06:47

@ ybendek : Did you get any solution? I facing the same issue.. How do i solve it? URL encoder didnot work for me..

http://stackoverflow.com/questions/2722 ... estcontext
Eva Mariam.
JSF 2.1.29. Primefaces 5.2. Tomcat 7.

ybendek
Posts: 102
Joined: 05 Aug 2011, 17:52

17 May 2015, 22:03

Eva Mariam wrote:@ ybendek : Did you get any solution? I facing the same issue.. How do i solve it? URL encoder didnot work for me..

http://stackoverflow.com/questions/2722 ... estcontext
Well finally after lot of test and even now with PF 5.2 this issue persist/ The only way I found to solved was to encode using some utility for example org.apache.commons.lang3.StringEscapeUtils. with this util and using the escapeXml10() it change '&' to '&' and it works properly.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 48 guests