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

Java Development

Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.

New Developer
Posts: 5
Registered: ‎12-09-2008
My Device: Not Specified
Accepted Solution

BrowserContentManager Behavior (Blackberry Bold)

Good afternoon everybody,


I'll start with a quick overview of the application.


We have been using a small Java application that is derived using the BrowserContentManager.


The application is used to force a specific page to be loaded on start and also to react to PUSH messages to navigate to another page when instructed by a server.


The original page that is navigated to is a ASP.NET form, which when submitted should direct the user to another page with simple JavaScript on it. This has worked correctly on all Blackberry devices (at least those I have had available for testing) except for the Blackberry Bold (I haven't tested anything later).


The issue I have is that when the user submits the initial form it just returns to the same form and clears the fields.


Does anybody know of any changes to the BrowserContentManager's behaviour that I should be aware of? Or, if there is some settings on devices that should be checked?


I am simulating the problem on BlackBerry 9000 Smartphone v4.6.0.92 - I have a user with the actual device who is experiencing the same problem.


Any help would be fantastic.



BlackBerry Development Advisor
Posts: 15,885
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: BrowserContentManager Behavior (Blackberry Bold)

Have you enabled JavaScript in the browser field?  What user agent are you using? 


Has IIS been configured to support this user agent?


How To - Configure .NET 2.0 for BlackBerry Browser support 
Article Number: DB-00593



How to - Use the ASP.NET Device Profiling Tool to Create BlackBerry device profiles 
Article Number: DB-00520


Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
New Developer
Posts: 5
Registered: ‎12-09-2008
My Device: Not Specified

Re: BrowserContentManager Behavior (Blackberry Bold)

[ Edited ]

Thanks for the reply Mark.


I have actually managed to track down what the problem might be. I have used cookieless SessionState on the application which manipulates the URL to store the Session Id e.g. http://site/page.aspx --> http://site/S(xxx)/page.aspx (or something like that).


This is done by sending a redirect to the client, with status code 302, it seems that the application is not picking up this redirect so a new session is created each time the user attempts to log in. I'm not sure if there's something in my code that I can change to catch this event. The code I'd expect it to fall into is shown below:


public Object eventOccurred(Event event) { int eventId = event.getUID(); switch (eventId) { case Event.EVENT_REDIRECT : { //never comes into this case break; } } return null; }


For now I have tried to get around this by changing the response code on the server, by adding a bit of code into the Global.asax file (see below):



Protected Sub Application_EndRequest(ByVal sender As Object, _ ByVal e As System.EventArgs) If Response.StatusCode = 302 Then Response.StatusCode = 300 End Sub


This does seem to work and go into the case ok (behaving properly) but I am now receiving another error when I run it through the Blackberry Bold simulator:


"JVM Error 104




When this is attached to the debugger gives the following information:


This is with the detail : "UI engine accessed without holding the event lock."


Do you have any further suggestions for correcting this?

Message Edited by ataylorccs on 12-11-2008 01:36 PM
New Developer
Posts: 5
Registered: ‎12-09-2008
My Device: Not Specified

Re: BrowserContentManager Behavior (Blackberry Bold)

Application.getApplication().invokeLater(new Runnable() { public void run() { //code should be here } });


I've looked at this problem for so long I'm missing the obvious: I was just being silly and forgot to use an invokeLater!! Smiley Sad


This seems to have fixed it. Thanks everybody.