Hi experts , I am using server side filter on my grid . I am not using JSP wrappers it is just normal kendo grid connected to servlet where to obtain data. I am giving the user to filter any coulmns as he wishes on my grid. what I am looking for is I need to translate the JSon filter made by the user to sql expression so I can use it to retreive data from the database. my Json filter representation is as below
{"logic":"and","filters":[{"field":"name","operator":"startswith","value":"ji"},{"field":"name","operator":"contains","value":"m"},{"field":"price","operator":"eq","value":"55"}]}
it is too much difficlut for me to translate it to sql expression . I have searched a lot , all I found on ASP not the JSP
please help me at least with the method/function to convert the json correctly as it is made by user on grid.
Dear Support Team ,
I have simple grid where I am getting data from Java Controller in JSON format ( all data getting at glance no sever hits for pages ). The Gird shows DATA but no page buttons are displayed to do pagination. I have also included buttoncount=5 but no success. But the grid shows the some data on the screen as per settings pagesize=5. There are total 12 records in the JSON but its shows only 5. We need your valuable support to go ahead further development. Thanks in advance...!
WE NEED YOUR SUPPORT TO RESOLVE THIS ISSUE. THANKS IN ADVANCE...!
Thanks
Shridhar
Code Samples :
<kendo:grid name="grid" style="height:380px;">
<kendo:grid-pageable refresh="true" buttonCount="5">
</kendo:grid-pageable>
<kendo:grid-columns>
<kendo:grid-column title="ID" field="id" width="90" />
<kendo:grid-column title="Name" field="name" width="200"/>
</kendo:grid-columns>
<kendo:dataSource pageSize="10">
<kendo:dataSource-transport>
<kendo:dataSource-transport-read url="${getnamesids}"/>
</kendo:dataSource-transport>
</kendo:dataSource>
</kendo:grid>
I am trying to reload contents of tabs on every click on tabs. How can I achieve this.. As I am trying to access current object in select event by using following code, but it gives error of null object.
<kendo:tabStrip name="tabstrip2" select="onSelect">
<kendo:tabStrip-items >
<kendo:tabStrip-item text="Bid Screen" selected="true" contentUrl="${ajaxContent1}"></kendo:tabStrip-item>
<kendo:tabStrip-item text="Clients" contentUrl="${ajaxContent2}"></kendo:tabStrip-item>
<kendo:tabStrip-item text="Reports" contentUrl="${ajaxContent3}"></kendo:tabStrip-item>
<kendo:tabStrip-item text="Downloads" contentUrl="${ajaxContent4}"></kendo:tabStrip-item>
</kendo:tabStrip-items>
</kendo:tabStrip>
function onSelect (e) {
var tabStrip = $("#tabStrip2").data("kendoTabStrip");
alert(tabStrip);//shows null
}
I am not using duplicate js files ,If I remove js files it does not show tabs.
thanks
I am trying to use gantt chart in a jsp file. I am using spring mvc and maven for the project. I was following the tutorial given in spring demos, but still I am not getting the result. Nothing is getting displayed in the jsp page. I have attached my jsp file and controller bellow. I also used debug mode to run the project but request is going only till /index method and no request is getting send to /gantt/tasks/read or /gantt/dependency/read methods.
I dont know where I went wrong. could you help me find the error any configuration setting I might be missing.
Hi,
I'm trying to fetch the records to grid using <kendo:dataSource-transport> and i get 406 error i'm setting the contentType="application/json", not sure what else i'm missing.l pls suggest. I followed the same process as given in spring demo.
My Jsp:
<%@taglib prefix="kendo" uri="http://www.kendoui.com/jsp/tags"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<c:url value="/retrieveCandidateList/update" var="updateUrl" />
<c:url value="/retrieveCandidateList" var="readUrl" />
<form:form method="post" action="retrieveCandidateList.html">
<kendo:grid name="grid" dataBound="gridDataBound">
<kendo:grid-editable mode="inline" confirmation="Are you sure you want to remove this item?"></kendo:grid-editable>
<kendo:grid-columns>
<kendo:grid-column title="Row Number" field="rowNum" width= "100px" />
<kendo:grid-column title="Work Request Seq" field="wrkRqstSeq" width="130px"/>
<kendo:grid-column title="Test Package Id" field="tstPkgId" width="230px" />
<kendo:grid-column title=" " width="180px">
<kendo:grid-column-command>
<kendo:grid-column-commandItem name="edit" />
<kendo:grid-column-commandItem name="destroy" />
</kendo:grid-column-command>
</kendo:grid-column>
</kendo:grid-columns>
<kendo:dataSource>
<kendo:dataSource-schema>
<kendo:dataSource-schema-model id="wrkRqstSeq">
<kendo:dataSource-schema-model-fields>
<kendo:dataSource-schema-model-field name="rowNum" type="string" editable="false" />
<kendo:dataSource-schema-model-field name="wrkRqstSeq" type="string" editable="false" />
<kendo:dataSource-schema-model-field name="tstPkgId" type="string" editable="false" />
</kendo:dataSource-schema-model-fields>
</kendo:dataSource-schema-model>
</kendo:dataSource-schema>
<kendo:dataSource-transport>
<kendo:dataSource-transport-read url="${readUrl}" dataType="json" type="POST" contentType="application/json" />
<kendo:dataSource-transport-update url="${updateUrl}" dataType="json" type="POST" contentType="application/json" />
<kendo:dataSource-transport-parameterMap>
<script>
function parameterMap(options,type) {
return JSON.stringify(options);
}
</script>
</kendo:dataSource-transport-parameterMap>
</kendo:dataSource-transport>
</kendo:dataSource>
</kendo:grid>​​​​
My controller:
@Controller
@SessionAttributes("data")
public class ListCandidateController
{
@Autowired
ListCandidateService listCandidate;
Log logger = LogFactory.getLog(this.getClass());
@RequestMapping(value = "/retrieveCandidateList", method=RequestMethod.POST)
public @ResponseBody List<WorkRequest> retrieve(@ModelAttribute("data") WorkRequestdata, BindingResult result, HttpServletResponse response) throws Exception
{
response.setContentType("application/json");
System.out.println("In controller - read method");
List<WorkRequest> databaseList = listCandidate.retrieveData(data);
System.out.println("list size:" +databaseList.size());
return databaseList;
}​
Symptoms
Loading kendo.all.min.js file in IE 8 results in multiple JavaScript errors.
Typically the error message will be "Object doesn't support this property or method" and will be caused by a call to map, forEach or bind.
Root Cause
The errors are due to the inclusion of the Kendo UI Spreadsheet​ which requires IE9 and later.
It was nevertheless bundled in kendo.all without the necessary run-time checks.
Mitigation
<!--[if lt IE 9]>
<
script
src
=
"https://cdnjs.cloudflare.com/ajax/libs/es5-shim/4.1.13/es5-shim.min.js"
></
script
>
<
script
src
=
"https://cdnjs.cloudflare.com/ajax/libs/es5-shim/4.1.13/es5-sham.min.js"
></
script
>
<![endif]-->
Solution
A permanent fix will be included in the next internal build, version 2015.3.1002, due for release on 2 Oct 2015.
Future Service Packs and official releases will be free of this defect as well.
Apologies for the caused inconvenience.​
Hi,
I have a kendo jsp tree view defined in the below format. Tree view works without any issue. It looks like Kendo library is throwing JSP exception while processing - JspException: The <kendo:dataSource> tag should be nested in a <kendo:dataSource-schema-hierarchical-model> tag
<kendo:treeView name="formsNav" select="onSelect">
<kendo:dataSource data="${​tree view data sent from server side}" />
</kendo:treeView>​
Can you please help resolve this issue?
Thanks!
While creating tabstrip, tabs are configured to load dynamically through Ajax loading.
Now when we click on the tab(one) manually it is loading contents properly via Ajax but when some other tab(two) is visible and we want to select tab(one) on click of a button on tab(two) its not loading via Ajax and an empty content pane is shown under the tab(one).
we created tabs via below code
<div class="wrapper" style="width: 100%;">
<kendo:tabStrip name="homeTabstrip" show="onShow" select="onSelect" activate="onActivate" contentLoad="onContentLoad">
<kendo:tabStrip-items>
<kendo:tabStrip-item text="Assessment" contentUrl="${assessmentTab}"></kendo:tabStrip-item>
<kendo:tabStrip-item text="Search Result" contentUrl="${searchTab}"></kendo:tabStrip-item>
<kendo:tabStrip-item text="Administration" selected="true" contentUrl="${adminTab}"></kendo:tabStrip-item>
</kendo:tabStrip-items>
</kendo:tabStrip>
</div>
Now to select tab(one) while sitting on tab(two) we use below code:
var tabstrip = $("#homeTabstrip").kendoTabStrip().data("kendoTabStrip");
tabstrip.select(1);
​
01.
<%@page contentType="text/html" pageEncoding="UTF-8"%>
02.
<%@taglib prefix="kendo" uri="http://www.kendoui.com/jsp/tags"%>
03.
04.
<!DOCTYPE html>
05.
<
html
>
06.
<
head
>
07.
<
meta
http-equiv
=
"Content-Type"
content
=
"text/html; charset=UTF-8"
>
08.
<
meta
name
=
"viewport"
content
=
"width=device-width, initial-scale=1, maximum-scale=1"
>
09.
<
title
>Configuración de Salas</
title
>
10.
<
link
rel
=
"stylesheet"
href
=
"resources/styles/kendo.common.min.css"
/>
11.
<
link
rel
=
"stylesheet"
href
=
"resources/styles/kendo.bootstrap.min.css"
/>
12.
<
link
rel
=
"stylesheet"
href
=
"css/estilo.css"
/>
13.
14.
<
script
src
=
"resources/js/jquery.min.js"
></
script
>
15.
<
script
src
=
"resources/js/kendo.all.min.js"
></
script
>
16.
<
script
src
=
"resources/js/cultures/kendo.culture.es-ES.min.js"
></
script
>
17.
<
script
src
=
"resources/js/messages/kendo.messages.es-ES.min.js"
></
script
>
18.
</
head
>
19.
<
body
>
20.
<
kendo:responsivePanel
name
=
"responsive"
>
21.
<
div
id
=
"top"
></
div
>
22.
23.
<
div
>
24.
<
kendo:menu
name
=
"menu"
/>
25.
<
kendo:button
name
=
"logout"
class
=
"k-primary"
>Logout</
kendo:button
>
26.
</
div
>
27.
28.
<
div
>
29.
<
kendo:grid
name
=
"grid"
pageable
=
"true"
filterable
=
"true"
>
30.
31.
<
kendo:grid-editable
mode
=
"inline"
confirmation
=
"¿Estas seguro de borrar este registro?"
/>
32.
33.
<
kendo:grid-columns
>
34.
<
kendo:grid-column
title
=
" "
>
35.
<
kendo:grid-column-command
>
36.
<
kendo:grid-column-commandItem
name
=
"edit"
/>
37.
<
kendo:grid-column-commandItem
name
=
"destroy"
/>
38.
</
kendo:grid-column-command
>
39.
</
kendo:grid-column
>
40.
<
kendo:grid-column
title
=
"Identificador de Sala"
field
=
"idSala"
filterable
=
"true"
/>
41.
<
kendo:grid-column
title
=
"Nombre de la Sala"
field
=
"nombre"
filterable
=
"true"
/>
42.
</
kendo:grid-columns
>
43.
44.
<
kendo:dataSource
pageSize
=
"10"
batch
=
"false"
autoSync
=
"true"
>
45.
46.
<
kendo:dataSource-schema
>
47.
<
kendo:dataSource-schema-model
id
=
"model"
>
48.
<
kendo:dataSource-schema-model-fields
>
49.
<
kendo:dataSource-schema-model-field
name
=
"idSala"
type
=
"string"
editable
=
"false"
/>
50.
<
kendo:dataSource-schema-model-field
name
=
"nombre"
type
=
"string"
/>
51.
</
kendo:dataSource-schema-model-fields
>
52.
</
kendo:dataSource-schema-model
>
53.
</
kendo:dataSource-schema
>
54.
55.
<
kendo:dataSource-transport
>
56.
<
kendo:dataSource-transport-read
url
=
"api/salas"
dataType
=
"json"
type
=
"GET"
contentType
=
"application/json"
/>
57.
<
kendo:dataSource-transport-parameterMap
>
58.
<
script
>
59.
function parameterMap(options,type) {
60.
return JSON.stringify(options);
61.
}
62.
</
script
>
63.
</
kendo:dataSource-transport-parameterMap
>
64.
65.
<
kendo:dataSource-transport-destroy
url
=
"api/salas"
dataType
=
"json"
type
=
"DELETE"
contentType
=
"application/json"
/>
66.
<
kendo:dataSource-transport-update
url
=
"api/salas"
dataType
=
"json"
type
=
"POST"
contentType
=
"application/json"
/>
67.
<
kendo:dataSource-transport-create
url
=
"api/salas"
dataType
=
"json"
type
=
"PUT"
contentType
=
"application/json"
/>
68.
69.
70.
</
kendo:dataSource-transport
>
71.
72.
</
kendo:dataSource
>
73.
</
kendo:grid
>
74.
</
div
>
75.
</
kendo:responsivePanel
>
76.
</
body
>
77.
78.
<
script
>
79.
$(function (){
80.
$("#logout").kendoButton({
81.
icon: "lock"
82.
});
83.
84.
$.get("api/menu", function(data){
85.
$("#menu").kendoMenu({dataSource: data });
86.
});
87.
});
88.
</
script
>
89.
</
html
>
In the following example , there are the following problems:
I 'm testing with the trial version .
Thank you for any help.​
Hi All,
I'm completely new to this framework and I have an issue with the paging inside GRID. I don't know what is happening but the GRID return all the records instead of what have been set on pageSize. Thanks in advance.
This is my GRID code:
<c:url value="${api_r}" var="transportReadUrl" />
<kendo:grid name="grid" pageable="true" height="690px" sortable="true" filterable="false" groupable="false">
<kendo:grid-scrollable/>
<kendo:grid-columns>
<kendo:grid-column title="${codefieldtext}" field="${codefield}" width="100px" />
<kendo:grid-column title="${codenametext}" field="${codename}" width="100px" />
</kendo:grid-columns>
<kendo:dataSource pageSize="20" serverPaging="true" serverSorting="true" serverFiltering="true" serverGrouping="true">
<kendo:dataSource-transport>
<kendo:dataSource-transport-read url="${transportReadUrl}" type="POST" contentType="application/json"/>
<kendo:dataSource-transport-parameterMap>
<script>
function(options){return JSON.stringify(options);}
</script>
</kendo:dataSource-transport-parameterMap>
</kendo:dataSource-transport>
<kendo:dataSource-schema data="Results" total="Total" groups="Results">
<kendo:dataSource-schema-model>
<kendo:dataSource-schema-model-fields>
<kendo:dataSource-schema-model-field name="${codefield}" type="string" />
<kendo:dataSource-schema-model-field name="${codename}" type="string" />
</kendo:dataSource-schema-model-fields>
</kendo:dataSource-schema-model>
</kendo:dataSource-schema>
</kendo:dataSource>
</kendo:grid>
This is response from the API:
{"Total":"43","Success":"true","Results":[{"accTypeCode":"16","accTypeName":"GOVERNMENT CONTROLLED CORPORATION"},{"accTypeCode":"32","accTypeName":"STATE GOVERNMENT"},{"accTypeCode":"51","accTypeName":"BUILDING SOCIETIES"},{"accTypeCode":"57","accTypeName":"UNIT TRUST COMPANIES"},{"accTypeCode":"58","accTypeName":"INSURANCE COMPANIES AND INSURANCE RELATED COMPANIES"},{"accTypeCode":"7","accTypeName":"TRADE UNION"},{"accTypeCode":"1","accTypeName":"INDIVIDUAL"},{"accTypeCode":"12","accTypeName":"PARTNERSHIP"},{"accTypeCode":"15","accTypeName":"UNLIMITED COMPANY"},{"accTypeCode":"22","accTypeName":"MERCHANT BANKS"},{"accTypeCode":"23","accTypeName":"COMMERCIAL BANKS"},{"accTypeCode":"31","accTypeName":"FEDERAL GOVERNMENT"},{"accTypeCode":"35","accTypeName":"STATE STATUTORY AUTHORITIES"},{"accTypeCode":"45","accTypeName":"MULTILATERAL DEVELOPMENT BANKS"},{"accTypeCode":"53","accTypeName":"ASSOCIATE OF STOCKBROKING COMPANIES"},{"accTypeCode":"54","accTypeName":"OTHER STOCKBROKING COMPANIES"},{"accTypeCode":"43","accTypeName":"NON-COMMERCIAL INTERNATIONAL ORGANIZATIONS"},{"accTypeCode":"14","accTypeName":"PUBLIC LIMITED COMPANY"},{"accTypeCode":"6","accTypeName":"SCHOOL"},{"accTypeCode":"26","accTypeName":"DISCOUNT HOUSES"},{"accTypeCode":"42","accTypeName":"CREDIT GUARANTEE CORPORATION"},{"accTypeCode":"44","accTypeName":"DIPLOMATIC REPRESENTATION IN MALAYSIA"},{"accTypeCode":"56","accTypeName":"CREDIT AND LEASING COMPANIES"},{"accTypeCode":"70","accTypeName":"FINANCE COMPANIES"},{"accTypeCode":"21","accTypeName":"FINANCE COMPANIES"},{"accTypeCode":"5","accTypeName":"CLUB/SOCIETY/ASSOCIATION"},{"accTypeCode":"11","accTypeName":"SOLE PROPRIETOR"},{"accTypeCode":"33","accTypeName":"LOCAL GOVERNMENT"},{"accTypeCode":"34","accTypeName":"FEDERAL STATUTORY AUTHORITIES"},{"accTypeCode":"37","accTypeName":"PETRONAS"},{"accTypeCode":"38","accTypeName":"CAGAMAS BERHAD"},{"accTypeCode":"39","accTypeName":"ISLAMIC BANK"},{"accTypeCode":"52","accTypeName":"SUBSIDIARY OF STOCKBROKING COMPANIES"},{"accTypeCode":"59","accTypeName":"DEVELOPMENT FINANCIAL INSTITUTIONS"},{"accTypeCode":"60","accTypeName":"COOPERATIVES"},{"accTypeCode":"13","accTypeName":"PRIVATE LIMITED COMPANY"},{"accTypeCode":"24","accTypeName":"OTHER ENTITIES NOT ELSEWHERE CLASSIFIED"},{"accTypeCode":"4","accTypeName":"TRUSTEE"},{"accTypeCode":"36","accTypeName":"NON-FINANCIAL PUBLIC ENTERPRISES"},{"accTypeCode":"40","accTypeName":"CENTRAL BANK"},{"accTypeCode":"50","accTypeName":"CREDIT CARD COMPANIES"},{"accTypeCode":"55","accTypeName":"COMMODITY BROKERS"},{"accTypeCode":"61","accTypeName":"OTHER FINANCIAL INSTITUTIONS"}]}