1
votes

I am looking for way to refresh current page after custom action.

My code

<Control Id="Config" Type="PushButton" .../>
    <Publish Event="DoAction" Value="SetConfiguration"></Publish>
</Control>

It can be after custom action, but I don't see that Session has such an opportunity, or just adding some Event to Control that will work.

Edit:

Ok I have somethink like this:

<Control Id="Config" Type="PushButton" X="120" Y="243" Width="56" Height="17" Default="yes" Text="Config" >
   <Publish Event="DoAction" Value="SetConfiguration" Order="1"></Publish>
   <Condition Action="disable">EndConfig = "true"</Condition>
   <Condition Action="enable">EndConfig = "false"</Condition>
   <Publish Event="NewDialog" Value="IISconfiguration2">EndConfig="true</Publish>
</Control>

But how to create NewDialog after return result custom acion. Because it now do it in this same time. Set order on 1 and 2 dont work.

2

2 Answers

3
votes

Try this

<Control Id="Config" Type="PushButton" X="120" Y="243" Width="56" Height="17" Default="yes" Text="Config" >
    <Publish Event="DoAction" Value="SetConfiguration">1</Publish>
    <Condition Action="disable">EndConfig = "true"</Condition>
    <Condition Action="enable">EndConfig = "false"</Condition>
    <Publish Event="NewDialog" Value="IISconfiguration2">2</Publish>
</Control>
2
votes

This is a known behavior in MSI native UI.

The best work around I have is to make a clone of the dialog and transition from the original to the clone dialog (or the clone to the original) so that it looks like the same dialog to the user but it's actually a different dialog and the data will be refreshed.

Example.

On SQLDlg1:

  <Control Id="Test" Type="PushButton" Text="&amp;Test" TabSkip="no" Default="yes" Height="17" Width="56" X="283" Y="195">
      <Publish Event="NewDialog" Value="SQLDlg2">1</Publish>
      <Publish Event="DoAction" Value="ValidateDatabase">1</Publish>
    </Control>

On SQLDlg2:

<Control Id="Test" Type="PushButton" Text="&amp;Test" TabSkip="no" Default="yes" Height="17" Width="56" X="283" Y="195">
      <Publish Event="NewDialog" Value="SQLDlg1">1</Publish>
      <Publish Event="DoAction" Value="ValidateDatabase">1</Publish>
    </Control>

On the next dialog I also clear the property in case they click back.

<Publish Dialog="VerifyReadyDlg" Control="Back" Property="DatabaseValid" Value="{}">1</Publish>
  <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="SQLDlg">1</Publish>