viewShow won't call

6 posts, 0 answers
  1. Tyler
    Tyler avatar
    6 posts
    Member since:
    Jan 2012

    Posted 23 Mar 2012 Link to this post

    Hi everyone !

    To begin, thank you to Team Kendo UI framework for this First, thank you to Team KendoUI framework for this really powerful.

    I am facing a problems for viewShow, even with the different possibilities of use:

    Here are the different ways that I used to use viewShow, and nothing appears in the event console 

    var app = new kendo.mobile.Application(document.body, {
      transition: "slide",
          hideAddressBar: true
      });
    app.bind("viewShow", function(e) {
        console.log(e);
      });
     
    OR
     
    var app = new kendo.mobile.Application(document.body, {
      transition: "slide",
      hideAddressBar: true,
      viewShow: function (e) {
        console.log(e);
      }
      });

    Someone can explain me why i encounter this problem ?

    Thanks,
    Tyler
  2. Tyler
    Tyler avatar
    6 posts
    Member since:
    Jan 2012

    Posted 23 Mar 2012 Link to this post

    No longer supported....

    Sorry.
  3. Kendo UI is VS 2017 Ready
  4. Petyo
    Admin
    Petyo avatar
    2438 posts

    Posted 23 Mar 2012 Link to this post

    Hi,

    The Application viewShow event was present in the first mobile beta, but was dropped afterwards. Now each view exposes a show event, instead. You can bind to it using a data attribute - something like 

    <div data-role="view" data-show="foo">
     ...
    <script>
    function foo() {
     
    }
    </script>


    Kind regards,
    Petyo
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  5. Shawn R.
    Shawn R. avatar
    4 posts
    Member since:
    Nov 2008

    Posted 24 Mar 2012 Link to this post

    viewShow used to fire on EVERY view - and my app was programmed as such. It appears as though data-show only fires the first time the view is shown. I need the original behavior. Am I correct in this change, was it intended as such and can you think of a workaround?

    Thanks - Shawn
  6. Petyo
    Admin
    Petyo avatar
    2438 posts

    Posted 26 Mar 2012 Link to this post

    Hello,

    I can't reproduce the behavior where data-show is executed only the first time when the view is shown; see this fiddle (click several times on Foo/Bar with the developer tools open).  

    Another thing that may come in handy in your case would be the layout init/show events - this would work if your views share a common layout. 

    Kind regards,
    Petyo
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  7. Tyler
    Tyler avatar
    6 posts
    Member since:
    Jan 2012

    Posted 26 Mar 2012 Link to this post

    For me, it's working !
    Thanks for support !
Back to Top
Kendo UI is VS 2017 Ready