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

Posts: 20
Registered: ‎08-24-2012
My Device: Curve 9300
My Carrier: Rogers
Accepted Solution

BBUI - Back and Forth between screens puts both pages on one.



I'm trying out BBUI 0.9.3 and ran into something very odd.  I have a simple test app with 2 pages.  Each page has only one button. The starting page button just does a bb.pushScreen to get to the second page.  The second page button does bb.popScreen to get back to the first.  


If I run it in a browser, it works fine.  If I use Ripple, a simulator, or an actual device (Curve) then the following occurs:

  1. Start on page 1.
  2. Hit button to go to page 2.  Shows page 2.
  3. Hit button on page 2 to go back to page 1.  Shows page 1.
  4. Hit button to open page 2 again, and page 2's button (entire page) is shown below page 1.
  5. Hit the new page 2 button, and the page 1 button shows where the page 2 button was, so now there are 2 page 1 buttons.
  6. Continue the process and it keeps adding buttons.

What is going on?  I assumed that pushScreen is supposed to replace the entire page, which it does in the plain browser, and does the first time.


For reference, here is the content of my files.  They aren't large so I figured it was ok to post here.



<widget xmlns:rim="http://www.blackberry.com/ns/widgets" id="bbUITest" version="0.1" rim:header="RIM-Widget:rim/widget" xmlns="http://www.w3.org/ns/widgets">
  <rim:navigation mode="focus" />
  <name>bbUI Test</name>
  <description>Testing BBUI</description>
  <icon src="images\icon.png" />
  <icon src="images\icon.png" rim:hover="true" />

    <content src="index.htm">
  <feature id="blackberry.ui.menu" />
  <feature id="blackberry.ui.dialog"/>
  <feature id="blackberry.system.event" />
  <feature id="blackberry.app" />
  <feature id="blackberry.app.event"/>


		<meta name="x-blackberry-defaultHoverEffect" content="false" />
		<meta name="viewport" content="initial-scale=1.0,width=device-width,user-scalable=no,target-densitydpi=device-dpi" />
		<link  rel="stylesheet" type="text/css" href="bbui-0.9.3.css">
		<script type="text/javascript" src="bbui-0.9.3.js">
		<script type="text/javascript">
	<body onload="bb.pushScreen('page1.htm', 'page1');">	


<div data-bb-type="screen" data-bb-effect="slide-left" data-bb-title="Page 1" data-bb-scroll-effect="off">

<div data-bb-type="button" id="page1-button" onclick="bb.pushScreen('page2.htm', 'page2');" data-bb-style="stretch">Go to Page 2</div>


<div data-bb-type="screen" data-bb-effect="slide-left" data-bb-title="Page 2" data-bb-scroll-effect="off">

<div data-bb-type="button" id="page2-button" onclick="bb.popScreen();" data-bb-style="stretch">Go Back</div>
Posts: 20
Registered: ‎08-24-2012
My Device: Curve 9300
My Carrier: Rogers

Re: BBUI - Back and Forth between screens puts both pages on one.

Tried the current build of 0.9.4 and it works as expected now. Guess I should have tried that first....