I haven't been following your thread closely, sorry, but from what I gather, onSuccess is going to be too late to push the id onto the environment. Check out: http://tapestry.apache.org/tapestry5.2-dev/tapestry-core/ref/org/apache/tapestry5/corelib/components/Form.html
Which will list all of the events fired by the Form component, which may prove useful. In particular, onPrepare or onPrepareForSubmit may be good places to stick the pageid into the environment. Robert On Aug 20, 2010, at 8/204:26 PM , Rich M wrote: > Spoke a little too soon. One minor thing remains in some of the sub-subPages > related to the Environmental stuff. Passing the PageId Object from the > containing page to the sub-page through the environment works out okay, but > when I submit forms on any of the sub-pages I get an exception stating the > PageId object isn't in the environment. My initial ideas were to return the > container from the onSuccessFromForm method as well as to push the PageId > back onto the Environment in the onSuccessFromForm method. Both haven't > gotten me anywhere. Although it seems these onSuccess methods don't even get > called yet judging by the lack of debug log messages when these errors occur. > Is there something special I need to be doing with the Environment to get the > PageId back in there? > > -Rich > > On 08/20/2010 04:21 PM, Rich M wrote: >> Ah, I've finally got it. Many many thanks for helping me put the pieces >> together Thiago, it can be really hard to see a different way of doing >> things once you've already done it a certain way. It looks like my >> application can finally start working the way I'd hoped! >> >> It turned out the render error was because I was returning a String in the >> getSelectedTab method called by the delegate object, instead of using the >> String to get a Component from the ComponentSource. Oops. >> >> Regards, >> Rich >> >> On 08/20/2010 02:30 PM, Thiago H. de Paula Figueiredo wrote: >>> On Fri, 20 Aug 2010 13:07:06 -0300, Rich M <rich...@moremagic.com> wrote: >>> >>>> Almost there.. I'm having a hard time with this environmental coding. If I >>>> can get it down for this one page then it should be simple enough for the >>>> rest. >>> >>> Your code that uses the environment looks correct. >>> >>>> As of now, I'm getting a strange error in the sense that it describes >>>> something I did not explicitly code: >>>> Render queue error in BeginRender[pss/ConversionTab:delegate]: The return >>>> value from a render phase event method was not compatible the expected >>>> return type of java.lang.Boolean. You should change the method to return >>>> the correct type. >>>> It says I have a render phase event returning something other than a >>>> Boolean, yet I don't have any render phases return anything other than >>>> void as far as I can tell. I'm trying to push a user Id through to the >>>> DetailsTab through the environment so it can load details from the DAO. >>> >>> This isn't related to the use of the environment. The render phase error >>> would happen independently of the use of the environment. >>> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >> For additional commands, e-mail: users-h...@tapestry.apache.org >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org