Customizing the NG Client - documentation

Forum to discuss the new web client version of Servoy.

Customizing the NG Client - documentation

Postby huber » Fri Jan 12, 2018 5:18 pm

Hi

In the Servoy documentation https://wiki.servoy.com/display/DOCS/Customizing+the+NG+Client it says to put them in a templates folder. I assume to put there the non customised versions. Where to put the customised versions? In ROOT. How are they accessed? For example for the template sessionExpiredView.html?

An example would be helpful.

Regards,
Robert Huber
7r AG, Switzerland
SAN Developer
http://www.seven-r.ch
User avatar
huber
 
Posts: 516
Joined: Mon May 14, 2012 11:31 pm

Re: Customizing the NG Client - documentation

Postby mboegem » Fri Jan 12, 2018 10:04 pm

Hi Robert,

reading the documentation page you mentioned, I assume these example templates are the build-in templates used by the NG-client.
If you want to customise one or more, you need to create a 'templates' folder in the application_server/server/webapps/ROOT folder.
Then create a html file(s) with the exact name(s) like the ones mentioned in the documentation.

You can start using the content from the documentation, make a minor change (for example: add a word) and see if this works.

Hope this helps.
Marc Boegem
Solutiative / JBS Group, Partner
• Servoy Certified Developer
• Servoy Valued Professional
• Freelance Developer

Image

Partner of Tower - The most powerful Git client for Mac and Windows
User avatar
mboegem
 
Posts: 1743
Joined: Sun Oct 14, 2007 1:34 pm
Location: Amsterdam

Re: Customizing the NG Client - documentation

Postby huber » Fri Jan 12, 2018 10:25 pm

Hi Marc

Thanks for your suggestion. That's exactly what I did. I created the templates folder in ROOT, duplicated some of the examples, made a minor text change in it and checked. With no success. Also restarted the server etc. Although I have to say a template is for me the blue print, not the real thing used, so it sounds a bit strange to me to put the real code into a folder called templates. I would expect the templates to be in this folder and the real thing in ROOT or another appropriate location.

Also tried the servoy.webclient.pageexpired.page: property pointing to a html file but with no success either.

My goal is to inform users if for example the max number of licences are exceeded or the session is expired etc. That would be helpful to users.

Thanks and best regards,
Robert Huber
7r AG, Switzerland
SAN Developer
http://www.seven-r.ch
User avatar
huber
 
Posts: 516
Joined: Mon May 14, 2012 11:31 pm

Re: Customizing the NG Client - documentation

Postby emera » Mon Jan 15, 2018 10:12 am

Hi,

For now the templates are overwritten only in a war export (I will update the docs). You need Servoy 8.2.2 in order for this to work.
When setting the servoy.webclient.pageexpired.page property, did you put that file in the templates folder?

Regards,
Edit
emera
 
Posts: 44
Joined: Tue Jun 17, 2014 8:33 am

Re: Customizing the NG Client - documentation

Postby emera » Mon Jan 15, 2018 10:30 am

I created a case to make the templates also visible in the developer: https://support.servoy.com/browse/SVY-12045
emera
 
Posts: 44
Joined: Tue Jun 17, 2014 8:33 am

Re: Customizing the NG Client - documentation

Postby huber » Mon Jan 15, 2018 12:38 pm

Hi Edit

I currently work with Servoy version 8.1.4. I am not completely sure anymore at what locations I did put and test the file(s). Do I understand you correctly they should be put in the templates folder under ROOT?

By the way, in the Docu, URL: https://wiki.servoy.com/display/DOCS/Cu ... +NG+Client, there is the description ... placing them in a templates folder in ROOT (application_server/server/webapps).

Using Tomcat, this location (path) is not the mentioned one, but at <Tomcat installation>/webapps/ROOR/templates. Is this correct?

Do you mean the whole mechanism only works with Servoy 8.2.2 or do you mean the templates are only overwritten in a war export starting with version 8.2.2?

Thanks for your clarification.

Best regards,

emera wrote:Hi,

For now the templates are overwritten only in a war export (I will update the docs). You need Servoy 8.2.2 in order for this to work.
When setting the servoy.webclient.pageexpired.page property, did you put that file in the templates folder?

Regards,
Edit
Robert Huber
7r AG, Switzerland
SAN Developer
http://www.seven-r.ch
User avatar
huber
 
Posts: 516
Joined: Mon May 14, 2012 11:31 pm

Re: Customizing the NG Client - documentation

Postby emera » Mon Jan 15, 2018 1:17 pm

Hi Robert,

Overwriting templates in a war export only works starting with version 8.2.2. When doing the war export the templates folder is copied from the <Servoy8.2.2 installation path>/application_server/server/webapps/ROOT to the war file.

In Servoy 8.1.4 the templates cannot be overwritten at war export.
You should either upgrade, or try to put them directly in your unpacked war file, in the webapps folder of your tomcat installation.
e.g. your war file is called crm.war and tomcat home is C:\tomcat8, you will have to put your templates into C:\tomcat8\webapps\crm\templates.
I hope it helps.

Regards,
Edit
emera
 
Posts: 44
Joined: Tue Jun 17, 2014 8:33 am

Re: Customizing the NG Client - documentation

Postby huber » Wed Jan 17, 2018 10:55 am

Hi Edit

Thanks for the details. Having for example the file maintenanceView.html in the location ... /webapps/<mysolution>/templates/, I assume it's called when I set the Servoy application server in maintenance mode. Is this correct? Are the files in the templates folder referenced the application server by their given names, i. e. maintenanceView.html, sessionExpiredView.html, ...?

Now, I expect if I put the Servoy application server into maintenance mode, that I get the content of the maintenanceView.html file (The server is in maintenance mode ...) displayed when starting my NG Client application. But I only get an empty white page (with no message)!?

Regards,
Robert Huber
7r AG, Switzerland
SAN Developer
http://www.seven-r.ch
User avatar
huber
 
Posts: 516
Joined: Mon May 14, 2012 11:31 pm


Return to Servoy NGClient

Who is online

Users browsing this forum: No registered users and 8 guests

cron