Hi @Wilky. This extension is great. I was just wondering if it's possible to use it to upload files to a socket server, something similar what this extension does.
Hi @Wilky. This extension is great. I was just wondering if it's possible to use it to upload files to a socket server, something similar what this extension does.
@okello: Thanks! Yeah, I think it could be an interesting feature! I'll give it a look as soon as possibleThanks for the suggestion!
Does this work with TreeStore? I got it to work with node.js's ws module using your grid example so I decided to test out the TreeStore and got an error:
The error happens even before the socket connects. I can have my socket server turned off and I see this error instantly when I refresh the page. This indicates that with tree store it tries to use the proxy before the connection is available to send anything.InvalidStateError: An attempt was made to use an object that is not, or is no longer, usable
this.ws.send (Ext.JSON.encode (msg));
WebSocket.js line 454
I followed the extjs 4 documentation, but maybe I setup something wrong.
Issue I submitted.Code:Ext.require (["*"]); Ext.Loader.setConfig( { enabled: true }); Ext.onReady(function() { Ext.define("players", { extend: "Ext.data.Model", fields: [ { name: "name", type: "string" }, { name: "width", type: "int" }, { name: "height", type: "int" }, { name: "timezone", type: "int" } ], proxy: { type: "websocket", storeId: "playersStore", url: "wss://domain.com/node.js", api: { create: "createPlayers", read: "readPlayers", update: "updatePlayers", destroy: "destroyPlayers" }, reader: { type: "json", root: "children" } } }); var playersStore = Ext.create("Ext.data.TreeStore", { model: "players", storeId: "playersStore", folderSort: true }); var tree = Ext.create("Ext.tree.Panel", { title: "Players", width: 500, height: 300, renderTo: Ext.getBody(), collapsible: true, useArrows: true, rootVisible: false, store: playersStore, columns: [ { xtype: "treecolumn", text: "Name", flex: 2, sortable: true, dataIndex: "name" }, { text: "Width", flex: 1, dataIndex: "width", }, { text: "Height", flex: 1, dataIndex: "height", }, { text: "Time Zone", flex: 1, dataIndex: "timezone", } ] });
Hi ... I'm trying to include this plugin to my project. I put the folder ux in my project-folder/ext .
So, I've now in my project folder => ext\ux\data\proxy\WebSocket.js
when i run the command sencha app build, it said, faild to resolve package ext.ux.data.proxy.websocket
do you have an idea why ?
sencha cmd v4.0.1.45
thx,
I finally manage to get it work, but i've :
Failed to execute 'send' on 'WebSocket': already in CONNECTING state.
I am just starting to work with websockets so i don't know much about them yet. Would this create a new websocket connection for each store then?
Hi!
I downloaded the websocketed grid example. Created a little nodejs server to serv the client, and it is working. If i press the read it reads the data, update sends back to server.
But what I need to send from the server to client to regularly automatically update the grid without pressing any button?
thanks
HyGy
Hi, is it me or anyone else had this issue.. I'm using this WebSocket proxy and it's great until I had this problem.
why the proxy extraParams not sent to server?
note that I'm 100% sure extraParams is there but the request sent to server did not include that extraParams. for the sake of clarity this is my extraParams after calling mystore.getProxy().extraParams
but it only send this request to serverCode:{nama: "kecap", kode: "l"}Note:Code:{"event":"stock/read","data":{"sort":[{"property":"name","direction":"ASC"}],"page":1,"limit":200,"start":0}}
- I'm using ExtJS 5.0.1
Last edited by nicklaros; 16 Aug 2014 at 5:57 PM. Reason: add note
Hi! nicklaros shall I know the version and the name of the browser you are using this plugin.
Hello, I am trying to use the WebSocket plugin with Ext 4.2.2. I can see the data coming back correctly but the script fails with the above error in the completeTask: function (action, event, data) function at the following line.
var me = this , resultSet = resultSet = me.reader.read (data);
the date is coming from the server as below.
[Object]
- 0: Object
- id: "1234"
- name: "Rashed"
- riskfactor: "yes"
Console statement shows that it is failing at the read method. The error n detail is:
TypeError
- [COLOR=red !important][E] Ext.ux.WebSocket.receiveEventMessage(): (No description provided) ext-dev.js:12883[/COLOR]
- [COLOR=red !important]log[/COLOR]ext-dev.js:12883
- [COLOR=red !important]Ext.Error.Ext.extend.statics.raise[/COLOR]ext-dev.js:11979
- [COLOR=red !important]Ext.define.receiveEventMessage[/COLOR]ext/src/ux/WebSocket.js:452
- [COLOR=red !important](anonymous function)
[/COLOR]
- message: "undefined is not a function"
- sourceClass: "Ext.ux.WebSocket"
- sourceMethod: "receiveEventMessage"