Labels
Zend Framework: Dojo Zend_Form Widgets Component Proposal
| Proposed Component Name | Dojo Zend_Form Widgets |
|---|---|
| Developer Notes | http://framework.zend.com/wiki/display/ZFDEV/Dojo Zend_Form Widgets |
| Proposers | Matthew Weier O'Phinney |
| Zend Liaison | Ralph Schindler |
| Revision | 1.0 - 20 June 2008: Initial Draft. (wiki revision: 5) |
Table of Contents
- 1. Overview
- 2. References
- 3. Component Requirements, Constraints, and Acceptance Criteria
- 4. Dependencies on Other Framework Components
- 5. Theory of Operation
- 6. Milestones / Tasks
- 7. Class Index
- 8. Use Cases
- Telling Zend_Form to use the Dojo widgets
- Using a ValidationTextBox widget in your form
- Using dijit layout elements with a form
- 9. Class Skeletons
1. Overview
Dojo offers a number of form-related widgets via its dijit.form widgets (dijit == widget in Dojo parlance). Additionally, there are a number of layout widgets via dijit.layout that are well-suited to form presentation. This proposal aims to identify a number of these widgets to include as specialized form elements and decorators for use with the Zend_Form component.
2. References
3. Component Requirements, Constraints, and Acceptance Criteria
- MUST live within the Zend_Dojo component
- MUST implement programmatic javascript decoration of elements
- MAY allow utilizing dojoType and other attribute declarations
- SHOULD allow specifying dojo-specific options via explicit mutators
- Form elements and decorators MUST utilize Dojo view helper to setup appropriate dojo.require statements and other dojo-specific environment requirements.
- SHOULD provide both decorators AND view helpers for layout components
- MAY provide both view helpers for dijit elements
4. Dependencies on Other Framework Components
- Dojo view helper
- Zend_Exception
- Zend_Form
5. Theory of Operation
Developers wishing to use Dojo form elements and layouts would point their form object to the Dojo elements:
Once the paths are in place, they would simply reference the appropriate form elements and decorators by name.
6. Milestones / Tasks
- Milestone 1: [DONE] Prepare this proposal
- Milestone 2: Prepare test suite and API
- Milestone 3: Complete initial implementation
- Milestone 4: Write documentation
7. Class Index
- Elements
- Zend_Dojo_Form_Element_CheckBox
- Zend_Dojo_Form_Element_ComboBox
- Zend_Dojo_Form_Element_CurrencyTextBox
- Zend_Dojo_Form_Element_DateTextBox
- Zend_Dojo_Form_Element_FilteringSelect
- Zend_Dojo_Form_Element_HorizontalSlider
- Zend_Dojo_Form_Element_NumberSpinner
- Zend_Dojo_Form_Element_NumberTextBox
- Zend_Dojo_Form_Element_RadioButton
- Zend_Dojo_Form_Element_Textarea
- Zend_Dojo_Form_Element_Textbox
- Zend_Dojo_Form_Element_TimeTextBox
- Zend_Dojo_Form_Element_ToggleButton
- Zend_Dojo_Form_Element_ValidationTextbox
- Zend_Dojo_Form_Element_VerticalSlider
- Layout-related decorators
- Zend_Dojo_Form_Decorator_AccordionContainer
- Zend_Dojo_Form_Decorator_BorderContainer
- Zend_Dojo_Form_Decorator_ContentPane
- Zend_Dojo_Form_Decorator_Form
- Zend_Dojo_Form_Decorator_StackContainer
- Zend_Dojo_Form_Decorator_TabContainer
- View helpers
- Zend_Dojo_View_Helper_AccordionContainer
- Zend_Dojo_View_Helper_BorderContainer
- Zend_Dojo_View_Helper_ContentPane
- Zend_Dojo_View_Helper_Form
- Zend_Dojo_View_Helper_HorizontalSlider
- Zend_Dojo_View_Helper_StackContainer
- Zend_Dojo_View_Helper_TabContainer
- Zend_Dojo_View_Helper_VerticalSlider
8. Use Cases
9. Class Skeletons
No class skeletons will be provided in the proposal. All will merely be extensions of the base Zend_Form classes, with a few added mutators and accessors.
Actually, the dojo.data data store would reference a URL (typically using a custom data store that extends QueryReadStore) – this could be a file on the server, a controller action, etc. So, the Zend_Form elements themselves have no dependency on Zend_Dojo_Data – the application does. In that case, you would simply have an action that passes data to Zend_Dojo_Data and returns it to your store.
Yes, I see it. Zend_Dojo_Data is not right here.
Let us think about the following Use Case:
We have a Form with two FilteringSelect Widgets. Both of them should select their Data from the same Datastore ('myStore'):
In this case, it would be good, if we could use a Zend_Dojo_Form_Element_Datastore (the question is, is the Datastore really a "Form_Element"?) and set a reference from this Datastore to the 'store' attribute:
Remi
| Zend Official Comment This proposal is accepted to the Standard Incubator with the following provisions:
|
ZF Home Page
Code Browser
Wiki Dashboard
Some DojoToolkit Widgets (for example FilteringSelect and ComboBox) are dojo.data-enabled. On the widget site there is only the attribute "store" necessary, which connects the Widget with a Datastore. A Datastore could be created with the new Zend_Dojo_Data class, so that the "store" attribute gets a reference from a Zend_Dojo_Data instance. Therefore, Zend_Dojo_Data is a soft dependency of this Proposal.
My question is: Could you add an Use Case with such an dojo.data-enabled widget?
Remi