3.0 beta 2

how to embed this in jsp


u gave an example but i am enable to get an idea ,how to embed that in a jsp file.Please give me the example which helps me well.

Thank U.
July 20,
<b> This is an example of how I used the ActiveWidgets Grid in a JSP Page. This is assuming you have an understanding of using java with the web and tag libraries</b>
Hope this helps.



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>


<title>Job Functions</title>

<script language="JavaScript" src="/StaffDirectory/activewidgets32/runtime/lib/grid.js"></script>
<link href="/StaffDirectory/activewidgets32/runtime/styles/xp/grid.css" rel="stylesheet" type="text/css"/>

<!-- grid format -->
.active-controls-grid {height: 100%; font: menu;}

/* Columns */
.active-column-0 {width: 50px; text-align: left;}
.active-column-1 {width: 175px; text-align: left;}
.active-column-2 {width: 175px; text-align: left;}

/* Grid Lines */
.active-grid-row {border-bottom: 1px solid black;}
.active-grid-column {border-right: 1px solid black;}

/* Active Row */
.active-row-highlight {background-color: threedshadow;}
.active-row-highlight .active-row-cell {background-color: threedshadow;}

/* list div */
.listDiv {position:absolute; overflow:auto; height:200px; width:520px; border: thin solid Navy;}


<script type="text/javascript">
<!-- grid data -->

var myData = [

<logic:iterate id="jobFunc" name="sdJobFunctions" property="iterator" type="gov.###.advsys.dataobjects.jobDescription.JobFunction" indexId="index">
['<bean:write name="jobFunc" property="jobFunctionID" filter="true" ignore="true"/>','<bean:write name="jobFunc" property="jobFunctionName" filter="true" ignore="true"/>','<bean:write name="jobFunc" property="jobFunctionDesc" filter="true" ignore="true"/>'],

var myColumns = ["Rec Key", "Job Func. Name", "Job Func Desc"];

<div class="listDiv">


function textSelected() {

var index = this.getSelectionProperty("index");
var strKey = this.getDataProperty("text", index, 0);

// create ActiveUI Grid javascript object
var obj = new Active.Controls.Grid;

// set number of rows/columns
obj.setRowCount(<bean:write name="sdJobFunctions" property="size" filter="true" ignore="true"/>);

// provide cells and headers text
obj.setDataText(function(i, j){return myData[i][j]});
obj.setColumnText(function(i){return myColumns[i]});

// set click action handlervar index = obj.getProperty("selection/index");
obj.setAction("selectionChanged", textSelected);

//-- set multiple selections to false
obj.setProperty("selection/multiple", false);

//--- Mouse Over ---//
var row = new Active.Templates.Row;
row.setEvent("onmouseover", "mouseover(this, 'active-row-highlight')");
row.setEvent("onmouseout", "mouseout(this, 'active-row-highlight')");
obj.setTemplate("row", row);
//--- End of Mouse Over ---//





July 28,
whet is menat by <XMP>
</XMP> tag,where we will use this tag

December 26,

This topic is archived.

See also:

Back to support forum


Version 2

Looking for AW 2.6 ?
The old site is here.