Apache Tapestry PageActivationContext tutorial
The idea behind this annotation is nice and very simple. It's all about telling tapestry how to hypothetically convert a string to an object of your choice. This string is actually a key used to look up a desired object. Now to do that you need to provide tapestry with your value encoder implementation then go ahead and use the @PageActivationContext annotation. First create a value encoder service : package com.skycomm.cth.services.encoders; import org.apache.tapestry5.ValueEncoder; import org.apache.tapestry5.services.ValueEncoderFactory; import com.jarmy.beans.UserInfo; import com.jarmy.services.dao.UserDAO; public class UserInfoEncoder implements ValueEncoder , ValueEncoderFactory { private final UserDAO userDao; public UserInfoEncoder(UserDAO userDao) { this.userDao = userDao; } @Override public ValueEncoder create(Class paramClass) { re...