No; he seems to be using 3.0 code, not 4.0 code. Both should work (in
4.0, PageRenderListener extends PageBeginRenderListener and
PageEndRenderListener).
You should only see beginRender() invoked when the page renders. In
Tapestry terms, a form submission is considered a render. You should
see it *every* time.
On 8/8/05, Jean-Yves Sironneau <[EMAIL PROTECTED]> wrote:
> Maybe it's because you're using
>
> PageRenderListener and not PageBeginRenderListener it seem's deprecated
>
> Jean-Yves
>
>
> Chris Chiappone wrote:
>
> >Ok I must be doing something wrong. Maybe I'm just missing something
> >simple so I will include my code:
> >
> >public abstract class CompanyProfile extends ProtectedPage implements
> >PageRenderListener{
> > private static Log log = LogFactory.getLog(CompanyProfile.class);
> > private boolean appsExist;
> > private boolean docsExist;
> > public abstract Company getCompany();
> > public abstract void setCompany(Company company);
> > public abstract Users getUser();
> > public abstract void setUser(Users user);
> > public abstract List getAppList();
> > public abstract void setAppList(List appList);
> > public abstract Collection getDocList();
> > public abstract void setDocList(Collection docList);
> >
> > /* (non-Javadoc)
> > * @see
> > org.apache.tapestry.event.PageRenderListener#pageBeginRender(org.apache.tapestry.event.PageEvent)
> > */
> > public void pageBeginRender(PageEvent event) {
> > log.info("\n\nRendering "+ getPage().getPageName() +"\n");
> > if(getCompany() == null){
> > Visit v = (Visit) getVisit();
> > Company comp = v.getCurrentCompany();
> > setCompany(comp);
> > setUser(v.getCurrentUser());
> > }
> > Collection docs = getCompany().getDocuments();
> > if(docs == null){
> > docs = new ArrayList();
> > }
> > setDocList(docs);
> > }
> >
> > /**
> > * @return Returns the docsExist.
> > */
> > public boolean isDocsExist() {
> > return(docsExist);
> > }
> >
> > /**
> > * @param docsExist The docsExist to set.
> > */
> > public void setDocsExist(boolean docsExist) {
> > this.docsExist = docsExist;
> > }
> >//......
> >}
> >
> >Here is my page spec:
> >
> ><page-specification class="view.pages.CompanyProfile">
> >
> > <description>Company Profile Page</description>
> >
> > <property-specification name="company" type="domain.company.Company"/>
> > <property-specification name="user" type="domain.useraccount.Users"/>
> > <property-specification name="appList" type="java.util.List"/>
> > <property-specification name="docList" type="java.util.Collection"/>
> >
> > <component id="border" type="Border">
> > <static-binding name="title">Company Profile</static-binding>
> > </component>
> >
> > <component id="docTable" type="DocumentTable">
> > <binding name="docList" expression="docList"/>
> > </component>
> >
> > <component id="compInfo" type="CompanyInfo">
> > <binding name="company" expression="company"/>
> > </component>
> >
> > <component id="apps" type="AppTable">
> > <binding name="company" expression="company"/>
> > <binding name="appList" expression="appList"/>
> > </component>
> >
> ></page-specification>
> >
> >I also set this in the header:
> ><meta http-equiv="Expires" Content="-1"><meta
> >http-equiv="Cache-Control" Content="NO-CACHE"><meta
> >http-equiv="Pragma" Content="NO-CACHE">
> >So that the pages don't cache.
> >
> >Any thoughts??
> >
> >On 8/8/05, Mark Alcocer Flores <[EMAIL PROTECTED]> wrote:
> >
> >
> >>Maybe you miss implementing PageRenderListener!!!
> >>Why dont you check that?
> >>Mark.
> >>
> >>--- Chris Chiappone <[EMAIL PROTECTED]> wrote:
> >>
> >>
> >>
> >>>I am positive that its not being cached. I can see some other output
> >>>in the logs associated with the page but do not see me debug for
> >>>pageBeginRender. Also my initializations don't seem to be occuring
> >>>either.
> >>>
> >>>On 8/8/05, Greg Ward <[EMAIL PROTECTED]> wrote:
> >>>
> >>>
> >>>>On 08 August 2005, Chris Chiappone said:
> >>>>
> >>>>
> >>>>>So anytime i click on a link that implements PageRenderListener and I
> >>>>>have a debug message in pageBeginRender, this debug should show up
> >>>>>correct?
> >>>>>
> >>>>>public void pageBeginRender(PageEvent event){
> >>>>> log.info("In pageBeginRender");
> >>>>> // initialize some things....
> >>>>>
> >>>>>}
> >>>>>
> >>>>>I am only seeing the log message the first time I go to the page. Is
> >>>>>there something I am doing wrong?
> >>>>>
> >>>>>
> >>>>Are you dead sure your browser isn't caching the page? Use ethereal or
> >>>>tcpdump to sniff the connection and see what's really going over the wire.
> >>>>Or clear your browser's cache.
> >>>>
> >>>> Greg
> >>>>
> >>>>---------------------------------------------------------------------
> >>>>To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>>>For additional commands, e-mail: [EMAIL PROTECTED]
> >>>>
> >>>>
> >>>>
> >>>>
> >>>--
> >>>~chris
> >>>
> >>>---------------------------------------------------------------------
> >>>To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>>For additional commands, e-mail: [EMAIL PROTECTED]
> >>>
> >>>
> >>>
> >>>
> >>The Greatest Thing You'll Ever Learn
> >>It's Just To Love And Be Loved In Return
> >>
> >>
> >>---------------------------------------------------------------------
> >>To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >>
> >>
> >
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
--
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind
Professional Tapestry training, mentoring, support
and project work. http://howardlewisship.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]