nijogeorgep / smartgwt

Automatically exported from code.google.com/p/smartgwt
0 stars 0 forks source link

TextItem.selectValue () does not always select the text #565

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I would like to select a TextItem via textItem.selectValue ().
Documentation says "Put focus in this item and select the entire value. Only 
applies to text based items", which is what I want.
I could not get this to work.
I tried several methods: see the code attached where I have marked "Test #1 - 
Test #6", along with comments as to what the results for that test where.
The only way I could get selectValue () to work is either in response to some 
user action (like a button click), or to execute it in "delayed" fashion via a 
Timer, which hopefully runs after the form is drawn...
I opened this Forum thread but did not receive any replies: 
http://forums.smartclient.com/showthread.php?t=15391
So I am opening this issue.

What steps will reproduce the problem?
1. Create a DynamicForm
2. Add a TextItem
3. Call TextItem.selectValue ()

What is the expected output? What do you see instead?
I expect to see the text selected and the form item focused.
I see the form focused, but the text is not selected.
The only way I get to see the text selected is by invoking selectValue () in 
response to some user action like a button click.

What version of the product are you using? On what operating system?
SmartGWT 2.4
GWT 2.1.1
Windows 7

What browser(s) does this happen in?  Are there any browsers where the issue 
does not occur?
Happens in: Chrome 8.0.552.237
Happens in: IE 9.0.7930.16406IS

Additional info.
Here is the dev console output for the test cases documented within the 
attached sample.

Test #1
09:09:37.326:INFO:Log:initialized
09:09:37.328:WARN:Page:NOTE: isc.Page.getWidth() called before <BODY> tag was 
written out -- value cannot be determined.  Returning 500
09:09:37.328:WARN:Page:NOTE: isc.Page.getHeight() called before <BODY> tag was 
written out -- value cannot be determined.  Returning 500
09:09:37.382:WARN:AutoObserver:Use addInterfaceProperties() to add methods to 
interface [Class AutoObserver]
09:09:37.470:INFO:Log:isc.Page is loaded

Test #3
09:10:41.993:INFO:Log:initialized
09:10:41.995:WARN:Page:NOTE: isc.Page.getWidth() called before <BODY> tag was 
written out -- value cannot be determined.  Returning 500
09:10:41.995:WARN:Page:NOTE: isc.Page.getHeight() called before <BODY> tag was 
written out -- value cannot be determined.  Returning 500
09:10:42.050:WARN:AutoObserver:Use addInterfaceProperties() to add methods to 
interface [Class AutoObserver]
09:10:42.138:INFO:Log:isc.Page is loaded

Test #5
09:11:09.105:INFO:Log:initialized
09:11:09.107:WARN:Page:NOTE: isc.Page.getWidth() called before <BODY> tag was 
written out -- value cannot be determined.  Returning 500
09:11:09.107:WARN:Page:NOTE: isc.Page.getHeight() called before <BODY> tag was 
written out -- value cannot be determined.  Returning 500
09:11:09.161:WARN:AutoObserver:Use addInterfaceProperties() to add methods to 
interface [Class AutoObserver]
09:11:09.250:INFO:Log:isc.Page is loaded

Test #6
09:12:05.592:INFO:Log:initialized
09:12:05.734:WARN:AutoObserver:Use addInterfaceProperties() to add methods to 
interface [Class AutoObserver]
09:12:05.869:INFO:Log:isc.Page is loaded

Original issue reported on code.google.com by shortpa...@gmail.com on 10 Feb 2011 at 1:18

Attachments:

GoogleCodeExporter commented 8 years ago
Should be fixed in 3.0p, please confirm.

Original comment by smartgwt...@gmail.com on 18 Apr 2012 at 12:47

GoogleCodeExporter commented 8 years ago
Does not look fixed to me.
Using 3.0p-2012-04-26
Using Firefox 6.0.2

Test #1: pass
Test #2: fails with the same: Caused by: 
com.google.gwt.core.client.JavaScriptException: (TypeError): self.selectValue 
is not a function
Test #3: fails: form DrawHandler.onDraw () is called, selectValue () does not 
fail, but the value is not selected
11:37:10.935:INFO:Log:initialized
11:37:10.945:WARN:Log:NOTE: Firebug is enabled. Firebug greatly slows the 
performance of applications that make heavy use of JavaScript. Isomorphic 
highly recommends Firebug for troubleshooting, but Firebug and other 
development tools should be disabled when assessing the real-world performance 
of SmartClient applications.
11:37:11.616:WARN:Log:New Class ID: 'EditPane' collides with ID of existing 
Class object '[DataSource ID:EditPane]'.  Existing object will be replaced.
This conflict would be avoided by disabling ISC Simple Names mode.  See 
documentation for further information.
11:37:16.799:INFO:Log:isc.Page is loaded
Test #4: fails: form DrawHandler.onDtraw () is called, selectValue () does not 
fail, but the value is not selected
Test #5: fails: selectValue () does not fail, but the value is not selected
Test #6: fails: selectValue () does not fail, but the value is not selected
Test #6 with a basePeriod of 1000 instead of 100: works!

Original comment by shortpa...@gmail.com on 26 Apr 2012 at 7:23