From: Eric C. <ecr...@us...> - 2006-09-28 05:36:08
|
User: ecrutchfield Date: 06/09/27 22:36:08 Modified: andromda-aspdotnet/src/test/expected cartridge-output.zip Log: fix bug with calendar parameters Revision Changes Path 1.3 +130 -68 cartridges/andromda-aspdotnet/src/test/expected/cartridge-output.zip <<Binary file>> |
From: Eric C. <ecr...@us...> - 2006-09-30 15:13:39
|
User: ecrutchfield Date: 06/09/30 08:13:39 Modified: andromda-aspdotnet/src/main/resources/templates/aspdotnet/web2005 webform.aspx.vsl webformBase.cs.vsl andromda-aspdotnet/src/test/expected cartridge-output.zip Log: fix rendering of table actions Revision Changes Path 1.4 +24 -1 cartridges/andromda-aspdotnet/src/main/resources/templates/aspdotnet/web2005/webform.aspx.vsl Index: webform.aspx.vsl =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-aspdotnet/src/main/resources/templates/aspdotnet/web2005/webform.aspx.vsl,v retrieving revision 1.3 retrieving revision 1.4 diff -u -w -r1.3 -r1.4 --- webform.aspx.vsl 28 Sep 2006 05:35:30 -0000 1.3 +++ webform.aspx.vsl 30 Sep 2006 15:13:38 -0000 1.4 @@ -14,7 +14,7 @@ <asp:HiddenField ID="$stringUtils.lowerCamelCaseName(${action.name})_${parameter.name}Hidden" runat="server" /> #end #end -#if(!$action.hyperlink) +#if(!$action.hyperlink && !$action.tableAction) <div class="action"> <table id="${action.name}Table" cellspacing="0" cellpadding="1" width="100%" border="0"> #foreach($parameter in ${action.parameters}) @@ -76,6 +76,18 @@ <AlternatingRowStyle BackColor="Lavender"></AlternatingRowStyle> <HeaderStyle Font-Bold="True" HorizontalAlign="Center" VerticalAlign="Middle" BackColor="#e8e2b6"></HeaderStyle> <Columns> +#foreach ($action in $table.tableFormActions) +#if (!$action.tableLinkColumnName && $action.tableAction) + <asp:TemplateField> + <ItemTemplate> +#foreach ($parameter in $action.parameters) + <asp:HiddenField ID="${action.actionMethodName}_${parameter.name}" runat="server" Value='<%# Eval("${parameter.name}")%>'/> +#end + <asp:CheckBox ID="${action.actionMethodName}_CheckBox" runat="server" /> + </ItemTemplate> + </asp:TemplateField> +#end +#end #if (!$table.tableColumns.empty) #foreach ($column in $table.tableColumns) #if($column.name) @@ -98,13 +110,24 @@ #end #end #foreach ($action in $table.tableFormActions) +#if (!$action.tableAction) <asp:TemplateField><ItemTemplate><asp:Button ID="${stringUtils.capitalise($action.triggerName)}" Text="<%$ Resources:GeneratedResources, ${key}_${stringUtils.capitalise($action.actionMethodName)}Button %>" CommandName="${action.triggerName}" CommandArgument='<%# #render2005TableCommandArgumentParameters() %>' runat="server" /></ItemTemplate></asp:TemplateField> #end +#end </Columns> <PagerSettings Mode=NumericFirstLast /> </asp:GridView> </td> </tr> +#foreach ($action in $table.tableFormActions) +#if (!$action.tableLinkColumnName && $action.tableAction) + <tr> + <td align=center> + <asp:Button ID="${action.actionMethodName}Button" Text="<%$ Resources:GeneratedResources, ${key}_${stringUtils.capitalise($action.actionMethodName)}Button %>" OnClick="${action.actionMethodName}Button_Click" runat="server" /> + </td> + </tr> +#end +#end <tr> <td align=center> <asp:Label ID="${table.name}Count" Runat=server ForeColor=DarkGreen></asp:Label> 1.5 +50 -3 cartridges/andromda-aspdotnet/src/main/resources/templates/aspdotnet/web2005/webformBase.cs.vsl Index: webformBase.cs.vsl =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-aspdotnet/src/main/resources/templates/aspdotnet/web2005/webformBase.cs.vsl,v retrieving revision 1.4 retrieving revision 1.5 diff -u -w -r1.4 -r1.5 --- webformBase.cs.vsl 28 Sep 2006 05:35:30 -0000 1.4 +++ webformBase.cs.vsl 30 Sep 2006 15:13:38 -0000 1.5 @@ -84,16 +84,61 @@ ${parameter.name}DG.AllowPaging = false; if(this.${parameter.name}DG.Rows.Count < 1) ${parameter.name}DG.Visible = false; - ${parameter.name}Count.Text = "Number Of result: "+this.${parameter.name}DG.Rows.Count; + ${parameter.name}Count.Text = String.Format(Resources.GeneratedResources.items_in_table_text, this.itemListDG.Rows.Count); + #end } } + #foreach($action in ${webform.outgoing}) -#if(!$action.hyperlink) +#if($action.tableAction) protected void ${action.actionMethodName}Button_Click(object sender, System.EventArgs e) { +## if this is an action to be performed on a table, we need to collect any parameters associated with +## the action prior to executing the action. +## First, loop through the parameters on the action and get their value from the table +## Then, match the parameter on the action to the parameter on the form + System.Collections.Specialized.StringCollection tableActionArgs = ${action.actionMethodName}_GetSelectedItems(); +#foreach ($parameter in $action.parameters) +#if ($parameter.type.stringType) + string[] tableActionArr = new string[tableActionArgs.Count]; + tableActionArgs.CopyTo(tableActionArr, 0); + base.Controller.${action.formImplementationPropertyName}.${parameter.capitalisedName} = String.Join(",", tableActionArr); +#elseif ($parameter.type.collectionType || $parameter.type.listType) + base.Controller.${action.formImplementationPropertyName}.${parameter.capitalisedName} = tableActionArgs; +#else + //Only table action parameters of type IList, ICollection, or String are handled + //The parameter for this action was of type $parameter.type.name + //${toDoTag} Get parameters from the table action and put into <see cref="base.Controller.${action.formImplementationPropertyName}"/> +#end +#end ${action.actionMethodName}(); } + + private System.Collections.Specialized.StringCollection ${action.actionMethodName}_GetSelectedItems() + { + System.Collections.Specialized.StringCollection ids = new System.Collections.Specialized.StringCollection(); + //Navigate through each row in the GridView for checkbox items + foreach (GridViewRow gv in ${action.tableLinkName}DG.Rows) + { + CheckBox chkBxItem = (CheckBox)gv.FindControl("${action.actionMethodName}_CheckBox"); + if (chkBxItem.Checked) + { +#foreach ($parameter in $action.parameters) + // Concatenate GridView items with comma + ids.Add(((HiddenField)gv.FindControl("${action.actionMethodName}_${parameter.name}")).Value.ToString()); +#end + } + } + return ids; + } + +#elseif(!$action.hyperlink) + protected void ${action.actionMethodName}Button_Click(object sender, System.EventArgs e) + { + ${action.actionMethodName}(); + } + #end #end #foreach($parameter in $webform.tables) @@ -108,8 +153,8 @@ ${parameter.name}DG.PageIndex = e.NewPageIndex; ${parameter.name}DG.DataBind(); } -#end +#end #foreach($action in ${webform.outgoing}) protected virtual void ${action.actionMethodName}() { @@ -146,6 +191,7 @@ break; #end #foreach ($action in $table.tableFormActions) +#if (!$action.tableAction) case "${action.triggerName}": #foreach ($parameter in $action.parameters) base.Controller.${action.formImplementationPropertyName}.${parameter.capitalisedName} = nameValuePairs["${parameter.name}"]; @@ -153,6 +199,7 @@ this.${action.actionMethodName}(); break; #end +#end } } 1.4 +45 -61 cartridges/andromda-aspdotnet/src/test/expected/cartridge-output.zip <<Binary file>> |
From: Eric C. <ecr...@us...> - 2006-10-01 15:41:34
|
User: ecrutchfield Date: 06/10/01 08:41:31 Modified: andromda-aspdotnet/src/test/expected cartridge-output.zip Log: support lasted version Revision Changes Path 1.5 +65 -95 cartridges/andromda-aspdotnet/src/test/expected/cartridge-output.zip <<Binary file>> |
From: Chris M. <cm...@us...> - 2007-01-11 16:55:32
|
User: cmicali Date: 07/01/11 08:55:29 Modified: andromda-aspdotnet/src/test/expected cartridge-output.zip Log: - Fixed failing tests Revision Changes Path 1.6 +55 -53 cartridges/andromda-aspdotnet/src/test/expected/cartridge-output.zip <<Binary file>> |