How to Add an inputNumberSpinbox Component

Using Input Components and Defining Forms 9-15 Figure 9–15 inputColor Component in Compact Mode

3. Expand the Data section and set the following attributes:

■ Value : Specify the value of the component. If the EL binding for value points to a bean property with a get method but no set method, the component will be rendered in read-only mode. ■ ColorData : Specify the list of colors to be displayed in the standard color palette. The number of provided colors can be 49 7 colors x 7 colors, 64 8 colors x 8 colors, or 121 11 colors x 11 colors. The number set for this attribute will determine the valid value for the width attribute. For example, if you set the colorData attribute to 49, the width must be 7. If the number does not match the width, extra color elements in the list will be ignored and missing color elements will be displayed as no-color. The color list must be an array of type TrColor on the client side. ■ CustomColorData : Specify the list of custom-defined colors. The number of colors can be 7, 8, or 11. The color list must be an array of type TrColor on the client side. On the server side, it must be a List of java.awt.Color objects, or a list of hexadecimal color strings. ■ DefaultColor : Specify the default color using hexadecimal color code, for example 000000.

4. Expand the Appearance section and set the following attributes:

■ Width : Specify the width of the standard palette in cells. The valid values are 7, 8, and 11, which correspond to the values of the colorData and customColorData attributes. ■ CustomVisible : Specify whether or not the Custom Color button and custom color row are to be displayed. When set to true, the Custom Color button and custom color row will be rendered. ■ DefaultVisible : Specify whether or not the Default button is to be displayed. When set to true, the Default button will be rendered. The Default button allows the user to easily select the color set as the value for the defaultColor attribute. ■ LastUsedVisible : Specify whether or not the Last Used button is to be displayed. When set to true the Last Used button will be rendered, which allows the user to select the color that was most recently used. 5. Expand the Behavior section and set the following attribute: ■ ChooseId : Specify the id of the chooseColor component which can be used to choose the color value. If not set, the inputColor component has its own default popup dialog with a chooseColor component. 9-16 Web User Interface Developers Guide for Oracle Application Development Framework 6. If you want the value of the component to appear as read-only until the user hovers over it, expand the Other section and set Editable to onAccess. If you want the component to always appear editable, select always. If you want the value to be inherited from an ancestor component, select inherit.

9.5.2 How to Add an InputDate Component

The inputDate component allows the user to either enter or select a date. To add an inputDate component: 1. In the Component Palette, from the Common Components panel, drag and drop an Input Date onto the page.

2. In the Property Inspector, in the Common section, set the following:

■ Label : Specify a label for the component. ■ Value : Specify the value of the component. If the EL binding for value points to a bean property with a get method but no set method, the component will be rendered in read-only mode.

3. Expand the Data section and set the following attributes:

■ MinValue : Specify the minimum value allowed for the date value. When set to a fixed value on a tag, this value will be parsed as an ISO 8601 date. ISO 8601 dates are of the form yyyy-MM-dd for example: 2002-02-15. All other uses require java.util.Date objects. ■ MaxValue : Specify the maximum value allowed for the date value. When set to a fixed value on a tag, this value will be parsed as an ISO 8601 date. ISO 8601 dates are of the form yyyy-MM-dd for example: 2002-02-15. All other uses require java.util.Date objects. ■ DisableDays : Specify a binding to an implementation of the org.apache.myfaces.trinidad.model.DateListProvider interface. The getDateList method should generate a List of individual java.util.Date objects which will be rendered as disabled. The dates must be in the context of the given base calendar. ■ DisableDaysOfWeek : Specify a whitespace-delimited list of weekdays that should be rendered as disabled in every week. The list should consist of one or more of the following abbreviations: sun, mon, tue, wed, thu, fri, sat. By default, all days are enabled. ■ DisableMonths : Specify a whitespace-delimited list of months that should be rendered as disabled in every year. The list should consist of one or more of the following abbreviations: jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec. By default, all months are enabled. Note: If you select inherit, and no ancestor components define the editable value, then the value always is used. Performance Tip: This binding requires periodic roundtrips. If you just want to disable certain weekdays for example, Saturday and Sunday, use the disableDaysOfWeek attribute.