Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 187874

Re: Custom Action showing up as disabled

$
0
0

Hi laurent,

Here is my plugin.xml

 

<extension id="com.vmware.samples.VMActionSet">

   <extendedPoint>vise.actions.sets</extendedPoint>

     <object>       

        <actions>

        <com.vmware.actionsfw.Actionspec>

              <uid>com.vmware.samples.includeVM</uid>

               <label>#{action.include}</label>          

               <command className="com.vmware.samples.VMActionCommand"/>

            </com.vmware.actionsfw.Actionspec>

          <com.vmware.actionsfw.Actionspec>

              <uid>com.vmware.samples.excludeVM</uid>

               <label>#{action.exclude}</label>             

               <command className="com.vmware.samples.VMActionCommand"/>

            </com.vmware.actionsfw.Actionspec>

            <com.vmware.actionsfw.Actionspec>

               <uid>com.vmware.samples.recovery</uid>

               <label>#{app.recovery}</label>              

               <command className="com.vmware.samples.VMActionCommand"/>

            </com.vmware.actionsfw.Actionspec>          

        </actions>

     </object>

     <metadata>

        <objectType>VirtualMachine</objectType>

     </metadata>

   </extension>

  

 

 

 

 

  <extension id="com.vmware.samples.vmActionSet">

     <extendedPoint>vsphere.core.menus.solutionMenus</extendedPoint>

     <object>

      <label>#{action.title}</label>

      <uid>com.vmware.samples.ActionTitle</uid>

      <children>

            <Array>

             <com.vmware.actionsfw.ActionMenuItemSpec>

             <uid>com.vmware.samples.MonitoringStatus</uid>

                  <label>#{vm.monitoringStatus}</label>

                  <children>

                     <Array>                       

                <com.vmware.actionsfw.ActionMenuItemSpec>

                  <type>action</type>

                    <uid>com.vmware.samples.includeVM</uid>

                    <label>#{action.include}</label>

                </com.vmware.actionsfw.ActionMenuItemSpec>              

                <com.vmware.actionsfw.ActionMenuItemSpec>

                   <type>action</type>

                   <uid>com.vmware.samples.excludeVM</uid>

                   <label>#{action.exclude}</label>

                </com.vmware.actionsfw.ActionMenuItemSpec>

              </Array>

                  </children>

              </com.vmware.actionsfw.ActionMenuItemSpec>

              <com.vmware.actionsfw.ActionMenuItemSpec>

                  <!-- Add a separator between menus items -->

                  <type>separator</type>

               </com.vmware.actionsfw.ActionMenuItemSpec>

              <com.vmware.actionsfw.ActionMenuItemSpec>

                 <type>action</type>

                  <uid>com.vmware.samples.recovery</uid>

                  <label>#{app.recovery}</label>

              </com.vmware.actionsfw.ActionMenuItemSpec>

            </Array>

         </children>              

     </object>

     <metadata>

         <!-- Filter creates this extension only for VirtualMachine objects -->

         <objectType>VirtualMachine</objectType>

      </metadata>

   </extension>

 

 

Inside the VMActionCommand.as class , i have three requestHandler's defined.

 

[RequestHandler("com.vmware.samples.excludeVM")]  

   public function onExcludeVM(event:ActionInvocationEvent):void {

  

    Alert.show("Exclude VM");  

   }

  

  

   [RequestHandler("com.vmware.samples.includeVM")]

   public function onIncludeVM(event:ActionInvocationEvent):void {

  

    Alert.show("Include VM");

}

   [RequestHandler("com.vmware.samples.recovery")]

   public function onRecovery(event:ActionInvocationEvent):void {

  

    Alert.show("Include VM");

   }

 

 

I want all the actions to be enabled. i don't need to disable them in my code.

 

Thanks

Kevin


Viewing all articles
Browse latest Browse all 187874

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>