Reusing tabs in web browser - blackberry

I am loading the given URL in web browser using the following code;
BrowserSession browserSession = Browser.getDefaultSession();
browserSession.displayPage(url);
Problem is, whenever I run this code, web browser opens the URL in a new tab (even if the URL is same). I want to reuse the existing tab or at least close the previously opened tab. In short I don't want to end up having a pile of tabs after firing several URLs.
Please guide me if there is any way to achieve this. I don't want to use BrowserField.
I am using;
BlackBerry Eclipse JDE 1.5
Target BlackBerry OS 4.5
Tested on BlackBerry Bold 9900 on Wifi network

I think the only one possible solution display pages inside your application by using BrowserField or RenderingApplication. There are samples available included to JDE or eclipse plugin.

Related

Open a new browser Window from a webview, without user input

I'm looking for a way to open a new browser window from a WebView, from a wp8.1 RT, silverlight or UWP app.
It should happen when the page loads, or after a few seconds, without any user input (I know it's possible if the user clicks on a 'target="_blank"' link)
Does anyone know if any way to do this exists?
I tried with window.open, jquery's .click() or .submit(), but nothing...
Neither the the javascript alert() works, it does work instead redirecting to a uri protocol with location.href and open an app, but unfortunately IE/Edge doesn't have an app protocol to launch it...
Any help would be much appreciated.
Since you put both Windows Phone 8 and Windows 10 in your tags, I can't be sure what to offer you here. SO I will tell you how to do it in 8.
JavaScript in a WebView can call external C# code by using ScriptNotify. You can read more about that in this question: Call Native C# from WinJS that's loaded in a WebView
Also, once you are in C# and you want to launch a browser, the answer is to use the LaunchUriAsync API. Read more about that here: https://msdn.microsoft.com/library/windows/apps/windows.system.launcher.launchuriasync.aspx
Best of luck!

smartgwt offline-caching with no GWT module

I'm using Eclipse 4.2, appengine-java-sdk-1.8.9, gwt-2.5.1, smartgwt-4.0p
I'm trying make the simple project like this - http://uptick.com.au/content/create-gwt-project
but offline.
When I save page (as html page) it doesn't work offline and I receive alert - "GWT module may need to be (re)compiled".
My question is: how to change project to save it as html page (plus project_name_nocache.js file).
Thanks.
You might be getting this error message because you might be trying to run/debug your application in compiled mode. In order to do so, you need to re-compile your application for GWT after every single change in code.
To avoid this, you should run/debug your application in developer mode.
See this link, to have idea on how to run GWT application in dev mode.

jQueryMobile / bootstrap / both

Today we got one version of the system for desktop and we got one version with jQueryMobile.
The goal is to only have one system/page for desktop, tablets and mobiles.
I know that bootstrap is a good css/js framework and it is responsive. That will soulve the todays problem with the desktop version of our system.
As I said we have one mobile version as well. But today it gives us some "double work". And it is made in webforms.
My thought was to use bootstrap for both desktop and mobile. But my boss like jQuerymobile look and functionality.
We belive that our main users will be mobile/tablet users. So the best solution will perhaps be to remake the jquerymobile page and build it with MVC?
The main content of the system is for eployees to check their scheme, accept work-suggestions from their bosses and so on... This is in a calender.
There will be some more functionality in this calendar futher on.
Ofc there is some other stuff in the system but this calendar is the biggest.
My question is what direction we will go with this. The goal is to have one page/system for both mobile and desktop users.
If you are using JqueryMobile, I normally use another kind of windows events, but i have tried those events in normal pc browser and they tend to work okay. So why dont you build the system base on jquery mobile and just change the layout depending on who is making the request with a agent request.

BlackBerry BrowserField executing javascript

I tried a simple javascript [Example: document.getElementById("mydiv").style.display = "none";] on a web page and tested it on BlackBerry 4.5 simulator browser and it worked.
Now I have an app (JRE 4.5 - Eclipse Plugin) with a BrowserField embedded in a browser and I access the same page in the BrowserField. I do have the following code added to my app
myrenderingSession.getRenderingOptions().setProperty(RenderingOptions.CORE_OPTIONS_GUID, RenderingOptions.JAVASCRIPT_ENABLED, true);
But the java script is not working. Do I need to add custom code to ensure java script executes? Anything in the Event.EVENT_EXECUTING_SCRIPT? Please help!
I simply can confirm I have the same code on OS 4.5 to enable JS, and the page with JS works OK for me. However should also say I don't hide anything on the page via JS, so I can't confirm if the same JS to hide an element works for me.
Also - I don't handle Event.EVENT_EXECUTING_SCRIPT in any way. So I am sure the code you are using to enable JS is enough to expect JS support in your BrowserField.

How to show WebPage in blackberry application?

How can we show the web page in the blackberry application.Pls share ur ideas to show the web page in blackberry application using broswerfield.If possible provide some code snippet.
The best place to look is in the sample code that ships with the JDE itself (or Eclipse plugin). Specifically, there is a sample app called "BrowserFieldSampleApplication" that has all the sample code you desire.

Resources