-
30 Nov 2010 2:33 AM #1
TimeField how to setRawValue()
TimeField how to setRawValue()
I searched the forum from beginnig to end twice. No useful links.
I want to show specific time (9:51, 18:32) value in timefield but I couldn't be sucessfull.
I tried below:
another I tried:Code:final DateWrapper wrapper = new DateWrapper( new Date() ); time.setValue( new Time( wrapper.getHours(), wrapper.getMinutes() ) );
these are didn't work. Any solution?Code:final DateWrapper wrapper = new DateWrapper( new Date() ); time.setRawValue( wrapper.getHours() + ":" + wrapper.getMinutes() );
-
30 Nov 2010 2:41 AM #2
1 code snippet: Time object has no text set, thats why nothing gets displayed.
2 code snippet works fine for me against latest SVN.
-
30 Nov 2010 3:42 AM #3
Are you serious 2 code snippet working.
I'm using GXT 2.2.1 and GWT 2.0.4 didn't work.
I implemented it small testcase please try this:
Code:public class Testing implements EntryPoint { private static ModuleTree modTree; private static CentralTabPanel tabPanel; public void onModuleLoad() { TimeField time = new TimeField(); final DateWrapper wrapper = new DateWrapper( new Date() ); time.setRawValue( wrapper.getHours() + ":" + wrapper.getMinutes() ); time.setWidth( "70" ); time.setFieldLabel( "time" ); time.setAllowBlank( false ); time.setTriggerAction( TriggerAction.ALL ); RootPanel.get().add( time ); GXT.hideLoadingPanel( "loading" ); }
-
30 Nov 2010 3:44 AM #4
setRawValue only works post rendering.
-
30 Nov 2010 3:56 AM #5
-
30 Nov 2010 4:02 AM #6
So this is also working for you now?
Similar Threads
-
ComboBox - setRawValue
By defcon1 in forum Ext 3.x: Help & DiscussionReplies: 3Last Post: 30 Mar 2010, 12:40 AM -
[FIXED] TimeField.setRawValue() issue
By liukaipeng in forum Ext GWT: Bugs (1.x)Replies: 1Last Post: 9 Sep 2008, 9:33 AM -
[2.??] ComboBox setRawValue
By XASD in forum Ext 2.x: BugsReplies: 10Last Post: 30 Jul 2008, 12:45 AM -
how to setRawValue of combo in tabpanel
By shuang in forum Ext 2.x: Help & DiscussionReplies: 1Last Post: 25 Jun 2008, 8:26 PM -
combobox setRawValue() issue
By manugoel2003 in forum Ext 2.x: Help & DiscussionReplies: 4Last Post: 21 Mar 2008, 8:54 AM


Reply With Quote