Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Validate Parameter List
Gremlin
Hi,
i currently try to solve the following scenario :
You define a parameter with static or dynamic list, maybe the two values ['One','Two'].
The report running in WebViewer shows the parameterpage. Now the devil-user change the page
for example with firebug and add a third value 'Three' and send it back to run the report.
How can i get the list of defined values in the parameter validate-event ?
Find more posts tagged with
Comments
averma
Hi Gremlin,
If the list is derived from a data set, you could store the data set values in a javascript list (use onFetch event handler) and use that for validation.
Ashwini
Gremlin
Hi Ashwini,<br />
<br />
thanks for your reply. I tried some kind of this.<br />
I just created a static list in code but failed when using the reportContext.setPersistentGlobalVariables to carry the list to validate-event. <br />
<br />
I have the same effect when using a global javascript variable. It's unknown in validate-event.<br />
<br />
I'm actually using Version 2.5.2 of Birt. <br />
<br />
If you have the time, please try it out. Maybe i make a foolish mistake.<br />
<br />
An other aspect on this. Yesterday i browsing thru the java classes, i found this part in ScalarParameterHandle :<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>/**
* Sets the flag indicates that whether the value must match one of values
* in the selection list.
*
*
@param
mustMatch
* <code>true</code> if the value must match one of values in the
* list, otherwise <code>false</code>.
*
@throws
SemanticException
* if the property is locked.
*/
public void setMustMatch( boolean mustMatch ) throws SemanticException
{
setBooleanProperty( MUCH_MATCH_PROP, mustMatch );
}</pre>
<br />
There seems to be a validation check inside. But where in UI or in XML-Definition File is the switch to turn it on ? <br />
<br />
Gremlin