[Building Sakai] Very basic velocity question: parsing data from java to template in Sakai

David Wafula Wanyonyi DavidWafula.Wanyonyi at wits.ac.za
Tue Nov 5 07:22:25 PST 2013


Hi all,
Never used velocity before, so my first attempt is not going any where; please point me where am getting it wrong:

in   https://source.sakaiproject.org/svn/portal/tags/portal-base-2.9.2/portal-impl/impl/src/java/org/sakaiproject/portal/charon/SkinnableCharonPortal.java,


there is  includeLogin(),  with lines:
....
  rcontext.put("loginLogInOutUrl", logInOutUrl);
  rcontext.put("loginMessage", message);
.......

so am adding something simple:

 String pwdMessage = "Warning: Your password is expiring in 6 days";
  rcontext.put("passwordExpireMessage", pwdMessage);


I go to includeTabs.vm:

<span class="pawword-expire-warning">
${passwordExpireMessage}
</span>

it prints '${passwordExpireMessage}' instead of actual message


if i try and replace this with say ${loginMessage}, just for testing, the correct message is printed.



The trick ?
Thanks.

<table width="100%" border="0" cellspacing="0" cellpadding="0" style="width:100%;"> 
<tr>
<td align="left" style="text-align:justify;"><font face="arial,sans-serif" size="1" color="#999999"><span style="font-size:11px;">This communication is intended for the addressee only. It is confidential. If you have received this communication in error, please notify us immediately and destroy the original message. You may not copy or disseminate this communication without the permission of the University. Only authorised signatories are competent to enter into agreements on behalf of the University and recipients are thus advised that the content of this message may not be legally binding on the University and may contain the personal views and opinions of the author, which are not necessarily the views and opinions of The University of the Witwatersrand, Johannesburg. All agreements between the University and outsiders are subject to South African Law unless the University agrees in writing to the contrary. </span></font></td>
</tr>
</table>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20131105/9a8e54c8/attachment.html 


More information about the sakai-dev mailing list