3.0.5

Grid problem under WebSphere Portal

We are having some problems deploying a workable grid under Websphere Portal Express (v6).

when the grid is added to jsp it is getting dispalyed as textarea and column and cell vaules are getting displayed besides that. Here is code snippet from portal jsp

<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<html:html locale="true">
<%
String responseText = "";
String columnHeaders = "";
if (request.getAttribute("STRING_SEARCH_RESULT") != null)
responseText = (String) request.getAttribute("STRING_SEARCH_RESULT");
if (request.getAttribute("COLUMN_HEADERS") != null)
columnHeaders = (String) request.getAttribute("COLUMN_HEADERS");
%>

<portlet:defineObjects />
<style>
#actionGrid { width:100%; height:150px; margin: 0px; padding: 0px}
</style>
<link rel="stylesheet" type="text/css" href="<html:rewrite page='/theme/stylesheet.css'/>">

<script type="text/javascript" src="<%=renderResponse.encodeURL(renderRequest.getContextPath() + "/js/common.js")%>" ></script>
<script type="text/javascript" src="<%=renderResponse.encodeURL(renderRequest.getContextPath() + "/aw/runtime/lib/aw.js")%>" ></script>
<script type="text/javascript" src="<%=renderResponse.encodeURL(renderRequest.getContextPath() + "/js/Ajax.js")%>" ></script>
<script type="text/javascript" src="<%=renderResponse.encodeURL(renderRequest.getContextPath() + "/js/commonExtended.js")%>" >
</script>

<script language="JavaScript1.2">
function LoadTable() {
var actiongrid = new AW.UI.Grid;
actiongrid.setId("actionGrid");
actiongrid.setVirtualMode(true);
actiongrid.setHeaderText([<%=columnHeaders%>]);
actiongrid.setColumnCount(9);
var gridData = '<%=responseText%>';
if(gridData == null || gridData == "null") {
gridData = "";
}
setModel(gridData, actiongrid); // Set the model
alert("actionGrid:" + actiongrid);
actiongrid.refresh(); // refresh the grid
}

</script>
<script>
window.onload = LoadTable;
</script>
<table width="800" border="0" cellspacing="0" cellpadding="0" class="table_main">
<tr>
<td><div class="centr_page_margin">
<fieldset class="forTexts">
<legend class="feildset">Search Criterion </legend>
Test Grid
</fieldset>
<div id="actionGridData" style=" position:static; width:100%; height:auto; vertical-align:top;">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="textGeneral" style="display:block">
<tr><td class="textGeneral"><span id="actionGrid"></span></td>
</tr>
</table>
</div>
</div>
</td>
</tr>
</table>
</html:html>

Anybody has any clue on this?
Rupali
March 3,
Alex, any clue on this ?
Rupali
March 4,
Check if grid css and js are loaded on page.
Paulo Cesar (PC from Brazil)
March 4,
Thanks a lot. The problem was with stylesheet. It was not loaded properly before.
Added following line and grid is getting dispalyed now.
<link rel="stylesheet" type="text/css" href="<%=renderResponse.encodeURL(renderRequest.getContextPath() + "/aw/runtime/styles/xp/aw.css")%>">
Rupali
March 5,

This topic is archived.

See also:


Back to support forum