it worked!!!! I thought all along that the case of my class name was correct because in the documentation at
http://jakarta.apache.org/turbine/turbine-2.3/howto/velocity-site-howto.html ... (under Screens) NOTE: Turbine capitalizes the first letter in the class file name before looking for the matching class in the classpath. This allows you to follow (somewhat) normal class naming guidelines. For example: index.vm and Index.vm both map to Index.class roleeditor.vm maps to Roleeditor.class role_editor.vm maps to Role_editor.class ... - I figured out just now that this rule works if the class is not inside a sub-directory. I think this should be mentioned in the documentation. Thank you very much!!! --- David Demner <[EMAIL PROTECTED]> wrote: > Hi Clinton, > > I'm pretty sure Henning is correct and the case of > the class name is > incorrect. I think it needs to be the same case as > your .vm file - in your > case try add.java instead of Add.java > > Good luck, > > David > > -----Original Message----- > From: clinton lopez [mailto:[EMAIL PROTECTED] > Sent: Thursday October 7, 2004 7:38 PM > To: Turbine Users List > Subject: Re: Problem with Screen Classes in > Subdirectories > > > Thanks to all who answered my question. > > My Add.java extends VelocitySecureScreen > > I can't find any information in the log file whether > or not it was able to find the class. I assumed it > didn't find it because the value of the variable > specified in context.put("entry", "hello") was not > reflected in velocity (just outputs '$entry'). > > the log file looked something like: > > ... > 2004-10-07 14:11:02,575 - ResourceManager : found > screens/admin/add.vm with loader > org.apache.velocity.runtime.resource.loader.FileResourceLoader > 2004-10-07 14:11:02,575 - > org.apache.velocity.runtime.exception.ReferenceException: > reference : template = screens/admin/add.vm [line > 19,column 4] : $entry is not a valid reference. > ... > > The index.vm, which was not under a sub-directory, > was > able to output the correct value of the variable. I > tried to copy the same working Index.java to a > sub-directory (I just changed the package to the > correct directory) but it is still not working > properly. > > I'm using Turbine2.2. I can't find any version 2.3 > release and my cvs can't connect to the Turbine > repository. I'm not sure if this is the problem. > > Thanks! > > > --- "Henning P. Schmiedehausen" <[EMAIL PROTECTED]> > wrote: > > > clinton lopez <[EMAIL PROTECTED]> writes: > > > > Make sure that the case of the class name is > > correct. > > > > Also, the class should extends VelocityScreen or > > VelocitySecureScreen. > > > > Regards > > Henning > > > > > > > > >--0-1870538179-1097138647=:85986 > > >Content-Type: text/plain; charset=us-ascii > > > > >In my case, it seems that the screen classes > > corresponding to the velocity templates are not > > being called when they are in subdirectories. They > > work fine when they are in their root directories. > > > > > >For example: > > > > > >in templates/.../screens/: > > > index.vm > > > admin/ > > > add.vm > > > > > >in classes/.../screens/: > > > index.java > > > admin/ > > > add.java > > > > > >index.java was executed before index.vm but > > add.java was not when add.vm was called (through > > $link.setPage("admin,add.vm")) > > >I assumed it should work this way. The layout and > > navigation parts worked fine. > > > > > >Is there anything I missed? > > > > > >Thanks! > > > > > > > >--------------------------------- > > >Do you Yahoo!? > > >vote.yahoo.com - Register online to vote today! > > >--0-1870538179-1097138647=:85986-- > > > > -- > > Dipl.-Inf. (Univ.) Henning P. Schmiedehausen > > > INTERMETA GmbH > > [EMAIL PROTECTED] +49 9131 50 654 0 > > http://www.intermeta.de/ > > > > RedHat Certified Engineer -- Jakarta Turbine > > Development -- hero for hire > > Linux, Java, perl, Solaris -- Consulting, > > Training, Development > > > > "Fighting for one's political stand is an > honorable > > action, but re- > > fusing to acknowledge that there might be > > weaknesses in one's > > position - in order to identify them so that they > > can be remedied - > > is a large enough problem with the Open Source > > movement that it > > deserves to be on this list of the top five > > problems." > > -- Michelle Levesque, > > "Fundamental Issues with > > Open Source > > Software Development" > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: > > [EMAIL PROTECTED] > > For additional commands, e-mail: > > [EMAIL PROTECTED] > > > > > > > > __________________________________ > Do you Yahoo!? > Yahoo! Mail - Helps protect you from nasty viruses. > http://promotions.yahoo.com/new_mail > > --------------------------------------------------------------------- > 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] > > _______________________________ Do you Yahoo!? Declare Yourself - Register online to vote today! http://vote.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
