Terry,

The $site.myMethod() will only work on the front page, if you want it to 
work on a normal weblog page add it to PageModel.


Cheers Greg





"Terry Corbet" <[email protected]> 
05/03/2009 06:58
Please respond to
[email protected]


To
<[email protected]>
cc

Subject
The Missing Manual






01.  I have visited every page that seems relevant and read every 
email/tutorial, but I cannot find the answer to my question(s).  What I am 
trying to do, seems to fall between the cracks in the nice informaiton you 
have provided across the spectrum of 
Template-Tweeking-to-Plugin-Development.
02.  I don't want to create my own Model; I don't think it is necesary.  I 
just want to add one additional method to one of your existing Models.
03.  Here is what I have been able to do:
       A.  Add a method to SiteModel.
       B.  Add the interface defintion to the business layer in 
UserManager.
       C.  Add the implementation to JPAUserManagerImpl.
       D.  Test the query against the database outside of this framework 
just to confirm that it has valid MySQL syntax and returns the expected 
results.
       E.  Insert the necessary velocity code into a convenient template 
to call the method.
04.  Here is what I have not been able to do:
      A.  Get any output.
05.  Here is what I have done for troubleshooting:
     A.  Set all log4j properties to DEBUG for maximum information.
     B.  Finally coerce/capture this diagnostic:
          "INFO  2009-03-04 21:50:04,875 
SimpleLog4JLogSystem:logVelocityMessage - RHS of #set statement is null. 
Context will not be modified. basic:sidebar [line 38, column 5]"
     C: Check the archives of this newslist to no avail.
     D.  Read every email thread you ever wrote to folks outside of the 
development community.
     D.  Google the whole world concerning the RHS message.
06.  I have log.info() statements at every key point in my code -- well 
before any Exception could have been silently thrown and captured -- and I 
cannot get any evidence of getting to my method via $site.myMethod().  I 
have grepped every single inch of the code and all the jar files and 
cannot determine where there must be some other 
build/configuration/binding declaration that is required before the 
renderer will actually call my back-end code.  But, knowing nothing about 
Velocity or Struts or Spring -- just being a very old 'do it the hard way' 
Servlet coder, I have not been able to find the missing link.  I hope I 
can get some advice as the method I am trying to implement is the key 
determinant of whether to build the application around Roller, or go back 
to try with one of the lesser contenders in the open source bag.
Thank you.

Share our environment commitment - conserve resources and contribute to the 
reduction of CO2 emissions by not printing the email unless absolutely 
necessary to do so. 

Any opinions expressed are those of the author, not Ricoh UK Ltd. This 
communication does not constitute either offer or acceptance of any 
contractually binding agreement. Such offer or acceptance must be communicated 
in writing. It is the responsibility of the recipient to ensure this email and 
attachments are free from computer viruses before use and the sender accepts no 
responsibility or liability for any such computer viruses. 

Ricoh UK Ltd. may monitor the content of emails sent and received via its 
network for the purpose of ensuring compliance with its policies and 
procedures. This communication contains information, which may be confidential 
or privileged. The information is intended solely for the use of the individual 
or entity named above. If you are not the intended recipient, be aware that any 
disclosure, copying, distribution or use of the contents of this information is 
prohibited. If you have received this communication in error, please notify the 
sender immediately by return email with a copy to  [email protected] . 
Please contact us on +44 (0) 208 261 4000 if you need assistance. 

Registered in England No: 473236 
VAT No: GB524161280  

Reply via email to