|
You can no longer add the actions column to tables. The actions column is in the data store, but not available in the UI. The actions menu is only available by right-clicking each row
|
If you don’t want to display any actions in the actions column you can set the action model to EMPTY_ACTION_MODEL. When you do that, the text “No Actions to Display” will appear in the actions column. |
Problem Description | Solution |
---|---|
Action Column does not appear in Table | By default, the actions column is not displayed. Users are not allowed to see it. Right-clicking a row is the only way to see the row actions. |
Icons for some actions are missing | To follow UI standards, the action service is designed to only show the icons in the actions menu if those icons also appear in some toolbar anywhere in the system. If you need to workaround this for some action that doesn’t belong in any toolbar, you could create a dummy model with your action such as: <model name=”toolbarModelNotUsedAnywhere”> <action name=”myAction” type=”myActionType”/> </model> Then the action service will show the icon defined for that action in the actions menu. |
User right clicks and gets the following error message: No Actions to Display | • Ensure “menufor” attribute is defined on the action model (in the XML file) for your type: menufor=”your.type.Here” (Or you can define which model should be used in the builder when you add the column to the table config) • Add the NmActions column identifier to the table config in the MVC builder: public ComponentConfig buildComponentConfig (ComponentParams params) { ComponentConfigFactory factory = getComponentConfigFactory (); JcaTableConfig table = (JcaTableConfig) factory.newTableConfig (); table.addComponent (factory.newColumnConfig (DescriptorConstants.ColumnIdentifiers.NM_ACTIONS , true)); .... return table; } • Using fiddler/firebug, check what the oid parameter is on the servlet/ActionsMenu request that is made when you right click. If its not the oid you expected, or if there is no oid at all, the infrastructure was not able to make the correct NmOid from the backing objects used for the table. See the NmObjectUtility documentation for more details of how to control what oid will be used for actions in the table. • If you are defining the action model to be used for the table/column (described in the Actions Column in a Table section under Intended Outcome). Using fiddler/firebug check what the “actions” parameter is on the servlet/ActionsMenu request made when you click to get the menu. Is the “actions” param the model name you defined? If actions=EMPTY_ACTION_MODEL it means the action column is not defined in the current table view. The actions column is required for the right click menu to work. Try using the “View”->”Customize…” option to add the actions column to the current table view. Change the table builder to make the actions column one of the default columns. • Check the validators defined on the actions in the model. Did all the actions get validated as hidden? If that was the case, then adding jcaDebug=true as a URL param should show the list of actions that were hidden as disabled actions in the menu. |
User right clicks and gets the following error message: You do not have access to this object or it does not exist | This message is ok if the user really does not have access to the row object. If the user should have access (for example they are able to get to the information page and see the actions menu there) Then using fiddler/firebug, check what the oid parameter is on the servlet/ActionsMenu request that is made when you right click. If its not the oid you expected, or if there is no oid at all, the infrastructure was not able to make the correct NmOid from the backing objects used for the table. See the NmObjectUtility documentation for more details of how to control what oid will be used for actions in the table. |
Some actions don’t appear in the list in the UI | There may be a validator configured on it which may hide the action in certain conditions. See Action Framework for Windchill Client Architecture for information on configuring an action with a validator. Add jcaDebug=true to the url to see even the hidden actions. With the jcaDebug option enabled, you’ll see more information in the menu, and there will be an action at the end of the list that takes you to the action model report for that menu. |
Wrong set of actions is showing. | Add jcaDebug=true and check what vaildators are on the actions in the menu. Check that the validators are working as you’d expect. 1. If you expect the action model to be found by type (described in the Actions Column in a Table section under Intended Outcome) , is ‘menuFor’ defined on the action model for the object type? To see what the action service is finding for the type of object in the row, turn on log4j logger : com.ptc.netmarkets.util.misc. StandardNmActionService 2. If the model to use is defined on the table/column (described in the Actions Column in a Table section under Intended Outcome): To see what action model the default data utility is returning turn on log4j logger: com.ptc.core.components.factory.dataUtilities.NmActionDataUtility The jcaDebug param will also produce a link to the action model report at the bottom of the menu. The action model report will have the model name, the set of actions in that model, where the model is defined, whether the model overrides any other models, etc. Make sure the model is defined as you’d expect. If you made a custom data utility for the column, make sure the correct column is getting used. Set jcaDebug=true on the URL and inspect the column header DOM element to make sure the column id is as you’d expect. Each column will have header text that starts with the column id, for example the default actions column would have header text like: “nmActions validated by: …”. |