Archive

Author Archive

Smart GWT – SgWidgets

April 21st, 2011 No comments

SmartGWT is an amazing UI component library for Google Webtool Kit. It increases your UI development productivity multi-fold as you don’t have to deal with many of the web related issues like Js/Css/Jsp/Jsf.

While it has so many components, I found out that it is missing Date/Time picker and Dual Pane List, which I end up creating myself for a project I was working on.

I’m releasing these two widgets as open-source project. Hope somebody finds it useful.

Categories: Sgwidgets Tags:

data-exporter

April 21st, 2011 No comments

Sometime back I posted about Java Text Table Formatter. As I worked on that, I realized that most of the data export model could be reused to export the content in various formats, like Xml, Html or Json etc.,

To that end, I started to refactor the code base to support various formats and I’m releasing it as new project data-exporter. It is very simple and flexible library to export the data in various formats. Check out the features and try it out. Let me know if you want some specific feature.

Categories: Data Exporter, Java Tags:

Ivaru Mechuva Vastu Illila Joke

April 20th, 2011 No comments

KS Narasimhaswamy is a prominent poet in Karnataka. One of his poem I always remember is, Ivaru Mechuva Vastu Illila Joke. This is about the general populous who always complains about the things around.

ಇವರು ಮೆಚ್ಚುವ ವಸ್ತು ಇಲ್ಲಿಲ ಜೋಕೆ

ಚಳಿಗಾಲ ಬಂದಾಗ ಎಷ್ಟು ಚಳಿ ಎಂಬರು
ಬಂತಲ್ಲ ಬೇಸಿಗೆ ಕೆಟ್ಟ ಬಿಸಿಲೆಮ್ಬರು
ಮಳೆ ಬಿತ್ತು ಬಿಡದಲ್ಲ ಶನಿ ಎಂಬ ಟೀಕೆ
ಇವರು ಮೆಚ್ಚುವ ವಸ್ತು ಇಲ್ಲಿಲ್ಲ ಜೋಕೆ

ನಿಂತರೆ ಕೇಳುವರು ನೀನೇಕೆ ನಿಂತೆ
ಮಲಗಿದರೆ ಗೊಣಗುವರು ನಿನಗಿಲ್ಲ ಚಿಂತೆ
ಓಡಿದರೆ ಬೆನ್ನ ಹಿಂದೆಯೇ ಇವರ ಟೀಕೆ
ಇವರು ಮೆಚ್ಚುವ ವಸ್ತು ಇಲ್ಲಿಲ್ಲ ಜೋಕೆ.

Approximate English translation:
ಚಳಿಗಾಲ ಬಂದಾಗ ಎಷ್ಟು ಚಳಿ ಎಂಬರು => Come winter, they say, how cold it is
ಬಂತಲ್ಲ ಬೇಸಿಗೆ ಕೆಟ್ಟ ಬಿಸಿಲೆಮ್ಬರು => In summer, they say, why did this summer come, it is so hot
ಮಳೆ ಬಿತ್ತು ಬಿಡದಲ್ಲ ಶನಿ ಎಂಬ ಟೀಕೆ => If it rains, they say why doesn’t this rain stop
ಇವರು ಮೆಚ್ಚುವ ವಸ್ತು ಇಲ್ಲಿಲ್ಲ ಜೋಕೆ => Be careful, you cannot please these people

ನಿಂತರೆ ಕೇಳುವರು ನೀನೇಕೆ ನಿಂತೆ => If you stand, they ask why did you stand?
ಮಲಗಿದರೆ ಗೊಣಗುವರು ನಿನಗಿಲ್ಲ ಚಿಂತೆ => If you sleep, they complain, you don’t have any responsibility
ಓಡಿದರೆ ಬೆನ್ನ ಹಿಂದೆಯೇ ಇವರ ಟೀಕೆ => If you run, they criticize behind your back
ಇವರು ಮೆಚ್ಚುವ ವಸ್ತು ಇಲ್ಲಿಲ್ಲ ಜೋಕೆ. => Be careful, you cannot please these people

Categories: Kannada Tags:

Web Service Connector (WSC) and Duplicate boolean Getters

March 24th, 2011 No comments

If you have worked with Salesforce WebService API or Metadata API from within Java environment, then it is possible that you might have used Salesforce WSC. This is a all inclusive high performance WebService stack, designed to access the Salesforce APIs easily.

I have been using that for a tool I have been working on and it has been working great.

One issue I found with this library is that it generates two getters for boolean variables (Both get and is variant). Some tools (like Jackson) doesn’t like this fact and complain about it.

org.codehaus.jackson.map.JsonMappingException: Conflicting getter definitions for property "booleanVariable"

Fortunately, it is easy fix this issue. WSC uses templates to generate the Java files. These templates are there in com.sforce.ws.tools. Template which generates the type source files is type.template. In this template, replace the following,

  public <%=gen.javaType(el)%> <%=gen.getMethod(el)%>() {
    return <%=gen.fieldName(el)%>;
  }

with

 

  <% if(!"boolean".equals(gen.javaType(el))) { %>

  public <%=gen.javaType(el)%> <%=gen.getMethod(el)%>() {
    return <%=gen.fieldName(el)%>;
  }

  <%}/**end if()*/%>

This should avoid generating the duplicate getters for boolean variables.

Categories: Uncategorized Tags:

Enhanced service from Servers

March 9th, 2011 No comments

You might have experienced this. You want to see an article in some site. When you navigate using your smart phone to read the article, instead of showing the article, site would show you the mobile version of their home page with assumption that they are providing you the enhanced service :) . It just freaks me out and I wonder why they do that.

Well, Xkcd, says it well.

Hi I'm a Server

Categories: Uncategorized Tags: