wood burning stoves 2.0*
The moose likes Java in General and the fly likes Correct programming/semantic for MVC in my application. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Correct programming/semantic for MVC in my application." Watch "Correct programming/semantic for MVC in my application." New topic
Author

Correct programming/semantic for MVC in my application.

Josh Borg
Ranch Hand

Joined: Oct 02, 2012
Posts: 32

Hello, I am making a program and I have the View who should get input and send it to Controller, but I want to know how. Is incorrect to get the Bean in the view, and in the save button and send it to Controller? How I send all this information?
I should make a method with all the arguments in the controler like this?



Really thanks.
karthick meyyappan
Ranch Hand

Joined: Jul 29, 2011
Posts: 43

hi josh,
i read your context more than two times. i cant able to come to a conclusion what are trying to say and what you are trying do.
so please re-phrase it. please framework details and your usecase/requirement details.

thanks.
John Vorwald
Ranch Hand

Joined: Sep 26, 2010
Posts: 139
Try to set up a MVC construction first, and get data to pass from the view to the models, and messages from the models to the views, via the controller. The approach that I used was to declare the controller(s) in main, and pass the controller(s) to the views / models constructors. Also, register the views / models inside the controller so the controller can call all the models / views. Then the views / models can call the controller and vice versa. Also, you can set a property and use the property name to create a method name, ie set_+propertyName. Then check the views and models for the existence of that method, and call the method appropriately. But, there is probably an easier way to do this using messages.... Be careful about multi thread access too.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Correct programming/semantic for MVC in my application.
 
Similar Threads
MVC -2+ views for 1 controller??
bean and jstl question
Spring MVC : {beanName.property} not working
MVC in Swing for a modularised View
faces-config not working