MVC Example

Hi,
Could anyone refer me to a VERY GOOD example of a MVC application with database transaction?
I am rather confused when to use a servlet or a jsp page. Also were to put the database transactions. I have been told that always goes into the javabeans but for some applications this is not always the best solution.
PS : I use a pool management system for my database transaction so I need to be able to share this object everywhere in my application.
Thanks

Yes!
Client calls servlet
servlet calls Delegate Methods which may be desided by XML Object.
Delegate(Use case specific Client Business logic can put here) calls beans
bean does Persistance (database) logic
Delegate forwards result to servlet
servlet forwards results to JSP
JSP displays results to client
servlet -> controller
(Delegate+bean) -> model
JSP -> view (Only Presentation logic)

Similar Messages

  • Seeking MVC Example

    Hi
    Would anyone be so kind to share his/her experience
    on how to implement the MVC architecture ?
    I'm new to this.
    I like to know how (code/implementation wise) from a servlet,
    it instantiates a bean, and the bean performs some action,
    and how the same servlet uses a RequestDispatcher object
    to ask JSP to display contents from that bean.
    Say client sends login and password infor (in html form) to
    the servlet. And there's a login bean that needs to authenticate
    the user with a database. If the login is valid, a user bean
    is created. And then the jsp must display the beans contents
    to the user.
    Any help is FULLY appreciated.

    Gum,
    the article was focusing on something else,
    not MVC 2Yes, but it used the MVC pattern as a basis for its example, and discussed a relatively important side effect that can result when MVC is applied to Java. I felt it was good supplimental reading because it laid out a few variations of the same MVC example for examination. But I enjoyed the link from nataliaV too, thanks nataliaV ;)

  • MVC example in SAP

    hi,
    please take a look at SAP example in 6.20 : tutorial_4_mvc.
    I have the same probelm as this example has, the only difference is the search criteria for authors is for me a text edit field(more than one value with tab separation).
    When you enter a search in this SAP example for field Title as 'Dynamic Commerce' (depends on the table entries in your client, i believe std. SAP delivered data would be there)u get the result and when u click on the radio button , u get the detail for this book.
    Now , when u do a new search for ex. C/C++, you get a result which is preselected with a radio button.
    I would like to deslect/clear this in my case.
    I am trying everything but no luck yet.
    Please suggest.
    Thanks.

    Dont post duplicate threads..
    Raja T

  • How to deploy and run Spring petportal example on Oracle portal?

    Is there any how-to steps or article show the petportal (Spring portlet MVC) example deploy and run Oracle portal?

    Hi,
    I haven't tired this, but I looked at the "README.txt" file included in the Spring PetPortal Application & it uses the standard JSR 168 Portlet standards.
    Hence, I assume that this would work as with any other remote portlet Implementation - host the portlet remotely & consume it in Oracle Portal 10.1.4.
    I just noticed that it has been 8 days since you posted the question - have you tried anything already ? If yes, what are your experiences so far ?
    Regards,
    Sandeep

  • Does anyone have a very simplee4 and GEF4 UI-integration example?

    Does anyone have a very simple GEF4 example? I am trying to learn GEF4 without ever having used the prior versions of GEF. I have bought five different books on eclipse plug-ins and RCP. Only one book, "Eclipse Plug-ins third edition" had a chapter on GEF. I read chapter 20 on GEF but it is based on version 3.x. Then I read other pages like this (https://wiki.eclipse.org/GEF/GEF4/MVC/Examples#Logo_Example_.28Standalone.2C_Eclipse_UI.2C_Web.29) and this (http://nyssen.blogspot.de/2015/06/gef4-mission-to-mars-accomplished.html) but they all assume prior GEF knowledge.
    Does anyone have a very simple GEF project example that is a Eclipse4 "Part" with a GEF UI-integration? By simple I am thinking only one "figure", a filled circle for example, with the a supporting Model and Controller (EditPart) that just outputs to the console a message like "The move is over the circle" to the console. All the other examples have a lot more stuff that is making it hard for this newbie to get a grip on the basics of the MVC in GEF4.

    I agree with you that something needs to change.
    I am a long time Macintosh user and Apple fan. I was using iTunes to download video podcasts to my iPod for a while before I realized that the list all buttons list all of the "Featured" podcasts only. I had no idea how much content was out there.
    I also take issue with the listings on iTunes. There is a Tiger Woods podcast that is killing all the other podcasts in terms of popularity. The problem is, it isn't really a podcast. It is simply a commercial that is in iPod format. This hardly deserves the spot in ITMS that it has. It is not updated or new, but it is listed as new and notable. As if Tiger needs more press.
    It seems that the big money podcasts get billing and premiere placement in the store. I hope they give some sort of fair time in the spotlight to podcasts that are regularly updated.
    PodcastGolfLessons.com
    http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewPodcast?id=152856310

  • Where is the "Logo Example (UI-integration)" example?

    As per this page
    https://wiki.eclipse.org/GEF/GEF4/MVC/Examples#Logo_Example_.28Standalone.2C_Eclipse_UI.2C_Web.29
    in the "Logo Example (UI-integration)" section there should be a "'GEF4 MVC Logo Example" which can simply be installed from the update-sites. I can not find the example even when I use the "-- All Available Sites --" option on the "Install new software" panel.

    Yes, the GEF4 MVC logo example is bundled by the GEF4 MVC examples feature, as outlined in the deliverables section of the release plan (https://projects.eclipse.org/projects/tools.gef/releases/3.10.0-mars/plan) and the respective example documentation (https://wiki.eclipse.org/GEF/GEF4/MVC/Examples#Logo_Example_.28Standalone.2C_Eclipse_UI.2C_Web.29).

  • Error in a book ?

    Hi. I have a book from Wrox called "Beginning Java Databases". In it is a MVC example using an EJB with the following interface:
    import org.w3c.dom.*;
    public interface MVCObject extends EJBObject {
        public Document retrieve (HttpServletRequest _request) throws RemoteException, Exception;
        public Document post (HttpServletRequest _request) throws RemoteException, Exception;
    }My question is how can this remote interface ever be used when the org.w3c.dom.Document class is not Remote or Serializable ??
    Their example involves a jsp which calls a RequestHandler which gets the session bean to process a HTTP request and return an XML document. My attempt to use such a method does not work, throwing an exception in the container implemented stub when the retrieve method is called.
    I put my application in a war file and deploy it using Sun's application deployment tool from the reference implementation, whereas the book is deploying to Tomcat and JBoss.
    I am new to programming for the web and must have missed something here. Can you help?
    Thanks.

    Document and HttpServletRequest are just interfaces, and no they do not implement Serializable. However, all that matters is that whatever class winds up implementing these interface also implements Serializable and/or Remote. The implementing class is generally vendor specific, so you may or may not be able to get the source code or javadocs for the implementing class. You can probably find out what the implementing class by doing some thing like System.out.println(request.getClass())

  • Help required building ADF-Swing/ADF-Faces using ADF Business Components

    My question is in regards to how you can go about building a light swing application to an ADF model?
    In particular if I were to say that we were developing a 3-tier project whereby we had a database tier, a series of EJB-ADF façade session beans to the database (middle-tier), and a swing client communicating with the session beans (view-controller tier), how would you go about developing these screens?
    In particular can we develop these screens using ADF-Faces and also ADF-Swing?
    The EJB session façade beans of course are ADF app modules with customised methods. The methods would return back customised DTO objects. These DTO objects are wrappers to row objects ADF would create. This would be mainly due to making these facade beans web service enabled (Oracle state that these methods cannot return oracle.jbo objects if they are to be web service enabled).
    This would be typically deployed to an app server, like Oracle App Server 10G.
    Could you please have a look at this, as I am doing a lot of research into this.
    eg. Taking example from oracle magazine sept/oct 2006
    with slight enhancements
    package oramag.frameworks.example.common;
    import oracle.jbo.ApplicationModule;
    import oramag.frameworks.customdto.EmployeeDTO;
    public interface HRService extends ApplicationModule {
    void deleteCurrentEmpAndCommit();
    EmployeeDTO findEmployee(int employeeId); // new method
    import oramag.frameworks.customdto.EmployeeDTO;
    public class HRServiceImpl extends ApplicationModuleImpl {
    public void deleteCurrentEmpAndCommit() {
    Row empRow = getEmpView().getCurrentRow();
    if (empRow != null) {
    empRow.remove();
    getDBTransaction().commit();
    public EmployeeDTO findEmployee(int employeeId)() {
    EmployeeDTO employeeDTO = null;
    EmployeesImpl employees = getEmployees();
    employees.setNamedWhereClauseParam("EmployeeId", employeeId);
    employees.executeQuery();
    if(employees.hasNext()) {
    EmployeesRowImpl employee = (EmployeesRowImpl)employees.next();
    employeeDTO = new EmployeeDTO(employee);
    return employeeDTO;
    public EmployeesImpl getEmployees() {
    return (EmployeesImpl)findViewObject("Employees");
    Now given the above code snippet, how could you turn this into an ADF-Swing/ADF Faces application so that if a user using the swing application enters an employee id, then the application will execute the query on the app server, the app server in turn returns the results to the client, and the client finally display the results. Typical MVC example.
    Cheers
    Rodney

    The tutorial is for ADF BC used with JavaServer Faces.
    While the tutorial doesn't cover it, we also support drag and drop development for Swing and visual WYSIWYG layout for Swing panels and windows, too. For a very simple example, watch screencast #4 on my blog here:
    http://radio.weblogs.com/0118231/stories/2005/06/24/jdeveloperAdfScreencasts.html
    One thing I have noticed is that when using ADF business components, when the app module returns a custom DTO object like the above example, it returns the data in a element structure according to the data control palette.
    You don't generally ever need to create your own custom DTO's when working with ADF for use by client UI's. The only situation where can be necessary -- until we simplify this in the JDeveloper/ADF 11g release -- is when you desire to expose custom methods that can return sets/arrays of typed row structures through a web service. However, web services are not involved/required in building 3-tier Swing applications.
    When dropping onto a page it does so like a string and doesnt give option to display the data in a read only form etc. Is there anything we need to do, to get the functionality.
    It's more of what you don't need to do :-)
    Just leverage the active data model that the ADF application module provides. You can read more about it in section 4.5 "Understanding the Active Data Model" of the ADF Developer's Guide for Forms/4GL Developers on the ADF Learning Center at http://www.oracle.com/technology/products/adf/learnadf.html). Your UI's bind to view object instances in the data model, and your UI's are automatically kept up to date without needing to write methods that return data. I short article I wrote that preceeded my writing the ADF Developer Guide content on this topis is here:
    http://radio.weblogs.com/0118231/stories/2006/01/26/theAdfBusinessComponentsActiveDataModel.html
    I know that when dropping a view object you get this functionality. Also was wondering if we were to pass an object of thios type back to the model it might not give us the rich functionality like input forms, like what Oracle provides if we were to drop a enitity view object.
    Just use the active data model and everything becomes totally easy, with no changes required to switch between local or three-tier deployment configurations.
    Trying to do everything with hand-coded DTO beans is really going the hard way.
    Could you help us regarding this?

  • Entity framework code first inheritance table per type problem

    hello
    i am using ODP.NET version 11.2.0.3.20. i am trying to get entity framework code first to work. one problem i have encountered is with inheritance. i have a "table per type" inheritance scenario. i have 3 tables involved. the base table is called "S_PERIOD" which maps to the base "Period" class. i have a derived table called "S_SEASON_QUARTER" that maps to the derived "Quarter" class. And I have another derived table called "S_SEASON_PRICE_PERIOD" that maps to the derived "PriceBreak" class. for testing purposes i am trying to load all records. the problem is that every class instance ends up being of type "Quarter", which is incorrect. for whatever reason the provider thinks that every "S_PERIOD" record has a corresponding "S_SEASON_QUARTER" record. i took a look at the generated SQL and posted it down below. looking at this SQL it's clear to me why every object ends up being of type "Quarter". It looks like the provider is checking the "C2" field to determine the concrete type to instantiate. the problem however is that the "C2" field value provided by each derived table is ALWAYS equal to "1", which is a problem since this will result in the "case" statement always hitting the second "when" condition. does anyone have any idea how to fix this? thank you
    SELECT
    CASE WHEN (( NOT (("Project1"."C2" = 1) AND ("Project1"."C2" IS NOT NULL))) AND ( NOT (("Project2"."C2" = 1) AND ("Project2"."C2" IS NOT NULL)))) THEN '0X' WHEN (("Project1"."C2" = 1) AND ("Project1"."C2" IS NOT NULL)) THEN '0X0X' ELSE '0X1X' END AS "C1",
    CAST( "Extent1"."PERIOD_ID" AS number(10,0)) AS "C2",
    "Extent1"."START_DATE" AS "START_DATE",
    "Extent1"."END_DATE" AS "END_DATE",
    "Extent1"."NAME" AS "NAME",
    "Extent1"."TYPE_CODE" AS "TYPE_CODE",
    CAST( "Extent1"."CREATE_USER_ID" AS number(10,0)) AS "C3",
    "Extent1"."CREATE_DATE" AS "CREATE_DATE",
    CAST( "Extent1"."MODIFY_USER_ID" AS number(10,0)) AS "C4",
    "Extent1"."MODIFY_DATE" AS "MODIFY_DATE",
    CASE WHEN (( NOT (("Project1"."C2" = 1) AND ("Project1"."C2" IS NOT NULL))) AND ( NOT (("Project2"."C2" = 1) AND ("Project2"."C2" IS NOT NULL)))) THEN NULL WHEN (("Project1"."C2" = 1) AND ("Project1"."C2" IS NOT NULL)) THEN "Project1"."QUARTER_NAME" END AS "C5"
    FROM "DBO_SPACE_DEV"."S_PERIOD" "Extent1"
    LEFT OUTER JOIN (SELECT
         "Extent2"."QUARTER_NAME" AS "QUARTER_NAME",
         CAST( "Extent2"."QUARTER_ID" AS number(10,0)) AS "C1",
         1 AS "C2"
         FROM "DBO_SPACE_DEV"."S_SEASON_QUARTER" "Extent2" ) "Project1" ON ( CAST( "Extent1"."PERIOD_ID" AS number(10,0))) = "Project1"."C1"
    LEFT OUTER JOIN (SELECT
         CAST( "Extent3"."PRICE_PERIOD_ID" AS number(10,0)) AS "C1",
         1 AS "C2"
         FROM "DBO_SPACE_DEV"."S_SEASON_PRICE_PERIOD" "Extent3" ) "Project2" ON ( CAST( "Extent1"."PERIOD_ID" AS number(10,0))) = "Project2"."C1"
    Edited by: 997830 on Apr 3, 2013 8:40 AM

    An update:
    I tried again following this example to the letter:
    Using NuGet to Install and Configure Oracle Data Provider for .NET
    This time I used a console application as described in the example. Yes, I rebuilt the project after the NuGet install.
    I made the appropriate mods to App.config. I get the same error message as with the MVC example above.
    Does the ODP.Net driver really work with EF? If so, can anyone provide me with a working sample project?

  • [AS3] Losing my religion: subclassing vs. composition

    I have been until now a fervent disciple of compositing a
    graphic instance into a class in every case, rather than making my
    class extend MovieClip. Admittedly I was a piker at AS2 and only
    now that I am cranking on AS3 do I consider myself worthy to call
    myself a beginner OOP programmer. But I bought into all the
    reasons, and if I were still making AS2 apps, I might remain in
    that camp.
    But lately my devotion has been shaken and now I am seriously
    considering extending (and then subclassing from) MovieClip or
    Sprite when making any class which has a visual component. Whereas
    before I would always compose in a MC instance, almost never make
    my class inherit from anything but my own superclass, and implement
    interfaces for polymorphism, now I think I will extend, although
    still implement interfaces for the usual other reasons. I also
    still plan to be a composition devotee in all other ways-- I like
    composition more than inheritance. Also I would not extend MC for
    classes which have no graphical component, such as game logic
    components. (I am making games and other interactive entertainment
    apps, for in-browser distribution.)
    Can I please be illuminated by better coders than I as to the
    wisdom or folly of my change of heart?
    Here are a few reasons why my mind is changing; please feel
    free to refute or support any of these:
    --Changes between AS2 and AS3 make the downside of
    subclassing MC/Sprite smaller than before. I'll let far more
    informed people come up with good examples, but one seems to be the
    explicit nature of adding an object to the display list-- the
    overhead hit of being an MC is small (nonexistent?) if it is not on
    the list.
    --Colin Moock, in his seminal "Essential ActionScript 2"
    book, advocated composition-- see his large MVC example in which
    his view class, although nearly entirely visual in function, did
    not extend MC but rather composited MC. However, in Moock's equally
    impressive AS3 book, all his examples now seem to use extension. I
    really admire Moock so this gives me a new perspective.
    --All the Adobe best practices and examples use extension, as
    do nearly all code samples I see in other helpful forums. I am not
    one to blindly run with the crowd but I think I'd get better
    feedback on my code from my peers if I follow suit.
    --All the AS3 Flash components seem to use extension, and
    indeed, AS3 itself is heavily inheritance-based rather than
    composition-based, for understandable reasons.
    I am probably missing a lot and mis-stating much of what is
    there but hopefully you get the idea.
    So once again I ask my better peers: what are now the
    arguments for and against extending MC or Sprite for one's visually
    represented classes in AS3? Any observations would be much
    appreciated.

    Here is a bit more concrete example:
    In Moock's AS2 book he has an extensive example of the MVC
    pattern involving, what else, a clock. In his code his Clock view
    does *not* extend MovieClip (Sprite not having been available in
    AS2), which is in keeping with his general admonition to compose a
    graphic element into a class rather than extend one. His view's
    constructor takes an MC as an argument, and the view attaches its
    MC instance (which contains all the clock visuals) to the passed
    MC. The view object is not itself attached, because it is not an
    MC. The view class contains an MC which ends up getting attached.
    To change the XY of the view would be to ask the view to change its
    MC instance's XY. Pure composition.
    In Moock's AS3 book he has an extensive "Virtual Zoo" example
    which among other things uses an MVC-ish structure, in which the
    view and controller are the same class. If anything, this would
    make composing in the view's root graphic element even more
    sensible than his AS2 example. The View does not really fit the
    definition "is-a Sprite"; it also is a view manager and controller.
    But, contrary to his AS2 stance and in keeping with all the other
    examples in his AS3 book, Moock's view class *extends* Sprite, and
    is added as a child by the main class. Though the view does happen
    to contain objects which are also made from Sprite-extending
    classes (pictures of the zoo animal and the like), the view class
    does not contain its root sprite the way the AS2 example contained
    its root MC. The view *is* a Sprite. To change the XY of the view
    would be to simply set its inherited XY properties from the
    outside, as any Sprite would be positioned. So though Moock still
    is a devotee of composition in every other way, on this one point
    he seems to have decided to use inheritance and take a path
    different from his AS2 book.
    And I have seen most other AS3 code examples follow suit. The
    Lott AS3 book does, and all the Adobe examples do. So forgive me
    for having my faith shaken a wee bit.
    Though I remain convinced of the rule to favour composition,
    in this particular set of cases I am considering routinely using
    inheritance, even though I easily *could* use composition. It just
    seems to be messier, denser, and longer to use composition *in this
    set of cases*. So is my reasoning good, faulty, or does it simply
    betray deep cluelessness about OOP?

  • Splitting GUI from Code

    Hi, I created a Tetris game and I didn't split GUI from code.
    but since I'm trying to learn from this I would like to split it.
    so I created 3 JPanels a controller and a JFrame in different classes.
    I think this is the best solution?
    now I have for example this piece of code in my Canvas TetrisBoard .paint method
    wich draws a TetrisBoard on the screen.
      public void paint(Graphics2D g) {
        Color color;
        for(int row = 0 ; row < rows ; row++)
          for(int col = 0 ; col < cols ; col++) {
            /* Get The Color for the current Position */
            switch(board[ row ][ col ]) {
              case Block.T_Block: color = Block.T_COLOR; break;
              case Block.I_Block: color = Block.I_COLOR; break;
              case Block.J_Block: color = Block.J_COLOR; break;
              case Block.L_Block: color = Block.L_COLOR; break;
              case Block.O_Block: color = Block.O_COLOR; break;
              case Block.S_Block: color = Block.S_COLOR; break;
              case Block.Z_Block: color = Block.Z_COLOR; break;
              default:color = Color.GRAY;
            g.setColor(color);
            /* Fill & Draw the rectangle with the given color from above. */
            g.fillRect(col*Block.TILE_SIZE, row*Block.TILE_SIZE, Block.TILE_SIZE,Block.TILE_SIZE);
            g.setColor(g.getColor().darker());
            g.drawRect(col*Block.TILE_SIZE, row*Block.TILE_SIZE, Block.TILE_SIZE,Block.TILE_SIZE);
    }How do I transfer this to my JPanel, controller class?
    The JPanel classes should they know about the board, or should they only containt the g.drawRect method. or something like this drawBoard(color, board, tile_size)
    so in general should the JPanel, controller classes contain any code not related to drawing. (KeyListeners, looping arrays...)
    Message was edited by:
    stef569

    You might want to have a look at implementations of the Model-view-controller (MVC) pattern as this may be a decent way to separate things out. Some reference sources include:
    http://en.wikipedia.org/wiki/Model-view-controller
    http://www.cs.cmu.edu/~pattis/15-1XX/15-200/lectures/modelinmvc/index.html
    http://www.stanford.edu/class/cs106a/handouts/43-mvc-example.pdf
    Also, I'm not sure about how to answer your specific question without looking at your code. It'd be great if you could post it, but this may not be feasible if it is large.

  • Building Portlets on Struts/Spring

    Hi,
    My existing web app is struts based. Its a huge application.
    I want to migrate current web app to Portal web app and develop/deploy portlets.
    What factors need to be considered for this?
    Also if in future if the web application need to be migrated to Spring f/w, then how it will affect the portal development of existing portlets ( on struts ) and new portlets ( spring )?
    Need your expert comments !
    Waiting for reply !
    Thanks very much in advance.
    Regards

    Thanks for your suggestions...
    Regarding your first answer..
    I never imagined to be so simple .. Have you ever
    tried it? Do you have any link for referencing the
    same ? Yes, I've done it. No links. What portal server are you using?
    My best suggestion? Try it. Deploy as JSR 168 and see what happens.
    As my project is about to start migrating to Portal
    Env ...... we are finding the best possible way to do
    it ...
    Regarding your second answer..
    could you pleae elaborate it more n explain it in
    simple manner... as i m new to this portlet world...No, I can't elaborate. It would require that you know a good deal about Spring and web apps. If you don't, I'm wasting my time.
    If you've never done Spring, download it now and go through their step by step MVC example. It's very good.
    %

  • A MVC datatable with dropdown filtering per column search with pagination example?

    Hello All,
    Just starting out a big project with MVC 3 and I've been searching for a while for any step by step example of creatintg a dynamic/ajax datatable that has real time filtering of the result set via dropdowns for mvc?  Is there a ready made solution already
    available for the MVC framework?
    Thanks,

    Hello,
    Thank you for your post.
    Glad to see this issue has been resolved and thank you for sharing your solutions & experience here. It will be very beneficial for other community members who have similar questions.
    Your issue is out of support range of VS General Question forum which mainly discusses
    WPF & SL designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help System
    and Visual Studio Editor.
    If you have issues about ASP.NET MVC app in the future, I suggest that you can consult your issue on ASP.NET forum:
    http://forums.asp.net/
     for better solution and support.
    Best regards,
    Amanda Zhu [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

  • JList data model, MVC, is there an example?

    I have a JList, constructed from an AbstractListModel based on an ArrayList, tucked into a JScrollPane. The data model changes frequently en masse, not element by element. I have studied the API documentation of ListModel, ListDataListener, and ListDataEvent. I want to update my Jlist without reconstructing the whole thing, JScrollPane and all, and adding that JScrollPane to a JFrame's content pane in a method called from a distant class. That approach is just not working in the details like screen redraws, no matter the combination of validate(),repaint(), and show() calls I make.
    The data in the ArrayList is there, I'm just trying to notify the AbstractListModel in the JList in the JScrollPane that the data has changed, so presumably it can take care of displaying those changes. The search function for similar posts on the forum is not working for me, and I am running out of resources to study on my own. A set of tutorials by by Dick Baldwin
    http://www.phrantic.com/scoop/onjava.html
    has been the most helpful by far in explaining MVC and its application to JList, but he says,
    "fortunately we can avoid having to deal with the complexity of creating and maintaining a list of registered listener objects, and invoking listener mithods on those objects, by extending AbstractListModel to create our alternative data model..." I don't want complexity either, but I do want to update a data model.
    I need an example of how to use these methods, like addListDataListener(ListDataListener l), fireContentsChanged(Object source,int index0, int index1),
    public ListDataEvent(Object source,int type, int index0, int index1)
    I can't believe that what I want to do is that uncommon or esoteric. Maybe it's just that I'm not seeing something obvious.
    Any pointers?

    Stated differently:
    Here's the API and my error message and my code: is there a way to have just working code and the API, without the compiler error? (recs in the code is my data model, allRecs is the ArrayLIst it's based on)
    API
    fireContentsChanged
    protected void fireContentsChanged(Object source,
    int index0,
    int index1)
    AbstractListModel subclasses must call this method after one or more elements of the list change. The changed elements are specified by a closed interval index0, index1, i.e. the range that includes both index0 and index1. Note that index0 need not be less than or equal to index1.
    Parameters:
    source - The ListModel that changed, typically "this".
    index0 - One end of the new interval.
    index1 - The other end of the new interval.
    See Also:
    EventListenerList, DefaultListModel
    error
    C:\My Documents\Java\CIS 290\hw2\ConnectionHandler.java:173: fireContentsChanged(java.lang.Object,int,int) has protected access in javax.swing.AbstractListModel
    recs.fireContentsChanged(recs,0,allRecs.size());
    codepublic void handleServerMessages(DataInput in)
        done=false;
        int command =0;
        try
            command = in.readInt();
          catch(IOException e)
            e.printStackTrace();
          switch(command)
            case FULLPACKET:{handleFullPacket(in);} break;
            case PARTIALPACKET:
              initializeAllRecs();
              handlePartialPacket(in);
            } break;
            case ALREADYEXISTS: {;} break;
            case DOESNTEXIST: {;} break;
            case BYE: {done = true;} break;
            default: {;}
          recs.fireContentsChanged(recs,0,allRecs.size());
      }

  • Does anyone tryed to apply mvc to a simple example ?

    does anyone tryed to implement mvc to a simple example ?
    Regards
    Tinnitus
    CLAD / Labview 2011, Win Xp
    Mission d'une semaine- à plusieurs mois laissez moi un MP...
    RP et Midi-pyrénées .Km+++ si possibilité de télétravail
    Kudos always accepted / Les petits clicks jaunes sont toujours appréciés
    Don't forget to valid a good answer / pensez à valider une réponse correcte

    You are right
    using simple I would like to say confined to the minimum
    i'm familiar with classes,  value references  and thread communcation
    each paradigm could be a step a first sight but the effort is rewarded afterward
    but it seems to be hard to find starting elements on mvc with labview
    I just come to discover mvc architecture, the theorie look nice but i'm not sure
    to understand enough to applicate , that why i'm looking for examples
    may be have you link to a good tutorial  ( not lined to a specific language) that could help me to start with labview
    Regards
    Tinnitus
    CLAD / Labview 2011, Win Xp
    Mission d'une semaine- à plusieurs mois laissez moi un MP...
    RP et Midi-pyrénées .Km+++ si possibilité de télétravail
    Kudos always accepted / Les petits clicks jaunes sont toujours appréciés
    Don't forget to valid a good answer / pensez à valider une réponse correcte

Maybe you are looking for

  • Blue Screen Error Message

    I have a Windows 7 Ultimate computer and I've been receiving the following message repeatedly; Problem signature:   Problem Event Name: BlueScreen   OS Version: 6.1.7601.2.1.0.256.1   Locale ID: 1033 Additional information about the problem:   BCCode

  • FM for get Material Inspection setup data

    Hi ALL I'm looking for a Function Module or Method that we can get Material Inspection setup data. ( QMAT data ) Please let me know if you know that. Regards Rie

  • OPening PDF in Pages

    How do you open a .pdf file in pages? I received new letterhead and I would like to be able to use it. I cannot open the .pdf file to make changes or add text. Any suggestions? It does open in preview, but it's just that; a preview. I need to be able

  • Hierarchical Query Counts

    There is a table (Hierarchy_Test): Set_Id Set_Name Parent_Id 1 A Null 2 B 1 3 C 1 4 D 1 5 E 2 6 F 2 7 G 3 8 H 4 9 I 4 10 J 5 There's one more table (Hierarchy_Values): Emp_No Set_ID 1 1 2 1 3 2 4 3 5 4 6 5 7 6 8 7 9 8 10 9 11 10 12 10 I need a query,

  • How to change Item mang method to 'None' from Serial No. On release only .

    I need help in changing the Item management method to "NONE". I hv created the item as Manage by Serial No. On Relase only. I hv aslo entered the Opening balance of 6000 pcs. But now i want to change the mange item to NONE. But when i try 'Goods Issu