[CLOSED] Remote data

Report bugs for any Extensible Components

[CLOSED] Remote data

Postby launort » Tue Oct 12, 2010 3:59 am

I do not know if it's me who takes me wrong, but I have a problem with the remote data when I want to modify the query.
The first query works perfectly when opening the calendar, then I want to change the query with other parameters the view does not refresh.

eg
Code: Select all
App = function() {
    return {
        init : function() {
        ...
         var today = new Date().clearTime();
             apiRoot = '002-Data/app.asp?action=';
         
         var proxy = new Ext.data.HttpProxy({
             api: {
                 read:    apiRoot+'view',
                 create:  apiRoot+'create',
                 update:  apiRoot+'update',
                 destroy: apiRoot+'destroy'
             }
         });
         
         var reader = new Ext.data.JsonReader({
             totalProperty: 'total',
             successProperty: 'success',
             idProperty: 'id',
             root: 'select_tbl_appl_neo_cal_user_rows',
             messageProperty: 'message',
             fields: Ext.ensible.cal.EventRecord.prototype.fields.getRange()
         });
         
         var writer = new Ext.data.JsonWriter({
             encode: true,
             writeAllFields: false
         });
         
         this.eventStore = new Ext.data.Store({
             id: 'eventStore',
             restful: true,
             proxy: proxy,
             reader: reader,
             writer: writer,
             autoSave: true,
             autoLoad: true
         });
      ...


To change the settings, I am calling the method:

Code: Select all
this.eventStore.proxy.conn.url = '...';
 this.eventStore.reload();


I tested more basically:

Code: Select all
...
    this.eventStore = new Ext.data.JsonStore({
                id: 'eventStore',
                root: 'select_tbl_appl_neo_cal_user_rows',
                proxy: new Ext.data.HttpProxy({
              url: '002-Data/app.asp?action='
           }),
      fields: Ext.ensible.cal.EventRecord.prototype.fields.getRange()
     });
...


I worked with the calendar ext 3.3.0 and I had no problem.
Have you any idea?
Thank you
Last edited by launort on Thu Oct 14, 2010 11:50 pm, edited 1 time in total.
launort
 
Posts: 14
Joined: Thu Oct 07, 2010 7:32 am

Re: Remote data

Postby brian.moeskau » Tue Oct 12, 2010 11:54 am

launort wrote:The first query works perfectly when opening the calendar, then I want to change the query with other parameters the view does not refresh.


Can you be more specific? What do you mean that the view doesn't refresh, that the same data always shows, or no data shows or what? It's hard to know what to look at since I don't have access to your back end. Do you have a public page available that I can look at? Accessing data via the store isn't really specific to the calendar stuff, so it's most likely just a more general Ext store issue of some sort, but I'm not sure.
Personal Blog: Extraneous / Twitter: @bmoeskau / Meetup: Austin Bleeding Edge Web
User avatar
brian.moeskau
Site Admin
Site Admin
 
Posts: 1344
Joined: Sat Sep 18, 2010 5:00 pm
Location: Austin, Texas

Re: [INFOREQ] Remote data

Postby launort » Wed Oct 13, 2010 12:23 am

Thank you for your reply.

To be more precise:
It's always the same data that are posted!

Here's the code:
On the first call:

Code: Select all
...
   this.eventStore = new Ext.data.JsonStore({
                storeId: 'eventStore_id',
                id: 'eventStore',
                root: 'select_tbl_appl_neo_cal_user_rows',
                proxy: new Ext.data.HttpProxy({
              url: '002-Data/app.asp?action=all'
           }),
           autoLoad: true,
      fields: Ext.ensible.cal.EventRecord.prototype.fields.getRange()
   });
...


Next to view more information:

Code: Select all
...
items: [{
    id:'app-west',
    region: 'west',
    width: 176,
    border: false,
    items: [{
        xtype: 'datepicker',
        id: 'app-nav-picker',
        cls: 'ext-cal-nav-picker',
        listeners: {
            'select': {
                fn: function(dp, dt){
                    App.calendarPanel.setStartDate(dt);
                 },
            scope: this
            }
        }
    },{
        xtype: 'extensible.calendarlist',
        store: this.calendarStore,
        border: false,
         width: 175
    },{
        xtype: 'panel',
        title: 'Option de vue',
   collapsible: true,
   autoHeight: true,
        border: false,
        width: 175,
        items:[{
            xtype: 'button',
            text: 'Mon calendrier',
            scale: 'large',
            width: 175,
       listeners: {
           'click': {
          fn: function(dp, dt){
              this.eventStore.proxy.conn.url = '002-Data/app.asp?action=me';
              this.eventStore.reload();
          }
       }
       }
...


the new query is executed properly but the data displayed does not change!

Thank you for your help.
launort
 
Posts: 14
Joined: Thu Oct 07, 2010 7:32 am

Re: [CLOSED] Remote data

Postby launort » Thu Oct 14, 2010 11:54 pm

Sorry for this post (I close), after much testing, remote data works very well.
The problem lies elsewhere: http://ext.ensible.com/forum/viewtopic.php?f=3&t=31
launort
 
Posts: 14
Joined: Thu Oct 07, 2010 7:32 am

Re: [CLOSED] Remote data

Postby hibaaryan » Sat Dec 20, 2014 12:35 am

It was fixed after alpha2, so unless you've built from the current code you won't have it. The first beta release should be coming out very soon.
hibaaryan
 
Posts: 1
Joined: Sat Dec 20, 2014 12:28 am


Return to Bugs

Who is online

Users browsing this forum: No registered users and 1 guest

cron