Luis Majano Forums Notification: Post to Depricated RC scope

Title: RE: Depricated RC scope
Thread: Depricated RC scope
Forum: Bugs (ColdBox)
Conference: ColdBox
User: lmajano

Hi Puc,

Your first part is correct, within the handler:

var rc =
context.getCollection();
rc.title = "Luis";

However, in your view,
you need to do the same method if you want to retrieve it using an alias like
the rc scope.

[code]
rc = context.getCollection();
<title>#rc.title#</title>
[/code]

Or

[code]
<title>#Context.getValue("title")#</title>
[/code]
Setting the rc = context.getCollection() is a why to be lazy, because you type
less. That is the only reason for it. If you want to be lazy like me and not
type that much, you use a reference variable. Else, just use the correct syntax.

http://www.luismajano.com/forums/index.cfm?event=ehMessages.dspMessages&threadid=4C4AEEF0-123F-6116-429DF123C83D1664