The spinner object on android development really give me a big headache. First I face the OnItemSelectedListener event handler gets called every time it been set. And then I face the same event handler gets called when a spinner selection is changed programmatically.
Finally I manage to write a dynamic spinner example to work correctly.
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." - Martin Fowler
Friday, April 20, 2012
Tuesday, March 13, 2012
How do I submit a Chinese characters in Struts?
The Chinese characters "UTF-8" encoding not able to work with the above code. The magic trick is on the "TilesRequestProcessor", change
< controller processorClass="org.apache.struts.tiles.TilesRequestProcessor" / >
to
< controller processorClass="com.fabiolee.struts.tiles.RequestProcessor" / >
in the "struts-config.xml" and add in the below class "RequestProcessor.java".
Then it will work nicely.
Subscribe to:
Posts (Atom)