Tuesday, May 26, 2015

ptc_note

Assuming that the command was executed from the Windows C:\ptc\Windchill\bin directory,
xconfmanager -d wt.home
xconfmanager  --help
The Java executable. Default is the wt.java.cmd
variable value specified in the $WT_HOME/
codebase/wt.propertiesfile.

The Windchill Client Architecture is Model-View-Controller based. There are two
MVC based paths available for use, a Java Builder based approach and a JSP based
approach.
Java Builder based
This approach is new for this release and is the recommended way of
implementing tables, trees, information pages, and panels of attributes. When
implementing one of these components, the configuration of the component is
specified in a ComponentConfigBuilder (java file) and the data acquisition is
specified in a ComponentDataBuilder (java file).
JSP and Tags based
This approach was used in previous releases and should only be used for
implementing wizards (create/edit) and property panels.

NmAction represents a line from actions.xml which describes a page in
Windchill. It is rendered as all the icons and links that one can click to make
changes to the Windchill system. Each jsp page should be described by an
NmAction in an xml file. The localized attributes of the NmAction can be found
in the action.properties or other rbInfo files.

NmContext represents a UI address of a page. (Note that this is becoming
obsolete and should be deprecated in the next release.)

Wizard.js functions
goBack Make the wizard go back one step
goNext Make the wizard go to the next step

In Windchill 9.x, for JCA Clients, JSP was serving both as the Controller and
View. In Windchill 10.0, we are introducing a clear separation between Controller
and View for which we are using Spring MVC Framework.
The primary motivation for this move is to enable our components to be both
requested by and rendered to any client technologies.

The servlet and servlet mapping for the Web container is defined in
<Windchill>\codebase\WEB-INF\web.xml. The below mentioned url
patterns are mapped to Spring DispatcherServlet and hence will be termed
as MVC requests.
<servlet-mapping>
<servlet-name>MVCDispatcher</servlet-name>
<url-pattern>/servlet/WizardServlet/*</url-pattern>
<url-pattern>/servlet/ActionsMenu/*</url-pattern>
<url-pattern>/servlet/RecentList/*</url-pattern>
...


Action Handling
Actions can be broadly divided into three groups.
These actions can be performed once your objects are loaded.
• Group 1 – Actions which act only on loaded data
○ Row-level and multi-select actions
○ Select all, Ctrl/Shift select, Clear all
○ View selected objects only
• Group 2 – Actions which act on the entire data set
These actions can be performed anytime (If incomplete data set, goes to the
server to get all the data)
○ Switching table views
○ Search in table
○ Export list
• Group 3 – Actions which apply to the table itself
These actions can be performed anytime
○ Create actions
○ Cancel data loading
○ Save table view

Element Type Description
*actionModels.xml XML Files which define the models where
actions are used. If an action is not already
defined in a model, one will need to be
created for the validation code to find the
action and properly set visibility.
actionmodels.xml is located in
<Windchills>/codebase; other
*actionmodels.xml files are generally in
<Windchill>/codebase /config/actions
*actions.xml XML Files where actions and other UI
components are defined. Actions are
optionally given a uicomponent value.
actions.xml is located in <Windchill>/
codebase; other *actions.xml files are
generally in <Windchill>/codebase /config/
actions.
Generic

roleaccessprefs.xml XML File for assigning default visibility to UI
components. Setting items in this file can
make them not appear at all for the site or
containers. Whether or not the container
manager can override the default value can
also be changed here.
Located in <Windchill>/codebase.
roleAccessResource.
rbInfo
XML Defines the labels to provide in the Uis for
the actions or UI components.
Located in <Windchill>/wtCustom/ com/
ptc/netmarkets/ roleAccess/.

the create folder action sample

Folder Contents -> New Document sample before actions Page 539


Action Service
Configuration of actions and action models that are available within the system
are defined using xml files. There is an action service that reads these xml files
and manages the set of actions and action models. Interaction with the service is
done via the components. Developers in general would not call the service
directly. For more detailed information about the action framework see Adding
Actions and Hooking Them Up in the UI on page 513

This section describes the action framework for the Windchill Client Architecture.
It does not include information on how to control the display of the action. For
more information on controlling the display see Related Documentation on page
548.

A service, called the StandardNmActionService manages the
set of actions and action models in the system.
StandardNmActionService .java <Windchill>\codebase\com \ptc\netmarkets\util\misc
actions.xml <Windchill>\codebase\config\actions
actionmodels.xml <Windchill>\codebase\config\actions
actions.dtd <Windchill>\codebase\config\actions
actionmodels.dtd <Windchill>\codebase\config\actions

The default actions.xml and actionmodels.xml files contain commonly used
actions, such as copy, cut, and commonly used action models such as wizard
buttons. Additional actions*.xml and actionmodels*.xml files contain
actions. and action models related to their functional areas. (e.g.
ChangeManagement-actions.xml contains actions related to change
management, PartManagement-actions.xml contains actions related to part management).

Here is an example of an action definition for the New Document wizard.
<objecttype name="document" class="wt.doc.WTDocument" resourceBundle="com.ptc.windchill.enterprise.doc.documentResource">
<action name="create" uicomponent="CREATE_DOC" dtiUpload="true">
<command class="com.ptc.windchill.enterprise.doc.forms.CreateDocFormProcessor"
method="execute" windowType="popup" onClick="validateCreateLocation(event)"/>
<includeFilter name="projectM4D" />
<nonSupportedTypes value="wt.part.WTPart"/>
<supportedTypes value="wt.doc.WTDocument"/>
</action>
</objecttype>

We support modularized actions and actionmodels within the system, so
to find what file an action is defined in, or what action models the action is used
in, there is a reporting tool that can be used. On a running Windchill installation,
you can use the Actions and ActionModels reports.

Action Report
http://<your machine name>/<app-name>/ app/#ptc1/
carambola/tools/actionReport/action The Action report allows you to search for actions managed by the
StandardNmActionService. You can search by several properties for the action
including the label (aka Description), action name, objecttype.

Debug Tool
There is also a debug mode that can be enabled in the UI that can help track down
information about a particular action on a page. See Debugging on page 442 for
information on enabling and using this tool.

Reload Action(s)
http://<your machine name>/<app-name>/app/#ptc1/carambola/tools/list
This tool reloads the action models from their xml files without having to restart
the method server.

As mention earlier in Solution Elements on page 517 section, there are two files,
custom-actions.xml and custom-actionmodels.xml, that are delivered with the
product. If you want to add/modify an action/actionmodel you can put the changes
in these files.

Toolbar Actions for a Table
Displaying Toolbar Actions for a Table
1. Define the actions in an actions.xml file. See Procedure – Defining a new
action on page 519 for more information.
2. Add the actions to an action model . See Procedure – Defining a new action on
page 519 for more information. Action models that used in the toolbar need to
contain “toolbar” in the name of the action model.
<model name="part toolbar actions">
Adding Actions and Hooking Them Up in the UI 583
<action name="create" type="Part"/>
<action name="create" type="Document"/>

</model>
3. Add the action model to your table by calling the setActionModel(action_
model_name) in your MVC builder:
public ComponentConfig buildComponentConfig (ComponentParams params) {
ComponentConfigFactory factory = getComponentConfigFactory ();
JcaTableConfig table = (JcaTableConfig) factory.newTableConfig ();
// add the toolbar action model to the table
table.setActionModel (“part toolbar actions”);
....
return table;
}

Soft Typing is the name of the set of Windchill capabilities that allows a
customer to, at runtime, add additional types and attributes to the out-of-thebox
Windchill Schema. This is done without having adding additional tables
to the database, without restarting the database, and without restarting the
system.

The Windchill Supported API includes those classes that customizers are meant to
work with directly. A class might be in the Supported API because it is meant to
be extended by customizers or, more likely, because it has some methods for
customizers to call.

ant -f bin/tools.xml eclipse_project.help

No comments:

Post a Comment