http://coldfusion.com logo
#adobe
Title
# adobe
a

Adam Cameron

05/05/2022, 12:50 PM
How do I implement this code in tags:
Copy code
component {
    static {
        final static.myStaticVar = "SET"
    }
}
I Inferred it would be this:
Copy code
<cfcomponent>

    <cfstatic>
        <cfset final static.myStaticVar = "SET">
    </cfstatic>

</cfcomponent>
And whilst that almost works in Lucee, CF chokes with:
Unknown tag: cfstatic.
Lucee fails on the
final
modifier, I will raise this with them separately.
g

Gareth

05/09/2022, 1:16 AM
I'm a tad confused, where does it say final is supposed to work ? Also, I stumbled across this.. https://docs.lucee.org/reference/tags/static.html but is this a CF tag as well ?
Sorry, noted documentation on final in lucee
love it, can we make FORM and URL scopes immutable by choice as well ? please...
a

Adam Cameron

05/09/2022, 7:15 AM
is this a CF tag as well ?
That's... erm... kinda what I'm asking...
d

dajester2015

08/09/2022, 6:43 PM
cannot find the lucee thread specifically related to this, but i would think it should be
Copy code
<cfstatic>
    <cfset final myStaticVar = "SET">
</cfstatic>
2 Views