Quantcast
Channel: PTC Community : Unanswered Discussions - Windchill
Viewing all articles
Browse latest Browse all 3592

How to add a custom action to Windchill PSB where command is not a JSP, but a custom class?

$
0
0

Hi All

 

Trying to add a custom action to right-click menu in Part Structure Builder (PSB)

 

Uncommented:

<action name="customActionGWT" type="psb"/>

 

in psb-actionmodels.xml

 

and

 

<action name="customActionGWT" ajax="component">

            <command class="com.ptc.cat.ui.client.action.LaunchURLAction" method="execute" url="/ptc1/psb/customAction" windowType="popup"/>

                        <supportedTypes>

                                <type value="wt.part.WTPart"/>

                                <type value="wt.part.WTPartUsageLink"/>

                                <type value="wt.part.PartUsesOccurrence"/>

                                <type value="wt.part.RTPartPathOccurrence"/>

                        </supportedTypes>     

        </action>

 

in psb-actions.xml

 

The menu item appears.

 

When i change command:

 

<command class="com.ptc.cat.ui.client.action.LaunchURLAction" method="execute" url="/ptc1/psb/customAction" windowType="popup"/>

 

to :

 

<command class="com.myCompany.MySimpleAction"/>

 

menu item disappears.

 

MySimpleAction class looks like this:

 

package com.myCompany;

 

import com.google.gwt.user.client.rpc.AsyncCallback;

import com.ptc.cat.ops.client.OperationResult;

import com.ptc.cat.ui.client.action.AbstractAction;

import com.ptc.cat.ui.client.action.ActionDefinition;

 

public class MySimpleAction extends AbstractAction {

 

    public MySimpleAction(ActionDefinition ad) {

        super(ad);

    }

 

    @Override

    public void run(AsyncCallback<OperationResult> ac) {

        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.

    }

   

}

 

Tried adding my class through adding JAR to WC/lib

and .java to WC/src and building

 

It is Windchill 10.2 M030

no .xconfs and .properties added or modified

jcaDebug somehow doesn't work for PSB tree menus

 

 

Does anybody know how to add a custom action class properly?

Thanks in advance!


Viewing all articles
Browse latest Browse all 3592

Trending Articles



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