I think you must extend your class from the VelocityNavigationScreen. Gunter M.
Jozsa Kristof wrote: > <newbie/> > > I'm trying to test out the connection between a navigation .vm file, and my > corresponding Java class. It's working with screens, but I'd need to use > dynamic data with navigations as well. I've followed the basic instructions > described in that mail: > > http://www.mail-archive.com/turbine-user%40jakarta.apache.org/msg03687.html > > ..but so far, it does not seem working. > > My files are placed like this: > > APP/templates/app/navigations/TestConn.vm > APP/WEB-INF/src/java/org/MYPACK/APP/modules/navigations/TestConn.java > > so after compilation, the class got placed at: > APP/WEB-INF/classes/org/MYPACK/APP/modules/navigations/TestConn.class > > TestConn.java contains: > --- > package org.dyn.joint.modules.navigations; > import org.apache.turbine.modules.screens.VelocityScreen; > import org.apache.turbine.util.RunData; > import org.apache.velocity.context.Context; > public class TestConn extends VelocityScreen > { > public void doBuildTemplate( RunData data, Context context ) > { > context.put("testconn", "connection alive"); > } > } > --- > > and the .vm file tries to print out $testconn, but velocity.log says: > '$testconn is not a valid reference.', and '$testconn' is printed out as a > string ofc, according my Turbine setup. > > I cant find any place to explicitly connect the vm file with the java class, > but as I've understood, the class loader of turbine should find it himself > (herself? :) automatically. > > What's wrong with the above? > > Regards, > Kristof > -- > .Digital.Yearning.for.Networked.Assassination.and.Xenocide > > --------------------------------------------------------------------- > 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]
