Composer Library - Show Property Component

Use the Show Property component to display an attribute or parameter in a custom property panel at runtime.

If you are building a custom property panel for a component, you can use Show Property components, available from the Composer tag library, to expose the component's attributes on the custom panel. In the page fragment defining the custom panel task flow, you must add one Show Property component for each attribute that you want to expose. Show Property is a declarative component that reads a property value on the component or task flow for which you have created the custom panel, and it displays an input field for that property in the custom panel. Users can edit property values using the input fields. More

Consider an example of a weather widget that is included inside a Show Detail Frame component. A custom property panel is created with fields to expose the Text, Auto Refresh, and Refresh Interval attributes on the weather widget. To enable users to set the three attributes on the weather widget, a Show Property component is added for each attribute that is exposed in the panel. When a user edits the weather widget at runtime, the Component Properties dialog displays the custom panel with the three attributes.

Example

<pedc:showProperty id="itcfi" type="boolean"
                  simple="true"
                  value="#{pageFlowScope.resourceEditorBean.insertFolderContents}"
                  shortDesc="#{neb.INSERT_FOLDER_CONTENTS_HINT}"/>

Common Attributes

Element Description

id

Specifies the unique identifier for the component on the page. This attribute is populated with a unique value by default when you add the component.
  • The identifier must follow a subset of the syntax allowed in HTML:

  • Must not be a zero-length String.

  • First character must be an ASCII letter (A-Za-z) or an underscore ('_').

  • Subsequent characters must be an ASCII letter or digit (A-Za-z0-9), an underscore ('_'), or a dash ('-')

rendered

Specifies whether the component is rendered. When set to false, no output will be delivered for this component (the component will not in any way be rendered, and cannot be made visible on the client). The default value is true.

type

Specifies the type of property being exposed. Supported values are string, boolean, date, and list.

value

Specifies the current value of the property. If the EL binding for the "value" points to a bean property with a getter but no setter, and this is an editable component, the component will be rendered in read-only mode.

label

Specifies the label of the component. If you want the label to appear above the control, use a panelFormLayout.

Data Attributes

Element Description

value

Specifies the current value of the property. If the EL binding for the "value" points to a bean property with a getter but no setter, and this is an editable component, the component will be rendered in read-only mode.

selectItems

Specifies the list of values to be displayed if attributeType was set to lov. This attribute takes an EL value that returns the list of values.

Appearance Attributes

Element Description

columns

Specifies the size of the text control specified by the number of characters shown. The number of columns is estimated based on the default font size of the browser.

rows

Specifies the height of the text control specified by the number of characters shown. The default value is 1, which generates a one-row input field. The number of rows is estimated based on the default font size of the browser.

label

Specifies the label of the component. If you want the label to appear above the control, use a panelFormLayout.

shortDesc

Provides a short description of the component. This text is commonly used by user agents to display tooltip help text, in which case the behavior for the tooltip is controlled by the user agent, for example, Firefox truncates long tooltips. For form components, the shortDesc is displayed in a note window.

simple

Specifies whether the component provides label support; when set to "true", the component will not display the label (these may be ignored: label, labelAndAccessKey, accessKey, showRequired, help facet) and may use simpler layout primitives. One of the use cases can be when the component is used in repeatable elements like in table, for-each etc., where label is not required.

unselectedLabel

The label for the option that represents a value of null, meaning nothing is selected. If unselectedLabel is not set and if the component does not have a selected value, then an option with an empty string as the label and value is rendered as the first option in the choice box (if there isn't an empty option already defined). Once an option has been successfully selected, and if unselectedLabel is not set, then the empty option will not be rendered.

Behavior Attributes

Element Description

required

Specifies a non-null, non-empty value must be entered. If false, validators will not be executed when the value is null or empty.

autoSubmit

Specifies whether the component will automatically submit when an appropriate action takes place (a click, text change, etc.). Since autoSubmit is a partial submit, also submitted and re-rendered are any other components with partialTriggers pointing to this component. The default value is false.

disabled

Specifies whether the property should be shown as disabled. This is useful if the Show Property component is inside an iterator whose model specifies that the property must be shown as disabled, for example, if an MDS restriction has been applied on the property.

validator

Specifies a method reference to a validator method.

valueChangeListener

Specifies a method reference to a value change listener.

Advanced Attributes

Element Description

binding

An EL reference that will store the component instance on a bean. This can be used to give programmatic access to a component from a backing bean, or to move creation of the component to a backing bean.

clientComponent

Whether a client-side component will be generated. A component may be generated whether or not this flag is set, but if client Javascript requires the component object, this must be set to true to guarantee the component's presence. Client component objects that are generated today by default may not be present in the future; setting this flag is the only way to guarantee a component's presence, and clients cannot rely on implicit behavior. However, there is a performance cost to setting this flag, so clients should avoid turning on client components unless absolutely necessary.

componentId

If you use the showProperty tag in Composer's property panel, componentId specifies the ID of the component for which the property must be rendered.

showELBuilder

Specifies whether to display the EL builder for the property. Default value is true.

showResourceEditor

Specifies whether to display the resource string editor for the property. The default value is true. However, this option is enabled only if you have configured resource string editing in the application.

taskFlowId

If Show Property is used to display task flow parameters, taskFlowId specifies the ID of the task flow.

taskFlowParam

If Show Property is used to display task flow parameters, taskflowParam specifies the task flow parameter that the input field must display.

customizationId

This attribute is deprecated. It will be removed in the next release. Use the id attribute.

Customization Attributes

Element Description

customizationAllowed

Specifies whether customizations are allowed on this component. Available values are true and false. The default value is true.

customizationAllowedBy

Specifies the roles for which customization is enabled.

Note: To display all relevant roles in this drop-down list, you must ensure that the roles are specified in the MDS customization policy.


Other Attribute

Element Description

text

Specifies the text used for the check box. This is used only when type is set to Boolean.The Expression Builder option available when setting these attributes allows you to bind the attribute to a managed bean.

Supported Facets

The Show Property component supports a customLink facet, which can be used to include a Command Menu Item. The Command Menu Item specified in this facet appears as a custom link in the drop-down list next to the property field, along with Resource String editor and EL Builder.

Related Topics

"Adding Custom Actions to Components" in Developing WebCenter Portal Assets and Custom Components with Oracle JDeveloper