Customizing Ajax loader in Servoy 5.1.0 or higher

Can someone please show how to customize a Servoy 5.1.0 (or higher) ajax/animated-gif “loader” animation - this is the “loading” that appears in red and at the top-right corner of a Servoy webclient page, on loading a webclient page and or triggering a webclient event?

In Servoy 4.1.3 ( or earlier), you’d place a “MainPage.html” html document (which contains a link to your custom animator) in :

*…\application_server\server\webapps\ROOT\servoy-webclient\templates\default*

When we place the same “html” doc (that we have been using in vers 4) in the same path in my Servoy 5.1.0 (or higher), my Servoy application server is not able to render any webclient page at all.

Are we doing something not right here?

Would appreciate a feedback,

Thanks,

You need to get a fresh unaltered version of “MianPage.html” and then insert your customization again.

Paul

Hi Paul,

Thanks for prompt feedback.

Actually we didn’t alter our old “MainPage.html” to use in the version 5 - this is because it was already working for us in the older version. So what we did was that we picked that file, unaltered, and put it the same folder in the version 5.

This is how the MakeUp of the file looks like:

<html xmlns:servoy>
    <head>
        <title servoy:id='title'>Container for holding a form and navigator</title>
        <style servoy:id='dynamic_css' type="text/css">
        </style>
        <link rel='stylesheet' type='text/css' href="/servoy-webclient/templates/default/servoy_web_client_default.css"/>
		<meta servoy:id='refresh' http-equiv="refresh" />
	</head>
    <body servoy:id='servoy_page' id='servoy_page' topmargin=0 leftmargin=0 bottommargin=0 rightmargin=0 bgcolor='#FFFFFF' STYLE="HEIGHT: 100%; WIDTH: 100%;overflow: auto;">
   	  <div id='mktipmsg' class='mktipmsg'></div>
	  <span style="display:none;position:absolute;left:400px;top:350px;width:200px; height:100px; background-color:#FFFFFF; border-style:solid;border-width:1px;z-index:99999;filter:alpha(opacity=80);-moz-opacity:0.8;-khtml-opacity: 0.8;opacity: 0.8;" id="indicator">
<center>



<img src="LinkToMyCustomImageLoader">

Loading
</center>
</span>
	  <span servoy:id='contribution'></span> 
      <div servoy:id="modalwindow"></div>
	  <form id='servoy_dataform' servoy:id='servoy_dataform' method='post'>
	  <input servoy:id='defaultsubmitbutton' type="submit" style="top: 0px;left: 100px;width: 0px;height: 0px;position: absolute;z-index: -2" value="">
		<div servoy:id='forms'>
        	<div servoy:id="webform"></div>
        </div>
      </form>
    </body>
</html>

The above is the original , unaltered version. I tried using a very simple MakeUp file like :

<html>
    <head>
        <title>Container for holding a form and navigator</title>
    </head>
    <body><center>


<img src="LinkToMyCustomImageLoader" />

Loading
</center>
</body>
</html>

in version 5, this loads for a second or two and then it throws an “Internal error , Return to home page”

Maybe I’m missing something here in this simplified version, or what do you suggest?

Not really following what you mean/what you tried/did…

You need to get the unaltered MainPage.html from a 5.x install, edit the file to include your custom loader markup and save the file in the templates subfolder.

Paul

Hi Paul,
I have just completed a fresh 5.x install. In what sub-directory can I find the unaltered “MainPage.html” ?

connect to webdav do that folder… (http://localhost:8080/servoy-webclient/ … es/default)
How did you get that first “MainPage.html” of version 4.1??
Back then it also wasnt a real file, You also had to go to that webdav folder to get the “virtual” html file.

But it is important to know that when you upgrade servoy and you have overwritten some of our stuff in the defaults folder.
You really have to reapply your changes again to the latest edition of the “virtual” file. Because we can have changed some things in the virtual file to support new stuff.

In the next version of servoy that loading indicator is styled by us (and for you to change) and the text is an i18n key.

Hi Johan,

Thanks for the feedback.
We have the “MainPage.html” re-created and customized again, following the last guidelines given by Servoy Support.

It is now working, at least the way we wanted it - our users are so used to the old version 4 customized “Loader” and now they can have that back again.

Please be assured that nothing is broken.

Thanks for the assistance :wink: