This is a migrated thread and some comments may be shown as answers.

Drawer problem. how to open fresh view and close, hide, destroy old view

5 Answers 115 Views
AppBuilder Windows client
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Markus
Top achievements
Rank 2
Markus asked on 24 Oct 2013, 03:34 PM
www.marktold.com/screencast/icenium_drawer.swf shows it best.

Tried 

window.location.href= "#drawer-daily-prayers";

then

I tried .destroy() and .hide() on the login view but that did somewhat not work.

Markus

<div data-role="view" id="drawer-log-in" data-layout="drawer-layout" data-title="Log-in">
           <div id="not-logged-in">
 
               <ul data-role="listview" data-style="inset" data-bind="invisible: isLoggedIn">
                   <li>
                       <label>
                           Database-ID
                           <input type="text" name="dpdID" id="dpdID" value="" placeholder="Database ID" />
                       </label>
                   </li>
                   <li>
                       <label>
                           E-Mail
                           <input type="text" name="uEmail" id="uEmail" value="" placeholder="E-mail" />
                       </label>
                   </li>
                   <li>
                       <label>
                           Password
                           <input type="password" name="uPasswort" id="uPasswort" value="" placeholder="Password" />
                       </label>
                   </li>
                   <li>
                       <a data-role="button"  onclick="getTheUserData(dpdID.value, uEmail.value, uPasswort.value)" data-icon="contacts" href="drawer-log-in">log-in</a>
                       <br /><br />
                       <span id="login-error" style="color:red;font-size:0.8em"></span>
 
                   </li>
               </ul>
 
           </div>
 
           <div id="logged-in" style="display:none;">
             Logged in View
                
              
           </div>
 
       </div>
 
 
 
  <div data-role="view" id="drawer-daily-prayers" data-layout="drawer-layout" data-title="Daily Prayers">
        <div> Daily prayers</div
       </div>




5 Answers, 1 is accepted

Sort by
0
Markus
Top achievements
Rank 2
answered on 24 Oct 2013, 03:42 PM
As soon as I posted I might have found the answer :-)

http://docs.kendoui.com/api/mobile/application#methods-navigate

---------------

no working :-(

app.navigateTo = function(URL) {
  //     window.location.href= URL;
  app.navigate(URL); // this trows an error: Uncaught TypeError: Object #<Object> has no method 'navigate'
 }
0
Markus
Top achievements
Rank 2
answered on 25 Oct 2013, 11:57 AM
It might be a simulater problem

Markus
0
Steve
Telerik team
answered on 25 Oct 2013, 12:37 PM
Hi Markus,

According to the Kendo UI docs, app in your code snippet should be new kendo.mobile.Application();

If you're using the Icenium Kendo UI template, app is a global wrapper and you should use app.application.navigate instead. Debugging your Icenium app to find out such problems is easy using the built-in developer tools in the Icenium simulator (see screehshot).

Regards,
Steve
Telerik
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.
0
Markus
Top achievements
Rank 2
answered on 25 Oct 2013, 12:44 PM
Dear Steve

As mentioned in my previous post it seems to be a simulator problem.

On my S3 it works as expected with both versions

window.location.href= URL; 

app.application.navigate(URL);

Markus
0
Steve
Telerik team
answered on 25 Oct 2013, 02:21 PM
Hello Markus,

Both work fine in the Icenium simulator, but in your previous post you indicated that you've tried app.navigate(URL); and not app.application.navigate(URL); I've already explained where the difference lies.

Regards,
Steve
Telerik
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.
Tags
AppBuilder Windows client
Asked by
Markus
Top achievements
Rank 2
Answers by
Markus
Top achievements
Rank 2
Steve
Telerik team
Share this question
or