Personalizzazione di base > User Interface Customization > Customizing HTML Clients Using the Windchill JSP Framework > Attribute Panels > Packaged Samples > Advanced Panel with Modified Context Object
  
Advanced Panel with Modified Context Object
This is a view-only attribute panel based on a layout defined in the Type and Attribute Management utility. It displays the layout that maps to the screen type “Information Page – More Attributes” (ScreenDefinitionName.MORE_ATTRIBUTES) for the container of a “Poem” object. It is displayed on a new tab in a Poem info page.
Note: To display this example, the Poem type must have been loaded into your Windchill system.
Also, to see this layout-based panel, you must create an object of type Poem in a product, project, or library container using the New Document wizard. If you don’t have a Poem object in one of those containers you will see a non-layout-based panel showing only the container name.
The example illustrates:
How to create a layout-based panel using a Java builder class
How to use a context object for the panel that is different from the page context object
How to change the title of an attribute panel group
The panel was configured using a Java MVC builder class that extends TypedAttributesPanelBuilder.
The builder overrides the buildAttributePanelConfig() method of its superclass so that it can reset the context object for the panel and set the title of the single panel group.
The builder resets the context object by calling JcaComponentParams.setContextObject(). Resetting the context object should be done with care. It must be done before the panel configs are created and can have unintended consequences if other components are displayed on the page.
To reset the title of the group the builder calls the setLabel() method on the group config. If it did not reset the title, the group would have the title specified in the Type and Attribute Management utility.
Like the example Advanced Attribute Panel on an Information Page, the attribute panel is displayed on a new tab of the Poem information page by specifying “tlnaction” and “tlntype” parameters on the info page URL. See Advanced Attribute Panel on an Information Pagefor more information on how this is done.
See Solution – Create an Advanced Attribute Panel Using Any Layout Defined in the Type and Attribute Management Utility for more information on creating layout-based attribute panels.
Location of Example
To navigate to this example in the product go to Customization > Component Catalog > Attribute Panel > Advanced Panel with Modified Context Object.
Actions Models Used in This Example
None
Actions Used in This Example
None
Files Used in This Example
Source File
Description
Com/ptc/mvc/builders/carambola/LiteratureContextObjectAttributePanelBuilder
Builder that creates the configuration and datum object for the panel
Packaged Samples