I’m working on a widget for coldbox and I haven’t used runevent before. In my widget I do a savecontent and return the string. The savecontent is a writeoutput of a runevent into which I am passing arguments from the widget. The runevent basically does a renderview on a viewlet. The problem is I can’t see find the arguments in the viewlet that should be there from the runevent. Right now the viewlet is nothing more than a few dumps. Can anyone help me connect the dots here?
my renderit function in the widget copied from the viewlet widget in contentbox and slightly modified.
any function renderIt(required string eventid){
var rString = “”;
var eventArguments = {};
if( len( arguments.eventid ) ){
var aString = listToArray( arguments.eventid, “,” );
for( var key in aString ){
eventArguments[ listFirst( key, “=” ) ] = getToken( key, 2, “=” );
}
}
saveContent variable=“rString”{
The only thing that I can’t decipher is your arguments what your exactly doing, but it looks like you are not defining an key, value relationship which the passing of arguments requires.
You don’t specify what the error is you’re getting, but I am guessing it would have told you what the problem is.