Posts: 11
Threads: 4
Joined: Oct 2009
Reputation:
0
11-10-2009, 05:52 PM
I would like to know how can I set a value for a JavaEdit inside the JavaTable. I've tried the following but it's not working.
Code: JavaWindow("...").JavaTable("...").SetCellData "0", "0", "value"
Posts: 350
Threads: 2
Joined: Mar 2008
Reputation:
0
11-10-2009, 08:58 PM
Hi,
Remove the "" for row,column.
Try as given below :
Examples:
Code: JavaWindow("...").JavaTable("...").SetCellData 0, 0, "value"
JavaWindow("...").JavaTable("Table Example").SetCellData 2, 4, "CostCenter"
Posts: 11
Threads: 4
Joined: Oct 2009
Reputation:
0
11-11-2009, 12:48 PM
I tried to remove the double quotes but it still does not work. There is a JavaEdit field in the JavaTable, does this have any effect? Thank you!
Posts: 350
Threads: 2
Joined: Mar 2008
Reputation:
0
11-11-2009, 01:31 PM
Hi yonobev,
Oh Okay !!!
If you mean to say that " JavaEdit is located inside the JavaTable's Cell", then try as given below.
Code: JavaWindow("...").JavaTable("...").ChildItem(0,0,"JavaEdit",0).Set "test Value"
Do let us know if it's working fine , I hope it would
Posts: 11
Threads: 4
Joined: Oct 2009
Reputation:
0
11-11-2009, 02:28 PM
Hi,
It is still not working. I tried to record the script again, but when I played, it does not work.
Regards!
Posts: 240
Threads: 38
Joined: Jun 2009
Reputation:
0
11-12-2009, 10:04 AM
(This post was last modified: 11-12-2009, 10:05 AM by venkatbatchu.)
HI,
You can stet the value in a java edit inside java table using childitem
Code: set jedit=JavaWindow("...").JavaTable("...").ChildItem(row number,column number,"JavaEdit",Index).Set "test Value"
here rownumber and column number is nothing but the place where javedit is placed in Javtable and Index is the index of the propert i.e java edit
Note: u might have used the row=0 and column=0 please change this value w.r.t youe javaedit and try with this
Thanks,
Venkat.Batchu
Type error
find the below one:
Code: JavaWindow("...").JavaTable("...").ChildItem(row number,column number,"JavaEdit",Index).Set "test Value"
Posts: 1,003
Threads: 1
Joined: Jul 2009
Reputation:
5
11-15-2009, 01:30 PM
There could be a issue of polymorphisim. For the Row and column try with Cint and see if that helps.
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Posts: 47
Threads: 9
Joined: Feb 2010
Reputation:
0
10-12-2017, 06:37 AM
(11-15-2009, 01:30 PM)basanth27 Wrote: There could be a issue of polymorphisim. For the Row and column try with Cint and see if that helps.
I have pretty same issue, when I record the steps it looks like this:
Code: JavaWindow("name").JavaDialog("name").JavaTable("name").SetCellData "#0","Area","01 ANTENNA"
But when I re-run it does not actually select a value but only kind of activates de list or something related (as before running the code above the row / column shows as gray but after, it becomes white), see below:
the list:
before running the line above:
and after: running the line above
The list when looking at it using the Spy Tool has JavaEdit object inside - these are those records listed under the list (a JavaEdit object for each record)..
Posts: 1,105
Threads: 18
Joined: Jan 2008
Reputation:
8
10-12-2017, 03:30 PM
Just before that statement you can emulate a click. Essentially the first click will select and then the second click will Set the data as required.
Posts: 47
Threads: 9
Joined: Feb 2010
Reputation:
0
11-08-2017, 11:12 PM
(This post was last modified: 11-08-2017, 11:14 PM by lotos.
Edit Reason: updated the content
)
(10-12-2017, 03:30 PM)Ankur Wrote: Just before that statement you can emulate a click. Essentially the first click will select and then the second click will Set the data as required.
Hi Ankur, this is actually something which I tried and worked, the difference is that I actually used the JavaList objects inside each table's cell instead of the JavaEdit ones, see the code sample below:
Code: 'grid/table:
JavaWindow("AppMain").JavaDialog("myDialog").JavaTable("tblName").Highlight
'Column 1:
JavaWindow("AppMain").JavaDialog("myDialog").JavaTable("tblName").ClickCell 0, "col1_Title", "LEFT"
'List inside column 1:
JavaWindow("AppMain").JavaDialog("myDialog").JavaList("listName").Select valueForCol1
'Column 2:
JavaWindow("AppMain").JavaDialog("myDialog").JavaTable("tblName").ClickCell 0, "col2_Title", "LEFT"
'List inside column 2:
JavaWindow("AppMain").JavaDialog("myDialog").JavaList("listName").Select valueForCol2
'Column 3:
JavaWindow("AppMAin").JavaDialog("myDialog").JavaTable("tblName").ClickCell 0, "col3_Title", "LEFT"
'List inside column 2:
JavaWindow("AppMain").JavaDialog("myDialog").JavaList("listName").Select valueForCol3
'click OK button:
.JavaButton("text:=OK").Click
|