Setting Cascading Fields Fails
<p>Hi all,</p>
<p> </p>
<p>I am new to actuate. I have inherited a codebase and am still wrestling on coming up to speed w/ the JSAPI.</p>
<p> </p>
<p>The problem is that when I set my form/report parameters, the cascading fields do not get set, and instead just use the default.</p>
<p> </p>
<p>I am running 3.1.x.</p>
<p> </p>
<p>Our initialization of a parameter set for a report looks roughly as follows:</p>
<pre class="_prettyXprint _lang-js">
var values = { someField: someValue, someCascadingParam: someCascadingValue }
var param = new actuate.Parameter("actuateparams")
param.downloadParameters(function (paramDefs) {
// some other init code ..., hidden!
viewer.setParameters(values)
param.renderContent(paramDefs, function () {
// parameter form updated!
// however, my cascading value is not set properly in the form.
// in fact, i dont think the value have even been downloaded yet,
// as I see a SOAP request in the network tab requesting value sets.
// also, the parent field is properly set
})
})
</pre>
<p>I don't have a good means to share a runnable example, but if there is a way to do so, I'd be happy to try if someone would provide some guidance.</p>
<p> </p>
<p>Thanks for your time!</p>
<p> </p>
<p>Chris</p>
<p> </p>
<p>I am new to actuate. I have inherited a codebase and am still wrestling on coming up to speed w/ the JSAPI.</p>
<p> </p>
<p>The problem is that when I set my form/report parameters, the cascading fields do not get set, and instead just use the default.</p>
<p> </p>
<p>I am running 3.1.x.</p>
<p> </p>
<p>Our initialization of a parameter set for a report looks roughly as follows:</p>
<pre class="_prettyXprint _lang-js">
var values = { someField: someValue, someCascadingParam: someCascadingValue }
var param = new actuate.Parameter("actuateparams")
param.downloadParameters(function (paramDefs) {
// some other init code ..., hidden!
viewer.setParameters(values)
param.renderContent(paramDefs, function () {
// parameter form updated!
// however, my cascading value is not set properly in the form.
// in fact, i dont think the value have even been downloaded yet,
// as I see a SOAP request in the network tab requesting value sets.
// also, the parent field is properly set
})
})
</pre>
<p>I don't have a good means to share a runnable example, but if there is a way to do so, I'd be happy to try if someone would provide some guidance.</p>
<p> </p>
<p>Thanks for your time!</p>
<p> </p>
<p>Chris</p>
0
Comments
-
<p>With cascading parameters and JSAPI, the solution is to call <strong>overwriteParameterDefProperties() </strong>after setting the values of the parameters. </p>
<p> </p>
<p>The process is:</p>
<ol><li>Get the parameter definitions</li>
<li>Set the parameter values</li>
<li>overwriteParameterDefProperties</li>
<li>Download the parameter definitions again and renderContent</li>
</ol><pre class="_prettyXprint">
function afterInit() {
params = new actuate.Parameter("ReportParamDiv");
params.setReportName("my.rptdesign");
params.downloadParameters(getParamDefs);
}
function getParamDefs(paramDefArray) {
parameterDefs = paramDefArray;
setParams(); //sets the values of the parameters, values are provided somehow, e.g. passed in the url
params.overwriteParameterDefProperties( parameterDefs );
params.downloadParameters( renderContent );
}
function renderContent( paramDefs ) {
params.renderContent( paramDefs );
}</pre>Warning No formatter is installed for the format ipb0
Categories
- All Categories
- 108 Developer Announcements
- 53 Articles
- 106 General Questions
- 144 IM Services
- 43 OpenText Hackathon
- 32 Developer Tools
- 20.6K Analytics
- 4.1K AppWorks
- 8.9K Extended ECM
- 899 Cloud Fax and Notifications
- 77 Digital Asset Management
- 9.3K Documentum
- 29 eDOCS
- 120 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management