Hi,
i have a a tabslider with two tabs. Each tab has a form. In each form I include a p:calendar component. Strange thing is that in the first tab all works fine, but in the second tab not. The popup of the calendar is not working here.
I tried it with inline mode: it worked. So the problem is the popup.
Any idea why the popup is not working?
Cheers
Timm
JSF Mojarra 1.2, PrimeFaces 1.0.2, Jboss 4.2.3, Facelets
popup problems with p:calendar in p:tabslider
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
Hi,
I think popup loses it's position when tab is moved, I've checked with firebug and dom element that belongs to the calendar is positioned at a hidden place inside a tab.
Please create an issue for this so we can have a look in detail, for now as you've tried workaround would be to use it in inline mode.
I think popup loses it's position when tab is moved, I've checked with firebug and dom element that belongs to the calendar is positioned at a hidden place inside a tab.
Please create an issue for this so we can have a look in detail, for now as you've tried workaround would be to use it in inline mode.
The same is for the tabview-module. If the calendar isn't on the first panel, the position will be lost. I think the problem is, that the "new YAHOO.widget.Overlay"- function is called, when the jsf-components are rendered. But at this time, the script which creates this tabviews isnt called. So the position, which is read from the DOM in this function, isn't the correct one. It take this one, where all 3 tabs are each under and not in tabview.
Would it be possible to call this function when the whole page is loaded??
Greats
Mikloman
Would it be possible to call this function when the whole page is loaded??
Greats
Mikloman
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
I'm not sure, I think every calendar has it's calendar overlay popup initialized properly, we can check out with firebug if dom element is created properly (it was the case with tabslider), problem is with location, I think I can be able to mix with repositioning the popup with the icon before showing. Hopefully that will fix it.
I think I will have a easy solution where overall should works. There is one config-parameter in the Overlay, which will realign the overlay for a defined trigger.
From YUI 2: Api
The 4th entry is an optional array of event names, or Custom Event objects, which should trigger re-alignment of the Overlay with the currently configured context element. For example:
[contextId, overlayCorner, contextCorner, ["beforeShow", "windowResize"]]
Will re-align the Overlay to the context element just before it's shown, and whenever the window is resized.
In Primefaces-Context means that:
In CalendarRenderer.java
So the popup is redrawed befor the popup is shown. That will works for me perfectly.
Greats
Mikloman
From YUI 2: Api
The 4th entry is an optional array of event names, or Custom Event objects, which should trigger re-alignment of the Overlay with the currently configured context element. For example:
[contextId, overlayCorner, contextCorner, ["beforeShow", "windowResize"]]
Will re-align the Overlay to the context element just before it's shown, and whenever the window is resized.
In Primefaces-Context means that:
In CalendarRenderer.java
Code: Select all
if(isPopup) {
popupVar = calendarVar + "_popup";
writer.write(popupVar + " = new YAHOO.widget.Overlay('" + clientId + "_popupContainer');\n");
writer.write(popupVar + ".cfg.setProperty('visible', 'false');\n");
writer.write(popupVar + ".cfg.setProperty('context', ['" + clientId + "_popupButton','tl','bl',['beforeShow', 'windowResize']]);\n");
writer.write(popupVar + ".render();\n");
}
Greats
Mikloman
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
Great Mikloman, yes I've used that api in a project so was planning to give it a try to fix this problem again, good to hear it works.
Thanks for the great feedback, we'll fix this very soon.
Thanks for the great feedback, we'll fix this very soon.
-
- Information
-
Who is online
Users browsing this forum: No registered users and 18 guests