10-13-2008 10:24 AM
10-13-2008 01:22 PM
10-13-2008 01:30 PM - edited 10-13-2008 01:30 PM
10-13-2008 03:04 PM
Hello,
I am not an expert of GWT but I have taken look at this toolkit and it seems that GWT has a client detection. This feature is typical for server based Ajax frameworks. Therefore it seems that the BlackBerry browser is unknown to GWT and the server of Googles sample page does not send the appropriate files to the client and the page is not displayed. Perhaps you will find more help in the documentation .
Hope it helps.
10-13-2008 04:07 PM
02-19-2009 03:37 PM
TGreenwood wrote:...
3. Outside of page load, neither document.write() nor innerHTML are producing any rendered changes in the net.rim.device.api.browser.field. However, at the end of page loading, or thereabouts, the net.rim.device.api.browser DOES render the results of these DOM changes. So, somehow net.rim.device.api.browser notices changes to the DOM and refreshes the page, whereas the browser.field impl doesn't have this check.
...So, the net.rim.device.api.browser is responding to the innerHTML and document.write() calls, but we're only seeing rendering at the end.
How could I get similar functionality with net.rim.device.api.browser.field?
I came across the same problem: changes are made to the innerHTML but are not reflected in browser.field. Is there any way around this? Are there any plans to fix this?
04-13-2009 09:51 PM
I am Developing an App for a forum, my Forum have a lot hide information with a label that in vBulletin is called post thank you, exactly after you press the button thank is when you can view the information hide. [HIDE-THANKS]Hide Information[/HIDE-THANKS]
The problem is that in the Mobile version of the forum I can´t give thank. I want to implement give thank from my app. The post thank you is in format Ajax.
Each post have a number, I dont know if it is possible that with the number of the post I can give the thank.
For example when I press the button Thank you, the url link is something like this: "zonablackberry.com.ve/forum/81xx/9227-crystal-cle
In this case the number 103826 is the number of the post.

My idea is make a menu item
private MenuItem posthank = new MenuItem("Give Thank you", 0, 0) {
public void run()
{
String selections[] = {
"Done", "Cancel"
};
Dialog addDialog = new Dialog("Give Thank you", selections, null, 0, null);
EditField inputField = new EditField("Number of Post: ", "");
addDialog.add(inputField);
if(addDialog.doModal() == 0)
{
String text = inputField.getText();
String Post = "?thanks_mode=add";
String Pre = "zonablackberry.com.ve/forum/81xx/9227-crystal-clear-tema-para-81xx.html#post103826?thanks_mode=add";
Browser.getDefaultSession().displayPage(Pre + text + Post);
Browser.getDefaultSession().showBrowser();
}
}
};
But thanks are not added to the list. This could be that this mode is in format Ajax. Any idea to solve my problem?
Sorry for my poor English.
I´m from Venezuela.
11-17-2010 09:25 AM
The problem with accessing a website built with Google Web Tools is in how Google Web Tools work.
Basically you create the application using Java and then the GWT compiler creates multiple optimized JavaScript cached files. It also creates a bootstrap file that is used to detect the browser and then it supplies the file optimized for that browser.
As previously suggested, the Blackberry browsers are not supplying a user agent string that the bootstrap file supports.
So one of two things (but preferably both) needs to happen.
1) Blackberry changes the user agent string on that their browsers send
2) Google Web Tools provides a default cached file when it does not recognize the user agent.
As a way to verify that the GWT bootstrap is not supplying a default cache file, in Firefox you can change the user agent for testing.

11-17-2010 11:23 AM
This is the section of the .nocache.js that determines which kind of browser is running the code and so which cache file to load.
providers['user.agent'] = function(){
var ua = navigator.userAgent.toLowerCase();
var makeVersion = function(result){
return parseInt(result[1]) * 1000 + parseInt(result[2]);
}
;
if (ua.indexOf('opera') != -1) {
return 'opera';
}
else if (ua.indexOf('webkit') != -1) {
return 'safari';
}
else if (ua.indexOf('msie') != -1) {
if (document.documentMode >= 8) {
return 'ie8';
}
else {
var result_0 = /msie ([0-9]+)\.([0-9]+)/.exec(ua);
if (result_0 && result_0.length == 3) {
var v = makeVersion(result_0);
if (v >= 6000) {
return 'ie6';
}
}
}
}
else if (ua.indexOf('gecko') != -1) {
var result_0 = /rv
[0-9]+)\.([0-9]+)/.exec(ua);
if (result_0 && result_0.length == 3) {
if (makeVersion(result_0) >= 1008)
return 'gecko1_8';
}
return 'gecko';
}
return 'unknown';
}
;
values['user.agent'] = {gecko:0, gecko1_8:1, ie6:2, ie8:3, opera:4, safari:5};
Notice that if it does not determine a matching user agent it returns "unknown". This is why it does not work on most Blackberry browsers as only the 9800 Torch has a browser that contains "gecko" in the user agent string, the rest all return "blackberry".
So a solution until GWT creates an optimized cache file for Blackberry specific browsers could be to change the "return 'unknown'" to "return 'gecko'" or one of the other valid user agents (some testing would need to be done to find the one that is most compatible with the majority of blackberry browsers).
