[prev in list] [next in list] [prev in thread] [next in thread] 

List:       tapestry-user
Subject:    Re: Is it possible to get property values in pageBeginRender?
From:       Pablo Ruggia <pruggia () gmail ! com>
Date:       2005-06-30 23:22:12
Message-ID: f13c775c05063016225a0b7b37 () mail ! gmail ! com
[Download RAW message or body]


Did you try declarin your orderId persistent ?

On 6/30/05, Steven Wisener <swisener@gmail.com> wrote:
> 
> I'm having a slight problems with pageBeginRender; for clarity I'll
> change my example to a standard Order/LineItem one. I have a LineItem
> listing page that is linked to from the order page like so:
> 
> LineItemListingPage page = (LineItemListingPage)
> cycle.getPage("LineItemListing");
> page.setOrderId(getOrderId());
> cycle.activate(page)
> 
> So the orderId property is set on the LineItemListingPage when it
> first renders. I have a form that allows editing each LineItem on the
> LineItemListingPage, which uses a ListEdit/ListEditMap. The collection
> of LineItems is initialized in pageBeginRender:
> 
> public void pageBeginRender(PageEvent event) {
> // OrderManager is a session facade that gets line items from the DB
> setLineItems(getOrderManager().getLineItems(getOrderId());
> // Set up ListEditMap, etc.
> }
> 
> On the initial page hit, this works fine because the orderId is set by
> the previous page. The problem is when the form is submitted. I've
> tried using a hidden field to remember the orderId, but it looks like
> the property is not set until *after* pageBeginRender is called, so
> getOrderId returns null. How do I get around this problem? I'd rather
> not have to mark the orderId property as persistent, as the orderId
> should be in the request parameters somewhere...
> 
> --Steven
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
>


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic