PDA

View Full Version : Positionning a grid within a container when using EXT TLD



nizarazu
19 Nov 2009, 7:25 AM
Hi,
Do somebody has an idea of how positionning a gridPannel in a JSP page.
My problem is that I'm trying to display a grid in a <td> tag of a <Table>, I use
renderTo to pass the container reference to the gridPannel but when launching the page the grid is always displayed in the top of the page.
here is the source:




<%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean"%>
<%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic"%>
<%@ taglib tagdir="/WEB-INF/tags/ext" prefix="ext"%>




<%@ page language="java"

session="true"

contentType="text/html; charset=ISO-8859-1"

%>

<html>
<head>



<link rel="StyleSheet" type="text/css" href="<bean:message bundle="config" key='rep_css'/>/styles.css">
<script type="text/JavaScript" src="<bean:message bundle="config" key='rep_javascript'/>/formulaires.js"></script>



<script type="text/JavaScript">
...





</script>



<style type="text/css">
...





</style>



</head>



<body scroll="yes" bgcolor="white" text="#000000" link="#0000ff" vlink="#0000ff" alink="#ff0000" leftmargin="0" marginwidth="0" topmargin="0" marginheight="0" onload="">



<%@include file="/jsp/menu/menu.jsp"%>



<table border="0" cellpadding="0" cellspacing="0" width="100%" height="92%">

<html:form action="/Action.do">

<html:hidden property="action" />

<tr valign="top">

<td width="235" class="elementMenu">
<%@ include file="/^xxx.jsp" %>
</td>
<td width="5"></td>

<td width="*" class="principal" valign="top">
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="92%">

<tr valign="top">

<!--page principale-->

<td width="100%" align="center" class="principal">

<p class="titre">Title </p>

<div id="panel"></div>

</td>
</tr>



<ext:body extLocation="static_soft/javascript/extjs">

<ext:viewport >

<ext:toolbar>

<ext:toolbar.button text="export" />

<ext:toolbar.separator />

<ext:toolbar.button text="impression"/>

</ext:toolbar>


<ext:panel id="userListPanel" renderTo="panel">

<ext:grid.gridPanel title="User List" id="userListGrid" autoScroll="true" renderTo="panel">

<ext:grid.columnModel >

<ext:grid.rowNumberer />

<ext:grid.column header="ID" sortable="true" />

<ext:grid.column header="Janvier" sortable="true"/>

<ext:grid.column header="Février" sortable="true"/>

<ext:grid.column header="Mars" sortable="true"/>

<ext:grid.column header="Avril" sortable="true" />
<ext:grid.column header="Mai" sortable="true" />

<ext:grid.column header="Juin" sortable="true" />
<ext:grid.column header="Juillet" sortable="true" />
<ext:grid.column header="Aout" sortable="true" />

<ext:grid.column header="Septembre" sortable="true" />

<ext:grid.column header="Octobre" sortable="true" />
<ext:grid.column header="Novembre" sortable="true" />

<ext:grid.column header="Decembre" sortable="true" />

<ext:grid.column header="Total" sortable="true" />
</ext:grid.columnModel>

<ext:grid.row>

<ext:grid.rowCell >1077</ext:grid.rowCell>

<ext:grid.rowCell >38</ext:grid.rowCell>

<ext:grid.rowCell >2,70</ext:grid.rowCell>

<ext:grid.rowCell >0</ext:grid.rowCell>

<ext:grid.rowCell >0,00</ext:grid.rowCell>

<ext:grid.rowCell >0</ext:grid.rowCell>

<ext:grid.rowCell >0,00</ext:grid.rowCell>

<ext:grid.rowCell >0</ext:grid.rowCell>

<ext:grid.rowCell >0,00</ext:grid.rowCell>

<ext:grid.rowCell >0</ext:grid.rowCell>

<ext:grid.rowCell >0,00</ext:grid.rowCell>

<ext:grid.rowCell >38</ext:grid.rowCell>

<ext:grid.rowCell >38</ext:grid.rowCell>

<ext:grid.rowCell >2,70</ext:grid.rowCell>

</ext:grid.row>

<ext:grid.row>

<ext:grid.rowCell >2077</ext:grid.rowCell>

<ext:grid.rowCell >79</ext:grid.rowCell>

<ext:grid.rowCell >5,61</ext:grid.rowCell>

<ext:grid.rowCell >0</ext:grid.rowCell>

<ext:grid.rowCell >0,00</ext:grid.rowCell>

<ext:grid.rowCell >0</ext:grid.rowCell>

<ext:grid.rowCell >0,00</ext:grid.rowCell>

<ext:grid.rowCell >0</ext:grid.rowCell>

<ext:grid.rowCell >0,00</ext:grid.rowCell>

<ext:grid.rowCell >0</ext:grid.rowCell>

<ext:grid.rowCell >0,00</ext:grid.rowCell>

<ext:grid.rowCell >79</ext:grid.rowCell>

<ext:grid.rowCell >38</ext:grid.rowCell>

<ext:grid.rowCell >5,61</ext:grid.rowCell>

</ext:grid.row>

</ext:grid.gridPanel>

</ext:panel>

</ext:viewport>
</ext:body>

</td></tr>

</table>






</td>

</tr>

</html:form>
</table>


</body>
</html>


Any ideas?

Regards