jQWidgets Forums

Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts

  • cflowers
    Participant

    check your webpack.config.js. This is working for me –
    module: {
    loaders: [
    { test: /\.ts$/, loader: ‘ts’, query: { silent: true } },


    cflowers
    Participant

    Working. Had to change webpack.cnfig.js to
    { test: /\.ts$/, loader: ‘ts’, query: { silent: true } },


    cflowers
    Participant

    For anyone looking to see how I solved this issue:

           [WebMethod(EnableSession = true)]
            [ScriptMethod(UseHttpGet = false, ResponseFormat = ResponseFormat.Json)]
            public object GetIntellisense(/*string corrkey, string reportName, string paramName,*/ string pattern) 
            {
                try
                {
                    Context.Response.Clear();
                    Context.Response.ContentType = "application/json";
                    using (var proxy = GTS.Client.GTSWebServiceFactory.CreateReportProxy())
                    {
                        List<Intellisense> intellisenseList = new List<Intellisense>();
                        List<string> names = proxy.GetReportIntellisense("DocumentActivity", "DocumentSearch", pattern + "%");
                        for (int i = 0; i < names.Count; i++)
                        {
                            Intellisense x = new Intellisense();
                            x.Name = names[i];
                            intellisenseList.Add(x);
                        }
                        proxy.Close();
                        JavaScriptSerializer js = new JavaScriptSerializer();
                        string json = js.Serialize(intellisenseList);
                        object oJson = js.DeserializeObject(json); // needed to deserialize object before returning.
                        return oJson;
                    }
                }
                catch (Exception exc)
                {
                    GTS.Logging.Log.Warn("error getting intellisense", exc);
                    throw new Exception(exc.Message);
                }
            }
     $("#documentName").jqxInput({
                    source: function (pattern, response) {
                        var dataAdapter = new $.jqx.dataAdapter
    	                (
    	                    {
    	                        type: 'POST',
    	                        dataType: 'json',
    	                        async: true,
    	                        url: "Reports.asmx/GetIntellisense",
                                datafields: [
                            	    { name: 'Name', type: 'string' }
                                ],
                               
                                cache: false,
                                contentType: 'application/json; charset=utf-8',
    	                    },
    	                    {
    	                        autoBind: true,
    	                        formatData: function (data) {
    	                            data.pattern = pattern;  // make sure name is same as paramater
    	                            return JSON.stringify(data); // Needed to stringify data
    	                        },
    	                        loadComplete: function (data) {
    	                            if (data.d.length > 0) {
    	                                response($.map(data.d, function (item) {
    	                                    return item.Name
    	                                }));
    	                            }
    	                        },
    	                        loadError: function (xhr, status, error) {
    	                            alert(error + xhr.responseText);
    	                        }
    	                    }
    	                );
    
                    },
    
                    placeHolder: "Enter a document name",
                    height: 25,
                    width: 200,
                    theme: theme,
                    minLength: 1    // MINIMUM 1 CHARACTER TO START WITH.
                });
Viewing 3 posts - 1 through 3 (of 3 total)