From: Eric C. <ecr...@us...> - 2006-10-01 13:32:27
|
User: ecrutchfield Date: 06/10/01 06:32:27 Modified: andromda-aspdotnet/src/main/java/org/andromda/cartridges/aspdotnet/metafacades AspBackendServiceLogicImpl.java andromda-aspdotnet/src/main/resources/templates/aspdotnet/controllers Controller.cs.vsl andromda-aspdotnet/conf/test andromda.xml Log: fix rendereing of form references and service implementation Revision Changes Path 1.2 +1 -1 cartridges/andromda-aspdotnet/src/main/java/org/andromda/cartridges/aspdotnet/metafacades/AspBackendServiceLogicImpl.java Index: AspBackendServiceLogicImpl.java =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-aspdotnet/src/main/java/org/andromda/cartridges/aspdotnet/metafacades/AspBackendServiceLogicImpl.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -w -r1.1 -r1.2 --- AspBackendServiceLogicImpl.java 28 Sep 2006 01:12:54 -0000 1.1 +++ AspBackendServiceLogicImpl.java 1 Oct 2006 13:32:27 -0000 1.2 @@ -35,6 +35,6 @@ { String packageName = String.valueOf( getConfiguredProperty(CommonProperties.SERVICE_PACKAGE_NAME_PATTERN)); - return packageName.replaceAll("\\{0\\}", super.getPackageName()) + "." + this.getName(); + return packageName.replaceAll("\\{0\\}", super.getPackageName()) + ".I" + this.getName(); } } \ No newline at end of file 1.2 +10 -2 cartridges/andromda-aspdotnet/src/main/resources/templates/aspdotnet/controllers/Controller.cs.vsl Index: Controller.cs.vsl =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-aspdotnet/src/main/resources/templates/aspdotnet/controllers/Controller.cs.vsl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -w -r1.1 -r1.2 --- Controller.cs.vsl 1 Oct 2006 01:44:47 -0000 1.1 +++ Controller.cs.vsl 1 Oct 2006 13:32:27 -0000 1.2 @@ -24,10 +24,12 @@ //Instantiate the Form objects to hold data from the pages during transitions //between action states. #foreach ($action in $controller.useCase.actions) +#if (!$action.formFields.empty) if (this.${action.formImplementationPropertyName} == null) this.${action.formImplementationPropertyName} = new ${action.fullyQualifiedFormImplementationName}(); #end +#end } #endregion @@ -61,6 +63,7 @@ ## #region Public properties #foreach ($action in $controller.useCase.actions) +#if (!$action.formFields.empty) /// <summary> /// Get/set the <see cref="${action.fullyQualifiedFormImplementationName}"/> from HttpSession. /// </summary> @@ -78,6 +81,7 @@ } #end +#end #endregion ##todo add public method that can be called from base page @@ -90,9 +94,13 @@ public virtual void ${stringUtils.capitalize(${action.triggerName})}() { string forward = String.Empty; +#if (!$action.formFields.empty) ${action.fullyQualifiedFormImplementationName} form = this.${action.formImplementationPropertyName}; +#end forward = #processTransition($action) +#if (!$action.formFields.empty) this.${action.formImplementationPropertyName} = form; +#end HttpContext.Current.Response.Redirect(forward); } @@ -132,7 +140,7 @@ /// <summary> /// Returns a reference to the $serviceRef.name back-end service. /// </summary> - protected $serviceRef.targetElement.fullyQualifiedName ${serviceRef.getterName}() + protected $serviceRef.targetElement.fullyQualifiedName $stringUtils.capitalise(${serviceRef.getterName})() { try { @@ -140,7 +148,7 @@ } catch (Exception ex) { - throw new InvalidOperationException(ex); + throw new InvalidOperationException("A problem occured while getting a reference to the ${serviceRef.name} service.", ex); } } 1.2 +1 -0 cartridges/andromda-aspdotnet/conf/test/andromda.xml Index: andromda.xml =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-aspdotnet/conf/test/andromda.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -w -r1.1 -r1.2 --- andromda.xml 25 Sep 2006 19:21:26 -0000 1.1 +++ andromda.xml 1 Oct 2006 13:32:27 -0000 1.2 @@ -56,6 +56,7 @@ <property name="AssemblyDelaySign">true</property> <property name="AssemblyKeyFile"></property> <property name="AssemblyKeyName"></property> + <property name="serviceAccessorPattern">{0}.ServiceLocator.Get{1}()</property> </properties> </namespace> </namespaces> |