I am using a Text Column of a cell table to display time but I want to
update the time on real time basis using a timer. How can I acheive
this?

I am setting the time with this

final TextColumn<Auction> TimeRemaining = new TextColumn<Auction>(){
                        @Override
        public String getValue(final Auction object)
        {
                if (object.getTimeRemaining() > 0)
                {
                    long s = ((object.getTimeRemaining()  / 1000) %
60);
                    long m = (((object.getTimeRemaining()  / 1000) /
60) % 60);
                    long h = ((((object.getTimeRemaining()  / 1000) /
60) / 60) % 60);


                    if (h>0 && m>0)
                    {
                        return (h + " hours " + m + " minutes " + s +
" seconds");
                    }
                    else if (h==0 && m>0)
                    {
                        return (m + " minutes " + s + " seconds");
                    }
                    else
                    {
                        return (s + " seconds");
                    }
                }
                else
                {
                    return "Auction Closed";
                }

        }};

How can i place a timer so that the text column is updated every
seconds??

I know that column should be updated using the field updater but I am
failing to understand how this works with a timer!!

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to