Skip to content

Added ability to Tie with standard html elements as well as form elements, and succes and failure callbacks, and docuementation#16

Closed
msaspence wants to merge 1 commit intojupiterjs:masterfrom
msaspence:master
Closed

Added ability to Tie with standard html elements as well as form elements, and succes and failure callbacks, and docuementation#16
msaspence wants to merge 1 commit intojupiterjs:masterfrom
msaspence:master

Conversation

@msaspence
Copy link

Added the ability to tie model instance attributes to non form html elements (includes test).

Added ability to define success and failure callback for a tie (includes tests).

Added some documentation for Tie, mostly taken from the GitHub Gist here:
https://gist.github.com/733106

Also slipped in some more tests for Validation didn't mean to but this is my first go with Git so please forgive, can't believe they will do any harm.

Added the ability to tie model instance attributes and non form html elements (includes test).

Added ability to define success and failure callback for a tie (includes tests).

Added some documentation for Tie, mostly taken from the GitHub Gist here:
https://gist.github.com/733106

Signed-off-by: Matt Spence <msaspence@gmail.com>
@jupiterjs
Copy link
Collaborator

Thanks. What are success and failure for?

@msaspence
Copy link
Author

Just a way to define callbacks for the syncing of values

Success is called when the value or attribue has been successfully set, and failure when it has not is the modal has returned a validation error

I'm using success to fire off a save and failure to render and display an error message

@jupiterjs
Copy link
Collaborator

wouldn't one want to listen to the model directly instead of using tie?

@justinbmeyer
Copy link
Member

I think tie is fading b/c of templated bindings. Closing this for now. If you give me an answer for why you wouldn't want to listen to the model directly, I will reopen. Thanks!

@msaspence
Copy link
Author

call me lazy but simply because tie is much quicker to implement
you could extend your argument to why not listen to the dom (input elements) directly and eliminant tie altogether

@justinbmeyer
Copy link
Member

I agree that tie is easier to setup cross binding, but not for listening to success and error.

Sent from my iPhone

On Sep 26, 2011, at 2:05 AM, msaspencereply@reply.github.com wrote:

call me lazy but simply because tie is much quicker to implement
you could extend your argument to why not listen to the dom (input elements) directly and eliminant tie altogether

Reply to this email directly or view it on GitHub:
#16 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants