> And if i use so then Sign.class is some as priavte Sign sign.
> WHY ?

@InjectPage grabs the page from a request level cache. This means that
no matter how many times or in how many components you inject a page
you get the same instance for the entire request (within the same
thread). When the PageRenderLinkSource grabs the page via its class it
is getting the same instance you injected in your
page/component/service.

It's important to remember that each time you call
createPageRenderLink, without a context or setting override to true,
the page you are referring to is passivated (onPassivate() is called).
This means that you get a link to the page that represents it's
current state. This is also true when you use the <t:pagelink>
component in your templates, not binding a context attribute tells the
page to passivate.

> And why i cant use just
> return linkSource.createPageRenderLink(sign);

Considering how @InjectPage works I'm guessing that the API isn't
there because it doesn't add value.



Josh

On Wed, Jan 12, 2011 at 10:45 AM, Argo Vilberg <wilps...@gmail.com> wrote:
> Thank you this works...
>
> Sorry i am stupid in java advance class usage,
> but what abaout strange behaviour
>
>
> @InjectPage
> private Sign sign;
>
>
> sign.setReturnPage("Failid");
> sign.setSeisund("FAILID");
> return linkSource.createPageRenderLink(Sign.class);
>
> And if i use so then Sign.class is some as priavte Sign sign.
> WHY ?
>
> And why i cant use just
> return linkSource.createPageRenderLink(sign);
>
>   [javac]
> G:\digileping\arendus5_1_0_5\digileping\src\ee\softpro\pages\Failid.java:486:
> cannot find symbol
>   [javac] symbol  : method createPageRenderLink(ee.softpro.pages.Sign)
>   [javac] location: interface
> org.apache.tapestry5.services.PageRenderLinkSource
>   [javac]             return linkSource.createPageRenderLink(sign);
>
> i got error.
>
>
> Argo
> 2011/1/11 Josh Canfield <joshcanfi...@gmail.com>
>
>> There isn't much information in your request so I'm not going to write
>> a book guessing every possible thing you might be talking about.
>>
>> If you know the parameters that you want to pass when you are
>> rendering the page that opens the popup then you can use something
>> like:
>> @Inject
>> PageRenderLinkSource linkSource;
>>
>> public String getPopupLink() {
>>  return linkSource.createPageRenderLinkWithContext(pagename, param1,
>> param2); // to create the link
>> }
>>
>> <script>
>> window.open('${popuplink}');
>> </script>
>>
>> I haven't compiled/run this code so please forgive typos etc.
>>
>> Josh
>>
>> On Tue, Jan 11, 2011 at 3:58 AM, Argo Vilberg <wilps...@gmail.com> wrote:
>> > hi,
>> >
>> > How to add parameters into Tapetstry page java object if i open page with
>> >  javascript pop-up windows ?
>> >
>> >
>> > Argo
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>
>>
>

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

Reply via email to