[wix-users] Associate Feature to Checkbox

Ven H venh.123 at gmail.com
Fri Feb 9 08:56:18 PST 2018


I have a few features (Complete, which has 2 child features, namely
AppFeature and DBFeature) in my Product.wxs, as shown below.

 <Feature InstallDefault="local" Description="!(loc.FullFeatureDesc)"
Title="!(loc.FullFeatureTitle)" Level="1" Id="Complete" Absent="allow"
AllowAdvertise="no" Display="expand">
      <Feature InstallDefault="local" Description="!(loc.AppFeatureDesc)"
Title="!(loc.AppFeatureTitle)" Level="1" Id="AppFeature" Absent="allow"
AllowAdvertise="no" Display="expand">
        <ComponentGroupRef Id="AppCG"/>
      </Feature>
      <Feature InstallDefault="local" Description="!(loc.DBFeatureDesc)"
Title="!(loc.DBFeatureTitle)" Level="1" Id="DBFeature" Absent="allow"
AllowAdvertise="no" Display="expand">
        <ComponentGroupRef Id="DbCG"/>
      </Feature>
    </Feature>

In another dialog, I have a few checkboxes for All, App and DB options,
each meant for a feature (All means both App and DB). I want to associate
App checkbox to App
feature and DB checkbox to DB Feature. I tried it using Publish element in
the Next button on that dialog using the Event="AddLocal" and
Value="AppFeature" and one for DBFeature with the checkbox values checked
appropriately. But on clicking on Next button, nothing happens. Can anyone
please help me? I am also providing the elements on the dialog for
reference.

<Control Id="ControlAllFeature" Type="CheckBox" X="180" Y="33" Width="140"
Height="17"
    Property="ALLFEATURES_CHECKED" CheckBoxValue="AllFeatureValue"
Text="Install Everything">
          <Publish Property="APPFEATURE_CHECKED" Value="AppFeatureValue"
Order="1">ALLFEATURES_CHECKED</Publish>
          <Publish Property="APPFEATURE_CHECKED" Value="{}" Order="2">NOT
ALLFEATURES_CHECKED</Publish>
          <Publish Property="DBFEATURE_CHECKED" Value="DBFeatureValue"
Order="3">ALLFEATURES_CHECKED</Publish>
          <Publish Property="DBFEATURE_CHECKED" Value="{}" Order="4">NOT
ALLFEATURES_CHECKED</Publish>
        </Control>
        <Control Id="ControlAppFeature" Type="CheckBox" X="191" Y="50"
Width="140" Height="17"
     Property="APPFEATURE_CHECKED" CheckBoxValue="AppFeatureValue"
Text="Install Application">
          <Publish Property="ALLFEATURES_CHECKED" Value="{}" Order="1">NOT
APPFEATURE_CHECKED</Publish>
  <Publish Property="ALLFEATURES_CHECKED" Value="AllFeatureValue"
Order="2">APPFEATURE_CHECKED AND DBFEATURE_CHECKED</Publish>
        </Control>
        <Control Id="ControlDBFeature" Type="CheckBox" X="191" Y="67"
Width="140" Height="17"
           Property="DBFEATURE_CHECKED" CheckBoxValue="DBFeatureValue"
Text="Install DB">
          <Publish Property="ALLFEATURES_CHECKED" Value="{}" Order="1">NOT
DBFEATURE_CHECKED</Publish>
  <Publish Property="ALLFEATURES_CHECKED" Value="AllFeatureValue"
Order="2">APPFEATURE_CHECKED AND DBFEATURE_CHECKED</Publish>
        </Control>

        <Control Id="Back" Type="PushButton" X="180" Y="243" Width="56"
Height="17" Text="&Back">
          <Publish Event="NewDialog" Value="CustLicenseAgmtDlg">1</Publish>
        </Control>
        <Control Id="Next" Type="PushButton" X="236" Y="243" Width="56"
Height="17" Default="yes" Text="&Next">
          <Publish Event="SpawnWaitDialog"
Value="WaitForCostingDlg">CostingComplete = 1</Publish>
          <Publish Event="NewDialog" Value="BrowsePathDlg"></Publish>
   <Condition Action="disable">NOT APPFEATURE_CHECKED OR NOT
DBFEATURE_CHECKED</Condition>
  <Condition Action="enable">APPFEATURE_CHECKED OR
DBFEATURE_CHECKED</Condition>
         <Publish Event="Remove" Value="ALL" Order="1">1</Publish>
         <Publish Event="AddLocal" Value="AppFeature"
Order="2">APPFEATURE_CHECKED</Publish>
         <Publish Event="AddLocal" Value="DBFeature"
Order="3">DBFEATURE_CHECKED</Publish>
        </Control>
        <Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56"
Height="17" Cancel="yes" Text="Cancel">
          <Publish Event="SpawnDialog" Value="CancelDlg">1</Publish>
        </Control>


Regards,
Venkatesh


More information about the wix-users mailing list