Problem: Actions aren't called with PF SNAPSHOT

UI Components for JSF
User avatar
Oleg
Expert Member
Posts: 3805
Joined: 02 Oct 2009, 09:41
Location: Germany, Black Forest

18 Mar 2010, 12:44

Hello,

I have a big problem after change to the 2.0.1-SNAPSHOT today. No actions are called more :-( I use Mojara 2.0.2. For example this working code before change to SNAPSHOT doesn't work more.

Code: Select all

								<p:commandLink id="ptLink" value="#{msgNavigation['metadata.link.propTemplates']}" 
									styleClass="#{navigationContext.getSidebarLinkStyleClass('pt')}"
									action="#{navigationContext.setSidebarSelection('pt')}" process="@this" update="rightColumnContent"
									immediate="true" async="true" onclick="selectSidebarLink(this)"/>
The method setSidebarSelection is not called (debugged). No Java errors appear, no JS errors. I've debugged PF Listeners, everything seems to be Ok. But application doesn't work. Any idea? Please help me with suggestions. This behavior occurs today after I've downloaded 2.0.1-SNAPSHOT by maven.

Thanks in advance.

P.S. regular submits are working, ajax not.
PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin

User avatar
Oleg
Expert Member
Posts: 3805
Joined: 02 Oct 2009, 09:41
Location: Germany, Black Forest

18 Mar 2010, 12:57

I have now more problems. Did you updated jQuery version? For a p:commandButton with ajax="true"

Code: Select all

<p:commandButton value="#{msgSettings['settings.button.apply']}" ajax="false" process="settingsPanelGrid" action="#{userSettings.save}"/>
I get an exception in IE 'undefined' is Null or no Object, jquery.js, line 55. FF is ok.
PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin

User avatar
Oleg
Expert Member
Posts: 3805
Joined: 02 Oct 2009, 09:41
Location: Germany, Black Forest

19 Mar 2010, 12:08

Hello,

Just for Info (I don't have worries, SNAPSHOT is SNAPSHOT). This with standard JSF works

Code: Select all

								<h:commandLink id="ptLink" value="#{msgNavigation['metadata.link.propTemplates']}" 
									styleClass="#{navigationContext.getSidebarLinkStyleClass('pt')}"
									action="#{navigationContext.setSidebarSelection('pt')}"
									immediate="true" onclick="selectSidebarLink(this)">
									<f:ajax immediate="true" execute="@this" render="rightColumnContent"/>
								</h:commandLink>
I don't intend to replace all places with p:commandLink / p:commandButton by h:commandLink / h:commandButton. I have too many places, but I tend more and more to that. Benefit of standard components are client behaviors. I have wrote an own Modal Dialog and attached it at the body. Then I wrote a small component which implements ClientBehavior and deliveries a script to call this Modal Dialog. If user pushes OK the next ClientBehavior will be called (here p:ajax), if CANCEL then I return false in the dialog and pass false to the onlick. The ClientBehavior chain will be aborted and no ajax call starts. An example:

Code: Select all

<h:commandLink ....>
  <jt:confirmDialog event="click"/>
  <f:ajax event="click" execute="..." render="..."/>
</h:commandButton>
Simple and powerful. Does PrimeFaces plan to use ClientBehaviors?
PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin


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

19 Mar 2010, 12:29

Weird thing is we are using the snapshots and actions run just fine.

User avatar
Oleg
Expert Member
Posts: 3805
Joined: 02 Oct 2009, 09:41
Location: Germany, Black Forest

19 Mar 2010, 13:09

cagatay.civici wrote:Weird thing is we are using the snapshots and actions run just fine.
Thanks at first for the reply about ClientBehaviors. Nice to hear that PrimeFaces is aware of that.

With SNAPSHOT it's really strange. I've not found errors, but actions are not fired. Switch to the released version - all works again. Weird , weird... Do anybody have this behavior too?
PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin

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

19 Mar 2010, 13:25

Do ajax commands actually do a proper ajax request?

User avatar
Oleg
Expert Member
Posts: 3805
Joined: 02 Oct 2009, 09:41
Location: Germany, Black Forest

19 Mar 2010, 13:27

cagatay.civici wrote:Do ajax commands actually do a proper ajax request?
Yes, proper. Do you need this exactly? I can switch to the SNAPSHOT, try it again and post here.
PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin

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

19 Mar 2010, 13:30

Is it possible for you to attach the code and debug?

User avatar
Oleg
Expert Member
Posts: 3805
Joined: 02 Oct 2009, 09:41
Location: Germany, Black Forest

19 Mar 2010, 13:33

cagatay.civici wrote:Is it possible for you to attach the code and debug?
I didn't quite understand. Which code, which debug? :-)

Just a question - Are there big differences between release and snapshot? Did you maybe introduce something new?

Thanks for your effort Cagatay!
PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 32 guests