I use PrimeFaces. And i get error on client: SyntaxError: SyntaxError: JSON.parse: expected double-quoted property name at line 1 column 26 of the JSON data http://localhost:8080/tfoms/javax.faces.resource/jquery/jquery.js.jsf?ln=primefaces&v=5.3 Line 25
My code:
org_dialog_page.xhtml page:
<h:form id="orgDetail">
<p:tabView id="orgTabView" widgetVar="orgDetailTabView" style="height: 500px" activeIndex="#{organizationBean.activeIndex}" >
<p:tab title="General">
<p:panelGrid id="orgDetails" columns="12" styleClass="full-width ui-org-details"
columnClasses="label,value,validation_icon,label,value,validation_icon,label,value,validation_icon,label,value,validation_icon">
<h:outputText value="INN:"/>
<p:inputText id="innIndividual" widgetVar="innIndividual" style="width: 85px"
value="#{organizationBean.selectedOrganization.inn}"
rendered="#{organizationBean.selectedOrganization.regTypeName eq 'INDIVIDUAL'}"
validatorMessage="message">
<f:validateRegex pattern="^([0]{1}|[0-9]{12})$"/>
<p:clientValidator event="keyup"/>
<p:ajax event="blur" process="@this"/>
</p:inputText>
<p:message rendered="#{organizationBean.selectedOrganization.regTypeName eq 'INDIVIDUAL'}"
for="innIndividual" display="icon"/>
<p:inputText id="innLegal" widgetVar="innLegal" style="width: 85px"
value="#{organizationBean.selectedOrganization.inn}"
rendered="#{organizationBean.selectedOrganization.regTypeName ne 'INDIVIDUAL'}"
disabled="#{organizationBean.selectedOrganization.regTypeName eq 'NONE'}"
validatorMessage="message">
<f:validateRegex pattern="^[0-9]{10}$"/>
<p:clientValidator event="keyup"/>
<p:ajax event="blur" process="@this"/>
</p:inputText>
..........
</p:panelGrid>
</p:tab>
</p:tabView>
<br/>
<p:commandButton rendered="#{securityBean.canUpdate(organizationBean.dictionaryClass)}"
value="Save" actionListener="#{organizationBean.save}" action="#{organizationCacheBean.reload}"
process="@form" update="@widgetVar(orgTreeTable)"
oncomplete="autoScroll('.ui-organization-dict')"/>
org.xhtml page:
<p:treeTable value="#{organizationBean.rootNode}" var="organization" style="margin-top:0"
styleClass="ui-scroll-treetable-70vh ui-organization-dict" selectionMode="single"
selection="#{organizationBean.selectedNode}" widgetVar="orgTreeTable" id="orgTreeTable"
emptyMessage="message" scrollable="true" scrollHeight="500" sortBy="#{organization.shortName}">
<p:ajax event="select" listener="#{organizationBean.onOrganizationSelect}" process="@this"
update="@(.ui-organizations-toolbar)"/>
<p:column headerText="Name" style="width: 55%">
<f:facet name="header">
<h:outputText value="name"/> <br/>
<p:inputText value="#{organizationBean.shortNameFilter}" size="30"
onkeypress="if (event.keyCode == 13) { filterOrgTree(); return false; }"/>
</f:facet>
<h:outputText value="#{organization.shortName}"/>
</p:column>
....
It error left after remove update table: update="@widgetVar(orgTreeTable)"
Have any ideas why this is happening?