You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by RR <se...@gmail.com> on 2005/01/10 16:32:17 UTC

Engine Service or beginResponse

I have a page that is used for creating and editing Customers. I'm
trying to decide how to best implement the logic that will determine
the state of the page (edit or create)--do I place it in an engine
service or in beginResponse? While the latter is being deprecated, the
former would (as I have discovered so far) require a fair amount of
work to execute the service when other pages need to access it (since
extending AbstractService.service requires so many params).  I
basically need to know what's the best way to architect a controller
to initialize the components on the edit/create page for either the
edit or create intention. I believe I will have additional pages that
will fall under the same premise (edit or create), so I'd like to get
a good model in place that I replicate as necessary.

Any thoughts or suggestions are greatly appreciated,
-RR-

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


Re: Engine Service or beginResponse [PageRenderListener]

Posted by RR <se...@gmail.com>.
Actually, that's exactly what I needed to double-check. Several
functions were being executed and upon further investigation I noticed
that the page was explicitly being detached--I forgot to clean up the
section after I pasted it in from the engine service I was previously
using. Stupid mistake, problem solved.


On Mon, 10 Jan 2005 14:39:18 -0800, Paul Ferraro <pm...@columbia.edu> wrote:
> Can you post your pageBeginRender() method?
> 
> Paul
> 
> RR wrote:
> 
> >So I've implemented PageRenderListener on my page and have placed my
> >logic in pageBeginRender. However, this appears to have broken my
> >page:
> >java.lang.NullPointerException
> >Stack Trace:
> >org.apache.tapestry.param.ParameterManager.setup(ParameterManager.java:136)
> >
> >Line dies because getEngine() returns null. Question now is why this
> >is happening? if I remove the logic from pageBeginRender then the page
> >loads (but lacking the logic I require). The dying occurs when the
> >ParameterManager "begins connecting parameters and properties".
> >
> >How could implementing PageRenderListner wipe out the engine that's
> >associated with the page?
> >
> >
> >
> >
> >On Mon, 10 Jan 2005 11:07:57 -0500, Nick Stuart <ba...@gmail.com> wrote:
> >
> >
> >>I have a couple pages like, such as create a new user, or update an
> >>existing, and I placed the logic mainly in the pageBeginRender method
> >>while implementing PageRenderListener. I think touching the Engine or
> >>over-riding beginResponse would be jumping in to deep for something
> >>like this. I also place some of the logic in the actual action method
> >>itself of the form, but there are probably other ways to do it as
> >>well. It's really up to you, but I would personally stay away from
> >>re-writting stuff if at all possible.
> >>
> >>
> >>On Mon, 10 Jan 2005 08:32:17 -0700, RR <se...@gmail.com> wrote:
> >>
> >>
> >>>I have a page that is used for creating and editing Customers. I'm
> >>>trying to decide how to best implement the logic that will determine
> >>>the state of the page (edit or create)--do I place it in an engine
> >>>service or in beginResponse? While the latter is being deprecated, the
> >>>former would (as I have discovered so far) require a fair amount of
> >>>work to execute the service when other pages need to access it (since
> >>>extending AbstractService.service requires so many params).  I
> >>>basically need to know what's the best way to architect a controller
> >>>to initialize the components on the edit/create page for either the
> >>>edit or create intention. I believe I will have additional pages that
> >>>will fall under the same premise (edit or create), so I'd like to get
> >>>a good model in place that I replicate as necessary.
> >>>
> >>>Any thoughts or suggestions are greatly appreciated,
> >>>-RR-
> >>>
> >>>---------------------------------------------------------------------
> >>>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
> >
> >
> >
> 
> 
> ---------------------------------------------------------------------
> 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: Engine Service or beginResponse [PageRenderListener]

Posted by Paul Ferraro <pm...@columbia.edu>.
Can you post your pageBeginRender() method?

Paul

RR wrote:

>So I've implemented PageRenderListener on my page and have placed my
>logic in pageBeginRender. However, this appears to have broken my
>page:
>java.lang.NullPointerException
>Stack Trace:
>org.apache.tapestry.param.ParameterManager.setup(ParameterManager.java:136)
>
>Line dies because getEngine() returns null. Question now is why this
>is happening? if I remove the logic from pageBeginRender then the page
>loads (but lacking the logic I require). The dying occurs when the
>ParameterManager "begins connecting parameters and properties".
>
>How could implementing PageRenderListner wipe out the engine that's
>associated with the page?
>
>
>
>
>On Mon, 10 Jan 2005 11:07:57 -0500, Nick Stuart <ba...@gmail.com> wrote:
>  
>
>>I have a couple pages like, such as create a new user, or update an
>>existing, and I placed the logic mainly in the pageBeginRender method
>>while implementing PageRenderListener. I think touching the Engine or
>>over-riding beginResponse would be jumping in to deep for something
>>like this. I also place some of the logic in the actual action method
>>itself of the form, but there are probably other ways to do it as
>>well. It's really up to you, but I would personally stay away from
>>re-writting stuff if at all possible.
>>
>>
>>On Mon, 10 Jan 2005 08:32:17 -0700, RR <se...@gmail.com> wrote:
>>    
>>
>>>I have a page that is used for creating and editing Customers. I'm
>>>trying to decide how to best implement the logic that will determine
>>>the state of the page (edit or create)--do I place it in an engine
>>>service or in beginResponse? While the latter is being deprecated, the
>>>former would (as I have discovered so far) require a fair amount of
>>>work to execute the service when other pages need to access it (since
>>>extending AbstractService.service requires so many params).  I
>>>basically need to know what's the best way to architect a controller
>>>to initialize the components on the edit/create page for either the
>>>edit or create intention. I believe I will have additional pages that
>>>will fall under the same premise (edit or create), so I'd like to get
>>>a good model in place that I replicate as necessary.
>>>
>>>Any thoughts or suggestions are greatly appreciated,
>>>-RR-
>>>
>>>---------------------------------------------------------------------
>>>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
>
>  
>


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


Re: Engine Service or beginResponse [PageRenderListener]

Posted by RR <se...@gmail.com>.
So I've implemented PageRenderListener on my page and have placed my
logic in pageBeginRender. However, this appears to have broken my
page:
java.lang.NullPointerException
Stack Trace:
org.apache.tapestry.param.ParameterManager.setup(ParameterManager.java:136)

Line dies because getEngine() returns null. Question now is why this
is happening? if I remove the logic from pageBeginRender then the page
loads (but lacking the logic I require). The dying occurs when the
ParameterManager "begins connecting parameters and properties".

How could implementing PageRenderListner wipe out the engine that's
associated with the page?




On Mon, 10 Jan 2005 11:07:57 -0500, Nick Stuart <ba...@gmail.com> wrote:
> I have a couple pages like, such as create a new user, or update an
> existing, and I placed the logic mainly in the pageBeginRender method
> while implementing PageRenderListener. I think touching the Engine or
> over-riding beginResponse would be jumping in to deep for something
> like this. I also place some of the logic in the actual action method
> itself of the form, but there are probably other ways to do it as
> well. It's really up to you, but I would personally stay away from
> re-writting stuff if at all possible.
> 
> 
> On Mon, 10 Jan 2005 08:32:17 -0700, RR <se...@gmail.com> wrote:
> > I have a page that is used for creating and editing Customers. I'm
> > trying to decide how to best implement the logic that will determine
> > the state of the page (edit or create)--do I place it in an engine
> > service or in beginResponse? While the latter is being deprecated, the
> > former would (as I have discovered so far) require a fair amount of
> > work to execute the service when other pages need to access it (since
> > extending AbstractService.service requires so many params).  I
> > basically need to know what's the best way to architect a controller
> > to initialize the components on the edit/create page for either the
> > edit or create intention. I believe I will have additional pages that
> > will fall under the same premise (edit or create), so I'd like to get
> > a good model in place that I replicate as necessary.
> >
> > Any thoughts or suggestions are greatly appreciated,
> > -RR-
> > 
> > ---------------------------------------------------------------------
> > 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: Engine Service or beginResponse

Posted by Nick Stuart <ba...@gmail.com>.
I have a couple pages like, such as create a new user, or update an
existing, and I placed the logic mainly in the pageBeginRender method
while implementing PageRenderListener. I think touching the Engine or
over-riding beginResponse would be jumping in to deep for something
like this. I also place some of the logic in the actual action method
itself of the form, but there are probably other ways to do it as
well. It's really up to you, but I would personally stay away from
re-writting stuff if at all possible.


On Mon, 10 Jan 2005 08:32:17 -0700, RR <se...@gmail.com> wrote:
> I have a page that is used for creating and editing Customers. I'm
> trying to decide how to best implement the logic that will determine
> the state of the page (edit or create)--do I place it in an engine
> service or in beginResponse? While the latter is being deprecated, the
> former would (as I have discovered so far) require a fair amount of
> work to execute the service when other pages need to access it (since
> extending AbstractService.service requires so many params).  I
> basically need to know what's the best way to architect a controller
> to initialize the components on the edit/create page for either the
> edit or create intention. I believe I will have additional pages that
> will fall under the same premise (edit or create), so I'd like to get
> a good model in place that I replicate as necessary.
> 
> Any thoughts or suggestions are greatly appreciated,
> -RR-
> 
> ---------------------------------------------------------------------
> 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