Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Error on Custom Variant for Grid(Setting a custom variant for Grid throws an Exception on client)
Error on Custom Variant for Grid [message #1816603] Fri, 01 November 2019 09:50 Go to next message
Sebastian Fuchs is currently offline Sebastian FuchsFriend
Messages: 97
Registered: July 2009
Member
Hi everybody,

I am trying to set a custom variant on Grid as describes in the developers guide.
The requirement is to change the selection color dynamically according to the domain context.

Here is the CSS I use:
Tree-RowOverlay.source-selection:selected,
Tree-RowOverlay.source-selection:selected:unfocused,
Tree-RowOverlay.source-selection:linesvisible:even:selected,
Tree-RowOverlay.source-selection:linesvisible:even:selected:unfocused {
  background-color: rgb(203, 1, 79);
  color: rgb(0, 0, 0);
}

Tree-RowOverlay.link-selection:selected,
Tree-RowOverlay.link-selection:selected:unfocused,
Tree-RowOverlay.link-selection:linesvisible:even:selected,
Tree-RowOverlay.link-selection:linesvisible:even:selected:unfocused {
  background-color: rgb(17, 62, 157);
  color: rgb(0, 0, 0);
}


Setting an initial variant doesn't change anything:
grid.setData(RWT.CUSTOM_VARIANT, "source-selection");


Any further attempt to set the SAME variant has no effect either:
grid.setData(RWT.CUSTOM_VARIANT, "source-selection");


Any further attempt to set a DIFFERENT variant throws a client error in the browser:
grid.setData(RWT.CUSTOM_VARIANT, "link-selection");

results in:
Client Error
Details

Error: Error: Operation "set" on target "w56" of type "rwt.widgets.Grid" failed:
this.$cellBackgrounds[d] is undefined
Properties: 
customVariant = variant_link-selection
selection = w181,w182,w183,w184


  Script: {"head":{},"operations":[["destroy","w93"],["destroy","w95"],["destroy","w97"],["destroy","w99"],["destroy","w101"],["destroy","w103"],["destroy","w105"],["destroy","w107"],["destroy","w109"],["destroy","w112"],["destroy","w114"],["destroy","w116"],["destroy","w118"],["destroy","w120"],["destroy","w123"],["destroy","w125"],["destroy","w127"],["destroy","w129"],["destroy","w131"],["destroy","w134"],["destroy","w137"],["destroy","w140"],["destroy","w143"],["destroy","w145"],["destroy","w147"],["destroy","w149"],["destroy","w151"],["destroy","w154"],["destroy","w157"],["destroy","w159"],["destroy","w162"],["destroy","w164"],["destroy","w166"],["destroy","w169"],["destroy","w172"],["destroy","w175"],["set","w87",{"functionResult":["fireObjectsSelectedJava",true,null]}],["set","w56",{"customVariant":"variant_link-selection","selection":["w181","w182","w183","w184"]}],["set","w92",{"itemCount":1,"expanded":false}],["create","w185","rwt.widgets.GridItem",{"parent":"w92","index":0}],["set","w111",{"itemCount":1,"expanded":false}],["create","w186","rwt.widgets.GridItem",{"parent":"w111","index":0}],["set","w122",{"itemCount":1,"expanded":false}],["create","w187","rwt.widgets.GridItem",{"parent":"w122","index":0}],["create","w188","rwt.widgets.GridItem",{"parent":"w133","index":0,"itemCount":2,"texts":["4.1","Wärmedämmschicht abgehängte Decke\n","","371,098","","m2","14,88","4,89","9,99","0","0","0","5.521,94",""],"expanded":true}],["create","w181","rwt.widgets.GridItem",{"parent":"w188","index":0,"texts":["Split 1","","","185,549","50,00","m2","14,88","","","","","","2.760,97",""]}],["create","w183","rwt.widgets.GridItem",{"parent":"w188","index":1,"texts":["Split 2","","","185,549","50,00","m2","14,88","","","","","","2.760,97",""]}],["create","w189","rwt.widgets.GridItem",{"parent":"w136","index":0,"itemCount":2,"texts":["5.1","Deckenschalung\n","","371,098","","m2","19,07","10,76","8,31","0","0","0","7.076,84",""],"expanded":true}],["create","w182","rwt.widgets.GridItem",{"parent":"w189","index":0,"texts":["Split 1","","","185,549","50,00","m2","19,07","","","","","","3.538,42",""]}],["create","w184","rwt.widgets.GridItem",{"parent":"w189","index":1,"texts":["Split 2","","","185,549","50,00","m2","19,07","","","","","","3.538,42",""]}],["set","w139",{"expanded":false}],["create","w190","rwt.widgets.GridItem",{"parent":"w139","index":0}],["set","w142",{"itemCount":1,"expanded":false}],["create","w191","rwt.widgets.GridItem",{"parent":"w142","index":0}],["set","w153",{"expanded":false}],["create","w192","rwt.widgets.GridItem",{"parent":"w153","index":0}],["set","w156",{"itemCount":1,"expanded":false}],["create","w193","rwt.widgets.GridItem",{"parent":"w156","index":0}],["set","w161",{"itemCount":1,"expanded":false}],["create","w194","rwt.widgets.GridItem",{"parent":"w161","index":0}],["set","w168",{"expanded":false}],["create","w195","rwt.widgets.GridItem",{"parent":"w168","index":0}],["set","w171",{"expanded":false}],["create","w196","rwt.widgets.GridItem",{"parent":"w171","index":0}],["set","w174",{"expanded":false}],["create","w197","rwt.widgets.GridItem",{"parent":"w174","index":0}]]}
  Stack: _processError@http://localhost:8080/rwt-resources/380/rap-client.js:226:3814
processOperationArray@http://localhost:8080/rwt-resources/380/rap-client.js:226:924
processMessage@http://localhost:8080/rwt-resources/380/rap-client.js:226:253
_handleSuccess@http://localhost:8080/rwt-resources/380/rap-client.js:230:3439
setSuccessHandler/this._success@http://localhost:8080/rwt-resources/380/rap-client.js:98:925
_onReadyStateChange@http://localhost:8080/rwt-resources/380/rap-client.js:98:1596
bind/<@http://localhost:8080/rwt-resources/380/rap-client.js:7:219
send@http://localhost:8080/rwt-resources/380/rap-client.js:98:713
sendImmediate@http://localhost:8080/rwt-resources/380/rap-client.js:230:2083
@http://localhost:8080/rwt-resources/380/rap-client.js:155:4243
window.fireObjectsSelectedJava@http://localhost:8080/rwt-resources/380/rap-client.js line 155 > eval:1:89
fireObjectsSelected@http://localhost:8080/ifc/webgl/viewer/js/com.apstex.webglviewer.js:4956:3
setObjectSelected@http://localhost:8080/ifc/webgl/viewer/js/com.apstex.webglviewer.js:4845:8
pickObject@http://localhost:8080/ifc/webgl/viewer/js/com.apstex.webglviewer.js:4418:53
mouseup@http://localhost:8080/ifc/webgl/viewer/js/com.apstex.webglviewer.js:4329:11

  Debug: off
  Request: {"head":{"requestCounter":9},"operations":[["call","w87","executeFunction",{"name":"fireObjectsSelectedJava","arguments":[["2y5WYHkxLE7f59CbVhVogi"],true]}],["set","w1",{"cursorLocation":[219,239]}]]}


Has anybody a hint what I can do better ?
Thanks
Sebastian
Re: Error on Custom Variant for Grid [message #1816708 is a reply to message #1816603] Tue, 05 November 2019 12:06 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2429
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi,

which RAP version are you using? Please open a bugzilla and provide a snippet/project (with the custom CSS file) to reproduce the issue.
Could be related to:
551447: Table linesVisible JS exception if any column width is zero
https://bugs.eclipse.org/bugs/show_bug.cgi?id=551447

Best regards,
Ivan
Re: Error on Custom Variant for Grid [message #1816769 is a reply to message #1816708] Wed, 06 November 2019 14:25 Go to previous message
Sebastian Fuchs is currently offline Sebastian FuchsFriend
Messages: 97
Registered: July 2009
Member
Hi Ivan,

you are right!
I am affected of 551447 because my Grid has an initially collapsed GridColumnGroup.

I can confirm that the problem is solved by the fix of 551447. I tested it with build rap-e4-nightly-3.11.0-S-20191105-0036.

By the way there are 2 points to improve:
1. The development guide states that 'Grid uses the theming of Tree' which can be misunderstood to use Tree-RowOverlay.* instead of Grid-RowOverlay.* in css. I suggest to add an explaining sentence wich mentions 'Grid-RowOverlay'.

2. The nightly build rap-e4-nightly-3.11.0-S-20191105-0036 is missing the bundle org.eclipse.equinox.util which is needed for a self contained target platform.

Thank you
Sebastian
Previous Topic:Eclipse RAP and EMF tools
Next Topic:RAP and SWT and Sirius
Goto Forum:
  


Current Time: Sat Dec 07 09:40:22 GMT 2024

Powered by FUDForum. Page generated in 0.03432 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top