2.2-Final/2.2.1/3.0-SNAPSHOT Regression-core.js line 171

UI Components for JSF
Post Reply
User avatar
bumble.bee
Posts: 723
Joined: 29 Sep 2010, 21:39
Location: United States

07 Feb 2011, 17:15

I updated to 3.0-SNAPSHOT today from 2.2-SNAPSHOT and noticed that I get a JavaScript error now on line 171 of core.js. This looks related to the issue discussed here:

http://primefaces.prime.com.tr/forum/vi ... f=3&t=7658

I'll start to debug and update you with what I find.

User avatar
bumble.bee
Posts: 723
Joined: 29 Sep 2010, 21:39
Location: United States

07 Feb 2011, 17:30

OK, so it appears the problem is with the spinner display fix discussed here:

http://primefaces.prime.com.tr/forum/vi ... f=3&t=5051

It no longer works! In particular, I've got the following attribute on my dialog:

Code: Select all

onShow="PrimeFaces.ajax.AjaxRequest('/bta/faces#{facesContext.viewRoot.viewId}',{formId:'openForm'},{'javax.faces.partial.render':'openForm'});"
This attribute was required to fix the spinner display issue. With the latest code, this attribute causes a JavaScript error on line 171 of core.js:

Code: Select all

cfg.source is undefined
(FireFox)

OR

Code: Select all

'source.id' is null of not an object
(IE)

User avatar
bumble.bee
Posts: 723
Joined: 29 Sep 2010, 21:39
Location: United States

07 Feb 2011, 17:52

So it seems that the source parameter is now required. I added it and now everything is fine.

Code: Select all

onShow="PrimeFaces.ajax.AjaxRequest('/bta/faces#{facesContext.viewRoot.viewId}',{formId:'openForm',source:'menubarForm:openMenuItem',process:'@none',update:'openForm'});"

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

07 Feb 2011, 19:15

I believe you were using the client side api directly?

User avatar
bumble.bee
Posts: 723
Joined: 29 Sep 2010, 21:39
Location: United States

07 Feb 2011, 19:17

Yup

User avatar
bumble.bee
Posts: 723
Joined: 29 Sep 2010, 21:39
Location: United States

16 Mar 2011, 21:39

I guess something in the low-level API changed again in the latest 3.0-SNAPSHOT because this isn't working again. I'm going to stop using the low-level API and just use the remote command:

Code: Select all

...
<p:remoteCommand name="myFormSpinnerBugFix" update="myForm" process="@this"/>
...
<p:dialog onShow="myFormSpinnerBugFix();"...
    <h:form id="myForm">
...
This is cleaner anyways.

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

16 Mar 2011, 21:56

Yes, low level api is simplified, no longer url and formdId is needed, for example;

Code: Select all

PrimeFaces.ajax.AjaxRequest('/showcase/ui/pprUpdate.jsf',{formId:'j_idt43',async:false,global:true,source:'j_idt43:j_idt46',process:'@all',update:'j_idt43:display'})
became

Code: Select all

PrimeFaces.ab({source:'j_idt43:j_idt46', process:'@all', update:'j_idt43:display'});
ab is shortcut to reduce page size, url and formId is retrieved at client side.

Still using remoteCommand is suggested to avoid changes like these.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 11 guests