
5.
Handle localization based on Dashboards language setting.
6.
Add a helper function called getPropertyBindDisplayName that returns null if the property is
not bound to the spreadsheet, otherwise it returns the displayable text for the cell range that the
property is bound to.
7.
Add a helper function that lets the Dashboards user bind a property to the spreadsheet (initiate
Bind) and another helper function that handles the user cell selection (continueBind) to create
the binding and update the custom property sheet.
8.
Add calls to set the property via the proxy when a value changes in the custom property sheet user
interface.
For example (let the Dashboards user edit a number value in the custom property sheet):
<s:TextInput id="valueEditor" ... change="proxy.setProperty('value', Number(valueEditor.text));" />
9.
Add calls to set a style via the proxy when a value changes in the custom property sheet user
interface.
For example (let the Dashboards user pick a color for a border style in the custom property sheet):
<mx:ColorPicker id="colorEditor" ... change="proxy.setStyle('borderColor', colorEditor.selectedColor);"
/>
10.
Add calls to let the user bind a property (styles cannot be bound) to the spreadsheet in the custom
property sheet.
For example (using an Adobe Flex Button to start the bind process for the value property):
<mx:Button ... click="initiateBind('value')" />
12.2 Bindings to and from the spreadsheet
InputBindings and OutputBindings types
When you create a binding, you also specify how to handle passing values from the spreadsheet to the
property set function, and how to pass values from the property get function to the spreadsheet:
• InputBindings.SINGLETON or OutputBindings.SINGLETON
A single value is passed.
Note:
If the user selects multiple cells only the first cell is used.
• InputBindings.ARRAY2D or OutputBindings.ARRAY2D
Multiple columns or rows of cells are passed as a 2D array.
For example (user selects cells A1:C2): [[A1,B1,C1],[A2,B2,C2]]
• InputBindings.ARRAY or OutputBindings.ARRAY
Multiple columns or rows of cells are passed as a flattened 1D array.
For example (user selects cells A1:C2): [A1,B1,C1,A2,B2,C2]
2013-05-0642
Appendix B: Custom Property Sheet API Reference
Commentaires sur ces manuels