You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Istvan Szucs <st...@inbox.com> on 2006/12/02 14:04:29 UTC

Popup window with parameter

Hello!

I have a page, with a javascript:
function openPopup(startValue){
var win2=window.open("./app/ListValues&startValue="+startValue,"Listed Values","width=600px, height=600px, resizable=yes, center=yes, menubar=no, scrollbars=yes, status=yes, minimize=no, maximize=no, help=no")
win2.creator=self
}
In the page, i tell the javascript: <input type="button" onClick="javascript:openPopup(1)" value="LOV">

How can I add parameters to the ListValues.page in javascript?
I want to add a parameter like this: "app/ListValues&startValue=1"

Stef


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


Re: Re: Popup window with parameter

Posted by Sam Gendler <sg...@ideasculptor.com>.
In general, if you want to construct a URL in Tapestry, it is best to
create an instance of ILink and then get the URL from that.  Assuming
the service for which you have instantiated the iLink takes
parameters, it should be fairly self explanatory how to get the Link
to include those parameters in the URL. The classic case of creating a
redirect which will pass parameters to the external service for a page
looks like the following:

            ExternalServiceParameter param =
                new ExternalServiceParameter(getPageName(),
                                             redirectExternalParams(params));
            ILink link = getExternalService().getLink(false, param);
            _log.debug("redirecting to: " + link.getURL());
            throw new RedirectException(link.getURL());

Every instance of ILink takes some parameter object which encapsulates
the entire set of parameters that can be passed.  In my example,
redirectExternalParams just returns an array of Objects which will be
passed to the activateExternalPage() method when the page is loaded
via the URL created.

--sam


On 12/3/06, Cyrille37 <cy...@gmail.com> wrote:
> Istvan Szucs a écrit :
> > The question is wrong.
> > The problem is solved.
> > I found this: http://lombok.demon.co.uk/tapestry4Demo/TestPopupSource.html
> >
> Hi,
>
> I don't know it it can help, but there are some components on Tassel :
>
> http://equalitylearning.org/Tassel/app?service=external/ViewComponent&sp=SNewWindowLink
> http://equalitylearning.org/Tassel/app?service=external/ViewComponent&sp=SNewWindowLink_Tap4
>
> Cyrille.
>
> > Stef
> >
> >
> >> Hello!
> >>
> >> I have a page, with a javascript:
> >> function openPopup(startValue){
> >> var win2=window.open("./app/ListValues&startValue="+startValue,"Listed
> >> Values","width=600px, height=600px, resizable=yes, center=yes,
> >> menubar=no, scrollbars=yes, status=yes, minimize=no, maximize=no,
> >> help=no")
> >> win2.creator=self
> >> }
> >> In the page, i tell the javascript: <input type="button"
> >> onClick="javascript:openPopup(1)" value="LOV">
> >>
> >> How can I add parameters to the ListValues.page in javascript?
> >> I want to add a parameter like this: "app/ListValues&startValue=1"
> >>
> >> Stef
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

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


Re: Popup window with parameter

Posted by Cyrille37 <cy...@gmail.com>.
Istvan Szucs a écrit :
> The question is wrong.
> The problem is solved.
> I found this: http://lombok.demon.co.uk/tapestry4Demo/TestPopupSource.html
>   
Hi,

I don't know it it can help, but there are some components on Tassel :

http://equalitylearning.org/Tassel/app?service=external/ViewComponent&sp=SNewWindowLink
http://equalitylearning.org/Tassel/app?service=external/ViewComponent&sp=SNewWindowLink_Tap4

Cyrille.

> Stef
>
>   
>> Hello!
>>
>> I have a page, with a javascript:
>> function openPopup(startValue){
>> var win2=window.open("./app/ListValues&startValue="+startValue,"Listed
>> Values","width=600px, height=600px, resizable=yes, center=yes,
>> menubar=no, scrollbars=yes, status=yes, minimize=no, maximize=no,
>> help=no")
>> win2.creator=self
>> }
>> In the page, i tell the javascript: <input type="button"
>> onClick="javascript:openPopup(1)" value="LOV">
>>
>> How can I add parameters to the ListValues.page in javascript?
>> I want to add a parameter like this: "app/ListValues&startValue=1"
>>
>> Stef
>>     
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
>   



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


RE: Popup window with parameter

Posted by Istvan Szucs <st...@inbox.com>.
The question is wrong.
The problem is solved.
I found this: http://lombok.demon.co.uk/tapestry4Demo/TestPopupSource.html

Stef

> Hello!
> 
> I have a page, with a javascript:
> function openPopup(startValue){
> var win2=window.open("./app/ListValues&startValue="+startValue,"Listed
> Values","width=600px, height=600px, resizable=yes, center=yes,
> menubar=no, scrollbars=yes, status=yes, minimize=no, maximize=no,
> help=no")
> win2.creator=self
> }
> In the page, i tell the javascript: <input type="button"
> onClick="javascript:openPopup(1)" value="LOV">
> 
> How can I add parameters to the ListValues.page in javascript?
> I want to add a parameter like this: "app/ListValues&startValue=1"
> 
> Stef

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