How to update fields in everlive using icenium graphite

4 posts, 0 answers
  1. Andres
    Andres avatar
    2 posts
    Member since:
    Sep 2013

    Posted 24 Sep 2013 Link to this post

    im trying to update fields of a register in everlive in the main.js from the htmlview but throws me an error like "uncaught typeerror: object[objec" (and just show that) and i dont no what to do


    //--------------------------------- actividad model ----------------------------------------
        var actividadViewModel = (function () {
            return {
                show: function (e) {
                    var actividad = actividadesModel.actividades.getByUid(e.view.params.uid);
                    kendo.bind(e.view.element, actividad,;
        //--------------------------------- add actividad model --------------------------------
        var addactividadViewModel = (function () {
            var $newdescripcion;
            var $newfecha_fin;
            var $newfecha_inicio;
            var $newhora_inicio;
            var $newhora_fin;
            var $newid_Cliente;
            var $newid_tipo_actividad;
            var $newidTipoTarifa;
            var validator;
            var init = function () {
                validator = $('#enterStatus').kendoValidator().data("kendoValidator");
                $newdescripcion = $('#newdescripcion');
                $newfecha_fin = $('#newfecha_fin');
                $newfecha_inicio = $('#newfecha_inicio');
                $newhora_inicio = $('#newhora_inicio');
                $newhora_fin = $('#newhora_fin');
                $newid_Cliente = $('#newid_Cliente');
                $newid_tipo_actividad = $('#newid_tipo_actividad');
                $newidTipoTarifa = $('#newidTipoTarifa');
            var show = function () {
            var saveActividad = function () {
                if (validator.validate()) {
                    var actividades = actividadesModel.actividades;
                    var actividad = actividades.add();
                    actividad.descripcion = $newdescripcion.val();
                    actividad.fecha_fin = $newfecha_fin.val();
                    actividad.fecha_inicio = $newfecha_inicio.val();
                    actividad.hora_inicio = $newhora_inicio.val();
                    actividad.hora_fin = $newhora_fin.val();
                    actividad.id_Cliente = $newid_Cliente.val();
                    actividad.id_tipo_actividad = $newid_tipo_actividad.val();//$newStatus.val();
                    actividad.idTipoTarifa = $newidTipoTarifa.val();
                    actividad.UserId = usersModel.currentUser.get('data').Id;
          'sync', function () {
            return {
                init: init,
                show: show,
                me: usersModel.currentUser,
                saveActividad: saveActividad,
                saveActividadE: saveActividadE


    <div data-role="view" id="single-actividad" data-layout="default" class="actividades-view" data-show="">

        <header data-role="header">
            <div data-role="navbar">
                <a class="nav-button" data-align="left" data-role="backbutton">Regresar</a>
                <a class="nav-button" data-align="right" data-role="button" onClick="
        <div id="status-container" class="user-status-wrp" data-role="listview" data-style="inset">
            <div id="enterStatusE" class="share-form-wrp">
                <div class="user-info">

                    <h2 data-bind="text: User().DisplayName"></h2>
                    <!--<h2 data-bind="text: UserId"></h2>-->
                    <h2 data-bind="text: me.get('data').DisplayName">Me</h2>
                <ul id="actividad-form" data-role="listview" data-style="inset">
                        <label for="descripcionE" style="font-size:14px; color:#FFAB00">Descripción </label>
                        <input  id="descripcionE" type="text" data-bind="value: descripcion" disabled="true"/>
                        <label for="fecha_inicioE" style="font-size:14px; color:#FFAB00">FechaInicio </label>
                        <input type="datetime" id="fecha_inicioE" data-bind="value: fecha_inicio" disabled="true"/>
                        <label for="fecha_finE" style="font-size:14px; color:#FFAB00"> FechaFin</label>
                        <input type="datetime" id="fecha_finE" data-bind="value: fecha_fin"  disabled="true"/>
                        <label style="font-size:14px; color:#FFAB00">
                            Hora Inicio
                            <input type="time" id="hora_inicioE" data-bind="value: hora_inicio" value="00:00:00" disabled="true"/>
                        <label style="font-size:14px; color:#FFAB00">
                            <input type="time" id="hora_finE" data-bind="value: hora_fin" value="00:00:00" disabled="true"/>

                        <label for="id_ClienteE" style="font-size:14px; color:#FFAB00">Cliente </label>
                        <input id="id_ClienteE" type="text" placeholder="Digite nombre " data-bind="value: id_Cliente" disabled="true"/>

                        <label style="font-size:14px; color:#FFAB00">
                            <select id="id_tipo_actividadE" data-bind="value: id_tipo_actividad" disabled="true">

                                <option value="Asesoría Jurídica">Asesoría Jurídica</option>
                                <option value="Litigios">Litigios</option>
                                <option value="Otros">Otros</option>

                        <label for="idTipoTarifaE" style="font-size:14px; color:#FFAB00">TipoTarifa </label>
                        <textarea id="idTipoTarifaE" placeholder="Estandar" required validationMessage="Requerido!" data-bind="value: idTipoTarifa" disabled="true"></textarea>

                        <a data-role="button" data-bind="events: { click: saveActividad }">guardar</a>


  2. Stefan Dobrev
    Stefan Dobrev avatar
    790 posts

    Posted 25 Sep 2013 Link to this post

    Hi Andres,

    You can try out Icenium Graphite Simulator to debug your application and find out what is the problem. You can click Debug in the simulator and then from the Sources tab add breakpoints in your JavaScript code to expect the behavior and find your issue.

    Hope this helps,

    Big news for mobile app and .NET developers! Hear about it at our Release Keynote. Thursday, September 26th, 11AM EDT
    Do you enjoy Icenium? Vote for it in Windows IT Pro Community Choice Awards as Best Cloud Computing Product or Service (Category 5).
    Looking for tips & tricks directly from the Icenium team? Check out our blog!
    Share feedback and vote for features on our Feedback Portal.
  3. Andres
    Andres avatar
    2 posts
    Member since:
    Sep 2013

    Posted 27 Sep 2013 Link to this post

    Thanks for help Stefan, in the debugger mode i'm trying to follow the error that throws me but i cant figure it out because he took me to the jquery library ant then to the kendo library and executes many  lines that i cant understand.... no one of these lines are commented.
    if you can help to solve this problem with a function that i can use  in the code that i  provide it will be really helpful.
  4. Steve
    Steve avatar
    10941 posts

    Posted 30 Sep 2013 Link to this post

    Hello Andres,

    There is no such thing as "debug function" that you can use. If you can't figure out where the problem lies by using the built-in debugger, you can try the old fashioned "console.log" or "alert" and place them in your code so they indicate which part of your code fails.

    You've missed the Icenium Visual Studio Integration keynote? It has been recorded and posted here.
    Looking for tips & tricks directly from the Icenium team? Check out our blog!
    Share feedback and vote for features on our Feedback Portal.
Back to Top