Dela via


Multiple Modes with Preview in the Same IE8 Accelerator

As a test, I wrote a simple page that would leverage preview and execute across multiple modes in the same accelerator.

UPDATE: Thanks to some helpful folks, I have found that accelerator preview blocks the passing of documentUrl as a safety precaution for SELECTION accelerators and LINK accelerators.  So, the below XML should have those preview sections removed. documentUrl is passed for EXECUTE actions though.

    1: <?xml version="1.0" encoding="utf-8"?>
    2: <openServiceDescription xmlns="https://www.microsoft.com/schemas/openservicedescription/1.0">
    3:   <homepageUrl>https://localhost/IE8Demo/Default.ASPX</homepageUrl>
    4:   <display>
    5:     <description>Share web content with your IE8Demo friends.</description>
    6:     <name>Share on IE8Demo</name>
    7:     <!--<icon></icon>-->
    8:   </display>
    9:   <activity category="Query">
   10:     <activityAction context="selection">
   11:       <execute method="get" action="https://localhost/IE8Demo/AccelQuery.aspx">
   12:         <parameter name="src" value="selection"/>
   13:         <parameter name="u" value="{documentUrl}"/>
   14:         <parameter name="t" value="{selection}" />
   15:       </execute>
   16:       <preview action="https://localhost/IE8Demo/AccelQuery.aspx">
   17:         <parameter name="src" value="selection"/>
   18:         <parameter name="u" value="{documentUrl}"/>
   19:         <parameter name="t" value="{selection}" />
   20:       </preview>
   21:     </activityAction>
   22:     <activityAction context="document">
   23:       <execute method="get" action="https://localhost/IE8Demo/AccelQuery.aspx">
   24:         <parameter name="src" value="document"/>
   25:         <parameter name="u" value="{documentUrl}"/>
   26:         <parameter name="t" value="{documentTitle}" />
   27:       </execute>
   28:       <preview action="https://localhost/IE8Demo/AccelQuery.aspx" method="get">
   29:         <parameter name="src" value="document"/>
   30:         <parameter name="u" value="{documentUrl}"/>
   31:         <parameter name="t" value="{documentTitle}" />
   32:       </preview>
   33:     </activityAction>
   34:     <activityAction context="link">
   35:       <execute method="get" action="https://localhost/IE8Demo/AccelQuery.aspx">
   36:         <parameter name="src" value="link"/>
   37:         <parameter name="u" value="{documentUrl}"/>
   38:         <parameter name="t" value="{linkText}" />
   39:         <parameter name="l" value="{link}" />      
   40:       </execute>
   41:       <preview action="https://localhost/IE8Demo/AccelQuery.aspx" method="get">
   42:         <parameter name="src" value="link"/>
   43:         <parameter name="u" value="{documentUrl}"/>
   44:         <parameter name="t" value="{linkText}" />
   45:         <parameter name="l" value="{link}" />
   46:       </preview>
   47:     </activityAction>
   48:   </activity>
   49: </openServiceDescription>