hiding an element in the ROM [message #202279] |
Tue, 21 November 2006 19:02  |
Eclipse User |
|
|
|
Originally posted by: goykhmanster.gmail.com
Hi all
I am trying to conditionally hide an element if a certain counter variable
reaches a certain value as rows keep rendering. However, it doesn't work,
because i don't know how to handle ROM elements via javascript. I am
using BIRT 2.0.2 and I added the following event handlers for the table:
<method name="onPrepare"><![CDATA[var countRecords =
0;]]></method>
<method name="onRender"><![CDATA[if (countRecords > 200) {
document.getElementById('107').style.display = 'none';
}]]></method>
and the following event handler for every row:
<method name="onRender"><![CDATA[countRecords++;]]></method>
The code inside 'if' statement is obviously wrong, so if someone could
point out how to hide a ROM element, i would greatly appreciate it.
Thanks
|
|
|
|
|
|
Re: hiding an element in the ROM [message #203054 is a reply to message #202488] |
Mon, 27 November 2006 11:09  |
Eclipse User |
|
|
|
Try setting this in the onRender event.
//this.getStyle().visibleFormat = "'pdf'";
//this.getStyle().visibleFormat = "'html'";
this.getStyle().visibleFormat = "'all'";
Jason
"Boris" <goykhmanster@gmail.com> wrote in message
news:7e049481b76846d31a634a9cf26fb169$1@www.eclipse.org...
> Jason
>
> Thanks for your response.
>
> The problem is, however, the element that i want to hide renders BEFORE
> the data table starts rendering. Therefore, if i use condition
> countRecords>200 for it, it will read countRecords variable's value at the
> time when it was first initialized when it is still 0.
> This is why i'm trying to execute something at the time when the table
> finishes rendering (onRender method is the right place for that, right?).
>
> Is there a way to apply a visibility property to an element dynamically
> via the script or anything else?
>
>
>
|
|
|
Powered by
FUDForum. Page generated in 1.02708 seconds