layout resize ajax event not working in 6.2

UI Components for JSF
Post Reply
herbu
Posts: 24
Joined: 09 Oct 2013, 19:13

18 May 2018, 16:51

Hi,

just moved from 6.0 to 6.2 and it looks like the "resize" event stopped working on layout.
Did anybody have the same problem and have a fix/explanation??

Regards,
herbu

PS
in showcase there is no example for resize currently - but it think it used to be there before ....

Code: Select all

	<p:layout id="layout_main_id" fullPage="true" dynamic="true" 


		<p:ajax event="resize" listener="#{treeBean.CL.onLayoutResize}"
			update="layout_main_id" />

		<p:layoutUnit id="layoutu_n" position="north" styleClass="layoutNorth layoutNorthContent" >
			<h:form id="formNorthLayout">
			
		(...)
		


primefaces 6.2

Melloware
Posts: 3717
Joined: 22 Apr 2013, 15:48

22 May 2018, 13:39

Can you paste your Java code for: treeBean.CL.onLayoutResize

I think I might know the problem. In PrimeFaces Extensions the layout resize is this...

Code: Select all

 public ResizeEvent(final UIComponent component, final Behavior behavior, final double width, final double height) {
In PrimeFaces its this:

Code: Select all

public ResizeEvent(UIComponent component, Behavior behavior, int width, int height) {
I noticed somewhere along the way Chrome and a few other browsers started sending Resize values as 48.24 instead of 48. Can you see if you are getting any errors in the JavaScript console?
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1

herbu
Posts: 24
Joined: 09 Oct 2013, 19:13

22 May 2018, 19:30

Hi Melloware,

no - the issue is NOT related to browser - I am testing it using the same environment only the primefaces version is different (jumping between 6.0 and 6.2).

Now, on 6.2 there is no error in the browser's console (tested on firefox and chrome) neither on the server side, just - it is that the resize event is not called at all (as I said - it is working perfectly fine on 6.0)

The bean code you requested:

Code: Select all

    public void onLayoutResize(org.primefaces.event.ResizeEvent event)
    {
    	org.primefaces.component.layout.LayoutUnit lu = 
    			(org.primefaces.component.layout.LayoutUnit) event.getComponent();
    			
		(...)
	}    			
Regards,
herbu

PS
for the layout I use only primefaces. (and not primefaces extensions)

Melloware
Posts: 3717
Joined: 22 Apr 2013, 15:48

22 May 2018, 20:46

I would submit a GitHub issue then....

https://github.com/primefaces/primefaces/issues
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1

Melloware
Posts: 3717
Joined: 22 Apr 2013, 15:48

23 May 2018, 14:21

I just fixed it with issue: https://github.com/primefaces/primefaces/issues/3705

You may want to build PF 6.3-SNAPSHOT from GitHub and test it.
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1

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

23 May 2018, 16:13

Wasn't layout deprecated?

Melloware
Posts: 3717
Joined: 22 Apr 2013, 15:48

23 May 2018, 17:08

They say it is on the showcase but I am still heard no clear guidance from PF on the issue so I try and fix it while its there.
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 33 guests