[
https://issues.apache.org/jira/browse/TRINIDAD-1324?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12651369#action_12651369
]
Sergey Astakhov commented on TRINIDAD-1324:
-------------------------------------------
Sorry, don't have that skill yet. :-)
file trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/Window.js, function
_sizeWin():
surround lines 629 & 630 with if:
// add in the margins (MS bogusly uses Strings for these)
if(body.tagName=='BODY')
{
newHeight += parseInt(body.topMargin) + parseInt(body.bottomMargin);
newWidth += parseInt(body.leftMargin) + parseInt(body.rightMargin);
}
> Incorrect sizing of dialog when using frameset
> ----------------------------------------------
>
> Key: TRINIDAD-1324
> URL: https://issues.apache.org/jira/browse/TRINIDAD-1324
> Project: MyFaces Trinidad
> Issue Type: Bug
> Affects Versions: 1.2.8-core
> Environment: IE7, Windows XP
> Reporter: Sergey Astakhov
> Priority: Minor
>
> When trying to view following page in Trinidad dialog there is incorrect
> sizing occured
> <f:view
> xmlns="http://www.w3.org/1999/xhtml"
> xmlns:ui="http://java.sun.com/jsf/facelets"
> xmlns:f="http://java.sun.com/jsf/core"
> xmlns:h="http://java.sun.com/jsf/html"
> xmlns:tr="http://myfaces.apache.org/trinidad"
> xmlns:trh="http://myfaces.apache.org/trinidad/html">
> <trh:html>
> <trh:head title="Title"/>
> <trh:frameBorderLayout>
> <f:facet name="center">
> <trh:frame name="content" source="#{pageFlowScope.contentURL}"/>
> </f:facet>
> </trh:frameBorderLayout>
> </trh:html>
> </f:view>
> The problem is inside javascript function _sizeWin() (in Window.js) - in it's
> code there is supposed that content page use <body> tag, but in this page
> there is <frameset> tag, so parsing of xxxMargin properties evaluated to NaN.
> As workaround you may add these properties in script:
> <f:view
> xmlns="http://www.w3.org/1999/xhtml"
> xmlns:ui="http://java.sun.com/jsf/facelets"
> xmlns:f="http://java.sun.com/jsf/core"
> xmlns:h="http://java.sun.com/jsf/html"
> xmlns:tr="http://myfaces.apache.org/trinidad"
> xmlns:trh="http://myfaces.apache.org/trinidad/html">
> <trh:html>
> <trh:head title="Title">
> <trh:script text="
> function fixFramesetMargins()
> {
> var body = document.body;
> if(body && body.tagName=='FRAMESET')
> {
> body.topMargin='0';
> body.bottomMargin='0';
> body.leftMargin='0';
> body.rightMargin='0';
> }
> }
> "/>
> </trh:head>
> <trh:frameBorderLayout onload="fixFramesetMargins()">
> <f:facet name="center">
> <trh:frame name="content" source="#{pageFlowScope.contentURL}"/>
> </f:facet>
> </trh:frameBorderLayout>
> </trh:html>
> </f:view>
> But better solution would be to fix code in _sizeWin() function.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.