[prev in list] [next in list] [prev in thread] [next in thread] 

List:       tapestry-user
Subject:    RE: Popup window
From:       "Simon Raveh" <Simon.Raveh () nominum ! com>
Date:       2003-09-26 16:13:01
[Download RAW message or body]

Thanks Paul for your help, I'll give it a try.

Simon

-----Original Message-----
From: Paul Jackson [mailto:paul.jackson@meridianinfo.com]
Sent: Thursday, September 25, 2003 4:58 PM
To: Tapestry-User
Subject: RE: Popup window


I haven't looked at the contrib component but we've implemented the
popup window in the following way...

Basically we extended the PageLink so we are able to call a script which
in turn opens a separate popup window.

The main reason we did it this way was so we can test the page in html
before running it in tapestry.

*In the html
    Add a new script 

        function popupParmPage(newUrl) {
           window.open(newUrl, "Parameter","resizable ,dependent=yes, 
                       height=320, width=730, top=90, left=150");
        }


*We have a new component which extends the PageLink component.
    Add a new script attribute.
    Override the getURL() method so as supply the script at the url.

        protected String getURL(IRequestCycle cycle) 
                throws RequestCycleException {
            String url;
            if (script == null) {
                url = super.getURL(cycle);
            } else {
                url = "javascript:" +    
                    script.replaceFirst("%URL%",super.getURL(cycle));
            }
            return url;
        }

*In the .page we specify the component as such
    <component id="popupParm" type="mylib:ExtendedPageLink">
        <binding name="page" expression="&quot;blah&quot;"/>
        <static-binding name="script">popupParmPage('%URL%');
        </static-binding>
    </component>



Paul Jackson
Ph +61 (0)2 8233 7564
Meridian Informatics (www.meridianinfo.com)
Custom Software for Agile Financial Services


-----Original Message-----
From: Simon Raveh [mailto:Simon.Raveh@nominum.com] 
Sent: Thursday, 25 September 2003 6:45 AM
To: Tapestry-User
Subject: Popup window

Hi,

Is it passable to open a Tapestry page as a popup window using the
contrib:PopupLink component.

Simon



---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic