Telerik Forums
UI for JSP Forum
1 answer
104 views

How can i make certain columns non-editable in data grid. I'm using Kendo UI for JSP. I tried editable="false" but gives error not an acceptable attribute.

 

Alexander Popov
Telerik team
 answered on 16 Jun 2015
2 answers
90 views

 Hi There,

It would be nice if i could do that: 

 

<kendo:grid name="verbrauchsprofile"
                        <c:if test="hasPermissionToCreate">
                    <kendo:grid-toolbar >
                 
                        <kendo:grid-toolbarItem name="create" text="Neues Verbrauchsprofil" />
                         
                    </kendo:grid-toolbar>
                    </c:if>
.....
</kendo:grid>

 

now there is an Exception 

javax.servlet.jsp.JspException: The <kendo:grid-toolbarItem> tag should be nested in a <kendo:grid-toolbar> tag.
at com.kendoui.taglib.BaseTag.findParentWithClass(BaseTag.java:133)
at com.kendoui.taglib.grid.ToolbarItemTag.doEndTag(ToolbarItemTag.java:21)

 

By disallowing other Tags than Kendo Tags, you obstruct many opportunities of what you can do.

I need that to check permissions, and so on and not every tag has an "hidden" attribute to change its visibility

 

 

Mathias
Top achievements
Rank 1
 answered on 29 Apr 2015
1 answer
169 views
How can i show data for one of the column as link(href) in the grid.

<kendo:grid name="grid" selectable="multiple">
        <kendo:grid-pageable pageSizes="true" buttonCount="5" />
        <kendo:grid-sortable mode="multiple" allowUnsort="true" />
        <kendo:grid-columns>
            <kendo:grid-column title="num" field="rowNum" width="130px" />
            <kendo:grid-column title="Test Id" field="testId" width="130px" />            
        </kendo:grid-columns>
        <kendo:dataSource data="${List}" pageSize="15">
            <kendo:dataSource-schema>
                <kendo:dataSource-schema-model>
                    <kendo:dataSource-schema-model-fields>
                        <kendo:dataSource-schema-model-field name="rowNum" type="string" />
                        <kendo:dataSource-schema-model-field name="testId" type="string" />                                            
                    </kendo:dataSource-schema-model-fields>
                </kendo:dataSource-schema-model>
            </kendo:dataSource-schema>
        </kendo:dataSource>
    </kendo:grid>
    
    here i want testId to be displayed as link and when i click on the link i want to open a  new window for showing more details.
Vladimir Iliev
Telerik team
 answered on 02 Apr 2015
1 answer
103 views
Hello,

I would like to add some fields to the popup when someone creates/edits an event in the scheduler.

Can someone point me to the documentation (or a sample code block) on how to use the JSP tags to create a scheduler event editor template? I see how it can be done with Javascript

http://docs.telerik.com/kendo-ui/api/javascript/ui/scheduler#configuration-editable.template
http://jsbin.com/oWABuQa/1/edit?html,js,output

Thanks,
Greg

Vladimir Iliev
Telerik team
 answered on 10 Mar 2015
1 answer
107 views
Hello



I have an existing Spring MVC with Hibernate app and I would like to
integrate the JSP Scheduler into the app. I am currently having an issue
where none of my data is showing in the scheduler (please see the
attached screen shot).



Below are my steps. I just think I am missing something. Specifically, I
do not know if there is a specific client side javascript data model
that I have to map my data to with required model property names to make
sure the control renders. If I do have to follow a model, do you a link
to the documentation that describes what the required fields are etc
for the scheduler?



I have followed the samples included with the eval by installing the
scheduler controller, the jsp tag library jar and the index jsp page. I
modified the controller and jsp page to point to my existing models
instead of the sample models. 



When I launch the page, the scheduler load but the loading spinner icon
just spins. So I checked the javascript console and i get the following:



Uncaught TypeError: undefined is not a function.    kendo.all.min.js:9 



I then checked the network tab of the developer tools to make sure the
page is loading my json data model from the server. It appears to load
as expected and looks like the following json:



[{"case_id":6,"status":"4","hospital_id":"4","doctor_id":"1","procedure_id":"1","user_id":"9","implant_id":null,"start_date":1393857600000,"end_date":1393857900000,"contact_lastname":"asl;kdjf","contact_midname":null,"contact_firstname":"asldkj","prefix":null,"suffix":null,"gender":"M","birth_date":"asdlk;fj","color":"rgb(235,147,115)","area_id":"3","products_selected":"68|1|0~69|1|0~","notes":"","po_number":"","tracking_number":"","wh_group_name":"LIMA","hospital_name":"St.Vincent Medical Center","procedure_name":"Shoulder
Replacement","doctor_name":null,"restock_track_no":null,"case_names":"New event"},blah blah]

Here is my code in the controller

@RequestMapping(value = {"/", "/index"}, method = RequestMethod.GET)

    public String index(Locale locale, Model model) {

        return "scheduler/index";

    }



    @RequestMapping(value = "/index/read", method = RequestMethod.GET)

    public @ResponseBody List<CaseEntity> read() {

        return caseEntity.getList();

    }


The following is my jsp tags mapping the json to the kendo model.



<kendo:dataSource-schema>

                    <kendo:dataSource-schema-model id="caseId">

                        <kendo:dataSource-schema-model-fields>

                            <kendo:dataSource-schema-model-field name="case_id" type="number"/>

                            <kendo:dataSource-schema-model-field name="hospital_name" defaultValue="No title"

                                                                 type="string"/>

<kendo:dataSource-schema-model-field name="user_id" type="number" defaultValue="1"/>

                            <kendo:dataSource-schema-model-field name="start_date" type="date"/>

                            <kendo:dataSource-schema-model-field name="end_date" type="date"/>

    <%-- commented out as I am just try to display data at this moment-%>

                            <%--kendo:dataSource-schema-model-field name="description" type="string" />

                    <kendo:dataSource-schema-model-field name="isAllDay" type="boolean" />

                    <kendo:dataSource-schema-model-field name="recurrenceRule" type="string" nullable="true"/>

                    <kendo:dataSource-schema-model-field name="recurrenceId" type="number" nullable="true" />

                    <kendo:dataSource-schema-model-field name="recurrenceException" type="string" nullable="true" />-%>

                            

                        </kendo:dataSource-schema-model-fields>

                    </kendo:dataSource-schema-model>

                </kendo:dataSource-schema>



The generated HTML looks like the following:



<div
id="scheduler"></div><script>jQuery(function(){jQuery("#scheduler").kendoScheduler({"startTime":new

Date(2015,1,13,7,0,0,0),"resources":[{"field":"user_id","dataSource":{"data":[{"text":"Alex","color":"#f8a398","value":1},{"text":"Bob","color":"#51a0ed","value":2},{"text":"Charlie","color":"#56ca85","value":3}]},"title":"Owner"}],"dataSource":{"schema":{"model":{"id":"case_id","fields":{"hospital_name":{"type":"string","defaultValue":"No

title"},"end_date":{"type":"date"},"case_id":{"type":"number"},"user_id":{"defaultValue":1.0,"type":"number"},"start_date":{"type":"date"}}}},"transport":{"destroy":{"dataType":"json","contentType":"application/json","type":"POST","url":"/scheduler/index/destroy"},"update":{"dataType":"json","contentType":"application/json","type":"POST","url":"/scheduler/index/update"},"parameterMap":function
parameterMap(options, type) {

                                if (type === "read") {

                                    debugger;

                                    return JSON.stringify(options);

                                } else {

                                    return JSON.stringify(options.models);

                                }

                           
},"read":{"dataType":"json","contentType":"application/json","type":"GET","url":"/scheduler/index/read"},"create":{"dataType":"json","contentType":"application/json","type":"POST","url":"/scheduler/index/create"}},"batch":true,"filter":[{"filters":[{"field":"user_id","value":1.0,"operator":"eq"},{"field":"user_id","value":2.0,"operator":"eq"}],"logic":"or"}]},"timezone":"Etc/UTC","height":600.0,"views":[{"type":"day"},{"selected":true,"type":"workWeek"},{"type":"week"},{"type":"month"},{"type":"agenda"},{"type":"timeline"}],"date":new
Date(2015,1,13,0,0,0,0)});})</script>

    </div>



Alexander Popov
Telerik team
 answered on 02 Mar 2015
1 answer
73 views

I wanted something where I could drag something from outside the
grid to a slot in the timeline. Something like

 

http://demos.telerik.com/aspnet-ajax/scheduler/examples/draganddropintegration/defaultcs.aspx?product=scheduler

 

but using java

Can someone help?

thanks
Lalitha

Vladimir Iliev
Telerik team
 answered on 25 Feb 2015
1 answer
145 views
Hello,

On my kendo chart with multiple valueAxis, I am getting this weird bug. The main value axis has positive and negative values, thus its axis has the value zero in the middle. But the zero value points of this axis is always at the bottom of the chart, on the far negative end of the axis. I checked the dataSource and the values are indeed zero. You can see the resulting image on the attached image.

Thanks

p.s. On the attached image, the values I highlighted actually have zero value, and their axis is on the right, and you can see their values should be -400 when they are on the bottom. I do not observe this behavior when those data sources are shown on bar chart...
T. Tsonev
Telerik team
 answered on 09 Feb 2015
6 answers
583 views
I have this problem, with Kendo Chart's y axis. I have two different data on it, one varies little, and has a range between 0-20, whereas other value has a way greater difference towards negative side of the y axis. You can see this problem on the included image. I do not get this issue when I have a large difference of the second data type towards positive side of the y axis, but when it is directed to the negative side, the ranges between steps and the number of steps of y-axis gets crazy.

You can see the difference on the images I have attached.

I couldn't find any solution to this problem, please help me with this.
Thanks
T. Tsonev
Telerik team
 answered on 09 Feb 2015
1 answer
395 views
Hi all,

I'm evaluating Kendo UI/JSP and currently focusing on grids. I'm trying to replicate the functionality of this example:
Grid / Toolbar template. Server side paging and sorting works. The drop down list loads correctly with the expected values. However, when I select a value from the drop down the request does not contain any values for the filter.

This is the code from my JSP:

<c:url value="/grid/instance/sort" var="transportReadUrl" />
    <c:url value="/grid/status/read" var="statusReadUrl" />
    <kendo:grid name="grid" pageable="true" sortable="true" height="440px">
        <kendo:grid-toolbarTemplate>
            <div class="toolbar">
                <label class="category-label" for="statuses">Show forms by status:</label>
                <kendo:dropDownList name="statuses" optionLabel="All" dataTextField="statusDisplay"
                                    dataValueField="statusId" autoBind="false" change="statusChange">
                    <kendo:dataSource>
                        <kendo:dataSource-transport>
                            <kendo:dataSource-transport-read url="${statusReadUrl}" />
                        </kendo:dataSource-transport>
                    </kendo:dataSource>
                </kendo:dropDownList>
            </div>
        </kendo:grid-toolbarTemplate>
        <kendo:grid-pageable pageSizes="true" refresh="true" buttonCount="3"></kendo:grid-pageable>
        <kendo:grid-sortable allowUnsort="true" mode="multiple" />
        <kendo:dataSource pageSize="10" serverPaging="true" serverSorting="true">
            <kendo:dataSource-transport>
                <kendo:dataSource-transport-read url="${transportReadUrl}" type="POST" contentType="application/json"/>
                <kendo:dataSource-transport-parameterMap>
                    function(options){return JSON.stringify(options);}
                </kendo:dataSource-transport-parameterMap>
            </kendo:dataSource-transport>
            <kendo:dataSource-schema data="data" total="total" groups="data"></kendo:dataSource-schema>
        </kendo:dataSource>
        <kendo:grid-columns>
            <kendo:grid-column title="REF#" field="instanceId" width="100px" filterable="false" />
            <kendo:grid-column title="Submitter" field="owner" width="200px" />
            <kendo:grid-column title="Status" field="status" width="200px"/>
            <kendo:grid-column title="Form" field="shortName" />
        </kendo:grid-columns>
    </kendo:grid>

This is the code from my JavaScript:

function statusChange() {
            var value = this.value(), grid = $("#grid").data("kendoGrid");
            if (value) {
                grid.dataSource.filter({ field: "statusId", operator: "eq", value: parseInt(value) });
            } else {
                grid.dataSource.filter({});
            }
        }

When I inspect the request in Chrome this is all I see:

{"take":10,"skip":0,"page":1,"pageSize":10}

When I inspect the DataSourceRequest object being sent to the controller I can confirm that the filters array inside the filter field is empty.

This thread seems to be related to my issue but I'm not sure how to fix my code accordingly: http://www.telerik.com/forums/kendo-ui-web-grid-search-with-sorting

I've also tried the following based on a different post, but still no luck

function statusChange() {
            var value = this.value(), grid = $("#grid").data("kendoGrid");
            if (value) {
                var filter = {
                    logic  : "and",
                    filters: [
                        {
                            field     : 'statusId',
                            value     : parseInt(value),
                            operator  : 'eq'
                        }
                    ]
                };
            } else {
                var filter = {};
            }
            grid.dataSource.filter(filter);

Any help would be greatly appreciated.

Regards,

Asanga M.

AsangaM
Top achievements
Rank 1
 answered on 07 Feb 2015
2 answers
68 views
I need to be able to have a GET request as follows:  

http://localhost:8080/api/leads?page=2&size=20&sort=firstName,desc -> or asc


This is for Server Side sorting for a Spring Data Rest project.  Currently the Sorting portion is showing up as an array.  How do you change the way the sorting URL is formed?
Shannon
Top achievements
Rank 1
 answered on 26 Jan 2015
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?