Example of a Window JSP tag converted from JavaScript.

4 posts, 0 answers
  1. Timothy
    Timothy avatar
    3 posts
    Member since:
    Aug 2016

    Posted 29 Mar Link to this post

    I have an app I created using Kendo UI and now I am upgrading it and want to fully utilize JSP which I am fairly new at.  I somewhat get your taglibs but don't "think" everything that can be done via Kendo UI can be done via UI for JSP via the taglibs?  So I assume you have to decide those things which can use taglibs and be done on the server side and those things which remain as JavaScript and done on the client?  As a simple example if and how would the following JavaScript code snippet I currently do in my app be replaced (if possible) and built with taglibs (I know via <kendo:window> but now sure how all options would be done such as actions)?

    $("#ppCustomize").kendoWindow({

    appendTo: "#ppCustomizeForm",
            title: "Application Settings",
            visible: false,
    modal: true,
    resizable: false,
            actions: [
    "Tick",
                "Close"
            ],
        }).data("kendoWindow").wrapper.find(".k-i-tick").click(function(e) {
    //e.preventDefault();
    displayLoading('#ppCustomize', null);
    if ($('#DateFilter').val() == "") {
    $('#DateFilter').val("Clear");
    };
    displayLoading(document.body, null);
    eval(logiActions.eventupdatevariables);
    });
    ppCustomize = $("#ppCustomize").data("kendoWindow");

    $("#selectCustom").kendoButton( { 
    click: function() {
    ppCustomize.center().open();
    }
    });

  2. Veselin Tsvetanov
    Admin
    Veselin Tsvetanov avatar
    563 posts

    Posted 31 Mar Link to this post

    Hi Timothy,

    I would suggest you to review the demos available for the Telerik UI for JSP suite. The Customizing actions demo, for example, shows how to configure the actions available for the Window.

    I noticed, that in the snippet sent you attach a click handler to an icon placed within the Window. Note, that in your JSP project you will still have to attach that with JavaScript.

    Regards,
    Veselin Tsvetanov
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. Timothy
    Timothy avatar
    3 posts
    Member since:
    Aug 2016

    Posted 31 Mar in reply to Veselin Tsvetanov Link to this post

    Thank you for your response.  I have been able to duplicate the necessary taglib syntax (below) except the icon for the tick is missing (though the button is there):

    <!-- Note - Snippet doesn't include the function which opens the window when needed or the code yet to do when the tick mark is clicked, just trying to figure out how to show the tick icon as a custom action as before -->

    <kendo:window name="ppCustomize"
    title="Application Settings"
    visible="false"
    modal="true"
    resizable="false"
    width="350px"
    actions="<%=new String[] { \"Tick\", \"Close\" } %>" 
    >
    </kendo:window>
    <script>
    $(function() {
    ppCustomize = $("#ppCustomize").data("kendoWindow");
    });
    </script>

     

  4. Timothy
    Timothy avatar
    3 posts
    Member since:
    Aug 2016

    Posted 31 Mar in reply to Timothy Link to this post

    Never mind.  I was able to use "Check" instead of "Tick" to get the icon I expected.  Thanks.
Back to Top