Hi,
In GAX wizards, when an argument is required, you won't be able toclick on the finish button until all the arguments are filled.
I'm not able to get the same result in my custom wizard. When the wizard opens, the finish button is effectively disabled, but if I fill every required values and then I clear one of them, the finish button stays enabled...
The effect of that is this error :
Microsoft.Practices.RecipeFramework.RecipeExecutionException: An exception occurred during the binding of reference or execution of recipe AddBusinessComponentRecipe. Error was: The following arguments are required and don't have values: ApplicationCode. Can't continue execution..
You can remove the reference to this recipe through the Guidance Package Manager.
at Microsoft.Practices.RecipeFramework.Recipe.ThrowIfRequiredArgumentsAreNull(IDictionaryService arguments)
at Microsoft.Practices.RecipeFramework.Recipe.Execute(Boolean allowSuspend)
at Microsoft.Practices.RecipeFramework.GuidancePackage.Execute(String recipe, IAssetReference reference, IDictionary arguments)
at Microsoft.Practices.RecipeFramework.GuidancePackage.ExecuteFromTemplate(String recipe, IDictionary arguments)
at Microsoft.Practices.RecipeFramework.VisualStudio.Templates.UnfoldTemplate.ExecuteRecipe(Boolean executeActions)
at Microsoft.Practices.RecipeFramework.VisualStudio.Templates.UnfoldTemplate.RunFinished()
Here is the code of my argument in my recipe :
<Argument Name="ApplicationCode">
</Argument>
And here is the code behind my wizard concerning this argument :
[RecipeArgument]
public string ApplicationCode
{
set
{
if (value != null)
{
applicationCodeTextBox.Text = value.ToString();
}
else
{
applicationCodeTextBox.Text = "";
}
}
}
private void applicationCodeTextBox_TextChanged(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(applicationCodeTextBox.Text.ToString()))
dictionaryService.SetValue("ApplicationCode", null);
else
dictionaryService.SetValue("ApplicationCode", applicationCodeTextBox.Text.ToString());
}
Am I doing something wrong?
Thanks!
Phil