On 03/22/2011 02:50 PM, Thiago H. de Paula Figueiredo wrote:
Hi!
BeanEditor, which is used inside BeanEditForm, only changes the value
of the edited property if it's null, so the problem should be
elsewhere. By the way, why are you using the Environment instead of
component parameters? And what do you call a subpage?
Okay, maybe I'm not interpreting the page lifecycle properly here, or it
has changed it some way that is causing me problems? The entity is
referenced and loaded properly in onPrepareForRender. Considering that
BeanEditor only changes the value of the edited property if it's null,
then what could be causing the private entity field to become set to
null between onPrepareForRender and the coupling/rendering of the
BeanEditor? I have no direct statements doing as much in my code.
In response to the Environment vs. Component Parameters, these are all
Pages not Components. Actually this structure and exact use was
discussed in this (
http://tapestry.markmail.org/thread/4rffky2r2uqno5ea#query:+page:1+mid:j375h7obo6hd2i6b+state:results
) previous thread. In trying to mentally recall the justification, I
believe the intent is that there is a two-way relationship on the
@Environmental PageId id between the container page and the 'subpage'.
The subpage term here means that there is the container page with the
Grid, and then the subordinate page (loaded via Delegate in container)
with the BeanEditForm. By two-way relationship, I mean that the GridPage
can manipulate the PageId so that a SubPage can load the correct Entity,
and going the other way, the SubPage can reset the PageId in the
environment in the event that the user deletes the Entity so the
GridPage is aware.
Maybe I just need to completely re-evaluate my approach here, perhaps my
prior implementation worked by miracle rather than design (I've been
forced to learn and seriously develop Tapestry concurrently.
Component-driven design over Page-driven design wasn't quite in my
repertoire back in August). Before I invest time into that though, I
want to verify that there isn't some easy adjustment to my existing code
to restore functionality.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org