Changing Model Vs. Changing View

Hello,
What is the preferred way to do things? Chaning the model or changing the view? For example, use myJTable.setValueAt( object, row, column ) or myModel.setValueAt( object, row, column )....Pros and cons of each.
AC

What is the preferred way to do things? Chaning the
model or changing the view? For example, use
myJTable.setValueAt( object, row, column ) or
myModel.setValueAt( object, row, column )....Pros and
cons of each.Actually, when you go through the JTable to update a value in its model, the table is acting as controller not view (if you don't believe this, think about how JTable allows in-cell editing).
If you're truly structuring your program in an MVC manner, then by all means you change the model directly -- the idea of MVC is that the model exists independently of its controllers or views (plural intended).

Similar Messages

  • How can I change view options for ALL playlists?

    How can I change view options for ALL playlists? With one single click or trick?
    I have a lot playlists and don't want to change every single one of them separatly.
    Thanks for your help. (I use Windows 7)

    There's no FAST way I know of, which is what I think you mean.
    Only the painful SLOW way of one-by-one.
    You could make a new playlist from the main library after you've set the columns up as you like.
    Go to an existing playlist that doesn't have the columns you want, and select all.
    RIght-click > Add to Playlist and send them to the new playlist.
    That's still one-by-one and only works with static playlists, not smart ones.

  • Folder in Change view of object Type

    Hi Guys,
    Can anyone tell me if there is any folder involved in the change view of object type.
    Any input is appreciated.
    Thanks,
    Shilpa

    Hi Shilpy!
    What do you mean with folder?
    Thanks,
    Zsolt

  • Day Limit in Change View "Terms of Payment":Details?

    What does exactly does the Daylimit field in
    "Change View " Terms of payment": Details "means?
    A detail explanation with an EXAMPLE is well appreciated.
    Thanks for your time

    Hi,
    The DayLimit Under Payment Term is Used to specify Perticular date to which you want the " Payment Term" or Condition should apply on the Invoice.  Explain you with simple example.
    Eg: 1.Payment Term 1001
    DayLimit 15
    Discount 2%  
    With the above inputs system Consider only the invoices posted on and before 15th date for 2% discount and for the Invoices posted after 15 of every month the said discount is not calculated or system will not consider the line for discount.
    Eg. Payment Term 1001
    Daylimit 31
    Discount 4%
    with the above inputs system consider's invoices posted from 16 to 31 dates for discount of 4%. 
    So If requirment is like this invoices posted on or before 15 should get 2% discount and invoices posted between 16 to 31 should get 4% discount then you can create the above manner.
    Hope you doupt is cleared .
    Thanks
    Goutam

  • How to change view in iPhone from vertical to horizon and vice versa?

    How to change view in iPhone from vertical to horizon and vice versa?

    Not all applications will go from Portrait to Landscape. Changing just requires you to turn the device. However, if you have the orientation lock activated, then it will not change to landscape. To check, look in the status bar and see if you can see a small lock shaped icon near the battery icon. If you do, then orientation lock is activated. To turn it off, swipe upwards from the bottom of the iPhone screen to bring up Control Center. The orientation lock is the last icon on the top row to the right. Tap on it to turn it off. White is on, black is off.

  • I touch keeps blacking out, camera wont change views either

    when we hit an icon it keeps blacking out or returning to main page... camera wont change views either

    Try #2 and #3 in link below. If neither work, you most likely have a hardware issue.
    Basic troubleshooting steps  
    17" 2.2GHz i7 Quad-Core MacBook Pro  8G RAM  750G HD + OCZ Vertex 3 SSD Boot HD 
    Got problems with your Apple iDevice-like iPhone, iPad or iPod touch? Try Troubleshooting 101
     In Memory of Steve Jobs 

  • Focus stays when change view

    Hello,
    I have a viewstack with 2 views.
    In view 1 is a textinput.
    In view 2 is an image.
    when i startup my application, view 1 is shown.
    I type an a in the textinput.
    Now i press a button and it goes to view 2.
    I type bcd.
    I close this view to return to view 1, and what i see is in my textinput shows bcd as value.
    I tried to kill the focus when i press the button to change view but it doesn't work.
    Please some help.
    Code i tried:
    this.stage.focus=null;
    Application.application.focusManager.deactivate();
    this.focusmanager=null;
    this.focusEnabled=false;
    this.focusManager.deactivate();

    The button is in a menubar.
    Is there a general place and/or function so i can see wich item in my project received focus?
    Should i do something like creating an eventlistener on the stage that calls a function on each enterframe so i can trace focus?
    I did solve my problem by setting: myMenuBar.focusenabled=true;
    and when i click on the menu i put focus on the menubar by setting; stage.focus=myMenuBar;
    I wonder if this is the best solution, cause when you are inside the second view and you use for example the S for a stroke function inside the second view, but you also created a menu shortcut with the S that saves your project.
    This way the S will save the project because the menubar has focus..
    Or would this be the only solution and youll have to be sure not to use the same key for different functionality?

  • PSE 7 crash when i try to change view from thumb in organizer

    hi.. im new to all this. i just installed pse7 and when i try to change view in the organizer from thumb nail to batch or any other view option it shuts down. also organizer will not generate thumb nails unless i look at them one at a time. also would like to know how to convert raw files to jpg. any help would be great. thanks.

    First, try repairing the catalog:
    http://www.johnrellis.com/psedbtool/photoshopelements-6-7-faq.htm#_Ref215030515
    Next, recreate the thumbnail cache:
    http://www.johnrellis.com/psedbtool/photoshopelements-6-7-faq.htm#_Recreate_Organizer_thum bnails
    Then wait until it finishes generating thumbnails (could be hours, depending on how many photos you have).  If you still have problems, post back here.

  • Change view "Settings for Infosets": Details

    Hi,
    I would like to know why there is a value of 100 under the heading Settings for Infosets in BW when you go to the 'Change view "Settings for Infosets": Details' screen. What does it mean and what value must I input there?
    Your assistance is urgently required
    Thanks,

    Hi Josef I'm not entirely with you on this one.
    When I look on the device Apple TV in iTunes, everything I have streamed to apple TV from iTunes is grayed out but when looking at the photos tab which I have synced is not grayed allowing me to change whatever I want to sync. Is this different to yours? or I'm I misunderstanding your point.

  • Address Book is slow to change views

    My address book has ~2400 entries and is now moving very slowly when changing views or updating any of the contacts.
    Is there a way to rebuild the address book database or something?
    Thanks for your help.

    I think I found my issue - I removed a smart group which I was keeping track of items I have moved to other groups as a catch all. With over 2000 contacts this smart group was really working hard.
    I am back to full speed.

  • Changing view and save memory ?

    Hello.
    I've a program where you could change often your view. I don't use NavigationController or TabBarController to have a customizate interface. I only have several ViewControllers.
    So, when I wanna change view, I call the method
    [self.view addSubview:secondViewController.view];
    But now, I realize that if the secondView call
    [self.view addSubview:firstViewController.view];
    and If you repeat this a lot of times (of course I don't only have two views, otherwise I could call "self.view removeFromSuperview"), there are a lot of view running in background of the actual view (I suppose, tell me if I'm wrong).
    So, is there a way to remove the first view after calling the "addSubview" method ?
    Or is there a way to tag a view in order to refind the tagged view when I want, from where I want ?
    Thank you for the answers

    [firstViewController.view removeFromSuperview];

  • How change View fields mandatory.

    Hi !
    How can change View field to not mandatory, if in table it must be not null.
    Thanks
    Matiss

    Try using CASE statement or DECODE function to get null value for a particular column, like
    Select col1, col2, case when col3 > 0 then null else null end from table_name
    -- Saran

  • Why is useful to separate the model from the view in Swing?

    As I have read a few times, swing implements the model-view-controller pattern and I think I understand why to separate the controller from the model and view but not why to separate the model from the view, why is this useful?
    Thanks

    J_MARTINEZ wrote:
    Ok, got it but how can I control the view because for I�ve read in swing you just modify the model in the components. For example, if I have a JProgressBar and I use the method setValue(int) to fill the bar, I am modifying the proeperty value in the model but I dont have control for the view.I'm not sure I know what you mean here. If you change the model, the view will automatically update itself and display the changed value. You should have a look at some of Swing's source code such as AbstractButton and DefaultButtonModel. There you'll see that the view adds (I think, it's been a bit since I looked myself) a ChangeListener to the Model that the model uses to notify the view of any changes.

  • Microsoft BI Semantic Model for Power View is missing in data source

    Microsoft BI Semantic Model for Power View is missing in data source type drop down when cretaing a rsds data source for powerview in sharepoint 2013

    Hi Sanjay,
    I resolved the issue.Follow the steps
    1)Go to Central Admin->System Settings->Manage Farm Solutions (Under Farm Management)
    2)Check if "powerpivotwebapplicationsolution.wsp" is there and is deployed for the webapplication under which you are creating report by verifying
    Deployed to:,if not then deploy that for your web application.
    Please Mark it as answer if this reply helps you in resolving the issue,It will help other users facing similar problem

  • FORCAST MODEL IN FORCASTING VIEW

    Dear All,
            I want to get material list in mara when forcast model available.
    (Forcast model in Forcasting view mm02)
    my problem is how to mapped the field, material number and forcast model.
    if you already mapped please send the information or send me the steps
    how to find mapping like dat.
    Thanks in advanced

    markf12 wrote:
    This is probably a simple question but I can't seem to figure this out or find out about it in the help.sometines when I'm working on a page element the margnins and padding are shown in the design view window. most often they are not visable. How can I choose to show the margin and paddign of elements in the Design view? I have the View>visua laids>box model selected. It only shows up seemingly randomly.
    I suspect there is a keyboard combination or something I need to invoke so I can have control over shwoing the margin and padding when I want to see it.
    thanks for any help.
    Should show up if you click the border of a container. Then if you want to see that actual measurements hover over the border again.

Maybe you are looking for