Well, did u try using @Persist for UserProfile page's UserID value?

HTH
 - Ashwanth

On Fri, Dec 18, 2009 at 2:53 PM, Alessandro Bottoni
<alexbott...@gmail.com>wrote:

> I'm trying to pass a value from a page called "Register" to a page
> called "UserProfile" following the instruction supplied by A. Kolesnikov
> in his Tapestry 5 book (pages 59 - 62).
>
> The value I want to pass is just a simple String Id. Here is (a
> simplified version of) my code:
>
> public class Register {
> // this class is used by a BeanEditor-based page template
>
>        private String id = "Id From Register";
>
>        @InjectPage
>        private UserProfile userProfile;
>
>        Object onSuccess(){
>                // this call does not work...
>                userProfile.setUserId(id);
>                return userProfile;
>        }
> }
>
> public class UserProfile {
>
>        private String UserId = "Id from UserProfile";
>
>        // this method is not invoked as expected..
>        public void setUserId(String MyUserId){
>                this.UserId = "Id received form Register";
>        }
>
>        // later used in a ${UserId} expansion on the target page
>        public String getUserId() {
>                return this.UserId;
>        }
> }
>
> The Id Value is not passed from the first page to the second one (that
> is: I always get the default string "Id from UserProfile" as the Id
> rendered on the UserProfile page).
>
> What can be wrong in such trivial code?
>
> --
>
> Alessandro Bottoni
> Website: http://www.alessandrobottoni.it/
>
> "Life is a sexually transmitted disease, and it's 100% fatal."
>     -- Unknown
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>

Reply via email to