Me n My Programming

If Only I Have TIme

Set Default Time Zone

It is a good practice that before we get the date and time using Php, we need to set the default time zone. This is the code to set the … Continue reading

February 10, 2014 · 3 Comments

ITSB Spring 105 – The Importance of @Autowired in code

When you’re using Spring MVC, there are certain keyword that you must have and should not forget when you’re coding. For instance, the @Autowired keyword. This will link your code … Continue reading

September 30, 2013 · Leave a comment

ITSB Spring 104 – Javascript Input Validation

Sometimes, we need to check the input before they were store. This is the example on how it can be used: function validateForm() { var x=document.forms[“myForm”][“fname”].value; if (x==null || x==””) … Continue reading

September 17, 2013 · Leave a comment

ITSB Spring 103 – Adding Error to BindingResult

Sometimes we need to add custom error to the binding result. So here is how we do it: ObjectError error = new ObjectError(“email”,”An account already exists for this email.”); result.addError(error); … Continue reading

September 17, 2013 · Leave a comment

From Web to Desktop – HTML5?

Live as a sole programmer has it’s advantages and dis-advantages. The advantages are that your boss rely on you and you can sometimes asked for “work from home” situation >:) … Continue reading

July 17, 2013 · Leave a comment

ITSB Spring 102 – JSTL HTML Select

This is for making the html select option: 1. JSP file <form:select path=”cityid” items=”${cityList}” /> 2. Controller file uiModel.addAttribute(“cityList”, cityService.populateCity()); 3. Service interface file public Map populateCity(); 4. Service Implementation … Continue reading

May 7, 2013 · Leave a comment

ITSB Spring 101 ~ Upload File to Server

One of the requirement for the new portal is to upload files (photo and pdf) to the server. Went google, and found these tutorial: From roseindia.net – Spring Upload File. … Continue reading

January 29, 2013 · Leave a comment