3.2.0

Unable to display grid in a BEA Weblogic Portlet (jsp)

Hi, I just downloaded the Grid and have inserted in into a very simple Weblogic portlet. I can't seem to see the grid. The portlet displays w/o any errors (i.e. no "active is not defined, so it seems to reference the .js, .css files OK), but all I see is a horizontal line (Start and End Grid markers around it) for the grid display. I have reduced the portlet to a simple grid display of a javascript array (from the tutorials).

I would appreciate any and all suggestions.

Thanks,
jeff

File StatusPortlet_view.jsp:


<html>
<head>
<link href="../external/ActiveWidgets/runtime/styles/xp/grid.css" rel="stylesheet" type="text/css" >
</link>
<script src="../external/ActiveWidgets/runtime/lib/grid.js"></script>


<style>
* {-moz-box-sizing: border-box;}
html { width: 100%; height: 100%; margin: 0px; padding: 0px; overflow: hidden}
body { width: 100%; height: 100%; margin: 0px; padding: 50px; overflow: hidden; font: menu}
.active-controls-grid {border: 1px solid #ccc}
</style>

<title>Status Grid Test</title>
</head>

<body>

<p> Start: Grid</p>

<script language="JavaScript">

var myData = [
["MSFT","Microsoft Corporation", "314,571.156", "32,187.000"],
["ORCL", "Oracle Corporation", "62,615.266", "9,519.000"],
["SAP", "SAP AG (ADR)", "40,986.328", "8,296.420"],
["CA", "Computer Associates Inter", "15,606.335", "3,164.000"],
["ERTS", "Electronic Arts Inc.", "14,490.895", "2,503.727"]
];

var obj = new Active.Controls.Grid;

obj.setColumnProperty("count", 4);
obj.setRowProperty("count", 5);
obj.setDataProperty("text", function(i,j){return myData[i][j]});

document.write(obj);

</script>

<p> End: Grid</p>

<table border="1">
<tr>
<td align="center"> </td>
</tr>
<tr>
<td> Preview Pane</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td>
<table border="1">
<tr> </tr>
</table>
</td>
</tr>
</table>


</body>
</html>

Jeff
June 14,
Updates. Ok, I reduced the test case to the *exact* source code for the posted working JavaScript array example.

Basically, I have one unique JSP file associated with each myABC.portal file (for which I would like to insert a grid object).

Still didn't work. Then I experimented with dynamic grid height calculation (px vs %). Now I am able to see a few columns and all of the data rows (but the first column header spans the whole header). Also, the data with the rows is not column aligned (looks like one data cell for each row).

I will experiment and post more code tomorrow.
Jeff
June 15,

This topic is archived.

See also:


Back to support forum