Hello
Thanks to answer.
You'r right and it is what I made for the second window I create...But when I click on a row in this second window to show a new one with data then I was not able to pass throuh the desktop information, so I'm not able to made this third window a desktop window.In fact my problem is to pass the desktop information to the url called for the creation of this new window. I try to pass it through a post data but I receive a string :[object object] : fail.
To try to claryfy:
First window is called from desktop menu. When desktop is created I save the desktop element in a global javascript variable
Second window is called by the way you show when I clink on a link in the frist window created and I use previous save desktop variable to attach it to desktop. so far so good
But when I click on a row of this second window, my global deskto variable is not reachable and I don't know hot to pass it to the window creation function.
The javascript called to create the second window :
function DaylinkClick(LinkParam){
var winTitle="";
var Status = LinkParam.substring(7,LinkParam.indexOf("&"));
var date = LinkParam.substring(LinkParam.indexOf("&")+6,LinkParam.lastIndexOf("&"))
if (date != "")
{
winTitle = "Liste des RMA statut : " + Statut ;
}
else
{
switch (Status)
{
case "":
winTitle="Liste des RMA";
break;
case "ATraiter":
winTitle="Liste des RMA en cours de traitement atelier";
break;
case "AControler":
winTitle="Liste des RMA à controler";
break;
case "Devis":
winTitle="Liste des RMA en attente de devis";
break;
default:
winTitle="Liste des RMA statut : " + Status;
break;
}
};
var win = createWindow(winTitle, "lstRMA.aspx?" + LinkParam);
win.show();
};
function DaylinkRenderer(value, meta, record){
if(value=="0")
return String.format("{0}", value);
else
return String.format("<a class='Header-link' href='#' onclick='DaylinkClick(\"{1}\");'>{0}</a>", value,stoGrd0.getById(record.id).get("DayURL"));
}
the main.js file included in my first aspx page :
var desktop;
function createWindow(winTitle, url)
{
//var win = new parent.window.Ext.Window({
var win = desktop.createWindow({
title: winTitle,
width: 1000,
height: 500,
minimizable:true,
maximizable: true,
layout:'fit',
autoLoad: {
showMask: true,
mode: "iframe",
url: url
}
});
return win;
};
the function to save desktop data into desktop variable :
var storeIDDesktop = function (app)
{
desktop=app.getDesktop();
};
this function is called when my desktop is ready :
<ext:Desktop
ID="MyDesktop"
runat="server"
BackgroundColor="Black"
ShortcutTextColor="White"
Wallpaper="images/DesktopImages/desktop.jpg">
<StartButton Text="Start" IconCls="start-button" />
<%-- NOTE: Body Controls must be added to a container with position:absolute --%>
<Listeners>
<Ready Handler="storeIDDesktop(#{MyDesktop})"/>
</Listeners>
<Modules>
<ext:DesktopModule ModuleID="DesktopModule1" WindowID="winBacklog" AutoRun="true">
</ext:DesktopModule>
</Modules>
............</Desktop>
the lstRMA.aspx page called to create second window :
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="lstRMA.aspx.vb" Inherits="VisualManagement.lstRMA" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
<link rel="stylesheet" type="text/css" href="NextGen.css" />
<script type="text/javascript" language="javascript" src="jsFile/MainSubWindow.js"></script>
</head>
<body>
<script type="text/javascript">
function createRMAWindow(RMA)
{
var win = createWindow("RMA n° " + RMA, "lstRMADetail.aspx?RMA=" + RMA);
win.show();
};
</script>
<form id="form1" runat="server">
<ext:ResourceManager ID="ResourceManager1" runat="server">
</ext:ResourceManager>
<ext:GridPanel
runat="server"
ID="grdListeRMA" AutoExpandColumn="RMA" AutoExpandMax="80" AutoExpandMin="80" AutoHeight="true" AutoWidth="True" TrackMouseOver="True" AutoScroll="True" Cls="x-grid-custom-Backlog2">
<ColumnModel ID="ColumnModel1" runat="server">
<Columns>
<ext:RowNumbererColumn />
<ext:Column ColumnID="RMA" DataIndex="RMA" Header="RMA" Editable="False" Align="Center"></ext:Column>
<ext:Column ColumnID="eRMA" DataIndex="eRMA" Header="e-RMA" Align="Center"></ext:Column>
<ext:Column ColumnID="Serial" DataIndex="Serial" Header="N° de série" Align="Center"></ext:Column>
<ext:Column ColumnID="Status" DataIndex="Status" Header="Statut courant" Align="Center"></ext:Column>
<ext:Column ColumnID="dDateMaj" DataIndex="dDateMaj" Header="Date de maj du statut" Align="Center" Width="150px"></ext:Column>
<ext:Column ColumnID="Tech" DataIndex="Tech" Header="Technicien" Align="Center"></ext:Column>
<ext:Column ColumnID="ETTR" DataIndex="ETTR" Header="ETTR" Align="Center"></ext:Column>
<ext:Column ColumnID="Delay" DataIndex="Delay" Header="Délai depuis dernier statut" Align="Center" Width="170px"></ext:Column>
</Columns>
</ColumnModel>
<Store>
<ext:Store
runat="server"
ID="stoListe">
<Proxy>
<ext:HttpProxy Url="" Json="false" Timeout="3000"></ext:HttpProxy>
</Proxy>
<Reader>
<ext:JsonReader>
<Fields>
<ext:RecordField Name="RMA" />
<ext:RecordField Name="eRMA" />
<ext:RecordField Name="Serial" />
<ext:RecordField Name="Status" />
<ext:RecordField Name="dDateMaj" />
<ext:RecordField Name="Tech" />
<ext:RecordField Name="ETTR" />
<ext:RecordField Name="Delay" />
</Fields>
</ext:JsonReader>
</Reader>
</ext:Store>
</Store>
<LoadMask ShowMask="true" />
<SelectionModel>
<ext:RowSelectionModel ID="RowSelectionModel1" runat="server">
<Listeners>
<RowSelect Handler="createRMAWindow(#{grdListeRMA}.getSelectionModel().getSelected().json.RMA);" />
</Listeners>
</ext:RowSelectionModel>
</SelectionModel>
</ext:GridPanel>
<ext:TaskManager ID="timerLstRMA" runat="server" Enabled="True">
<Tasks>
<ext:Task
TaskID="taskLstRMA"
Interval="60000" AutoRun="True">
<DirectEvents>
<Update OnEvent="RefreshLstRMA">
<EventMask
ShowMask="true"
Target="CustomTarget"
CustomTarget="grdListeRMA"
MinDelay="350"
/>
</Update>
</DirectEvents>
</ext:Task>
</Tasks>
</ext:TaskManager>
</form>
</body>
</html>
and its javascript embeded file here I don't know hot to get desktop information to attache the third window to :
function createWindow(winTitle, url)
{
var win = new parent.window.Ext.Window({
//var win = desktop.createWindow({
title: winTitle,
width: 1000,
height: 500,
minimizable:true,
maximizable: true,
layout:'fit',
autoLoad: {
showMask: true,
mode: "iframe",
url: url
}
});
return win;
};
Here 3 screen captures of the process
I hope there is a solution because I really need all my window belongued to the desktop, and I need to called several time the same window with different data shows for compare reason.