Em Tue, 04 Nov 2008 09:31:36 -0300, Peter Stavrinides <[EMAIL PROTECTED]> escreveu:

Hi everyone,

Hi!

I was wandering about best practice for passing multiple parameters to a page without using persist in the mix. Take the following example:

void onActivate(Integer companyId, Integer siteId) throws SQLException {
    _site = getSite(companyId,siteId);
}

CompanySite onPassivate(){
        return _site;
}       

This works okay for my purposes... I like it because its stateless, however is CompanySite being serialized underneath?

AFAIK, no.

String onPassivate(){
   return _site.getCId() + "/" + _site.getSiteId();
}       

It wouldn't work. Tapestry would handle it as a single String and scape the / character. Then, your onActivate method, as written above, wouldn't work. You should return an Object[] or List instead:

Object onPassivate(){
    return new Object[] {_site.getCId(), + _site.getSiteId()};
}       

--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to