how to set a variable for renderer.renderView()?

how to set a variable in coldboxproxy method so that the variable can
be used in the adjacent call to renderView()?

That really doesn't make sense, if you are using the coldboxproxy you must
be using an Ajax call. So anything returned from that would be needing a JS
code to do what you need from that point onwards.

Unless I am mistaken you might need to explain better what you are trying to
do.

Regards,
Andrew Scott
http://www.andyscott.id.au/

i want to use an existing view which is "rendered" into a variable,
which in turn i'll return to the ajax caller to render it. however,
the view needs some input data.

i'm using coldbox 3 rc1 btw.

You can simply pass the data along with the ajax call and it will be
inflated to the rc.

Curt

Behalf Of alacarte

here's an example of the function i have. let's pretend the call to
findAll works and i get the right data for the person. however, the
person variable is not available in the _person view.

now how to make it visible to the view?

function getDynCluster(id) access="remote" output="true"
{
    var person = getModel("PersonService").findAll( ..., id );
    var output = getPlugin('renderer').renderView('person/_person'));
    return output;
}

Is the getDynCluster function in a handler or in your proxy?

Plus, you are declaring person as a local var to that function. You
should pass it through the request collection(rc).

If it is in your proxy, you can then turn around and call a handler
event so all will be inside the ColdBox lifecycle and you can treat it
like anything else...

Here is some code to maybe help you out.

//in proxy
function getDynCluster() access="remote" output="true"
{
    var results = "";

    //Set the event to execute
    arguments.event = "someHandler. getDynCluster";

    //Call to process a coldbox event cycle, always check
the results as they might not exist.
    results = super.process(argumentCollection=arguments);

    return results;
}
//in handler
function getDynCluster() access="public" output="false"
{
  rc.person = getModel("PersonService").findAll( ..., rc.id );
    var output =
getPlugin('renderer').renderView('person/_person'));
    return output;

}

Curt

Behalf Of alacarte

yes, thanks. that seems to work.