Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Confirmation dialog and the MVVM pattern
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
José F. Romaniello  
View profile  
 More options Aug 11 2011, 8:43 am
From: José F. Romaniello <jfromanie...@gmail.com>
Date: Thu, 11 Aug 2011 05:43:54 -0700 (PDT)
Local: Thurs, Aug 11 2011 8:43 am
Subject: Confirmation dialog and the MVVM pattern
Hi everyone, I am doing my first steps in knockoutJs and I like it so
far.

Here is my problem, I have a form which has the submit binding is
bound to an function in the viewmodel. Yesterday we decide that we
need to show a confirmation dialog, before doing the ajax post.

A-So, my first question is conceptually speaking, if a "confirmation
dialog" is a view concern or a viewmodel concern?

My thoughts on this, is that it is a presentation concern so I tried
to keep this out from my viewmodel-

And I decide to do something like this http://jsfiddle.net/fNCBa/7/
(it is not working)  instead of doing
  data-bind="submit: save...",

I am doing:
  data-bind="confirmAndSubmit: {template: '#MyConfirmTemplate', data:
items, submit: save}"

B-Does this seems right?
C-If this is right, is there a way I can use knockout template engine
from my code.. to render the content of the dialog?
D-If this doesn't seem right, how would you do it?

Thank you very much!


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Scott Messinger  
View profile  
 More options Aug 11 2011, 12:07 pm
From: Scott Messinger <scottmessin...@gmail.com>
Date: Thu, 11 Aug 2011 12:07:36 -0400
Local: Thurs, Aug 11 2011 12:07 pm
Subject: Re: Confirmation dialog and the MVVM pattern

I also put the alert/confirm dialog box in the save action in my viewmodel.

On Thu, Aug 11, 2011 at 8:43 AM, José F. Romaniello
<jfromanie...@gmail.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
iandrake1...@gmail.com  
View profile  
 More options Aug 11 2011, 2:13 pm
From: iandrake1...@gmail.com
Date: Thu, 11 Aug 2011 11:13:38 -0700 (PDT)
Local: Thurs, Aug 11 2011 2:13 pm
Subject: Re: Confirmation dialog and the MVVM pattern

Here a sample that should help, specifically the delete button
functionality.  Though, your needs maybe more simple.

http://jsfiddle.net/cL557/2/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
José F. Romaniello  
View profile  
 More options Aug 11 2011, 2:32 pm
From: José F. Romaniello <jfromanie...@gmail.com>
Date: Thu, 11 Aug 2011 15:32:51 -0300
Local: Thurs, Aug 11 2011 2:32 pm
Subject: Re: Confirmation dialog and the MVVM pattern

Excelent! thank you very much you both...
The final version of my example working is http://jsfiddle.net/U2wEh/23/

now we have three different approach for this

2011/8/11 <iandrake1...@gmail.com>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »