topleft
topright

Topics

ServoyCamp Login



New Users

                 

Online Users

No users online!
Tips

Easy (semi) automatic update of your PostgreSQL database sequences

 

When using dbidenty as sequence type in Servoy for your PostgreSQL table you are in fact using a sequence object inside the PostgreSQL database.

Servoy queries this sequence object when it creates a new record for you and stores it in the PK column.

Now sometimes this sequence might be out of sync because you imported data (with PK values) that have higher values than the sequence or perhaps you want to reset the sequence after a big purge of your data.

PostgreSQL has a simple command to update the sequence using SQL:

 

SELECT setval('sequenceName', value); 

 

So you could use SQL to get the correct value for your  sequence:

 

SELECT setval('sequenceName', (SELECT MAX(pkColumn) FROM tableName)+1);

 

Of course if you need to update ALL your sequences in your database this will be a daunting task, especially when you still modeling your tables.

Sure it's easy to fetch all sequence names but then you still need to parse it all into usable SQL that you can fire off at your database.

Turns out that this is an old problem. Michael Fuhr, a PostgreSQL community member, already solved this in 2004 in a post to the pgsql-general mailing list.

 

Please login or register to see the full article
 

Get installed plugins info

The reason why some issues could occur (I'm never using the word 'bug' ;-) ), is a wrong plugin version on the application server, or even worse, a required plugin is not installed at all.

This is a handy way to display plugins info in the client: a dialog that shows all installed plugins, including version (if available):

Please login or register to see the full article
 

Tuning your Servoy Look & Feel

Hi there,


yesterday, Johan posted a nice method on the forum, for tuning your font's inside your Look & Feel of your Servoy solution. But the problem was that, fonts, of text & buttons in the plugins.dialogs plugin, were not changed so we dived into this, to see how we could fix that :)

Please login or register to see the full article
 

Eclipse Tips!

 

1. Show active workspace in Eclipse

 

It is pretty hard to see in what workspace you are working, so it would be nice to have the name of the active workspace in the menubar. This is possible by inserting this argument in the servoy.ini file:
eclipse -showlocation
(The .ini file for Mac users is located in servoy.app/Contents/MacOS/)

 

Please login or register to see the full article
 

Check Java-version in Servoy Client Page

Servoy has changed/updated the java applet in version 5.2.2, in this page: http://localhost:8080/autoinstallvm.html

In the old version it shows a strange Java version:

old java applet

Please login or register to see the full article
 

Tip: Servoy webclient the sexy way!

Hi there,

ever wanted to get rid of those ugly blue servoy-webclient tabpanels?

resulting in this sexy looking tabpanels:

this can be done, solution-wide in a few simple steps, want to know more? Read on.... :-)

Please login or register to see the full article
 

Insert i18n values from workspace into database

For some time a few developers (including me) were struggling getting i18n values, created in Servoy 5 developer into the (development) database.

Before Servoy 5, i18n keys were directly created in the database messages table, but since Servoy 5 the location of the keys changed to files in the eclipse workspace. So in order to get the i18n values into the database, an export and import of a solution was needed.

Too much hassle for me, so I made this little method :).

Please login or register to see the full article
 

Creating PDFs from Documents

In a recent project, I was tasked with creating PDFs from Word documents.  As you already know, creating PDFs from printable Servoy objects is not too hard, but creating from documents that Servoy stores or manipulates is not as straightforward.  With the help of two open source projects, I was able to create a system that converts documents to PDFs (or to other types of documents as well).

 

The steps to setup a PDF converter:

  1. Create an OpenOffice service (or run OpenOffice headless).
  2. Create a JODConverter web service on the Application Server.
  3. Write code in Servoy to utilize the web service, passing a document to the web service and receiving the PDF from the web service.
Please login or register to see the full article
 

TIP: Opensource Project Management tool

When working with a team of (Servoy) developers, it's definetly nice to have a (central) system to manage todo's for application development projects.

At STB Automatisering, we're working for a while now with RETROSPECTIVA, a very nice opensource Project Management tool with many cool features, like a Blog, Wiki, Milestones, Ticketsystem, etc.

It's opensource, so check it out :)

Retrospectiva overview

 

Tip: Great online SVN book

Hi all,

I was in a hotel last night, doing some surfing about SVN & branching. And I found this great book:

http://svnbook.red-bean.com/en/1.1/

Please login or register to see the full article
 
<< Start < Prev 1 2 Next > End >>

Page 1 of 2