Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » resourcemanager resource order
resourcemanager resource order [message #1165792] Fri, 01 November 2013 14:50
Rene Richter is currently offline Rene RichterFriend
Messages: 13
Registered: May 2013
Junior Member

I'm facing a weird problem while playing around with the google visualization project under RAP 1.5.0. The demo works fine..

As the next step, I create an own bundle, extending the example by a treemap implementation. The resource is loaded properly.
Nevertheless I get an 'TypeError: org.eclipse.rap is undefined @http: //

Line 27: qx.Class.define( "", {


try {
	google.load('visualization', '1', {'packages':['treemap']});
catch (e) {
	var mesg = "Error loading Google TreeMap API: "+e;
	if (console) {
	else {

qx.Class.define( "", {

    members : {
      _createChart : function(domElement) {
        return new google.visualization.TreeMap(domElement);

      initialize : function() {
      	var chart = this._chart; 
      	if (chart == null) {"Creating new chart instance.");
	    		this._chart = new google.visualization.TreeMap(this._getTargetNode()); 
	    		var chart = this._chart;
	            var qParent = this;
	  , 'onmouseover', function() {	            	
	  , 'onmouseout', function() {

	  , 'select', function() {
	            	var wm = org.eclipse.swt.WidgetManager.getInstance();
	                var widgetId = wm.findIdByWidget(qParent);
	            	var selObj = chart.getSelection();
	            	var selection = selObj[0].row;
//	            	var selection = clickedObj.row;
//	            	this.selectedItem = selection;
	            	this.selectedItem = qParent._dataTable.getValue(selection,0);
//	            	this.selectedRow = selection;
//	            	this.selectedColumn = 0;

//	            	console.log(chart.getSelection())
	            	//fire selection event
	            	var req = org.eclipse.swt.Request.getInstance();
	            	req.addParameter(widgetId + ".selectedItem", this.selectedItem);
	            	req.addParameter(widgetId + ".selectedRow", selection);
	            	req.addParameter(widgetId + ".selectedColumn", "0");
	            	req.addParameter(widgetId + ".selectedValue", qParent._dataTable.getValue(selection,2));
	            	req.addEvent( "", widgetId );
	  "Created new chart instance.");

} );

This problem doesn't occur when the treemap code doesn't reside in its own bundle but is added to the google bundle.
I suppose, that my problem is less a google charting problem, but more a resource loading problem, so here are some questions goolge couldn't answer:

- All loaded resources are merged into a resources.js, right?! I noticed, that my treemap javascript code is added first when implemented in its own bundle (and the error occurs).
So my question is, whether the order of added resoures is relevant or whether this is just a random observation.

- If the order is relevant, is it possible to load the resources in the google bundle before the treemap bundle resources?

- How is the order of loaded resources organized anyway?

I would really appreciate it if someone could enlighten my concerning resource loading and resource order.
Thank you in advance.

Edit: I added the BaseChart resource (which the treemap depends on) also to the treemap bundle manifest(only loaded in the google bundle so far). Now it works but doesn`t look like a neat solution to me.
My questions remain valid. Thank you!

[Updated on: Fri, 01 November 2013 15:09]

Report message to a moderator

Previous Topic:Installing war on tomcat
Next Topic:Drag and Drop from outside RAP
Goto Forum:

Current Time: Wed Jun 20 17:35:03 GMT 2018

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

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

Back to the top