Skip to main content


Showing posts from August, 2007

Add css styles for gwt widgets

Adding Cascading styles (CSS) to Google Web Toolkit (GWT) widgets is much simpler and involves only two steps. Style nameset style name
for a widget using the $widgetInstance$.setStyleName() method orstick with the default
style name of the widget (use for setting global values)
default style name examples: for buttons: .gwt-Buttonfor Check Boxs: .gwt-CheckBox
CSS style ruleAdd CSS style rules to a .css file and import that into the html page
orwrite those inside the html page itself. (not recommended)
Let us provide you with an example which would create buttons shown below.

Coding in your java class: Button cancelButton = new Button("Cancel"); Button loginButton = new Button("Login"); loginButton.setStyleName("buttons");
CSS rules:
.gwt-button { background: #EEEEFF; color: #0000CC; font-size: 12px; } .buttons { background: #CCCCCC; color: #333333; font-size: 12px; }

GWT releases 1.4 and is no longer beta

Google Web Toolkit (GWT) has released a new version, 1.4. With over 1 million downloads GWT is moving forward well; and it's no longer beta. The user group is really active and well established; so if you haven't tried GWT yet, it's time to have a look.

Read more about GWT and news release at GWT official blog.

For any issues visit the GWT user group here.

Would Google Adsense let a website earn $100,000 per month?

Yes, Yes, Yes!!! With Google Adsense earning $100,000 per month!!! Feels like day dreaming? Are there web sites earning around 100k dollars per month; shockingly and interestingly the answer is YES. There are some few sites that earn this much; even more than that. Believe me A social site named "PlentryOfFish" owned by "Markus" has earned more than $900k in two months while "ShoeMoney" blog earned more than $100k in one month. See the proofs here and here. So the good news is we should try now and reach there since it is possible. Analysis of sites earning with Adsense There are two major factors related to the earnings. 1. Monthly visitors Number of visitors is a huge factor considering the Adsense revenue as visitors help revenue increase; so having a healthy visitors base is a must. 2. Adsense ads placementText and Image ads combination
Many sites have been using text/image advertisements rather than going for text only ads or image only ads t…

Adsense Ads between blogger posts

If you have switched your blog from older blogger to new blogger platform (which uses layouts) and looking for adding adsense advertisements in between posts; Blogger has created a new widget for this purpose. And they have made it such that any non-tech blogger even can use this. This widget lets you specify number of posts between an adsense advertisement. You can see the full guide here at Get inline.

If you haven't switched to new blogger yet, don't worry. You still can put adsense ads between your posts. You have to put the adsense code inside the tags that shows up the blog post. My home page has done like that. If you need any assistance on that, just drop me a mail or write below as a comment. I would be happy to help you.

GWT not working on Internet explorer 7 (IE7) giving "Element not found" JavaScript error

GWT web application started to give "Element not found" JavaScript error message on Internet Explorer 7 (IE7)? This application worked fine on Internet Explorer 6 and Firefox 2. Now your best guess would be; GWT not working on IE 7 properly. Wasn't it?

Situation becames confusing and unbelievable because your application worked fine on IE7 in some machines while not on some others. Have you faced this issue? Solution This issue can be fixed by a making a change on windows registry.

Steps to follow are; Open up the Registry editor by typing regedit on command prompt. Look for the key shown below
  HKEY_CLASSES_ROOT\TypeLib\{EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}\1.1\0\win32 Click on the "Default" row and see the value there.
If it's value is "C:\WINDOWS\system32\shdocvw.dll", then that is what causes the above mentioned issue.
If you have installed Windows in a different drive; C:\ must be replaced with the that letter. Replace that value with

Set Cookies with GWT applications to expire after expected time period

Google Web Toolkit (GWT) supports HTTP cookies similar to other web technologies. GWT provides methods for setting cookies for specified time duration, for specific domains and paths. Below is a listing on how to set a basic cookie for a duration of one day.
Write/Set Cookies Date now = new Date(); long nowLong = now.getTime(); nowLong = nowLong + (1000L * 60 * 60 * 24 * 7);//seven days now.setTime(nowLong); Cookies.setCookie("sampleCookieName", "sampleCookiValue", now);
When retrieving the cookies, you have to specify only the name of the cookie, nothing related to duration. If the cookie is found in the browser for this domain (not expired); value you set will be returned.
Read/Get Cookies Cookies.getCookie("sampleCookieName");//only name
Things to considerIn setting cookies, you must consider on what you actually plans to get done using a cookie. There are two possibilities in setting duration for cookies. Either remember duration
(i) from the day …
Creative Commons License Digizol by Kamal Mettananda is licensed under a Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 License .
URL of this page must be supplied in attribution
© 2004-2017