From adffaces-user-return-2437-apmail-incubator-adffaces-user-archive=incubator.apache.org@incubator.apache.org Thu Mar 22 19:16:05 2007 Return-Path: Delivered-To: apmail-incubator-adffaces-user-archive@locus.apache.org Received: (qmail 20326 invoked from network); 22 Mar 2007 19:16:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 22 Mar 2007 19:16:05 -0000 Received: (qmail 80454 invoked by uid 500); 22 Mar 2007 19:16:11 -0000 Delivered-To: apmail-incubator-adffaces-user-archive@incubator.apache.org Received: (qmail 80431 invoked by uid 500); 22 Mar 2007 19:16:11 -0000 Mailing-List: contact adffaces-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: adffaces-user@incubator.apache.org Delivered-To: mailing list adffaces-user@incubator.apache.org Received: (qmail 80416 invoked by uid 99); 22 Mar 2007 19:16:11 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Mar 2007 12:16:11 -0700 X-ASF-Spam-Status: No, hits=1.4 required=10.0 tests=MSGID_MULTIPLE_AT X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [209.200.229.110] (HELO nova.lunarpages.com) (209.200.229.110) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Mar 2007 12:16:02 -0700 Received: from fireout.mbakercorp.com ([199.107.67.131] helo=phad) by nova.lunarpages.com with esmtpa (Exim 4.63) (envelope-from ) id 1HUSlB-0008CW-Od for adffaces-user@incubator.apache.org; Thu, 22 Mar 2007 11:15:42 -0800 Reply-To: From: "Mark Millman" To: References: In-Reply-To: Subject: RE: Dialog position Date: Thu, 22 Mar 2007 12:15:37 -0700 Organization: Mizar, LLC Message-ID: <013f01c76cb6$7ac7f180$7057d480$@millman@mizar.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AcdspjxUK7pU9zJYRbWXhwPC83FYMQADpKPg Content-Language: en-us X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - nova.lunarpages.com X-AntiAbuse: Original Domain - incubator.apache.org X-AntiAbuse: Originator/Caller UID/GID - [0 0] / [47 12] X-AntiAbuse: Sender Address Domain - mizar.com X-Source: X-Source-Args: X-Source-Dir: X-Virus-Checked: Checked by ClamAV on apache.org We've been able to control the placement of server launched dialogs by setting the windows properties as per the following example. public static void launchApprovalDialog(String title, String remark, UIComponent source) { FacesContext context = FacesContext.getCurrentInstance(); ViewHandler vh = context.getApplication().getViewHandler(); UIViewRoot dialog = vh.createView(context, "/ApprovalDialog.jspx"); // dialog:download does not work" HashMap winProps = new HashMap(); winProps.put("width", new Integer(300)); winProps.put("height", new Integer(200)); winProps.put("left", new Integer(200)); winProps.put("top", new Integer(200)); HashMap props = new HashMap(); props.put("title", title); props.put("remark", remark); if (source != null) { props.put("approveButton", Boolean.valueOf(true)); } else { props.put("approveButton", Boolean.valueOf(false)); } RequestContext afc = RequestContext.getCurrentInstance(); afc.launchDialog(dialog, props, source, true, winProps); } It would be nice if the CoreCommand tags supported windowLeft and windowRight in addition to windowHeight and windowWidth mark.millman@mizar.com | www.mizar.com -----Original Message----- From: Bertrand, Shawn R [mailto:shawn.bertrand@tycoelectronics.com] Sent: Thursday, March 22, 2007 10:19 AM To: adffaces-user@incubator.apache.org Subject: Dialog position Hello all, Are we able to control position of dialogs displayed via buttons in a JSP which use the "dialog:" notation in their action attributes? The dialogs always pop up with their top-left corner near the current browser window's top-left corner, and I'd like to have them centered on the window instead. Thanks, Shawn