PF5 SelectCheckBoxMenu ajax update error

UI Components for JSF
Post Reply
shinsuke
Posts: 2
Joined: 19 May 2014, 02:57

19 May 2014, 03:25

PF5 SelectCheckBoxMenu ajax update is JavaScript Error.

Error:Syntax error, unrecognized expression: unsupported pseudo: selectCheckboxMenu_panel

Code: Select all

<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:p="http://primefaces.org/ui"
    xmlns:f="http://java.sun.com/jsf/core">
  <h:head>
    <title>SelectCheckboxMenu Error</title>
  </h:head>
  <h:body>
    <h:form id="form">
      <p:selectCheckboxMenu id="selectCheckboxMenu" label="Options">
        <f:selectItems value="#{backingBean.items}"/>
      </p:selectCheckboxMenu>
      
      <p:commandButton value="click" update="selectCheckboxMenu"/>
    </h:form>
  </h:body>
</html>
this code PF4 no error.

jherkel
Posts: 2
Joined: 18 Jul 2013, 14:23

13 Jun 2014, 15:29

I have same problem. Any idea what is wrong?
Primefaces 5.0.2
Mojarra 2.2.6
Tomcat 7.0.53

markusg80
Posts: 69
Joined: 21 Nov 2013, 17:11

09 Jul 2014, 22:31

I have the same issue! Very important to fix this
PrimeFaces 12.0.0,Mojarra 4.0.0,Payara 6

tandraschko
PrimeFaces Core Developer
Posts: 3979
Joined: 03 Dec 2010, 14:11
Location: Bavaria, DE
Contact:

09 Jul 2014, 23:21

Fixed for 5.1 and 5.0.4 ;)
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

RaviKul
Posts: 4
Joined: 16 Sep 2014, 15:59

16 Sep 2014, 16:13

Im noticing same error and using PF 5. In my case, SelectCheckBoxMenu is on overlaypanel and after data selection and form submission, there is business validation. If validation fails, I have to keep the overlay open. I have similar user case on another screen which works great but having SelectCheckBoxMenu on the current screen throws JS error "Uncaught Error: Syntax error, unrecognized expression: unsupported pseudo: suppSpecType_panel".

After reviewing current thread looks like it's a known issue and patch has been released. Our's is a maven project. So how do I get 5.1 release(assuming patch is in) via maven repository. I looked for it on Maven site but apparently not available yet. Any suggestions is greatly appreciated.

jwtillmanjx
Posts: 22
Joined: 18 Jul 2012, 00:01
Location: Jacksonville, FL

23 Sep 2014, 21:49

I added this to a JavaScript file that my page imports and now it's working, at least without any errors seen so far.

Code: Select all

// This issue is fixed as of PrimeFaces 5.0.4 and later. REMOVE this function when update to 5.0.4 or later!!!
PrimeFaces.widget.SelectCheckboxMenu.prototype.refresh = (function()
{
	return function()
	{
		//$(this.panelId).remove();								   REMOVED
		$(PrimeFaces.escapeClientId(this.panelId)).remove();	// ADDED
		this.init( arguments[0] );
	};
})();
PrimesFaces 5.0
MyFaces 2.1
IBM WebSphere Application Server
Version 8.5.5.0 (8.5.5000.20130514_1044)
IBM® Rational® Application Developer for WebSphere® Software
Version 8.5.5 (8.5.5000.RADO855-I20130822_1421)

smithh032772
Posts: 6144
Joined: 10 Sep 2011, 21:10

24 Sep 2014, 17:36

PrimeFaces 5.1.RC1 Released

The issue should no longer exist in PrimeFaces 5.1. Correct?
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

pablo.palma
Posts: 1
Joined: 07 Mar 2017, 09:26

10 Mar 2017, 06:10

Xml:
<selectCheckboxMenu id="languages" value="#{accountController.languages}" label="Languages:" multiple="true" filter="false" filterMatchMode="startsWith" panelStyle="width:250px">
<selectItems value="#{languagesController.itemsAvailable}">
</selectItems>
</selectCheckboxMenu>

Error:
JS Error: Syntax error, unrecognized expression: [data-item-value=XXX"]
In PF6, I added this javascript:


PrimeFaces.widget.SelectCheckboxMenu.prototype.removeMultipleItem= (function()
{
return function(b)
{

var a = this.multiItemContainer.children();
if (a.length) {
a.filter("[data-item-value='" + b.data("item-value") +"' ]").remove()
}
};



and it worked

Kushal Goswami
Posts: 1
Joined: 04 Dec 2018, 12:03

04 Dec 2018, 12:08

jwtillmanjx wrote:
23 Sep 2014, 21:49
I added this to a JavaScript file that my page imports and now it's working, at least without any errors seen so far.

Code: Select all

// This issue is fixed as of PrimeFaces 5.0.4 and later. REMOVE this function when update to 5.0.4 or later!!!
PrimeFaces.widget.SelectCheckboxMenu.prototype.refresh = (function()
{
	return function()
	{
		//$(this.panelId).remove();								   REMOVED
		$(PrimeFaces.escapeClientId(this.panelId)).remove();	// ADDED
		this.init( arguments[0] );
	};
})();
This is Working Fine Thanks .
PF 5.0 having update issue with SelectCheckboxMenu and solve that with this Component.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 55 guests