drop down menu - Eclipse Scout call getDataByKey to many times -
i have form table. table has smart fields.
my problem when fill data in table (by initialization) smart fields call getdatabykey id (what right) not called once expect 30 times.
i dig little bit answer , discovered function called many times, because inside class abstracttable
inside processdecorationbuffer
table calls m_celllookupbuffer
has lot of calls stored inside (512 insted 9).
has same problem?
when have smartcolumn in table, scout needs lookup "key -> text" each row. mentioned, in cases can expensive. why there additional concept: batchlookupcall / batchlookupservice.
the idea first collect rows , required lookupcall , process them in 1 batch.
to answer question, had set small playground project. here key points have noticed:
type of key
batch lookupcall check equals method of call relies on equality of key object. if using custom type key, ensure equals()
, hashcode()
implemented.
way of adding rows in table
if add rows 1 after other, this:
table table = getmytablefield().gettable(); itablerow r; r = table.addrow(table.createrow()); table.gettextcolumn().setvalue(r, "lorem"); table.getmycolumn().setvalue(r, 1l); r = table.addrow(table.createrow()); table.gettextcolumn().setvalue(r, "ipsum"); table.getmycolumn().setvalue(r, 3l); r = table.addrow(table.createrow()); table.gettextcolumn().setvalue(r, "dolor"); table.getmycolumn().setvalue(r, 1l); r = table.addrow(table.createrow()); table.gettextcolumn().setvalue(r, "figus"); table.getmycolumn().setvalue(r, 4l);
scout computes table content often… observe many calls lookup service. think there optimization possibility in domain.
this not happen if import rows in 1 step, example using tabledata included in formdata or in tablepagedata.
Comments
Post a Comment