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

Adrian Fish adrian.r.fish at gmail.com
Tue Nov 5 07:47:37 PST 2013


Have you tried setting pwdMessage to something different, "abc" for
instance? If this was my code I'd be thinking "Is that colon breaking
something?". There are no tricks, no weird Spring wiring or anything that
only allows certain keys. Not that I can think of, anyway.

Cheers,
Adrian.


On 5 November 2013 15:22, David Wafula Wanyonyi <
DavidWafula.Wanyonyi at wits.ac.za> wrote:

>  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.
>
>  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.
>
>
> _______________________________________________
> sakai-dev mailing list
> sakai-dev at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>
> TO UNSUBSCRIBE: send email to
> sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of
> "unsubscribe"
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20131105/ee903304/attachment.html 


More information about the sakai-dev mailing list