ENHANCEMENT REQUEST: pe:layoutPane p:ajax events

Community Driven Extensions Project
Post Reply
smithh032772
Posts: 6144
Joined: 10 Sep 2011, 21:10

08 Nov 2012, 04:52

I recently attampted to use pe:layout p:ajax event="resize" and it did not meet requirement, even though I conditionally rendered p:ajax for pe:layout, when a certain page was the active view.

ENHANCEMENT REQUEST: please add p:ajax event="resize|open|close" per pe:layoutPane.

This would be great for nested layout use cases. Why should one have to conditionally render p:ajax event="resize" for p:layout, when you only want that AJAX event for one layoutPane (e.g. west) within one view?

It would be nice to be able to call various bean methods via pe:layoutPane p:ajax, such as follows:

north

Code: Select all

<pe:layoutPane north> <p:ajax event="resize" listener="bean.resizeNorth()"/></pe:layoutPane>
west

Code: Select all

<pe:layoutPane west> <p:ajax event="resize" listener="bean.resizeWest()"/></pe:layoutPane>
What will this enhance? This will enhance (and actually, 'replace') p:layout p:ajax. Is an entire p:layout closed, opened, or resized? No. Each layoutPane is closed, opened, or resized.

Also, the current p:layout p:ajax event="resize" is not usable/reliable. I cannot rely on the AJAX event argument values at all. If I click the button which hides/shows west pane, it AJAX "resize" event always says that "center" resized.

Providing this enhancement request will eliminate the 'need' or requirement to provide name of layoutPane which was resized. When I click the hide/show layoutPane button, then it should plainly and simply just let me know that the layoutPane is currently hidden or displayed.

I have not attempted to use open/close events yet, but providing p:ajax events for each layoutPane would be a great enhancement to pe:layout component.

Issue 311 in Issue Tracker
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

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

08 Nov 2012, 11:42

ENHANCEMENT REQUEST: please add p:ajax event="resize|open|close" per pe:layoutPane.
p:ajax can't be added to pe:layoutPane. It should be a direct child of pe:layout like other PF components. I would specifiy something <p:ajax forPosition="north" .... />, but as you know p:ajax doesn't have forPosition attribute :-) We can think about a configuration for desired panes for AJAX events per attribute(s) in pe:layout. This would a good idea I think.
Also, the current p:layout p:ajax event="resize" is not usable/reliable. I cannot rely on the AJAX event argument values at all. If I click the button which hides/shows west pane, it AJAX "resize" event always says that "center" resized.
No, that's not true. This is because "center" pane gets resized together with other ones. Growl notification displays all messages, but they get overlapped. You can debug Java code and see that listeners are invoked correct. Simple output in listener the pane position the listener is being invoked for.
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 “Extensions”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest