Visual Studio Development Bookmark and Share   
 index > Visual Studio Guidance Automation Toolkit > Wizard - Field with optional value
 

Wizard - Field with optional value

Hello, I hope that they are well.

I have one question, very simple.

It posible define one field of type string, in the wizard, that it will be optional.

There is one attribute to define optional.

The problem is that if not complete all field, the finish button, is not enable.

Thanks.

Leandro Tuttini  Monday, September 03, 2007 9:25 PM
Hi Leandro, I tried the following recipe provided by the GAT Feb 2007 CTP when you create a new Guidance Package:

<Recipe Name="HelloWorldRecipe" Bound="true">
<Caption>Say a message</Caption>
<Description>Accepts a message as input and shows a message box with it.</Description>
<HostData>
<Icon ID="1046"/>
<CommandBar Name="Solution Folder"/>
<CommandBar Name="Project"/>
<CommandBar Name="Web Project"/>
<CommandBar Name="Web Item"/>
<CommandBar Name="Web Folder"/>
</HostData>
<Arguments>
<Argument Name="Message" Required="false" />
</Arguments>
<GatheringServiceData>
<Wizard xmlns="http://schemas.microsoft.com/pag/gax-wizards" SchemaVersion="1.0">
<Pages>
<Page>
<Title>Collect message to show</Title>
<LinkTitle>Provide a message that will be used by the HelloWorldAction.</LinkTitle>
<Help>You shouldn't need a lot of help!</Help>
<Fields>
<Field ValueName="Message" Label="Message" />
<!--<Editor Type="GuidancePackage6.Editors.MessageEditor, GuidancePackage6" />
</Field>-->
</Fields>
</Page>
</Pages>
</Wizard>
</GatheringServiceData>
<Actions>
<Action Name="HelloWorld" Type="GuidancePackage6.Actions.HelloWorldAction, GuidancePackage6">
<Input Name="HelloMessage" RecipeArgument="Message" />
</Action>
</Actions>
</Recipe>


I added the Required="false" to the Message argument and it works (The finish button is always enabled).

HTH
-Adrian
Adrian Alonso  Tuesday, September 04, 2007 12:45 PM
Hi Leandro, I tried the following recipe provided by the GAT Feb 2007 CTP when you create a new Guidance Package:

<Recipe Name="HelloWorldRecipe" Bound="true">
<Caption>Say a message</Caption>
<Description>Accepts a message as input and shows a message box with it.</Description>
<HostData>
<Icon ID="1046"/>
<CommandBar Name="Solution Folder"/>
<CommandBar Name="Project"/>
<CommandBar Name="Web Project"/>
<CommandBar Name="Web Item"/>
<CommandBar Name="Web Folder"/>
</HostData>
<Arguments>
<Argument Name="Message" Required="false" />
</Arguments>
<GatheringServiceData>
<Wizard xmlns="http://schemas.microsoft.com/pag/gax-wizards" SchemaVersion="1.0">
<Pages>
<Page>
<Title>Collect message to show</Title>
<LinkTitle>Provide a message that will be used by the HelloWorldAction.</LinkTitle>
<Help>You shouldn't need a lot of help!</Help>
<Fields>
<Field ValueName="Message" Label="Message" />
<!--<Editor Type="GuidancePackage6.Editors.MessageEditor, GuidancePackage6" />
</Field>-->
</Fields>
</Page>
</Pages>
</Wizard>
</GatheringServiceData>
<Actions>
<Action Name="HelloWorld" Type="GuidancePackage6.Actions.HelloWorldAction, GuidancePackage6">
<Input Name="HelloMessage" RecipeArgument="Message" />
</Action>
</Actions>
</Recipe>


I added the Required="false" to the Message argument and it works (The finish button is always enabled).

HTH
-Adrian
Adrian Alonso  Tuesday, September 04, 2007 12:45 PM

Sorry by the delay in answering

It work perfect

Thanks

Leandro Tuttini  Tuesday, September 11, 2007 6:45 PM
Great, glad it worked!

-Adrian
Adrian Alonso  Tuesday, September 11, 2007 6:49 PM

You can use google to search for other answers

Custom Search

More Threads

• Could not load WCSF project Microsoft.Practices.ComponentModel
• Creating Data Repository classes.
• IExtenderProvider the GAT way...
• How to Validate Custom Argument
• Problem with Specifying Command Bars
• Get Full Path for Project Item...
• Possible Syntax for CommandBar Name Attribute
• Server Application Unavailable
• ProjectTemplateLink does not support substitution parameters (as used by GAT & SFT)
• Installing GAT, GAX, Microsoft Recipe Framework and MCSF