Home > Archive > Java Help > January 2006 > Model View Controller
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Model View Controller
|
|
|
| Hi,
I am a bit confuse about model view controller design. I am trying to
create an error dialog based on comparison of two object values.
My object values are in the model. and the error dialogs that are
previously there are all in the view. I can create the error dialog
thats basicaly NOT doing any comparison.
In order to do the comparison, I need to access the objects in the
model. How would I do that? and have it coordianted with the error
dialog in the view?
Thanks,
Sanna
| |
| Oliver Wong 2006-01-25, 7:16 pm |
|
"sanna" <ecoswiss@yahoo.com> wrote in message
news:1137782615.023366.62790@g49g2000cwa.googlegroups.com...
> Hi,
>
> I am a bit confuse about model view controller design. I am trying to
> create an error dialog based on comparison of two object values.
> My object values are in the model. and the error dialogs that are
> previously there are all in the view. I can create the error dialog
> thats basicaly NOT doing any comparison.
> In order to do the comparison, I need to access the objects in the
> model. How would I do that? and have it coordianted with the error
> dialog in the view?
Usually, error dialogs are modal, meaning they take focus from the
application and refuse to give it back until the user dismisses the dialog.
Also, usually error dialogs do not update themselves in "real time" when the
model might change.
For example, imagine you have a field on a form that says "Enter you
age", and the user types in "hello", and clicks OK. An error dialog might
pop up saying "'Hello' is not a valid age" or something similar. It would be
a weird design if the user could then, WITHOUT closing the error dialog,
give focus back to the field, and type in "53", and the error dialog would
update itself with "'53' is not a valid age".
Because of this lack to real-time updating, I don't think the error
dialog should be a "View" in your MVC design.
- Oliver
|
|
|
|
|