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

Java Development

Reply
New Developer
ataylorccs
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.

 

Antony.

Please use plain text.
Administrator
MSohm
Posts: 14,528
Registered: ‎07-09-2008
My Device: BlackBerry Z30, BlackBerry PlayBook
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

http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800878/800733/How_To_...

 

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

http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800878/800733/How_to_...

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Please use plain text.
New Developer
ataylorccs
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

"Uncaught:

"IllegalStateException"

 

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
Please use plain text.
New Developer
ataylorccs
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!! :smileysad:

 

This seems to have fixed it. Thanks everybody.

Please use plain text.