Page.tag containing a single view

Dear ScadaBR Users and Developers,

We are faced with a complicated schema of a control system. To reduce this complexity, we are trying to implement popup windows for view components in the "global" view. For example, to take a closer look into a switch, we would like to have a popup window that displays details for that switch (number of shifts so far etc.). To realize this, one approach is to associate a view component with a certain (popup) view, so this view can be customized through the familiar interfaces and be adapted by the user.

To this end we have defined an onclick action for the component in question which calls javascript open.window() to open a popupViews.shtm. This .shtm should be a stripped down version of the views.shtm (i.e. without a top menu and such). In the process, I tried to strip down the page.tag to get a barePage.tag without menus and just displaying a view. Within this .tag, there is a test that reads

 <c:if test="${!simple}">

Now this might do what I need, i.e. get a simpler version of the .tag skeleton. My first question is how to specify that simple variable? And then does this help me at all, because when I delete these lines, the view is not correctly loaded because a style gets not set correctly then. I assume it is the one in

 <span id="__header__alarmLevelDiv" style="display:none;">

Does my approach (and my explanations) make sense? Could you give me a hint on how to proceed?

Best Regards

Hello there,

I think i understood - correct me if I´m wrong:

You recompiled ScadaBR, creating a new view page, exclusively to show in popup window mode right? It´s a way to do things. You can access the data, but not without altering in the code, how the html tags are created. ScadaBR does not supporte multiple views opened in the same browser because of how it creates the html interface. 

What we´ve done already - create JS and JQuery popups with the html tags. Use the server side scripts to create functions to refresh data in the popup or alter values. You stick with 1 window, no recompiling required and save time.

Hope that helps, If you need further help in this, please, let us know!


Thanks for your comment Diego! You understood correctly.

I use an ugly workaround to hide the html tags that belong to the ScadaBR header, i.e. disable the link to events and the images. Now I can open a popup window with an arbitrary view ID. Next step would be to define a popup view for each view component - this should be done in the Java object. A little awkward, but then the user could configure the popup using the viewEdit interface.

Your approach sounds nice because of only using JS. Can you give me a link to an example of your approach? We are using ScadaBR 0.9.1 with few additions from the SVN repo (e.g. fullscreen functionality...).

Thanks again and Best Regards,


Hello again Michael,

The sollution we found was this:

HTML Component:


<script language="javascript" type="">
var popAlerta = 0;
function verificaAlerta(pointAlerta){
if(pointAlerta==1 && popAlerta==0){
    document.getElementById('alertaPopup').style.display = 'inline';
if(pointAlerta==0 && popAlerta==1){
     document.getElementById('alertaPopup').style.display = 'none';
function fechaAlerta(){
      document.getElementById('alertaPopup').style.display = 'none';
<DIV id="alertaPopup" style="display:none; position:absolute; top:0px; left:0px;" > 
<table  style= "background-image: url('/ScadaBR/images/Popup-Alerta.png');" width="1366px" height="768px" >
<td style="position:absolute; top:225px; left:625px;"><img src="/ScadaBR/images/Icone-Alerta-Notificacao.png"></tr>
<td style="position:absolute; top:345px; left:445px;"><font size=4px>Atenção! Identificamos um erro de conexão com<br>algum dos dispositivos do sistema. Por favor, contate<br>um responsável técnico para verificar as instalações<br>e realizar os ajustes necessários.</font></td>
<td style="position:absolute; top:460px; left:485px;"><img onClick="fechaAlerta();" src="/ScadaBR/images/Botao-Recarregar.png"/></td>
<td style="position:absolute; top:460px; left:710px;"><img onClick="fechaAlerta();" src="/ScadaBR/images/Botao-Cancelar.png"/></td>
Server Side Script Component:
return "<script>verificaAlerta("+value+");</script>";
So, as you may guess, Popup-Alerta.png is a full-size image with transparency in it´s boarders. This emulates a popup screen without creating one. The server side script only calls the function to verify the data from the alarme and display the alarm div.
This is one way to do things! There are infinite =]
Share with us your sollution! 

Hello again Diego! Thanks for your input.

As already mentioned, my solution was to remove the link and hide the divs in the header that are not needed

<table width="100%" cellspacing="0" cellpadding="0" border="0" id="mainHeader">
<td align="center" width="99%" id="eventsRow">
<span id="__header__alarmLevelDiv" style="display:none;">
<img id="__header__alarmLevelImg" style="visibility:hidden" src="images/spacer.gif" alt="" border="0" title=""/>
<span id="__header__alarmLevelText" style="display:none;"></span>
This way we can use the existing:
<c:if test="${!empty currentView}">
<tag:displayView view="${currentView}" emptyMessageKey="views.noViews" />
In the end, we wrote our own ViewController and augmented the ViewComponent class for a popup window :) Changes are across many files by now and do not fit in here (in a meaningful way).
Best Regards



Glad you could work it out!