I'm writing a mostly-stateless app, and in it I often do similar
things -- in your example, Details would have an init(productId)
method, and doShowDetails() would call details.init(productId).
It works just fine, as far as I can tell.
On Aug 24, 2005, at 9:03 AM, Alan Chandler wrote:
The example in the tap4 user guide on page injection gives the
following example
<inject property="detailsPage" type="page" object="Details"/>
public abstract Details getDetailsPage();
public IPage doShowDetails(long productId)
{
Details details = getDetailsPage();
details.setProductId(productId);
return details;
}
This is almost exactly what I want to do, with my little database
application as I allow the user to move from a summary list to the
details page for one item.
I am trying to run stateless where I can. So the question is do I
need to make the productId property of the Details page a
persistant one (with session scope), or am I considered within the
overall lifecycle for the page?
The reason for my confusion is, that by the time the listener has
fired, the response has come back from the user (so the productID
has been stored in the URL as a parameter to the listener) but
since the page has not yet started rendering I assumed all its
property variables would get themselves initialised to their
initial value.
--
Alan Chandler
[EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_________________________________________________________________
"Prediction is hard, especially of the future." -- Niels Bohr
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]