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

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

Related articles:

Filed in ColdFusion on 16 Jun 05 | Tags:


Comments are closed.