calendar bootstrap web component does not work.

Forum to discuss the new web client version of Servoy.

calendar bootstrap web component does not work.

Postby Roberto Blasco » Mon Apr 04, 2016 4:10 pm

Hi all

I'm trying to implement a date field in my solution using bootstrap calendar component from servoy default installation.

Do I have to write an special function to deal with the date dataprovider in the web component before saving it in the database?

Web components like input text are workin right, but the date one does not work for me .....

Is it my fault? Has anybody worked with this kind of web component?

My work environment is

Version: 8.0.2 - build 3024
Postgres 9.4

Best regards. Thanks in advance.
You do not have the required permissions to view the files attached to this post.
Un saludo. Roberto.

Madrid - Spain
Tfno: (+34) 625653066
E-mail: roberto.blasco.serrano@gmail.com
User avatar
Roberto Blasco
007
 
Posts: 355
Joined: Tue Apr 08, 2008 7:18 pm
Location: Madrid / Spain

Re: calendar bootstrap web component does not work.

Postby jdbruijn » Tue Apr 05, 2016 9:04 am

Hello Roberto,
I've tried you sample and it looks like it is working correctly.
I can change the date values and those are stored in the database.
Jos de Bruijn
Focus Feedback BV
Servoy Certified Developer
Image
jdbruijn
 
Posts: 492
Joined: Sun Apr 11, 2010 6:34 pm

Re: calendar bootstrap web component does not work.

Postby Roberto Blasco » Tue Apr 05, 2016 4:24 pm

Thanks a lot jdbruijn

I'm starting to think my computer is getting crazy ...... :| :| :|

I can not retrieve any data from Date Picker Web Component.

This is again a sample solution where dataprovider from Web Component is linked to a date form variable .... and again nothing happens.

Thanks in advance. Best Regards. Roberto Blasco.
You do not have the required permissions to view the files attached to this post.
Un saludo. Roberto.

Madrid - Spain
Tfno: (+34) 625653066
E-mail: roberto.blasco.serrano@gmail.com
User avatar
Roberto Blasco
007
 
Posts: 355
Joined: Tue Apr 08, 2008 7:18 pm
Location: Madrid / Spain

Re: calendar bootstrap web component does not work.

Postby jdbruijn » Tue Apr 05, 2016 4:42 pm

That one is working also.
Jos de Bruijn
Focus Feedback BV
Servoy Certified Developer
Image
jdbruijn
 
Posts: 492
Joined: Sun Apr 11, 2010 6:34 pm

Re: calendar bootstrap web component does not work.

Postby Roberto Blasco » Tue Apr 05, 2016 5:10 pm

Thanks a lot jdbruijn ....

Time to try it in another computer and/or servoy installation .... :shock: :shock: :shock:

Best Regards. Roberto Blasco.
Un saludo. Roberto.

Madrid - Spain
Tfno: (+34) 625653066
E-mail: roberto.blasco.serrano@gmail.com
User avatar
Roberto Blasco
007
 
Posts: 355
Joined: Tue Apr 08, 2008 7:18 pm
Location: Madrid / Spain

Re: calendar bootstrap web component does not work.

Postby dfernandez » Thu Apr 07, 2016 10:08 pm

Hi Roberto,

I tried your sample and the component works fine. I can pick a date but when I click on Save data, this error appears in the log
2016-04-07 17:05 Executor,uuid:19ea7175-6358-4c07-bbe2-1e05d6c1d90a WARN org.sablo.websocket.WebsocketEndpoint Warning: Access to component calendar property dataProviderID denied (protected)

The app remains running but data is not updated into the database.

Regards
dfernandez
 
Posts: 87
Joined: Wed Feb 29, 2012 4:04 pm

Re: calendar bootstrap web component does not work.

Postby Roberto Blasco » Sat Apr 09, 2016 12:19 pm

Hi dfernandez

Thanks a lot for this point of view ...... :-)

I've rebuild the compontent provided with servoy within ".\developer\plugins\servoy_ngclient_8.0.2.3024.jar" --> "war\bootstrapcomponents\calendar

Looking up model section int the spec file.

This is servoy code ...

Code: Select all
"name": "bootstrapcomponents-calendar",
   "displayName": "Calendar",
   "version": 1,
   "icon": "servoydefault/calendar/Calendar_C16.png",
   "definition": "bootstrapcomponents/calendar/calendar.js",
   "libraries": [{"name":"moment", "version":"2.6.0", "url": "bootstrapcomponents/calendar/bootstrap-datetimepicker/js/moment.min.js", "mimetype":"text/javascript"},{"name":"moment-jdateformatparser", "version":"0.1.1", "url":"bootstrapcomponents/calendar/bootstrap-datetimepicker/js/moment-jdateformatparser.js", "mimetype":"text/javascript"},{"name":"bootstrap-datetimepicker", "version":"4.7.14", "url":"bootstrapcomponents/calendar/bootstrap-datetimepicker/js/bootstrap-datetimepicker.js", "mimetype":"text/javascript"},{"name":"bootstrap-datetimepicker", "version":"4.7.14", "url":"bootstrapcomponents/calendar/bootstrap-datetimepicker/css/bootstrap-datetimepicker.css", "mimetype":"text/css"},
{"name":"bootstrap-datetimepicker-servoy-extension", "version":"1.0", "url":"bootstrapcomponents/calendar/bootstrap-datetimepicker/css/bootstrap-datetimepicker-servoy-extension.css", "mimetype":"text/css"}],
   "model":
   {
           "dataProviderID" : { "type":"dataprovider", "pushToServer": "allow","tags": { "scope" :"design" }, "ondatachange": { "onchange":"onDataChangeMethodID", "callback":"onDataChangeCallback"}},
           "enabled" : { "type": "enabled", "blockingOn": false, "default": true, "for": ["dataProviderID","onActionMethodID","onDataChangeMethodID"] },
           "format" : {"for":["dataProviderID"] , "type" :"format"},
           "readOnly" : { "type": "protected", "blockingOn": false, "default": false,"for": ["dataProviderID","onDataChangeMethodID"] },
           "styleClass" : { "type" :"styleclass", "tags": { "scope" :"design" }, "default" : "form-control"},
           "visible" : "visible"
   },
   "handlers":
   {
           "onActionMethodID" : {
               
              "parameters":[
                        {
                            "name":"event",
                          "type":"JSEvent"
                        }
                      ]
           },
           "onDataChangeMethodID" : {
             "returns": "Boolean",
               
              "parameters":[
                        {
                            "name":"oldValue",
                          "type":"${dataproviderType}"
                        },
                        {
                            "name":"newValue",
                          "type":"${dataproviderType}"
                        },
                        {
                            "name":"event",
                          "type":"JSEvent"
                        }
                      ]
           }
   },
   "api":
   {
   }



This is my code ...

Code: Select all
{
   "name": "mypackage-datepicker",
   "displayName": "Calendar",
   "version": 1,
   "definition": "mypackage/datepicker/datepicker.js",
   "libraries": [
         {"name":"moment", "version":"2.6.0", "url": "bootstrapcomponents/calendar/bootstrap-datetimepicker/js/moment.min.js", "mimetype":"text/javascript"},
         {"name":"moment-jdateformatparser", "version":"0.1.1", "url":"bootstrapcomponents/calendar/bootstrap-datetimepicker/js/moment-jdateformatparser.js", "mimetype":"text/javascript"},
         {"name":"bootstrap-datetimepicker", "version":"4.7.14", "url":"bootstrapcomponents/calendar/bootstrap-datetimepicker/js/bootstrap-datetimepicker.js", "mimetype":"text/javascript"},
         {"name":"bootstrap-datetimepicker", "version":"4.7.14", "url":"bootstrapcomponents/calendar/bootstrap-datetimepicker/css/bootstrap-datetimepicker.css", "mimetype":"text/css"},
         {"name":"bootstrap-datetimepicker-servoy-extension", "version":"1.0", "url":"bootstrapcomponents/calendar/bootstrap-datetimepicker/css/bootstrap-datetimepicker-servoy-extension.css", "mimetype":"text/css"}],
   "model":
   {
           "dataProviderID" : { "type":"dataprovider", "pushToServer": "allow","tags": { "scope" :"design" }, "ondatachange": { "onchange":"onDataChangeMethodID", "callback":"onDataChangeCallback"}},
           "enabled" : { "type": "enabled", "blockingOn": false, "default": true, "for": ["dataProviderID","onActionMethodID","onDataChangeMethodID"] },
           "format" : {"for":["dataProviderID"] , "type" :"format"},
           "styleClass" : { "type" :"styleclass", "tags": { "scope" :"design" }, "default" : "form-control"},
           "visible" : "visible"
   },
   "handlers":
   {
           "onActionMethodID" : {
               
              "parameters":[
                        {
                            "name":"event",
                          "type":"JSEvent"
                        }
                      ]
           },
           "onDataChangeMethodID" : {
             "returns": "Boolean",
               
              "parameters":[
                        {
                            "name":"oldValue",
                          "type":"${dataproviderType}"
                        },
                        {
                            "name":"newValue",
                          "type":"${dataproviderType}"
                        },
                        {
                            "name":"event",
                          "type":"JSEvent"
                        }
                      ]
           }
   },
   "api":
   {
   }
   
}



Note that readOnly property has been removed.

And now ..... it's works !!!!!!!

This is the solution with the datepicker webcomponent modified code.

Best regards. Roberto Blasco
You do not have the required permissions to view the files attached to this post.
Un saludo. Roberto.

Madrid - Spain
Tfno: (+34) 625653066
E-mail: roberto.blasco.serrano@gmail.com
User avatar
Roberto Blasco
007
 
Posts: 355
Joined: Tue Apr 08, 2008 7:18 pm
Location: Madrid / Spain


Return to Servoy NGClient

Who is online

Users browsing this forum: No registered users and 28 guests