You are on page 1of 3

New Web Dynpro Sample available - Enhancing Table Performance

Bertram Ganz Bu ine !ar"


Po te" on Sep# $%& '(() ($*%) +, in +pplication Server& -ava Programming & S+P NetWeaver Platform& Emerging Technologie & Web Dynpro ./0* https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/bad3e9 90-0201-0010-39 !-"a093#d901b$

.ubscrib e /rint /ermalin k

%he e&istin' (eb )ynpro table selection behavior is automatically combined with a correspondin' lead selection chan'e. (hen clickin' on a table cell editor* it is even possible that two separate server roundtrips have to be processed* which may lead to an undesired per"ormance drawback. + wrote a new article with a related sample application which describes how to improve the (eb )ynpro table selection behavior usin' the newly introduced ,-et(eaver 0$ ./ .tack 130 table property compatibilityMode. 1ombined with the implementation o" a parameter mappin' relation* table per"ormance can be enhanced si'ni"icantly. %he new learnin' material was added to the e&istin' table tutorials pa'e inside the (eb )ynpro 2eature2.amples3atri&. 3ore ... Sample +pplication 2or interactively testin' table interaction behavior you can download the provided sample application. )ependin' on the speci"ic settin's o" the two table properties compatibilityMode and readOnly* you can observe a di""erent table selection chan'e behavior.

Note 4ased on a bu' within the -et(eaver )eveloper .tudio version -(0$ ./ .tack 13 the table-property 5compatabilityMode5 is not displayed. 2urthermore the )ictionary .imple %ype 5TableCompatibilityMode5 cannot be used to de"ine conte&t attribute types. 6ead more details on my recommended workaround here... /lease post your "eedback or 7uestions on the new material here. 8njoy (eb )ynpro* 4ertram 9an:* .;/ ;9 Bertram Ganz is a member of the Web Dynpro Java Runtime team ;dd to: del.icio.us < )i'' < 6eddit

Thi blog can be u e" for po ting your fee"bac1 or 2ue tion on thi new article an" it relate" ample application# !omment on thi weblog .howin' messa'es 1 throu'h # o" #.

%itles =nly 3ain %opics 8&ample does not work "or me 200#-01-31 0$:$>:2$ ?arald 2reund 4usiness 1ard @6eplyA ?i 4ertram*

=ldest 2irst

+ have installed -(). ./ 13 on my client and our server is also runnin' ./ 13. .o + thou'ht it is the ri'ht time to try your new tutorial* but it does not work. 3y properties "or the table do not contain compatibility3ode* my tasks show the "ollowin' line a"ter importin' and rebuildin' your project: Bind .tatus /riority )escription 6esource +n 2older Cocation 8rror %able .hoppin'4asket @compatibility3odeA: D+8lement8vent not valid %able1ompatibility3odeEiew.wdview %ut()F%ableF1ompatibility3ode/src/packa'es/com/sap/tut/wd/tutwdFtable/tablecomp 3y about shows the "ollowin': .;/ -et(eaver )eveloper .tudio Eersion: 2.0.13 4uild id: 200!0>190119 .o my 7uestion is* what is 'oin' wron'G + have up'raded "rom patched -(). ./ 11 to 13 only about 2 weeks a'o. 4est re'ards ?arald

8&ample does not work "or me 200#-01-31 0!:1>:3# 4ertram 9an: ?allo ?arald* 4usiness 1ard @6eplyA

your problem is based on the "act* that an early version o" the -et (eaver )eveloper .tudio ,-(0$ ./ 130 does not use the newest plu'in version o" the dictionary simple types ,(eb )ynpro D+ element enumeration types0. 1onse7uently you cannot declare all bindin's and de"initions which are based on the 5%able1ompatibilty3ode5 simple type. %wo solutions e&ist "or solvin' your problem: + described them within this "orum thread: https://"orums.sdn.sap.com/thread.jspaGthread+)H !#$ 6e'ards* 4ertram

Iava.cript optimi:ationG 200!-09-2# 0>:1#:3# Easilj /upovac 4usiness 1ard @6eplyA

%he proposed solution solves nicely interaction with table cells* by reducin' the roundtrips "rom two to one "or simple cell editor. ?avin' a 4utton or 1heckbo& in the table chan'es the thin' since these D+ elements will have their own actions to be handled. .o in this case the improvement is "rom 3 to 2 roundtrips. +" we have checkbo&es in a hu'e table let5s say with 1000 cells* simple selection o" a check bo& can take "ew seconds ,in certain cases ! to > s0 even i" you client machine is a very 'ood machine. + am mentionin' client machine* since + "ound that majority o" the time is spent on processin' the Iava.cript "unctions. + assume ..13 improvement will reduce this "or one* since all 3 roundtrips are takin' same time currently. 4ut even this looks very slow "or a simple action like selectin' or unselectin' a checkbo&. .o is there any plan to optimi:e Iava.cript and "urther improve this per"ormance.

Iava.cript optimi:ationG 200!-10-0! 02:0 :1# 4ertram 9an: ?allo Easilj* 4usiness 1ard @6eplyA

thanks "or your reply. 4uttons or 1heckbo&es in a table did not cause 3 roundtrips even in the previous selection behavior. + cannot understand your statement 5.o in this case the improvement is "rom 3 to 2 roundtrips5 ,in "act the improvement is "rom 2 to 10. + hope that you do not use 1heckbo&es as cell editors "or 5simulatin'5 the multi-selection o" table lines. 3ultiselection is based on settin' the node selection cardinality to 50..n5. %he selected node elements ,table lines0 can than be accessed by iteratin' all node elements and callin' +()-ode.is3ulti.elected,int i0. +n most cases the on%oo'le-8vent o" a checkbo& must not be bound to an action at all so that no roundtrip is tri''ered at all. 6e'ards* 4ertram

68:Iava.cript optimi:ationG 200#-01-31 0#:01:!# Ealery .ilaev 4usiness 1ard @6eplyA @citeA+n most cases the on%oo'le-8vent o" a checkbo& must not be bound to an action at all so that no roundtrip is tri''ered at all@/citeA

.adly* there FisF a round-trip in many cases even without action handler ,./11-./130. /robably this was introduced to support calculated attributes ,"or check-bo&es* drop-downs etc0 and master-details scenario ,"or tables0 E.

?%%/ $0$ "or D6C in post header 200!-09-13 01:!>:$# Ealery .ilaev 4usiness 1ard @6eplyA 4ertram* please check subj

E.

You might also like