I?m having a problem with value replacement in a deployed XML file.

I have a property defined (?DataValueProperty?) and I allow the user to 
modify it in a dialog in the UI.  The next dialog shows the successfully 
modified value.  But when I go to write the value via XmlFile, the 
deployed XML file does not get updated.

What happens is the XmlFile custom action updates the xml file with the 
old property value.  The new property value set by the Edit control is 
being ignored.

I am using version 3.0.4014.0 and I have searched the bug database but 
have not found anything relevant to what I am seeing.

Here is the property I'm modifying:

<Property Id="DataValueProperty" Value="Default WiX value" />

Here is the component code:

<Component Id="data" Guid="C685777C-5FED-4593-9B9D-9EED1DDECF8E">
            <File Id="data" Source="data.xml" />
            <util:XmlFile Id="modifyData" Action="setValue"
                            File="[INSTALLLOCATION]data.xml"
                            ElementPath="//dataFile/data" 
                            Name="value"
                            Value="[DataValueProperty]"/>
          </Component>

Here is the UI code, I am adding a custom dialog to the WixUIExtension UI:

<Dialog Id="CustomDlg" Width="370" Height="270" Title="[ProductName] 
[Setup]" NoMinimize="yes">
        <Control Id="PropertyL" Type="Text" X="45" Y="140" Width="200" 
Height="10" TabSkip="no" Text="Change DataValueProperty:" />
        <Control Id="PropertyText" Type="Edit" X="45" Y="155" Width="220" 
Height="15" Property="DataValueProperty" />

        <Control Id="Back" Type="PushButton" X="180" Y="243" Width="56" 
Height="17" Text="&amp;Back"></Control>
        <Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" 
Height="17" Default="yes" Text="&amp;Next">
        </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>
        <Control Id="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="370" 
Height="44" TabSkip="no" Text="WixUI_Bmp_Banner" />
        <Control Id="Description" Type="Text" X="25" Y="23" Width="280" 
Height="15" Transparent="yes" NoPrefix="yes">
          <Text>Please change value for DataValueProperty</Text>
        </Control>
        <Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" 
Height="0" />
        <Control Id="Title" Type="Text" X="15" Y="6" Width="200" 
Height="15" Transparent="yes" NoPrefix="yes">
          <Text>{\WixUI_Font_Title}Change property</Text>
        </Control>
        <Control Id="BannerLine" Type="Line" X="0" Y="44" Width="370" 
Height="0"/>
      </Dialog>

I can send an example solution if anyone wants to take a look. 

Are WixUIExtension and WixUtilExtension compatiable to work in this way?

-David
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to