Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
New Developer
Posts: 27
Registered: ‎07-24-2012
My Device: Blackberry Dev Alpha
My Carrier: Bell

Re: Form Field Validation

By the way, this code is near the top of my index.htm page.
Developer
Posts: 270
Registered: ‎12-13-2010
My Device: PlayBook 16GB, BB10 Dev Alpha
My Carrier: o2 (de)

Re: Form Field Validation

OK, that's somehow what I was guessing.

You have a couple of options to solve this. Probably the easiest would be to use pushScreen instead of popScreen be replacing:

 

bb.popScreen();

 with

bb.pushScreen('play.html','play');
// Or however your menu is named in the filesystem (1. param)

 

 

- - -
My approved apps @ App World
New Developer
Posts: 27
Registered: ‎07-24-2012
My Device: Blackberry Dev Alpha
My Carrier: Bell

Re: Form Field Validation

Hi,

 

I had already tried pushScreen.  Although that brings me to the good page, it does not refresh the list with the updated names which was processed when calling the checkpass() command.  If you actually refresh the page though, it then gets updated (As long as the index.htm page has been refreshed).

 

 

Highlighted
Developer
Posts: 270
Registered: ‎12-13-2010
My Device: PlayBook 16GB, BB10 Dev Alpha
My Carrier: o2 (de)

Re: Form Field Validation

[ Edited ]

OK, if you use pushScreen(), we can be sure, that the page actually gets re-rendered, but the updated data is not included.

 

A couple of thoughts that immediately come to my mind:

  1. Maybe your localStorage library works asynchronously and inserting/updating takes longer than the lookup.
  2. Another possibility is that your behavious is caused by the fact that you use (at least) two instances of localStorageDB instead of one global.

It's a little hard to "brain-debug" when I see only a couple lines of code. Smiley Wink

- - -
My approved apps @ App World