json,datasource,smartgwt,listgridRelated issues-Collection of common programming errors
JDelage
php ajax json
All,I’m trying to pass a stringified json object as a GET parameter but the receiving URL seems unable to decode it, I am not sure why.Here is the relevant code:Client side Json object production (works fine): function createJson(){ // This works fine. It creates a json objects with three elements, the third being an array. //(omitted code for brevity)return jsonData; }Client side ajax call (works fine):function recordSetGet(jsonData){request = createRequest();var rawSet=JSON.stringify(jsonDat
user3258586
json unicode encoding canopy python-unicode
I’m following python documentation to learn some commands etc. In this paragraph: http://docs.python.org/2/tutorial/inputoutput.html#saving-structured-data-with-json I read that I can save data structure likex=[‘text’,34,”letters”,42] using .jsonSo my code looks like:f = open(‘C:\Users\PC\Desktop\plik.txt’, ‘r+b’) x=[‘text’,34,”letters”,42] json.dump(x, f)And my IDE says that there’s an error:Unexpected error UnicodeEncodeError:What is wrong?I’m using canopy, windows 7, 32.
Jason Sundram
json d3.js queue topojson
I successfully completed the “Let’s make a map” tutorial and now want to make a world map. However, all examples I tried (a couple from mbostock) only display background graphics in chrome and firefox. I get the following error in firebug:SyntaxError: JSON.parse: unexpected character return JSON.parse(request.responseText);in d3.v3.js but I assume it starts with the following code in the index.htm:queue() .defer(d3.json, “world-110m.json”) .defer(d3.tsv, “world-country-names.tsv”) .await(ready
Dennis Kipper
php mysql json kineticjs
I hope you will understand what my problem is…I built a little T-Shirt-Shop with KineticJS.I store the stage with toJSON() in a json-string and I save that in mySQL database.Now when I try to get that string with an other page from my database and insert that string into the KineticJS functionvar stage = Kinetic.Node.create(json, ‘container’);it doesn’t work.The curious thing is that when I look into my database and I copy the whole string directly into my javascript it does work. Just the fac
tkone
jquery ajax json jquery-ajax
I have the following code:$.ajax({type: ‘get’,mode: ‘abort’,dataType: ‘json’,url: ‘http://localhost/1.php’,data: {},success: function(res){alert(res);},timeout: 10000,error: function(XMLHttpRequest, textStatus, errorThrown){alert(“ERROR L: ” + textStatus + ” (” + errorThrown + “)”);}});PHP contains only {id:1} and that’s it. When I try to parse the code as is, I get:ERROR L: parsererror (SyntaxError: Unexpected token i)from the error handler I have. If I change to dataType:’html’, Everything
Alfred Rowe
ruby-on-rails ruby json sinatra
I have a sinatra app mounted inside a rails 3.2.12 app which accepts JSON posts. The problem is that I get an error when one of the strings contains an asterisk(*) or a harsh(#) symbol. These are required because a USSD service will push data to my end point wich will contain “*712#”. I am positive its got to do with the * and # since removing them seams to work without throwing MultiJson::LoadError at /ussdpush/requests ==========================================> 399: unexpected token at ‘{“
Newbie
jquery android ajax json phonegap
Ive been developing an application in android with phonegap. can anyone help me on how can i call my webservice that outputs a JSON string through my android application via AJAX with jquery? thank you very much for the help.I have this piece of code in my Jscript:$(document).bind(“mobileinit”, function(){ $.support.cors = true; $.mobile.allowCrossDomainPages = true; });$.ajax({type: “POST”,timeout: moneTimeout,url: “http://10.0.2.2:49878/SampleProject.aspx?p_trxn_type=doLogin&p_phoneNumber=
Zvunks
php jquery json request
i have this code:$.ajax({url: ‘urlsubmit.php’,data: json_data,dataType: ‘json’,type: ‘POST’,success: function(data) {$(‘#saveResult_’+tnTopic_id).html(“OK”);if(data.indexOf(“ok”) !== -1) {$(“#saveResult_”+tnTopic_id).html(“Ok, am salvat!”);}else {$(“#saveResult_”+tnTopic_id ).html(data);//alert(“A aparut o eroare:\n\r”+data);}},error: function (jqXHR, textStatus, errorThrown) {$(‘#saveResult_’+tnTopic_id).html(textStatus + ‘ | ‘ + errorThrown + ‘ | ‘ + jqXHR.responseText);//alert(xhr.status);//a
Gurpreet Singh
python json
I have the following string {“action”:”print”,”method”:”onData”,”data”:”Madan Mohan”}I Want to deserialize to a object of class class payloadstring actionstring methodstring dataI am using python 2.6 and 2.7
Shahrooz Jefri ?
javascript json jsonp cors
I should send cross browser request and get a result.So i use jsonp request.my result is:Response: Success Message: Authentication acceptedBut my problem is the server returns json that is not valid and i get Uncaught SyntaxError: Unexpected identifier . I use angularJs,Jquery and implement a request. var ud = ‘json’ + (Math.random() * 100).toString().replace(/\./g, ”); window[ud] = function (o) {success && success(o); }; document.getElementsByTagName(‘body’)[0].appendChild((function (
Alex Poole
oracle oracle11g weblogic datasource
Facing one issue on production. Please help me out:Unexpected exception while enlisting XAConnection java.sql.SQLException: XA error: XAResource.XAER_RMFAIL start() failed on resource ‘BpelDataSource_oss-prod1’: XAER_RMFAIL : Resource manager is unavailable javax.transaction.xa.XAException: Internal error: XAResource ‘BpelDataSource_oss-prod1’ is unavailable at weblogic.transaction.internal.XAResourceDescriptor.checkResource(XAResourceDescriptor.java:948) at weblogic.transaction.internal.XAResou
ArtK
c# .net listbox datasource
I have a ListBox that has IEnumerable List<PhoneNumber> as DataSource. PhoneNumber class has 2 properties Number and Type. I want to display Number and Type in separate columns so I set MultiColumn property to true bur now how do I assign DisplayMembers to individual columns? And since we are on a topic of ListBox, how do you change background color of individual lines in ListBox?
Nix
c# datagridview datasource
I have a DataGrid on a Win Form that display perfectly when I initially set the datasource. The AutoSizeColumnsMode is “DisplayCells”. When I change the datasource during runtime the rows do not autosize unless I re-order a column. Does anyone know how to fix this? Also note that the DataGrid is on a different Tab than the button that calls the update.The only code that I ever use to populate the grid is:dgUnPrinted.DataSource = TableName; dgUnPrinted.Refresh();
Iain Holder
c# winforms data-binding datagridview datasource
I’m not even sure if i’m doing this correctly. But basically I have a list of objects that are built out of a class. From there, I am binding the list to a datagrid view that is on a Windows Form (C#)From there, it shows all the public properties of the object, in the datagrid view. However there is some properties that i still need accessible from other parts of my application, but aren’t really required to be visible in the DataGridView. So is there an attribute or something similar that I can
Jason Marcell
linq grid datasource devexpress
I have a DevExpress grid (DevExpress.XtraGrid.GridControl 8.2) with a datasource set at runtime like so:private DataContext db = new DataContext(“connection string”); gridControl.DataSource = from t in db.sometableselect new{Field1 = t.Name,Field2 = t.Email,Field3 = t.City};This means that the view has no idea what the data is going to look like at design time. I like being able to set a LINQ query as the datasource, but I’d also like to specify what the view will look like at design time.Is the
MPelletier
grails datasource sql-server-express
I would like some help about setting Grails to work with SQL Server Express. I know i have to change the datasource, but i’m not sure exactly what to do, and couldnt find updated information on the web.Thanks in advance, JM
PaN1C_Showt1Me
wpf sorting datasource optimal
Many WPF examples use CollectionViewSource as DataSource for DataBinding. It provides sorting and other useful functions. My question is, shouldn’t this be done in Database? I mean in SQL? I bet it’s 10times quicker. Isn’t CollectionViewSource too slow? Thanks
Johnny C.
web-services grails datasource
I’ve read a lot about switching between multiple datasource on runtime, but as far as I understand they’re already defined datasources. I’m not quite sure on how can I just asign the datasources properties on runtime from a webservice call.I don’t need to switch between datasources, just need to create only one datasource with conection data coming from a webservice. Is there a way to retrieve these parameters from the webservice and create the datasource from that?The policy here is to retrieve
Jeremy Mullin
java spring datasource
I’m implementing an AbstractRoutingDataSource and it works quite well for mapping user requests to the correct DataSource at runtime. Some of my beans have a DataSourceTransactionManager injected, however, and I now have X instances. Is there some other proxy that can sit on top of those transaction managers just like AbstractRoutingDataSource sits on top of the DataSources?
fatcat1111
reporting-services datasource reportingservices-2008
I have an ASP.Net Web site that displays various SSRS reports using the Microsoft Report Viewer Control. I need to be able to specify a data source at runtime. It seems like I should be able to just specify the name of a “shared” data source when I render the report, but I sure can’t find a way to do that. The only thing I’ve found so far that works is to use an “embedded” data source. I’m not real crazy about that, but if that’s my only option it will have to do.Anybody know how to specify a sh
Lamar McAdory
smartgwt selenium-ide
I’m trying to create test cases with Selenium on a GUI built using smartGWT2.4 I have told Selenium where to find the user-extensions for both core and IDE. The problem is it keeps throwing a Unexpected Error Exception. It cannot find autWindow.isc. Then it points me to line 17 within the user-extensions.js. I’ve researched and could not find a solution to this problem. Is this a known problem, is there a solution? I can get Selenium to work if I roll back the IDE to a later version, but I wante
Ashika Umanga Umagiliya
java gwt smartgwt gwt-ext
Greetings , I have been using GWT for few weeks and wanted a rich Table widget.I came across with SmartGWT library. Can I use SmartGWT widgets same way I develop using GWT or is there any special things I need to know ?thanks
Emil D
gwt smartgwt gwt-rpc
I have a question about the Communication between a client and a server.I would like to create a GWT application that can do the following:The client A fires an event to the server and the server in his turn fire an event to the client B. Here the client B has to be able to listen to the event all the time.I wanted to send some event with few data in real time to a connected client B. is that possible? and if yes how can I do that?Thanks
rich
java gwt exception-handling smartgwt
I’ve been working on a project which uses GWT (and SmartGWT), which is (are) new to me.Whenever runtime exceptions are thrown in the client (no RPCs involved) nothing happens. By that I mean the method does not continue executing, there are no alerts, there is nothing in the Javascript error console or the SmartGWT error console.I’m assuming this isn’t normal practice in GWT applications. Where are these errors (e.g. null pointers) normally logged/handled?Thanks in advance.
Bozho
java firefox smartgwt
Does anyone know a ‘nice’ way to prevent SmartGWT from creating TextItem form items with the spellcheck=”true” set? It’s annoying to get spellcheck markers on name fields etc.The nuclear option is to hack out the problem js code from the smartGWT library, or replace the js method at runtime with: formItem.setAttribute(“getBrowserSpellCheck”, JavaScriptObject.createFunction());But this is clearly not an ideal approach.
a question
java javascript exception gwt smartgwt
I got Exception java.lang.NoSuchFieldError: reportUnusedDeclaredThrownExceptionIncludeDocCommentReference outside eclipse in command line using maven.The gwt libraries are declared at the top of list of dependencies and GWT 2.5.1 is being used. How to solve this issue? Please help
gnat
java gwt smartgwt jre
Possible Duplicate:How to find out which Java classes are missing in GWT (client side)? Help, prompt me which packages and classes from JDK (java.*) I can use in GWT web project and which I can’t use?
Victor Kiricheiko
java cross-browser smartgwt treegrid
i’m trying to add a treeGrid to my project. I added it, but after testing in different browsers i got very bad results:1)Firefoxno Formating at all, for open category i should click on screen until find this icons2)IE show where should be open category icons, but on click do not open them3)Google Chrome Work just as i want, formating subcategory, show places where icons should be=)yea, i know that i should add icons, but problem not in them. How can i fix view in firefox and open categories in I
Marcel Piquet
java css gwt smartgwt
I would like to know if and how it is possible working on SmartGWT to change the class associated to an element at runtime.Take for example the underlying code that renders contents inside a div, I would like to know if and how I can modify at runtime the css class associated to the div.HTMLFlow productInfo = new HTMLFlow(productInfoHtml);productInfo.setStyleName(“loginProductInfo”);productInfo.setHeight(13);productInfo.setMargin(5);Note: I’m using Smart GWT version 4.0
SpursP
smartgwt
I am getting below errors when I use listGrid.setData(some array)SEVERE: Unhandled Exception in com.google.gwt.core.client.JavaScriptException: (null) @com.smartgwt.client.widgets.Canvas::redraw()([]): nullcom.google.gwt.logging.server.RemoteLoggingService Util logOnServer SEVERE: Unhandled Exception in com.google.gwt.core.client.JavaScriptException: (null) @com.google.gwt.core.client.impl.Impl::apply(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;) ([JavaScript object(2955), JavaScript
Till Helge
json datasource smartgwt listgrid
I have created a REST API at URL: http://localhost:8888/rest/contacts with this JSON output:{“contact”: {“address”: [{“city”:”Shanghai”,”street”:”Long Hua Street”},{“city”:”Shanghai”,”street”:”Dong Quan Street”}],”id”: “huangyim”,”name”: “Huang Yi Ming”} }I want to print only the id value in a smartGWT ListGrid.public class ExampleEntry implements EntryPoint {#Overridepublic void onModuleLoad() {DataSource dataSource = new DataSource(); dataSource.setDataFormat(DSDataFormat.JSON); dataSource.s
Web site is in building