You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Joris Kimpe <jo...@get.be> on 2008/06/09 17:35:56 UTC

[TRINIDAD] panelPopup positioning

Hello all,

I'm experimenting with Trinidad on this moment, but I'm stuck...

I want to use a panelPopup which is positioned somewhere around my
mousepointer click.  But I only get the popup on top of my page.  I thought
I should use the xoffset and yoffset, but this didn't do the trick.  Could
someone help me out on this one?

Thanks!


My jsp looks something like this:

----------------------------------------------------------------------------------------------

<tr:table id="foobar">
	<tr:column>
		<f:facet name="header">
			<tr:outputText value="foo" />
		</f:facet>
		<tr:outputText value="foo"/>
	</tr:column>
	<tr:column>
		<f:facet name="header">
			<tr:outputText value="bar" />
		</f:facet>
		<tr:panelFormLayout maxColumns="2" rows="2">
                        ...
			<tr:panelPopup text="popupTest" title="popuptest" modal="true"
xoffset="0" yoffset="0"> 
				<tr:panelGroupLayout>
					<tr:panelFormLayout rows="4" maxColumns="1" labelWidth="20%"
rendered="true" fieldWidth="80%" >
						<tr:inputText id="test" label="test"/>
					</tr:panelFormLayout>
				</tr:panelGroupLayout>
			</tr:panelPopup>			
		</tr:panelFormLayout>
	</tr:column>
</tr:table>

----------------------------------------------------------------------------------------------


-- 
View this message in context: http://www.nabble.com/-TRINIDAD--panelPopup-positioning-tp17735420p17735420.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Re: [TRINIDAD] panelPopup positioning

Posted by Scott O'Bryan <da...@gmail.com>.
Go for it.. :)

Andrew Robinson wrote:
> If the popup is not placed in the form, but in the document body, then
> submission of the form will not include any form controls in the
> popup. The problem seems to be that in IE7, if the form is not right
> under the BODY tag, especially if it nested in any element that has
> scrolled overflow, the position is inaccurate. The problem seems to be
> from the IE7 specific code to target where on the page the X and Y
> coordinates of the mouse event were. In FF, events are page relative,
> in IE they are client relative. The problem here is that I know of no
> built in way in IE to get page coordinates using a client X and Y. The
> code that I changed it to is not taking into account scroll offsets
> that are not on the document.body and therefore appearing in the wrong
> location on the page.
>
> This JS is really a pain in the rear to debug on each platform. If
> someone has the desire to fix the IE specific code for calculating the
> location and submitting the patch, that would be best.
>
> On Tue, Jun 17, 2008 at 3:57 AM, Carsten Pieper
> <ca...@continentale.de> wrote:
>   
>> Hi,
>>
>> probably this is related and might help: In some cases (portal environment,
>> but
>> browser-independent...) we also experienced problems with popup positioning
>> (using tr:panelPopup...).
>>
>> We introduced a local patch for the trinidad-impl file
>> /src/main/javascript/META-INF/adf/jsLibs/PanelPopup.js
>> which fixed our positioning problem. The only change we made was in the
>> _getOffsetParent() function.
>>
>> This is the original (please note: We're on Trinidad 1.0.5) method:
>>
>> /**
>>  * Get the element to add to the dialog to, to ensure dialog
>>  * positioning
>>  */
>> TrPanelPopup.prototype._getOffsetParent = function()
>> {
>>  for (var elem = this.getContent(); elem != null;
>>    elem = elem.parentNode)
>>  {
>>    if (elem.tagName && 'form' == elem.tagName.toLowerCase())
>>    {
>>      return elem;
>>    }
>>  }
>>  return document.body;
>> }
>>
>> And this is our patched version (we just omitted the for-loop)
>>
>> /**
>>  * Get the element to add to the dialog to, to ensure dialog
>>  * positioning
>>  */
>> TrPanelPopup.prototype._getOffsetParent = function()
>> {
>>  return document.body;
>> }
>>
>> As we don't know, what the for-loop was for (perhaps anyone could give a
>> hint...)
>> we can't claim this to be a general solution, but probably it's a hint that
>> might be useful...
>>
>> Best regards, Carsten
>>
>>
>> Andrew Robinson-5 wrote:
>>     
>>> The popup code is a bit complex and a pain to work with in a cross
>>> browser space. The best thing is to use firebug on firefox and
>>> visualstudio 2008 with IE to debug the TrPopup  JavaScript code. In
>>> there you can step through and watch the calculations being made.
>>>
>>> Otherwise, you can try to reproduce the problem on the demo page then
>>> create a Jira ticket and attach the patch/file so a developer can have
>>> a look. Danny Robinson created the panelPopup and I have made some
>>> positioning changes. I have not seen Danny around on the list anymore
>>> unfortunately and I am behind on open source work (burned out lately)
>>> so getting work done on this code may be slow going.
>>>
>>> If you can debug the code (BTW you only need the free version of
>>> VS2008 to debug JS) that would go a long way.
>>>
>>>
>>>       
>> --
>> View this message in context: http://www.nabble.com/-TRINIDAD--panelPopup-positioning-tp17735420p17881667.html
>> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>>
>>
>>     


Re: [TRINIDAD] panelPopup positioning

Posted by Andrew Robinson <an...@gmail.com>.
If the popup is not placed in the form, but in the document body, then
submission of the form will not include any form controls in the
popup. The problem seems to be that in IE7, if the form is not right
under the BODY tag, especially if it nested in any element that has
scrolled overflow, the position is inaccurate. The problem seems to be
from the IE7 specific code to target where on the page the X and Y
coordinates of the mouse event were. In FF, events are page relative,
in IE they are client relative. The problem here is that I know of no
built in way in IE to get page coordinates using a client X and Y. The
code that I changed it to is not taking into account scroll offsets
that are not on the document.body and therefore appearing in the wrong
location on the page.

This JS is really a pain in the rear to debug on each platform. If
someone has the desire to fix the IE specific code for calculating the
location and submitting the patch, that would be best.

On Tue, Jun 17, 2008 at 3:57 AM, Carsten Pieper
<ca...@continentale.de> wrote:
>
> Hi,
>
> probably this is related and might help: In some cases (portal environment,
> but
> browser-independent...) we also experienced problems with popup positioning
> (using tr:panelPopup...).
>
> We introduced a local patch for the trinidad-impl file
> /src/main/javascript/META-INF/adf/jsLibs/PanelPopup.js
> which fixed our positioning problem. The only change we made was in the
> _getOffsetParent() function.
>
> This is the original (please note: We're on Trinidad 1.0.5) method:
>
> /**
>  * Get the element to add to the dialog to, to ensure dialog
>  * positioning
>  */
> TrPanelPopup.prototype._getOffsetParent = function()
> {
>  for (var elem = this.getContent(); elem != null;
>    elem = elem.parentNode)
>  {
>    if (elem.tagName && 'form' == elem.tagName.toLowerCase())
>    {
>      return elem;
>    }
>  }
>  return document.body;
> }
>
> And this is our patched version (we just omitted the for-loop)
>
> /**
>  * Get the element to add to the dialog to, to ensure dialog
>  * positioning
>  */
> TrPanelPopup.prototype._getOffsetParent = function()
> {
>  return document.body;
> }
>
> As we don't know, what the for-loop was for (perhaps anyone could give a
> hint...)
> we can't claim this to be a general solution, but probably it's a hint that
> might be useful...
>
> Best regards, Carsten
>
>
> Andrew Robinson-5 wrote:
>>
>> The popup code is a bit complex and a pain to work with in a cross
>> browser space. The best thing is to use firebug on firefox and
>> visualstudio 2008 with IE to debug the TrPopup  JavaScript code. In
>> there you can step through and watch the calculations being made.
>>
>> Otherwise, you can try to reproduce the problem on the demo page then
>> create a Jira ticket and attach the patch/file so a developer can have
>> a look. Danny Robinson created the panelPopup and I have made some
>> positioning changes. I have not seen Danny around on the list anymore
>> unfortunately and I am behind on open source work (burned out lately)
>> so getting work done on this code may be slow going.
>>
>> If you can debug the code (BTW you only need the free version of
>> VS2008 to debug JS) that would go a long way.
>>
>>
>
> --
> View this message in context: http://www.nabble.com/-TRINIDAD--panelPopup-positioning-tp17735420p17881667.html
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>

Re: [TRINIDAD] panelPopup positioning

Posted by Carsten Pieper <ca...@continentale.de>.
Hi,

probably this is related and might help: In some cases (portal environment,
but
browser-independent...) we also experienced problems with popup positioning 
(using tr:panelPopup...).

We introduced a local patch for the trinidad-impl file 
/src/main/javascript/META-INF/adf/jsLibs/PanelPopup.js
which fixed our positioning problem. The only change we made was in the 
_getOffsetParent() function. 

This is the original (please note: We're on Trinidad 1.0.5) method:

/**
 * Get the element to add to the dialog to, to ensure dialog
 * positioning
 */
TrPanelPopup.prototype._getOffsetParent = function()
{
  for (var elem = this.getContent(); elem != null;
    elem = elem.parentNode)
  {
    if (elem.tagName && 'form' == elem.tagName.toLowerCase())
    {
      return elem;
    }
  }
  return document.body;
}

And this is our patched version (we just omitted the for-loop)

/**
 * Get the element to add to the dialog to, to ensure dialog
 * positioning
 */
TrPanelPopup.prototype._getOffsetParent = function()
{
  return document.body;
}

As we don't know, what the for-loop was for (perhaps anyone could give a
hint...)
we can't claim this to be a general solution, but probably it's a hint that 
might be useful...

Best regards, Carsten


Andrew Robinson-5 wrote:
> 
> The popup code is a bit complex and a pain to work with in a cross
> browser space. The best thing is to use firebug on firefox and
> visualstudio 2008 with IE to debug the TrPopup  JavaScript code. In
> there you can step through and watch the calculations being made.
> 
> Otherwise, you can try to reproduce the problem on the demo page then
> create a Jira ticket and attach the patch/file so a developer can have
> a look. Danny Robinson created the panelPopup and I have made some
> positioning changes. I have not seen Danny around on the list anymore
> unfortunately and I am behind on open source work (burned out lately)
> so getting work done on this code may be slow going.
> 
> If you can debug the code (BTW you only need the free version of
> VS2008 to debug JS) that would go a long way.
> 
> 

-- 
View this message in context: http://www.nabble.com/-TRINIDAD--panelPopup-positioning-tp17735420p17881667.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Re: [TRINIDAD] panelPopup positioning

Posted by Andrew Robinson <an...@gmail.com>.
The popup code is a bit complex and a pain to work with in a cross
browser space. The best thing is to use firebug on firefox and
visualstudio 2008 with IE to debug the TrPopup  JavaScript code. In
there you can step through and watch the calculations being made.

Otherwise, you can try to reproduce the problem on the demo page then
create a Jira ticket and attach the patch/file so a developer can have
a look. Danny Robinson created the panelPopup and I have made some
positioning changes. I have not seen Danny around on the list anymore
unfortunately and I am behind on open source work (burned out lately)
so getting work done on this code may be slow going.

If you can debug the code (BTW you only need the free version of
VS2008 to debug JS) that would go a long way.

On 2008-06-11, Joris Kimpe <jo...@get.be> wrote:
>
> Thanks for your answer Andrew, but after I removed my HTML, HEAD and BODY
> tags, I still have my popup at the wrong position.  I don't see what I'm
> doing wrong, so if you have some more advice, it is more than welcome!
>
> Joris
>
>
>
> Andrew Robinson-5 wrote:
>>
>> You should not have HTML and BODY elements if you are using
>> tr:document, it creates the HTML, HEAD and BODY tags. The popup code
>> relies on the FORM and BODY tags. That may affect it. Check out the
>> demo for the proper usage of tr:document (I think the demo uses it).
>> Change that and let me know if that helps
>>
>> -Andrew
>>
>> On Tue, Jun 10, 2008 at 1:36 AM, Joris Kimpe <jo...@get.be> wrote:
>>>
>>> It seems it is browser specific.  In Firefox my popup appears in the
>>> upper
>>> part of the screen, while in IE, it seems to be positioning correctly.
>>> However, in IE I can't use the radio buttons or the input textbox (while
>>> in
>>> Firefox I can).
>>>
>>> I based my application on the demo (which is running and working
>>> correctly
>>> on my local tomcat server).  So, if someone knows in which direction I
>>> need
>>> to search my solution, please help me...
>>>
>>>
>>> The structure of my page is:
>>> <html>
>>>        <f:view>
>>>        <tr:document >
>>>                <head>...</head>
>>>
>>>                <body id=personalShiftPlanOverviewBody">
>>>                        <h:form id="personalShiftPlanOverviewForm">
>>>                                <tr:panelBorderLayout id="overview">
>>>                                        <f:facet name="left">
>>>                                                <t:dataTable ...>
>>>                                                        ...
>>>                                                </t:dataTable>
>>>                                        </f:facet>
>>>
>>>                                        <f:facet name="right">
>>>                                                <tr:panelTabbed
>>> id="overviewType" position="above">
>>>                                                        <tr:showDetailItem
>>> id="dayOverview" text="DayOverview">
>>>
>>> <tr:panelBorderLayout>
>>>
>>> <f:facet name="left">
>>>
>>>
>>> <jsp:include page="dailyOverview.jsp" />
>>>
>>> </f:facet>
>>>
>>> </tr:panelBorderLayout>
>>>
>>> </tr:showDetailItem>
>>>                                                        ...
>>>                                                </tr:panelTabbed>
>>>                                        </f:facet>
>>>                                </tr:panelBorderLayout>
>>>
>>>                                <jsp:include page="/common/pageFooter.jsp"
>>> />
>>>                        </h:form>
>>>                </body>
>>>        </tr:document>
>>>        </f:view>
>>> </html>
>>>
>>>
>>> The included jsp (dailyOverview.jsp) looks like this:
>>>
>>> <html>
>>>        <f:subview id="dailyOverviewTablePage">
>>>                <tr:table ...>
>>>                        ...
>>>                        <tr:column width="30%">
>>>                                <f:facet name="header">
>>>                                        <tr:outputText
>>> value="columnHeading" />
>>>                                </f:facet>
>>>                                <tr:panelFormLayout maxColumns="2"
>>> rows="2">
>>>                                        <tr:table ...>
>>>                                                ...
>>>                                        </tr:table>
>>>
>>>                                        <tr:panelPopup text="create"
>>> title="Create" modal="true" xoffset="2"
>>> yoffset="2">
>>>                                                <tr:panelBox>
>>>                                                        <tr:selectOneRadio
>>> id="direction" label="Direction">
>>>
>>> <f:selectItem itemValue="0" itemLabel="In"/>
>>>
>>> <f:selectItem itemValue="1" itemLabel="Out"/>
>>>
>>> </tr:selectOneRadio>
>>>                                                        <tr:inputText
>>> id="time" label="Time" />
>>>                                                </tr:panelBox>
>>>                                        </tr:panelPopup>
>>>
>>>                                        <tr:table ...>
>>>                                                ...
>>>                                        </tr:table>
>>>                                </tr:panelFormLayout>
>>>                        </tr:column>
>>>                        ...
>>>                </tr:table>
>>>        </f:subview>
>>> </html>
>>>
>>>
>>>
>>> Joris
>>>
>>>
>>>
>>> Andrew Robinson-5 wrote:
>>>>
>>>> Is it browser specific?
>>>>
>>>> Do you have the form in the BODY tag, or in another scrolled element
>>>> below the body?
>>>>
>>>> Check out the live demo of the popup to see it running and using
>>>> relative positioning as well
>>>>
>>>> On Mon, Jun 9, 2008 at 9:35 AM, Joris Kimpe <jo...@get.be> wrote:
>>>>>
>>>>> Hello all,
>>>>>
>>>>> I'm experimenting with Trinidad on this moment, but I'm stuck...
>>>>>
>>>>> I want to use a panelPopup which is positioned somewhere around my
>>>>> mousepointer click.  But I only get the popup on top of my page.  I
>>>>> thought
>>>>> I should use the xoffset and yoffset, but this didn't do the trick.
>>>>> Could
>>>>> someone help me out on this one?
>>>>>
>>>>> Thanks!
>>>>>
>>>>>
>>>>> My jsp looks something like this:
>>>>>
>>>>> ----------------------------------------------------------------------------------------------
>>>>>
>>>>> <tr:table id="foobar">
>>>>>        <tr:column>
>>>>>                <f:facet name="header">
>>>>>                        <tr:outputText value="foo" />
>>>>>                </f:facet>
>>>>>                <tr:outputText value="foo"/>
>>>>>        </tr:column>
>>>>>        <tr:column>
>>>>>                <f:facet name="header">
>>>>>                        <tr:outputText value="bar" />
>>>>>                </f:facet>
>>>>>                <tr:panelFormLayout maxColumns="2" rows="2">
>>>>>                        ...
>>>>>                        <tr:panelPopup text="popupTest"
>>>>> title="popuptest"
>>>>> modal="true"
>>>>> xoffset="0" yoffset="0">
>>>>>                                <tr:panelGroupLayout>
>>>>>                                        <tr:panelFormLayout rows="4"
>>>>> maxColumns="1" labelWidth="20%"
>>>>> rendered="true" fieldWidth="80%" >
>>>>>                                                <tr:inputText id="test"
>>>>> label="test"/>
>>>>>                                        </tr:panelFormLayout>
>>>>>                                </tr:panelGroupLayout>
>>>>>                        </tr:panelPopup>
>>>>>                </tr:panelFormLayout>
>>>>>        </tr:column>
>>>>> </tr:table>
>>>>>
>>>>> ----------------------------------------------------------------------------------------------
>>>>>
>>>>>
>>>>> --
>>>>> View this message in context:
>>>>> http://www.nabble.com/-TRINIDAD--panelPopup-positioning-tp17735420p17735420.html
>>>>> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>>>>>
>>>>>
>>>>
>>>>
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/-TRINIDAD--panelPopup-positioning-tp17735420p17749495.html
>>> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>
> --
> View this message in context:
> http://www.nabble.com/-TRINIDAD--panelPopup-positioning-tp17735420p17775787.html
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>

Re: [TRINIDAD] panelPopup positioning

Posted by Joris Kimpe <jo...@get.be>.
Thanks for your answer Andrew, but after I removed my HTML, HEAD and BODY
tags, I still have my popup at the wrong position.  I don't see what I'm
doing wrong, so if you have some more advice, it is more than welcome!

Joris



Andrew Robinson-5 wrote:
> 
> You should not have HTML and BODY elements if you are using
> tr:document, it creates the HTML, HEAD and BODY tags. The popup code
> relies on the FORM and BODY tags. That may affect it. Check out the
> demo for the proper usage of tr:document (I think the demo uses it).
> Change that and let me know if that helps
> 
> -Andrew
> 
> On Tue, Jun 10, 2008 at 1:36 AM, Joris Kimpe <jo...@get.be> wrote:
>>
>> It seems it is browser specific.  In Firefox my popup appears in the
>> upper
>> part of the screen, while in IE, it seems to be positioning correctly.
>> However, in IE I can't use the radio buttons or the input textbox (while
>> in
>> Firefox I can).
>>
>> I based my application on the demo (which is running and working
>> correctly
>> on my local tomcat server).  So, if someone knows in which direction I
>> need
>> to search my solution, please help me...
>>
>>
>> The structure of my page is:
>> <html>
>>        <f:view>
>>        <tr:document >
>>                <head>...</head>
>>
>>                <body id=personalShiftPlanOverviewBody">
>>                        <h:form id="personalShiftPlanOverviewForm">
>>                                <tr:panelBorderLayout id="overview">
>>                                        <f:facet name="left">
>>                                                <t:dataTable ...>
>>                                                        ...
>>                                                </t:dataTable>
>>                                        </f:facet>
>>
>>                                        <f:facet name="right">
>>                                                <tr:panelTabbed
>> id="overviewType" position="above">
>>                                                        <tr:showDetailItem
>> id="dayOverview" text="DayOverview">
>>                                                               
>> <tr:panelBorderLayout>
>>                                                                       
>> <f:facet name="left">
>>                                                                               
>> <jsp:include page="dailyOverview.jsp" />
>>                                                                       
>> </f:facet>
>>                                                               
>> </tr:panelBorderLayout>
>>                                                       
>> </tr:showDetailItem>
>>                                                        ...
>>                                                </tr:panelTabbed>
>>                                        </f:facet>
>>                                </tr:panelBorderLayout>
>>
>>                                <jsp:include page="/common/pageFooter.jsp"
>> />
>>                        </h:form>
>>                </body>
>>        </tr:document>
>>        </f:view>
>> </html>
>>
>>
>> The included jsp (dailyOverview.jsp) looks like this:
>>
>> <html>
>>        <f:subview id="dailyOverviewTablePage">
>>                <tr:table ...>
>>                        ...
>>                        <tr:column width="30%">
>>                                <f:facet name="header">
>>                                        <tr:outputText
>> value="columnHeading" />
>>                                </f:facet>
>>                                <tr:panelFormLayout maxColumns="2"
>> rows="2">
>>                                        <tr:table ...>
>>                                                ...
>>                                        </tr:table>
>>
>>                                        <tr:panelPopup text="create"
>> title="Create" modal="true" xoffset="2"
>> yoffset="2">
>>                                                <tr:panelBox>
>>                                                        <tr:selectOneRadio
>> id="direction" label="Direction">
>>                                                               
>> <f:selectItem itemValue="0" itemLabel="In"/>
>>                                                               
>> <f:selectItem itemValue="1" itemLabel="Out"/>
>>                                                       
>> </tr:selectOneRadio>
>>                                                        <tr:inputText
>> id="time" label="Time" />
>>                                                </tr:panelBox>
>>                                        </tr:panelPopup>
>>
>>                                        <tr:table ...>
>>                                                ...
>>                                        </tr:table>
>>                                </tr:panelFormLayout>
>>                        </tr:column>
>>                        ...
>>                </tr:table>
>>        </f:subview>
>> </html>
>>
>>
>>
>> Joris
>>
>>
>>
>> Andrew Robinson-5 wrote:
>>>
>>> Is it browser specific?
>>>
>>> Do you have the form in the BODY tag, or in another scrolled element
>>> below the body?
>>>
>>> Check out the live demo of the popup to see it running and using
>>> relative positioning as well
>>>
>>> On Mon, Jun 9, 2008 at 9:35 AM, Joris Kimpe <jo...@get.be> wrote:
>>>>
>>>> Hello all,
>>>>
>>>> I'm experimenting with Trinidad on this moment, but I'm stuck...
>>>>
>>>> I want to use a panelPopup which is positioned somewhere around my
>>>> mousepointer click.  But I only get the popup on top of my page.  I
>>>> thought
>>>> I should use the xoffset and yoffset, but this didn't do the trick.
>>>> Could
>>>> someone help me out on this one?
>>>>
>>>> Thanks!
>>>>
>>>>
>>>> My jsp looks something like this:
>>>>
>>>> ----------------------------------------------------------------------------------------------
>>>>
>>>> <tr:table id="foobar">
>>>>        <tr:column>
>>>>                <f:facet name="header">
>>>>                        <tr:outputText value="foo" />
>>>>                </f:facet>
>>>>                <tr:outputText value="foo"/>
>>>>        </tr:column>
>>>>        <tr:column>
>>>>                <f:facet name="header">
>>>>                        <tr:outputText value="bar" />
>>>>                </f:facet>
>>>>                <tr:panelFormLayout maxColumns="2" rows="2">
>>>>                        ...
>>>>                        <tr:panelPopup text="popupTest"
>>>> title="popuptest"
>>>> modal="true"
>>>> xoffset="0" yoffset="0">
>>>>                                <tr:panelGroupLayout>
>>>>                                        <tr:panelFormLayout rows="4"
>>>> maxColumns="1" labelWidth="20%"
>>>> rendered="true" fieldWidth="80%" >
>>>>                                                <tr:inputText id="test"
>>>> label="test"/>
>>>>                                        </tr:panelFormLayout>
>>>>                                </tr:panelGroupLayout>
>>>>                        </tr:panelPopup>
>>>>                </tr:panelFormLayout>
>>>>        </tr:column>
>>>> </tr:table>
>>>>
>>>> ----------------------------------------------------------------------------------------------
>>>>
>>>>
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/-TRINIDAD--panelPopup-positioning-tp17735420p17735420.html
>>>> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>>>>
>>>>
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/-TRINIDAD--panelPopup-positioning-tp17735420p17749495.html
>> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/-TRINIDAD--panelPopup-positioning-tp17735420p17775787.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Re: [TRINIDAD] panelPopup positioning

Posted by Andrew Robinson <an...@gmail.com>.
You should not have HTML and BODY elements if you are using
tr:document, it creates the HTML, HEAD and BODY tags. The popup code
relies on the FORM and BODY tags. That may affect it. Check out the
demo for the proper usage of tr:document (I think the demo uses it).
Change that and let me know if that helps

-Andrew

On Tue, Jun 10, 2008 at 1:36 AM, Joris Kimpe <jo...@get.be> wrote:
>
> It seems it is browser specific.  In Firefox my popup appears in the upper
> part of the screen, while in IE, it seems to be positioning correctly.
> However, in IE I can't use the radio buttons or the input textbox (while in
> Firefox I can).
>
> I based my application on the demo (which is running and working correctly
> on my local tomcat server).  So, if someone knows in which direction I need
> to search my solution, please help me...
>
>
> The structure of my page is:
> <html>
>        <f:view>
>        <tr:document >
>                <head>...</head>
>
>                <body id=personalShiftPlanOverviewBody">
>                        <h:form id="personalShiftPlanOverviewForm">
>                                <tr:panelBorderLayout id="overview">
>                                        <f:facet name="left">
>                                                <t:dataTable ...>
>                                                        ...
>                                                </t:dataTable>
>                                        </f:facet>
>
>                                        <f:facet name="right">
>                                                <tr:panelTabbed id="overviewType" position="above">
>                                                        <tr:showDetailItem id="dayOverview" text="DayOverview">
>                                                                <tr:panelBorderLayout>
>                                                                        <f:facet name="left">
>                                                                                <jsp:include page="dailyOverview.jsp" />
>                                                                        </f:facet>
>                                                                </tr:panelBorderLayout>
>                                                        </tr:showDetailItem>
>                                                        ...
>                                                </tr:panelTabbed>
>                                        </f:facet>
>                                </tr:panelBorderLayout>
>
>                                <jsp:include page="/common/pageFooter.jsp" />
>                        </h:form>
>                </body>
>        </tr:document>
>        </f:view>
> </html>
>
>
> The included jsp (dailyOverview.jsp) looks like this:
>
> <html>
>        <f:subview id="dailyOverviewTablePage">
>                <tr:table ...>
>                        ...
>                        <tr:column width="30%">
>                                <f:facet name="header">
>                                        <tr:outputText value="columnHeading" />
>                                </f:facet>
>                                <tr:panelFormLayout maxColumns="2" rows="2">
>                                        <tr:table ...>
>                                                ...
>                                        </tr:table>
>
>                                        <tr:panelPopup text="create" title="Create" modal="true" xoffset="2"
> yoffset="2">
>                                                <tr:panelBox>
>                                                        <tr:selectOneRadio id="direction" label="Direction">
>                                                                <f:selectItem itemValue="0" itemLabel="In"/>
>                                                                <f:selectItem itemValue="1" itemLabel="Out"/>
>                                                        </tr:selectOneRadio>
>                                                        <tr:inputText id="time" label="Time" />
>                                                </tr:panelBox>
>                                        </tr:panelPopup>
>
>                                        <tr:table ...>
>                                                ...
>                                        </tr:table>
>                                </tr:panelFormLayout>
>                        </tr:column>
>                        ...
>                </tr:table>
>        </f:subview>
> </html>
>
>
>
> Joris
>
>
>
> Andrew Robinson-5 wrote:
>>
>> Is it browser specific?
>>
>> Do you have the form in the BODY tag, or in another scrolled element
>> below the body?
>>
>> Check out the live demo of the popup to see it running and using
>> relative positioning as well
>>
>> On Mon, Jun 9, 2008 at 9:35 AM, Joris Kimpe <jo...@get.be> wrote:
>>>
>>> Hello all,
>>>
>>> I'm experimenting with Trinidad on this moment, but I'm stuck...
>>>
>>> I want to use a panelPopup which is positioned somewhere around my
>>> mousepointer click.  But I only get the popup on top of my page.  I
>>> thought
>>> I should use the xoffset and yoffset, but this didn't do the trick.
>>> Could
>>> someone help me out on this one?
>>>
>>> Thanks!
>>>
>>>
>>> My jsp looks something like this:
>>>
>>> ----------------------------------------------------------------------------------------------
>>>
>>> <tr:table id="foobar">
>>>        <tr:column>
>>>                <f:facet name="header">
>>>                        <tr:outputText value="foo" />
>>>                </f:facet>
>>>                <tr:outputText value="foo"/>
>>>        </tr:column>
>>>        <tr:column>
>>>                <f:facet name="header">
>>>                        <tr:outputText value="bar" />
>>>                </f:facet>
>>>                <tr:panelFormLayout maxColumns="2" rows="2">
>>>                        ...
>>>                        <tr:panelPopup text="popupTest" title="popuptest"
>>> modal="true"
>>> xoffset="0" yoffset="0">
>>>                                <tr:panelGroupLayout>
>>>                                        <tr:panelFormLayout rows="4"
>>> maxColumns="1" labelWidth="20%"
>>> rendered="true" fieldWidth="80%" >
>>>                                                <tr:inputText id="test"
>>> label="test"/>
>>>                                        </tr:panelFormLayout>
>>>                                </tr:panelGroupLayout>
>>>                        </tr:panelPopup>
>>>                </tr:panelFormLayout>
>>>        </tr:column>
>>> </tr:table>
>>>
>>> ----------------------------------------------------------------------------------------------
>>>
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/-TRINIDAD--panelPopup-positioning-tp17735420p17735420.html
>>> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/-TRINIDAD--panelPopup-positioning-tp17735420p17749495.html
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>

Re: [TRINIDAD] panelPopup positioning

Posted by Joris Kimpe <jo...@get.be>.
It seems it is browser specific.  In Firefox my popup appears in the upper
part of the screen, while in IE, it seems to be positioning correctly. 
However, in IE I can't use the radio buttons or the input textbox (while in
Firefox I can).

I based my application on the demo (which is running and working correctly
on my local tomcat server).  So, if someone knows in which direction I need
to search my solution, please help me...


The structure of my page is:
<html>
	<f:view>
	<tr:document >
		<head>...</head>
	
		<body id=personalShiftPlanOverviewBody">
			<h:form id="personalShiftPlanOverviewForm">
				<tr:panelBorderLayout id="overview">
					<f:facet name="left">
						<t:dataTable ...>
							...
						</t:dataTable>
					</f:facet>
					
					<f:facet name="right">
						<tr:panelTabbed id="overviewType" position="above">
							<tr:showDetailItem id="dayOverview" text="DayOverview">
								<tr:panelBorderLayout>
									<f:facet name="left">
										<jsp:include page="dailyOverview.jsp" />
									</f:facet>
								</tr:panelBorderLayout>
							</tr:showDetailItem>
							...
						</tr:panelTabbed>
					</f:facet>
				</tr:panelBorderLayout>	
							
				<jsp:include page="/common/pageFooter.jsp" />
			</h:form>
		</body>
	</tr:document>
	</f:view>	
</html>	


The included jsp (dailyOverview.jsp) looks like this:

<html>
	<f:subview id="dailyOverviewTablePage">
		<tr:table ...>
			...
			<tr:column width="30%">
				<f:facet name="header">
					<tr:outputText value="columnHeading" />
				</f:facet>
				<tr:panelFormLayout maxColumns="2" rows="2">																 
					<tr:table ...>
						...
					</tr:table>
					
					<tr:panelPopup text="create" title="Create" modal="true" xoffset="2"
yoffset="2"> 
  						<tr:panelBox>
							<tr:selectOneRadio id="direction" label="Direction">
								<f:selectItem itemValue="0" itemLabel="In"/>
								<f:selectItem itemValue="1" itemLabel="Out"/> 
							</tr:selectOneRadio>							
							<tr:inputText id="time" label="Time" />
						</tr:panelBox>
					</tr:panelPopup>
					
					<tr:table ...>
						...
					</tr:table>
				</tr:panelFormLayout>
			</tr:column>
			...
		</tr:table>
	</f:subview>
</html>



Joris



Andrew Robinson-5 wrote:
> 
> Is it browser specific?
> 
> Do you have the form in the BODY tag, or in another scrolled element
> below the body?
> 
> Check out the live demo of the popup to see it running and using
> relative positioning as well
> 
> On Mon, Jun 9, 2008 at 9:35 AM, Joris Kimpe <jo...@get.be> wrote:
>>
>> Hello all,
>>
>> I'm experimenting with Trinidad on this moment, but I'm stuck...
>>
>> I want to use a panelPopup which is positioned somewhere around my
>> mousepointer click.  But I only get the popup on top of my page.  I
>> thought
>> I should use the xoffset and yoffset, but this didn't do the trick. 
>> Could
>> someone help me out on this one?
>>
>> Thanks!
>>
>>
>> My jsp looks something like this:
>>
>> ----------------------------------------------------------------------------------------------
>>
>> <tr:table id="foobar">
>>        <tr:column>
>>                <f:facet name="header">
>>                        <tr:outputText value="foo" />
>>                </f:facet>
>>                <tr:outputText value="foo"/>
>>        </tr:column>
>>        <tr:column>
>>                <f:facet name="header">
>>                        <tr:outputText value="bar" />
>>                </f:facet>
>>                <tr:panelFormLayout maxColumns="2" rows="2">
>>                        ...
>>                        <tr:panelPopup text="popupTest" title="popuptest"
>> modal="true"
>> xoffset="0" yoffset="0">
>>                                <tr:panelGroupLayout>
>>                                        <tr:panelFormLayout rows="4"
>> maxColumns="1" labelWidth="20%"
>> rendered="true" fieldWidth="80%" >
>>                                                <tr:inputText id="test"
>> label="test"/>
>>                                        </tr:panelFormLayout>
>>                                </tr:panelGroupLayout>
>>                        </tr:panelPopup>
>>                </tr:panelFormLayout>
>>        </tr:column>
>> </tr:table>
>>
>> ----------------------------------------------------------------------------------------------
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/-TRINIDAD--panelPopup-positioning-tp17735420p17735420.html
>> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/-TRINIDAD--panelPopup-positioning-tp17735420p17749495.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Re: [TRINIDAD] panelPopup positioning

Posted by Andrew Robinson <an...@gmail.com>.
Is it browser specific?

Do you have the form in the BODY tag, or in another scrolled element
below the body?

Check out the live demo of the popup to see it running and using
relative positioning as well

On Mon, Jun 9, 2008 at 9:35 AM, Joris Kimpe <jo...@get.be> wrote:
>
> Hello all,
>
> I'm experimenting with Trinidad on this moment, but I'm stuck...
>
> I want to use a panelPopup which is positioned somewhere around my
> mousepointer click.  But I only get the popup on top of my page.  I thought
> I should use the xoffset and yoffset, but this didn't do the trick.  Could
> someone help me out on this one?
>
> Thanks!
>
>
> My jsp looks something like this:
>
> ----------------------------------------------------------------------------------------------
>
> <tr:table id="foobar">
>        <tr:column>
>                <f:facet name="header">
>                        <tr:outputText value="foo" />
>                </f:facet>
>                <tr:outputText value="foo"/>
>        </tr:column>
>        <tr:column>
>                <f:facet name="header">
>                        <tr:outputText value="bar" />
>                </f:facet>
>                <tr:panelFormLayout maxColumns="2" rows="2">
>                        ...
>                        <tr:panelPopup text="popupTest" title="popuptest" modal="true"
> xoffset="0" yoffset="0">
>                                <tr:panelGroupLayout>
>                                        <tr:panelFormLayout rows="4" maxColumns="1" labelWidth="20%"
> rendered="true" fieldWidth="80%" >
>                                                <tr:inputText id="test" label="test"/>
>                                        </tr:panelFormLayout>
>                                </tr:panelGroupLayout>
>                        </tr:panelPopup>
>                </tr:panelFormLayout>
>        </tr:column>
> </tr:table>
>
> ----------------------------------------------------------------------------------------------
>
>
> --
> View this message in context: http://www.nabble.com/-TRINIDAD--panelPopup-positioning-tp17735420p17735420.html
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>