msgbartop
News, views, tips and tricks on Oracle and other fun stuff
msgbarbottom

Model-Glue FAQ

The following are some Model-Glue notes (in the form of an FAQ) I wrote for my own reference. Please feel free to add or correct anything by commenting below. (more…)

Filed in ColdFusion with 20 Comments | Tags: ,


Model Glue viewState tip

In your view, for example, instead of:

<cfset variables.var1 = viewState.getValue("var1") />
<cfset variables.var2 = viewState.getValue("var2") />
<cfset variables.var3 = viewState.getValue("var3") />

You can always use this alternate syntax:

<cfset variables.state = viewState.getAll() />

and then you can reference var1, var2 and var3 in your code like this: variables.state.var1, variables.state.var1 and variables.state.var1

Filed in ColdFusion with Comments Off | Tags: