Well i found my issue. Just in case anyone else happens to have this problem. The issue really was having to go from jdk 1.5 back to 1.4, which I expect most people don't end up doing. I was thinking that i could extend my getAso from a parent page. You can do that but you have to include the <inject .../> tags in all subsequent .page files not just the superclasses.
On 6/14/07, Chris Chiappone <[EMAIL PROTECTED]> wrote:
I put the empty default constructors in and my <inject property="aso" type="state" object="sessionASO" /> is in my .page file I cannot understand why this isn't working. I've had it working before in Java 1.5 but since having to use 1.4 for this project I can't seem to get something right. On 6/14/07, Kristian Marinkovic <[EMAIL PROTECTED]> wrote: > just a guess..... > <inject property="aso" type="state" object="sessionASO"/> > is within you .page file and not within your .html? > > > > > "Jonathan Barker" <[EMAIL PROTECTED]> > 14.06.2007 05:16 > Bitte antworten an > "Tapestry users" <[email protected]> > > > An > "'Tapestry users'" <[email protected]> > Kopie > > Thema > RE: ASO Frustrations > > > > > > > Chris, > > Nothing jumps out at me as *wrong*, but I've run into strange problems > when > I omit constructors. Try adding no-arg constructors to your factory and > ASO > classes. > > I lean more toward annotations, so I hardly ever use the <inject> method, > so > I wouldn't even know what I was missing there. > > Jonathan > > > -----Original Message----- > > From: Chris Chiappone [mailto:[EMAIL PROTECTED] > > Sent: Wednesday, June 13, 2007 12:14 PM > > To: Tapestry List > > Subject: ASO Frustrations > > > > Could someone take a quick look at this and see if i'm doing anything > > wrong. I am trying to use and session based ASO but it doesn't seem > > to be getting injected properly, i've looked at this code over and > > over and must be missing something. > > > > hivemodule.xml > > > > <service-point id="SessionFactory" > > interface="org.apache.tapestry.engine.state.StateObjectFactory"> > > <invoke-factory> > > <construct class="application.aso.SessionASOFactory"> > > > > </construct> > > </invoke-factory> > > </service-point> > > > > > > > > <contribution configuration-id="tapestry.state.ApplicationObjects"> > > <state-object name="globalASO" scope="application"> > > <invoke-factory object="service:GlobalFactory"/> > > </state-object> > > <state-object name="sessionASO" scope="session"> > > <invoke-factory object="service:SessionFactory"/> > > </state-object> > > > > </contribution> > > > > page.html contains: > > > > <inject property="aso" type="state" object="sessionASO"/> > > > > page.java contains: > > > > public abstract SessionASO getAso(); > > > > public Client getCurrentClient() { > > SessionASO aso = getAso(); > > if(aso == null){ > > logger.info("Why the hell > is the aso null?"); > > } > > } > > > > SessionASOFactory.java: > > > > public class SessionASOFactory implements StateObjectFactory { > > private static final Log logger = > > LogFactory.getLog(SessionASOFactory.class > > .getName()); > > > > public Object createStateObject() { > > SessionASO aso = new SessionASO(); > > logger.info("Createing a new sessionASO > object from > factory"); > > return aso; > > } > > } > > > > SessionASO.java: > > > > public class SessionASO implements Serializable > > { > > > > private Client sessionClient; > > > > public Client getSessionClient() { > > return sessionClient; > > } > > > > public void setSessionClient(Client sessionClient) { > > this.sessionClient = sessionClient; > > } > > > > > > } > > > > Thanks for the help. > > -- > > ~chris > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- ~chris
-- ~chris --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
