Yeah, that does get old. Do this instead:
<cfset event.copyToScope( variables, "xe.handleForm,xe.handleLink" ) /> <cfset handleForm = event.linkTo( xe.handleForm ) /> And everything will be rocking! Make sense? I typed this on my blackberry so it might not compile.. ------Original Message------ From: Chuck Savage To: model-glue ReplyTo: [email protected] Subject: [Model-Glue] helper for 'myself' & something Sent: Nov 30, 2009 1:12 PM Anyone have a good helper that combines 'myself' and other? I find that I'm writing ... <cfset loginPage = viewstate.getValue("myself") & viewstate.getValue ("xe.Login") /> <cfset logoutPage = viewstate.getValue("myself") & viewstate.getValue ("xe.Logout") /> on one page, then another <cfset myself = viewState.GetValue('myself')> <cfset self = myself & viewState.GetValue('event')> <cfset resetPage = myself & viewState.GetValue('xe.reset')> <cfset deletePage = myself & viewState.GetValue('xe.delete')> <cfset ignorePage = myself & viewState.GetValue('xe.ignore')> <cfset unignorePage = myself & viewState.GetValue('xe.unignore')> etc etc. Its getting old fast. I need something smoother and less verbose. Related, can helper cfc's get injected with the event scope/bean? I'm thinking a custom tag that does something like <cf_myself variable="loginPage" e="xe.Login"> 'variable' being optional, otherwise variable would be the value passed into e, so internally to the tag would basically be: <cfparam name="Attributes.e" type="string" /> <cfparam name="Attributes.variable" type="string" default="#Attributes.e#" /> <cfset "#Attributes.variable#" = viewState.getValue("myself") & viewState.getValue(Attributes.e)> -- Model-Glue Sites: Home Page: http://www.model-glue.com Documentation: http://docs.model-glue.com Bug Tracker: http://bugs.model-glue.com Blog: http://www.model-glue.com/blog You received this message because you are subscribed to the Google Groups "model-glue" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/model-glue?hl=en Sent from my Verizon Wireless BlackBerry -- Model-Glue Sites: Home Page: http://www.model-glue.com Documentation: http://docs.model-glue.com Bug Tracker: http://bugs.model-glue.com Blog: http://www.model-glue.com/blog You received this message because you are subscribed to the Google Groups "model-glue" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/model-glue?hl=en
