PDA

View Full Version : [CLOSED] The control XTemplate show an error



hujq
Apr 12, 2013, 6:08 PM
hi all :
I use the contal XTemplate to show my workflow,but it show an error:6012,the exlt.net.dll is the (Version 2.0 Beta3),please help me!

Vladimir
Apr 12, 2013, 7:44 PM
XTemplate cannot be placed inside Items collection because Items expects AbastractComponent subclasses only
Why do you place XTemplate inside Items? XTemplate is not UI control

hujq
Apr 13, 2013, 2:28 PM
XTemplate cannot be placed inside Items collection because Items expects AbastractComponent subclasses only
Why do you place XTemplate inside Items? XTemplate is not UI control


I want to show the work flow using the xtemplte in my layout which is show in the fllow aspx code,My page's layout is as flow :



<%@ Page Language="C#" AutoEventWireup="true" CodeFile="WorkFlowMainFramework.aspx.cs" Inherits="webUI_WorkFlow_WorkFlowMainFramework" %>


<html>
<head id="Head1" runat="server">
<title>Viewport with BorderLayout - Ext.NET Examples</title>
<style type="text/css">
.x-panel-body p {
margin : 5px;
font-size : 11px;
}

.even {
background-color : gray;
color : #fff;
}

.odd {
background-color : #fff;
color : #000;
}
</style>

</head>
<body>
<ext:ResourceManager ID="ResourceManager1" runat="server" />
<ext:Viewport ID="Viewport1" runat="server" Layout="BorderLayout">
<Items>
<ext:Panel ID="Panel1" runat="server" Region="Center" Border="false">
<TopBar>
<ext:Toolbar Height="30">
<Items>
<ext:MultiCombo ID="MultiComboReceiver" runat="server" FieldLabel="接收人" Icon="UserGo"
DisplayField="UserName" ValueField="UserId">
<Store>
<ext:Store ID="StoreReceiver" runat="server">
<Model>
<ext:Model ID="ModelReceiver" runat="server">
<Fields>
<ext:ModelField Name="UserName" />
<ext:ModelField Name="UserId" />
</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
<Listeners>
<Change Handler="setMultiboValue()">
</Change>
</Listeners>
</ext:MultiCombo>
<ext:ToolbarSpacer ID="ToolbarSpacer1" Width="30" runat="server">
</ext:ToolbarSpacer>
<ext:Button ID="Button1" runat="server" Text="附件" Icon="Attach">
</ext:Button>
<ext:ToolbarSpacer ID="tsp" Width="30" runat="server">
</ext:ToolbarSpacer>
<ext:Button ID="btnSave" runat="server" Text="保存" Icon="Disk">
<Listeners>
<Click Handler="if(CheckIsNull(Ext.encode(#{StoreFormField}.getRec ordsValues())))App.direct.SubmitData();">
</Click>
</Listeners>
</ext:Button>
<ext:ToolbarSpacer ID="ToolbarSpacer6" Width="30" runat="server">
</ext:ToolbarSpacer>
<ext:Button ID="btnSaveToDraft" runat="server" Text="存草稿" Icon="PageWhiteText" />
<ext:ToolbarSpacer ID="ToolbarSpacer3" Width="30" runat="server">
</ext:ToolbarSpacer>
<ext:Button ID="btnCheckFlow" runat="server" Text="查看流程" Icon="ChartOrganisation" />
<ext:ToolbarSpacer ID="ToolbarSpacer4" Width="30" runat="server">
</ext:ToolbarSpacer>
<ext:Button ID="btnBack" runat="server" Text="返回" Icon="ArrowUndo">
</ext:Button>
<ext:ToolbarSpacer ID="ToolbarSpacer5" Width="30" runat="server">
</ext:ToolbarSpacer>
<ext:Button ID="btnPrinter" runat="server" Text="打印" Icon="Printer" />
<ext:ToolbarSpacer ID="ToolbarSpacer2" Width="30" runat="server">
</ext:ToolbarSpacer>
<ext:Button ID="btnCancel" runat="server" Text="取消" Icon="Cancel">
</ext:Button>
</Items>
</ext:Toolbar>
</TopBar>
<LayoutConfig>
<ext:HBoxLayoutConfig Align="Stretch" />
</LayoutConfig>
<Items>
<ext:Panel ID="PanelLoadForm" runat="server" BodyStyle="text-align:center;" BodyPadding="20"
Flex="3">
<Loader ID="Loader1" runat="server" Mode="Frame">
<LoadMask ShowMask="true" />
</Loader>
<Items>


<%-- I want to show the workflow in here!--%>




</Items>
</ext:Panel>
<ext:Panel ID="ServerTimeContainer" runat="server" Height="300" BodyStyle="text-align:center;"
Flex="1">
<Content>
<br />
<ext:FieldSet ID="FieldSet1" runat="server" Title="领导审批选项" Layout="AnchorLayout"
DefaultAnchor="100%">
<Items>
<ext:RadioGroup ID="rdgLeaderApproval" ColumnsNumber="4" runat="server" Cls="x-check-group-alt">
<Items>
<ext:Radio ID="rdAggree" runat="server" BoxLabel="同意">
</ext:Radio>
<ext:Radio ID="Radio1" runat="server" BoxLabel="不同意">
</ext:Radio>
<ext:Radio ID="Radio2" runat="server" BoxLabel="办理">
</ext:Radio>
<ext:Radio ID="Radio3" runat="server" BoxLabel="已阅">
</ext:Radio>
</Items>
</ext:RadioGroup>
</Items>
</ext:FieldSet>
<br />
<br />
<br />
<br />
<ext:FieldSet ID="FieldSet2" runat="server" Title="领导审批意见" Height="300" Layout="AnchorLayout"
DefaultAnchor="100%">
<Items>
<ext:TextArea ID="taLeaderSuggestion" runat="server" Cls="x-check-group-alt" Height="280">
</ext:TextArea>
</Items>
</ext:FieldSet>
</Content>
</ext:Panel>
</Items>
</ext:Panel>
</Items>
</ext:Viewport>
</body>
</html>


the target page'vision is as flow:
6013
please give me some good methods!thanks!

Baidaly
Apr 13, 2013, 6:30 PM
Hello!

Please, take a look at this example: http://examples2.ext.net/#/Miscellaneous/XTemplate/Overview/

In the example you can see how to apply XTemplate to a Panel.