You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Theo vN <th...@gmail.com> on 2005/03/10 22:23:46 UTC

external link, callback, process before activate

Hi there

I've been working with tapestry for about a month and like it a lot.
My firsts application will go into production within the next week. I
have one problem, however,  that I do not understand..

I like the idea (or mayby only my understanding of) of external links.
It allows a method  "activateExternalPage" of a page to be called
before rendering takes place. Unfortunately there is only the one
menthod to be called but at least you have parameters and can perform
your pre-rendering actions (db-lookups) based on the parameters.
DirectLinks otoh makes you call a method on the calling page to
perform actions on another page and finally to activate that other
page.

I have an external link from the home page to a protected page. In the
protected page's activateExternalPage method I parse parameters and do
a db lookup to populate a list to display. In the protected page's
pageValidate methods it checks the visit and redirects with a callback
to the login page if neccessary. After successfull login the protected
page gets activated but with the list empty. It seems like the
activateExternalPage method does not get called on callback - the
pageValidate method intercepted the flow and simply activate the
procted page.

What strategies do you follow to do specific processing before page activation? 
-- 
Cheers
Theo

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


Re: Performance of Hibernate

Posted by Michael Echerer <me...@tngtech.com>.
> anything you want to the sql server. But I doubt that your performance
> issues will come from "select *" vs "select, a,b". I'm currently

That is usually true until you have blobs or things like that in your 
table. Reading blobs unnecessarily, despite Hibernate's caching, doesn't 
sound like a good idea to me.


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


Re: Performance of Hibernate

Posted by Henri Dupre <he...@gmail.com>.
Hibernate 3 is very customizable and will allow you to generate almost
anything you want to the sql server. But I doubt that your performance
issues will come from "select *" vs "select, a,b". I'm currently
moving from a php site where I wrote all the sql to a
hibernate/spring/tapestry system and I've been extremely satistifed
with hibernate. It takes a long time to learn and get your mapping
files correctly but once you have them, you're free from any database
code.



On Thu, 10 Mar 2005 23:18:37 +0100 (MET),
sarah.simbad@women-at-work.org <sa...@women-at-work.org> wrote:
> Just a small remark....
> 
> Assuming you are using standard sql queries versus a hibernate mapping, dont
> u waste resources this way?
> 
> E.g. if you have a table with lots of columns, hibernate will read all of
> them as it will generate code for the whole object.
> 
> In most case you would not use a "select *" query but maybe a "select, a,b
> query..."
> 
> What do you think?
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
>

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


Performance of Hibernate

Posted by sa...@women-at-work.org.
Just a small remark....

Assuming you are using standard sql queries versus a hibernate mapping, dont
u waste resources this way?

E.g. if you have a table with lots of columns, hibernate will read all of
them as it will generate code for the whole object.

In most case you would not use a "select *" query but maybe a "select, a,b
query..."

What do you think?


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


Re: external link, callback, process before activate

Posted by Bryan Lewis <br...@maine.rr.com>.
Maybe this search will help:

http://marc.theaimsgroup.com/?l=tapestry-user&w=2&r=1&s=externalcallback&q=b



----- Original Message ----- 
From: "Theo vN" <th...@gmail.com>
To: <ta...@jakarta.apache.org>
Sent: Thursday, March 10, 2005 4:23 PM
Subject: external link, callback, process before activate


> Hi there
>
> I've been working with tapestry for about a month and like it a lot.
> My firsts application will go into production within the next week. I
> have one problem, however,  that I do not understand..
>
> I like the idea (or mayby only my understanding of) of external links.
> It allows a method  "activateExternalPage" of a page to be called
> before rendering takes place. Unfortunately there is only the one
> menthod to be called but at least you have parameters and can perform
> your pre-rendering actions (db-lookups) based on the parameters.
> DirectLinks otoh makes you call a method on the calling page to
> perform actions on another page and finally to activate that other
> page.
>
> I have an external link from the home page to a protected page. In the
> protected page's activateExternalPage method I parse parameters and do
> a db lookup to populate a list to display. In the protected page's
> pageValidate methods it checks the visit and redirects with a callback
> to the login page if neccessary. After successfull login the protected
> page gets activated but with the list empty. It seems like the
> activateExternalPage method does not get called on callback - the
> pageValidate method intercepted the flow and simply activate the
> procted page.
>
> What strategies do you follow to do specific processing before page
activation?
> -- 
> Cheers
> Theo
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>


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


RE: external link, callback, process before activate

Posted by Karthik Abram <ka...@neovera.com>.
Use an external call back and restuff the parameters - here is a sample:

        ICallback callbackpage = new
ExternalCallback(getPage().getPageName(),
                    pEvent.getRequestCycle().getServiceParameters());
        loginPage.setCallback(callbackpage);
        throw new PageRedirectException(loginPage);

and then in login, when you re-activate:

ICallback callback = getCallback();
            setCallback(null);
            callback.performCallback(pCycle);


-----Original Message-----
From: Theo vN [mailto:theovn@gmail.com]
Sent: Thursday, March 10, 2005 4:24 PM
To: tapestry-user@jakarta.apache.org
Subject: external link, callback, process before activate


Hi there

I've been working with tapestry for about a month and like it a lot.
My firsts application will go into production within the next week. I
have one problem, however,  that I do not understand..

I like the idea (or mayby only my understanding of) of external links.
It allows a method  "activateExternalPage" of a page to be called
before rendering takes place. Unfortunately there is only the one
menthod to be called but at least you have parameters and can perform
your pre-rendering actions (db-lookups) based on the parameters.
DirectLinks otoh makes you call a method on the calling page to
perform actions on another page and finally to activate that other
page.

I have an external link from the home page to a protected page. In the
protected page's activateExternalPage method I parse parameters and do
a db lookup to populate a list to display. In the protected page's
pageValidate methods it checks the visit and redirects with a callback
to the login page if neccessary. After successfull login the protected
page gets activated but with the list empty. It seems like the
activateExternalPage method does not get called on callback - the
pageValidate method intercepted the flow and simply activate the
procted page.

What strategies do you follow to do specific processing before page
activation?
--
Cheers
Theo

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


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