Appointments Module in Servoy - mfModuleAppointments

Home for older / inactive topics

Re: Appointments Module in Servoy - mfModuleAppointments

Postby ROCLASI » Thu Apr 28, 2011 12:55 pm

victor.rojo wrote:I think that Postgres expect a date instead of a string.

That is correct. PostgreSQL doesn't implicitly cast strings to a date (anymore).
Robert Ivens
SAN Developer / Servoy Valued Professional / Servoy Certified Developer

ROCLASI Software Solutions / JBS Group, Partner
Mastodon: @roclasi
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5438
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium

Re: Appointments Module in Servoy - mfModuleAppointments

Postby jasantana » Thu Apr 28, 2011 1:36 pm

victor.rojo wrote:
jasantana wrote:Hi,

When I launch the solution I get this error: Cannot rander the Calendar. Please Restart the application!


Hi, did you import the solution in a Postgres db?

I also had this error. The problem is in
Code: Select all
   var apptDataset = databaseManager.getDataSetByQuery(datasource,
      sqlQuery, [globals.mfcal_g_getUserIDx(),
      utils.dateFormat(monthViewStartDate, 'yyyy-MM-dd HH:mm:ss'),
      utils.dateFormat(monthViewlastTime, 'yyyy-MM-dd HH:mm:ss')], 10000);


I think that Postgres expect a date instead of a string.
I searched all the databaseManager.getDataSetByQuery and replaced the utils.dateFormat(<date>, 'yyyy-MM-dd HH:mm:ss') with <date> and it worked.



Thanks Victor that did the trick. I got it working now
User avatar
jasantana
 
Posts: 555
Joined: Tue Aug 10, 2010 11:40 am
Location: Leeds - West Yorkshire - United Kingdom

Re: Appointments Module in Servoy - mfModuleAppointments

Postby pradiptab » Thu Apr 28, 2011 4:19 pm

For this module we have used MySQL.

victor.rojo wrote:I think that Postgres expect a date instead of a string.
I searched all the databaseManager.getDataSetByQuery and replaced the utils.dateFormat(<date>, 'yyyy-MM-dd HH:mm:ss') with <date> and it worked.


Yes you are right for PG you need to use only date without any formatting.
Thanks Victor Rojo for sharing this information.
Pradipta
Mindfire Solutions
SAN Developer | Servoy Certified Developer
pradiptab
 
Posts: 59
Joined: Tue Mar 10, 2009 2:32 pm
Location: India, Orissa, Bhubaneswar

Re: Appointments Module in Servoy - mfModuleAppointments

Postby michele » Thu Apr 28, 2011 9:19 pm

Someone has tested to use this module in an application based on the servoy navigation framework ?
I receive an error ("Cannot rander the Calendar. Please Restart the application!" when the main form is opened and i can't see the months panel on the left....
michele
 
Posts: 66
Joined: Wed Feb 23, 2011 3:13 pm
Location: Brescia - Italy

Re: Appointments Module in Servoy - mfModuleAppointments

Postby jasantana » Thu Apr 28, 2011 9:53 pm

michele wrote:Someone has tested to use this module in an application based on the servoy navigation framework ?
I receive an error ("Cannot rander the Calendar. Please Restart the application!" when the main form is opened and i can't see the months panel on the left....


I think the solution for your problem is some posts ago. It might be the SQL to retrieve the data and the dates format
User avatar
jasantana
 
Posts: 555
Joined: Tue Aug 10, 2010 11:40 am
Location: Leeds - West Yorkshire - United Kingdom

Re: Appointments Module in Servoy - mfModuleAppointments

Postby michele » Fri Apr 29, 2011 9:31 pm

jasantana wrote:
michele wrote:Someone has tested to use this module in an application based on the servoy navigation framework ?
I receive an error ("Cannot rander the Calendar. Please Restart the application!" when the main form is opened and i can't see the months panel on the left....


I think the solution for your problem is some posts ago. It might be the SQL to retrieve the data and the dates format


I think this is not the same problem. I have corrected the rows with the problem explained some posts ago. In fact if i run the module in standalone mode it is all ok. The problem is only when i attempt ro run the module into my application that works with the servoy navigation framework.....i don't know which is the problem...i am not an expert in Servoy....i use it since the beginning of this year and i come from Visual Foxpro not from Java....i have seen that the error message appears every time an error is found in the "try" structure....the message is in the "catch" part.... and the result is that the months in the left side of the form are not present after the error....
michele
 
Posts: 66
Joined: Wed Feb 23, 2011 3:13 pm
Location: Brescia - Italy

Re: Appointments Module in Servoy - mfModuleAppointments

Postby michele » Fri Apr 29, 2011 9:53 pm

I have commented the try/catch structure and i have found that the program find this error

"TypeError: Cannot call method "getFullYear" of null "

on this statement

var navEndDate = new Date(navCalStartDate.getFullYear(),
navCalStartDate.getMonth() + 3,
navCalStartDate.getDate());

what can i try ?
michele
 
Posts: 66
Joined: Wed Feb 23, 2011 3:13 pm
Location: Brescia - Italy

Re: Appointments Module in Servoy - mfModuleAppointments

Postby ROCLASI » Fri Apr 29, 2011 11:54 pm

So the variable navCalStartDate holds null. Where does is get set ?
Robert Ivens
SAN Developer / Servoy Valued Professional / Servoy Certified Developer

ROCLASI Software Solutions / JBS Group, Partner
Mastodon: @roclasi
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5438
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium

Re: Appointments Module in Servoy - mfModuleAppointments

Postby CHAUMARET » Sat Apr 30, 2011 10:23 am

Thank you !
CHAUMARET
 
Posts: 20
Joined: Sun Aug 23, 2009 5:20 pm
Location: France

Re: Appointments Module in Servoy - mfModuleAppointments

Postby michele » Sat Apr 30, 2011 3:27 pm

The previous error was generated by another try/catch structure taht goes in error....commented also this try/catch and the first error seems to be this:

Exception Object: org.mozilla.javascript.EvaluatorException: Can't find method com.servoy.j2db.scripting.solutionmodel.JSForm.js_newLabel(string,number,number,null,number). (K:\servoy_workspace\mfModuleAppointments\forms\mfcal_main.js#187)
MSG: Can't find method com.servoy.j2db.scripting.solutionmodel.JSForm.js_newLabel(string,number,number,null,number). (K:\servoy_workspace\mfModuleAppointments\forms\mfcal_main.js#187)
Can't find method com.servoy.j2db.scripting.solutionmodel.JSForm.js_newLabel(string,number,number,null,number). (K:\servoy_workspace\mfModuleAppointments\forms\mfcal_main.js#187)

with(frmObj.newLabel('', colCnt * cellWidth , 0, cellWidth, (cellNormalHeight * 21) + (headerCellHeight * 3)))
michele
 
Posts: 66
Joined: Wed Feb 23, 2011 3:13 pm
Location: Brescia - Italy

Re: Appointments Module in Servoy - mfModuleAppointments

Postby jcompagner » Mon May 02, 2011 10:35 am

how is there a 'null' in this:

string,number,number,null,number

that should also be a number.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8829
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Appointments Module in Servoy - mfModuleAppointments

Postby michele » Mon May 02, 2011 2:40 pm

The problem is that when i use this module in my application and i run it, the form when is loaded is lined to the requested table, but doesn't see the record stored in it....so the null values returned...and all the problems in the creation of the form....if i set the values, normally read from the table, manually all seems to run without problem...but if i attempt to read data from the parameters tables no records are displayed..i don't know why....
michele
 
Posts: 66
Joined: Wed Feb 23, 2011 3:13 pm
Location: Brescia - Italy

Re: Appointments Module in Servoy - mfModuleAppointments

Postby michele » Tue May 03, 2011 10:35 am

My application works with another server name that is different from the original (schedule). All ther tables are in my server and i have checked that all entries in files in workspace haven't references to old server name (schedule) and have only references to my server's name (approdo).
The problem is still present. When i open the form the record in the tbl_preference table is not read.....and if i enter the settings form i can't see the data stored in the table. I can save new appointments and search all old appointments....In the settings form i can't see the appointment's type table, but if i insert a new appointment i can see the valuelist of the appointment's type....

I don't know what verify anymore....
michele
 
Posts: 66
Joined: Wed Feb 23, 2011 3:13 pm
Location: Brescia - Italy

Re: Appointments Module in Servoy - mfModuleAppointments

Postby michele » Wed May 04, 2011 4:45 pm

The problem has been resolved. The appointments module can runs in standalone mode or as module in another application. When starts in standalone there is a method in onShow that execute some statements and between these there is a loadallrecords() of the main form. If the module is inserted in another application the onShow is not executed.....if i put the loadallrecords() before calling the main form it is all ok.

The only problem is still present is that when i call the main form from another application and i attempt to call the full method present in onshow of the module it runs correct only the first time, while the next it shows an error message.....

xception Object: java.lang.RuntimeException: Couldn't start the scheduler! Unable to store Job with name: 'showAlert' and group: '13DDEB9A-2C32-469E-970B-0F0F5E9149A6', because one already exists with this identification.
michele
 
Posts: 66
Joined: Wed Feb 23, 2011 3:13 pm
Location: Brescia - Italy

Re: Appointments Module in Servoy - mfModuleAppointments

Postby jasantana » Wed May 04, 2011 5:54 pm

@pradiptab

Good afternoon from Gran Canaria. First I want to thank you for this contribution, it is a very good one.

I have been trying to make it work as a module in one solution and I do not know how to get something. What I need is to share my solution navigator and to do that I created a new form in my solution that extends mfcal_main and set the navigator to my own, but it does not work as expected and do not know why. Have you tried to get that?

Thanks in advance
User avatar
jasantana
 
Posts: 555
Joined: Tue Aug 10, 2010 11:40 am
Location: Leeds - West Yorkshire - United Kingdom

PreviousNext

Return to Archive

Who is online

Users browsing this forum: No registered users and 1 guest