Hi there!
I’m trying to make a Servoy Bean and to do so I looked at the tutorials ‘How to build servoy bean’ but unfortunaly I haven’t found what I’m looking for.
To build my Bean, I found some interesting third-party jar files that I already have integrated in my Java test-application.
But what is this application I’m trying to make? Well, whenever the user starts my application, a connection to the database has to be made so all the data can be imported in my application. When that has happened, the user can drag&drop this data in a table to create a custom layout. By doing so, it allows him to have the same functionality as you get in the excel PivotTable wizard.
I already managed all of this by making a local Java application that is connected to a local database to retrieve the data. But now i have to transform this to a Servoy Bean. The GUI as well as all the functionality, has to stay the same. The connection to the database has to change in the future to a database stored on a server. Is there someone out there that could help me out on this one?
I’m an intern and have to make this application for the company i’m currently working for. The only knowledge I have of Servoy is building a plugin and how to use the Servoy form designer and script editor.
Thanks in advance!
Hi!
How do you connect to the DB now? JDBC?
If that’s the case and you’re using the DB’s that Servoy already support you don’t even need to get the drivers, just pass the right URL and authentication.
I don’t see anything that would make a problem to use this as a Bean in Servoy.
If you really followed Patrick’s tutorial (It’s pretty verbose sometimes!) you should already get your Bean in Servoy, or not?
jbrancoIF:
(It’s pretty verbose sometimes!)
I know, I just cannot shut up! ![Wink ;)]()
But quite frankly I cannot understand the question of the poster here: you want a bean to create Servoy’s layout???
Just doesn’t make sense to me.
…you want a bean to create Servoy’s layout???
No, the user needs to drag and drop his values into the pivot table to create a custom layout within the table NO servoy layout.
I don’t see anything that would make a problem to use this as a Bean in Servoy.
I use a JDBC connection and this works just fine when I launch the applet with AppletViewer. But when I import my applet in Servoy and use this as a bean in a form, Servoy crashes and stops working. I think it’s because it can’t make a connection to the MySQL database. I’ll try to use the DB in Servoy…
1/ an Applet’s lifecycle is not the same as a Java Bean’s, so it’s already a bad bet to use an applet directly in Servoy.
2/ if you want to use a database that is already managed by Servoy from inside Servoy you’d better leverage the public API to do so and not try to use JDBC directly. Have a look at the com.servoy.j2db.dataprocessing package in the public API, you may find what you are looking for: http://www.servoy.com/docs/public-api/6xx/
3/ is there some Exception stack trace in the servoy_log.txt? Or in your workspace/.metadata/.log file? You should always start by looking in there…
4/ to better debug your bean you should try and launch Servoy in debug mode from an Eclipse instance using the Servoy sources, then you will have better indication of what is really going on.
Hope this helps