简体   繁体   中英

wix selectTree doesn't update

I'ąm trying to do instaler thats components on SelectedTree will be dependent on property value. So I create my own UI dialog with Edit componen which is binded to Property.

    <?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
    <UI Id="WixUI_ProductType">
      <PropertyRef Id="PRODUCTKEY" />
      <Dialog Id="ProductChooseDlg" Width="370" Height="270" Title="Product key">
        <Control Id="Description" Type="Text" X="25" Y="23" Width="280" Height="15" Transparent="yes"  NoPrefix="yes" Text="Specify your product" />
        <Control Id="Title" Type="Text" X="15" Y="6" Width="200" Height="15" Transparent="yes" NoPrefix="yes" Text="Product code" />
        <Control Id="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="44" TabSkip="no" Text="!(loc.InstallDirDlgBannerBitmap)" />
        <Control Id="BannerLine" Type="Line" X="0" Y="44" Width="370" Height="0" />
        <Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" />

        <Control Id="Control_Label" Type="Text" X="20" Y="100" Width="105" Height="30" NoPrefix="yes" Text="Please enter your code:" />
        <Control Id="Control_Edit" Type="Edit" X="125" Y="98" Width="50" Height="16" Property="PRODUCTKEY"/>

        <Control Id="Next" Type="PushButton" X="241" Y="243" Width="60" Height="17" Text="Next">
          <Publish Event="NewDialog" Value="CustomizeDlg" Order="1"></Publish>
          <Publish Property="PRODUCTKEY" Value="NE05" Order="2"></Publish>
          <Condition Action="disable"><![CDATA[PRODUCTKEY = "ALL"]]></Condition>
          <Condition Action="enable"><![CDATA[PRODUCTKEY <> "ALL"]]></Condition>
        </Control>
        <Control Id="Back" Type="PushButton" X="180" Y="243" Width="60" Height="17" Text="Back">
          <Publish Event="NewDialog" Value="WelcomeDlg"></Publish>
        </Control>
      </Dialog>
    </UI>
    </Fragment>
</Wix>

But problem is that when change value SelectedTree dosn't update ownself. I have always the same choose list. Feature has own Condisions to check property value.

<Feature Id='FeatureExportModule' Title='Export module' Description='' Level='0'>
    <ComponentRef Id='ComponentDataMigration.Modules.Export' />
    <Condition Level='1'><![CDATA[PRODUCTKEY = "EXPO"]]></Condition>
  </Feature>

Its only work when I manualy set value in xml. How to fix it?

 <Property Id="PRODUCTKEY" Value="EXPO"/>

Short answer - feature conditions are evaluated before UI starts. See Feature conditions and UI .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM