Ticket #2528926 (closed enhancement)
ReporterDavid Robert |
Opened: 05/26/10 Last modified: 09/7/10 Status: closed Type: enhancement Resolution: fixed |
Owner Satyen Desai |
Target Release: 3.2.0 Priority: P3 (normal) |
|---|---|---|---|
| Summary: | Provide access to normalized values for Y.Attribute | ||
| Description: | Their may be a number of applications where it would be useful to access the nomalized values of Y.Attribute. The way I would like to use it is for form validation and data formatting. However in practice this does not work because there is no access to normalized values. I would like to see access Perhaps an augmentation to Y.Attribute so that users that want to retain the encapulation of Y.Attribute can do so, but those that want access can get it? |
||
| Type: | enhancement | Observed in Version: | 3.1.1 |
| Component: | Attribute | Severity: | S3 (normal) |
| Assigned To: | Satyen Desai | Target Release: | 3.2.0 |
| Location: | Priority: | P3 (normal) | |
| Tags: | attribute, form, json, ajax | Relates To: | |
| Browsers: | All | ||
| URL: | |||
| Test Information: | |||
Change History
|
Posted: 05/26/10
|
|
Posted: 05/26/10
OK, would that also be available in the event object also? That's why I had it as a S2 :) |
|
Posted: 05/26/10
You could call it from the event listener right? What event is it listening for? If it's something fired by the Attribute augmented object, then you have access to this._state.data.value. If it's something else, then you'd need to maintain a reference to the Attribute augmented object in scope. |
|
Posted: 05/26/10
Ug. I forgot the context for the listener was the Y.Attribute object. Sorry, new to JS. |
|
Posted: 05/26/10
np. thanks for the confirmation. |
|
Posted: 07/27/10
I added a _getAttrCfg for 3.2.0pr1, since we needed a way to get at the config for an attribute in general. The object returned will also have the raw value. Let me know if this works for you. /** |
|
Posted: 09/7/10
|
|
Posted: 09/7/10
|
|
Posted: 09/7/10
|
I was thinking just a "protected" _getRawValue method (or something similar), which wraps the _state.data.values workaround I gave you. Changed severity to P3 since it has the workaround I mentioned in the forum thread.