Re: MVC abuse

It's possible we're talking about two separate things. However, the Model-Controller-View paradigm specifically allows for the maximum amount of flexibility. Model in this case generally means the data model, or the data source.
For example, let's take a typical eBusiness portal-slash-web site. Normally you have a series of web pages (the HTML output, and the forms) representing the view aspects, some sort of business logic (the Servlets and other class files) representing the controller, and the database itself as the model. Say, a human resources application that determines your available sick days and vacation days.
If the system was designed according to MVC principles, then you should be able to swap any one of these three components without affecting the other two. Let's say in theory that two years down the road, your boss decides they can't afford to pay the Microsoft Tax, and rather than conducting business through a web browser, he wants to switch to a desktop Java application. You should then be able to code a swing component (view) that calls the existing business logic (controller) and database access (model) code. Similarly, if you decide to change the database from say Sybase to Oracle, then all you need to do is change the database access (model) aspect.
In your example, the advantage of a MVC architecture would be that all you need to do is change the business logic in order to add new operations. Or alternatively, if you changed the model, the controller and the view should effortlessly recognize the changes in the model without any intervention on your part. Realistically, especially when it comes to web pages, at least two if not all three components probably need to be changed, which is why most people don't bother following the philosophy closely.
I do stress it's possible we're talking about two different MVCs; we do have different definitions of "model" for example. But in theory, if your application was MVC-compliant, then you should never have any maintenance pains - it's so well designed and modular that changes made to one component don't break the others.

I hope I have not annoyed everybody yet.
I would like to try to explain myself one more time as I still have not figured out the answer for myself.
For the sake of argument lets separate Model component in two layers and call them Logic and Flow.
Logic consists of pure business logic methods/information and includes cached, SQL statements, calculating the result (in whatever type), etc.
Flow ties multiple Logic pieces together into one invocation block.
Lets say form validation is a separate notion. Broken down this way the Model component would look as follows (l: means logic, f: means flow)
l: process session, load information
f: if OK invoke registration logic. Get username from 3rd party token, business ID from session manager and password from user form
l: create account
f: if not OK return to form JSP, if OK set up purchasing parameters (price, etc.) and proceed to purchasing; to identify payment attributes use payment reference table from MySQL DB, business ID from session management, date of birth, etc.
l: add purchase record to the database together
f: if not OK forward to error JSP, otherwise update account tokens
In the above example, Logic components do not change almost ever. However Flow can depend on systems involved in the particular task and has to be flexible if the directives do not form just one-two complete Model elements.
So, Logic elements can (and have to) be compiled Java classes deployable as JAR units. Flow elements have to be lights weight scriptable as we do not want to have a separate Action class for every marketing request and we do not want to break the flow into multiple HTTP requests where it is not needed.
Either because I do not understand these systems yet good enough or for whatever other reason I do not see any reasonably easy way to implement such business logic flexibility in Struts or in JavaServer Faces.
PS Please forgive a little clumsy example. I did not have time for more sophisticated one but I do have similar real life examples.
PPS I in no way imply that MVC is a bad concept. I am just trying to figure out whether it applies for a certain class of problems (flexible and restructurable business requiements)

Similar Messages

  • UML Class Diagram MVC

    Hi,
    I am designing a piece of software that will be used as a game client for a MUD server. At the moment I am trying to draw the class diagram but am unsure of the association between the MVC components.
    here is the diagram:-
    http://chrisjohnson.freehomepage.com/class.htm
    Any help greatly appreciated

    This history, in particular:
    http://forum.java.sun.com/thread.jspa?threadID=6081
    33
    Do you know, I never even checked this thread after my last post. i had a few people who understood my problem and were helping. Until you suggested that I was being spoon fed and then no more help. Thanks for that, must return the favour some day.
    Also even though you mention in this thread that your time is very preciousand won't be spent doing someone elses work for them you managed to spend long enough posted abusive comments on the board so well done for that.

  • Open and display image in MVC layout

    Hello!
    I cant figure out how I shall do this in an MVC layout:
    The program request user to open an image file that are then displayed in a JLabel
    My setup at the moment resolve in a nullpointerexeption because it dont get any actual image file, but I dont understand what I have missed.
    I can not post the whole code fo you to run because it is to big, so I post the part that are the most important. please have a look.
    PicturePanel
    //Import Java library
    import javax.swing.*;
    import java.awt.*;
    public class PicturePanel extends JPanel {
         //Variables
         private ImageIcon picture;
         //Method to get information of the selected file
         PicturePanel (String fileName) {
              picture = new ImageIcon (fileName); //Get the filename
              int w = picture.getIconWidth(); //Get the image with
              int h = picture.getIconHeight(); //Get the image height
              //Set preferable size for the image (Use the properties for the selected image)
              setPreferredSize(new Dimension(w, h));
              setMinimumSize(new Dimension(w, h));
              setMaximumSize(new Dimension(w, h));
         //Method to draw the selected image
         protected void paintComponent(Graphics g) {
              super.paintComponent(g); //We invoke super in order to: Paint the background, do custom painting.
              g.drawImage(picture.getImage(), 0, 0, this); //Draw the image at its natural state
    }From my model:
    //Local attributes
         boolean check = false; //Used to see if a statement is true or not
         PicturePanel pp;
         JFileChooser fc;
         int returnVal;
    //newFile in File menu
         public void newFile() {
              //Open a file dialog in users home catalog
              fc = new JFileChooser();
              //In response to a button click:
              returnVal = fc.showOpenDialog(pp);
              System.out.println("You pressed new in file menu");
         }From my controler:
    //User press "New" in File menu
              else if (user_action.equals("New")) {
                   //Call method in model class
                   model.newFile();
                   //Update changes
                   if (model.returnVal == JFileChooser.APPROVE_OPTION) {
                        System.out.println("Hello1");
                        File f = model.fc.getSelectedFile();
                        if (model.pp != null)     
                             model.pp = new PicturePanel(f.getAbsolutePath());
                        System.out.println("Hello2");
                        //Display image (Here is line 83)
                        view.setImage_DisplayArea(model.pp);
                        System.out.println("Hello3");
              }From my view:
    //Sets the image to be displayed on the image_display area (Here is line 302)
         public void setImage_DisplayArea(PicturePanel pp) {
              image_display.add(pp);
         }The complet error:
    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
         at java.awt.Container.addImpl(Container.java:1015)You pressed new in file menu
    Hello1
    Hello2
         at java.awt.Container.add(Container.java:351)
         at View_Inlupp2.setImage_DisplayArea(View_Inlupp2.java:302)
         at Control_Inlupp2.actionPerformed(Control_Inlupp2.java:83)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1882)
         at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2202)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
         at javax.swing.AbstractButton.doClick(AbstractButton.java:334)
         at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1050)
         at apple.laf.CUIAquaMenuItem.doClick(CUIAquaMenuItem.java:119)
         at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1091)
         at java.awt.Component.processMouseEvent(Component.java:5602)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3129)
         at java.awt.Component.processEvent(Component.java:5367)
         at java.awt.Container.processEvent(Container.java:2010)
         at java.awt.Component.dispatchEventImpl(Component.java:4068)
         at java.awt.Container.dispatchEventImpl(Container.java:2068)
         at java.awt.Component.dispatchEvent(Component.java:3903)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4256)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3936)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3866)
         at java.awt.Container.dispatchEventImpl(Container.java:2054)
         at java.awt.Window.dispatchEventImpl(Window.java:1801)
         at java.awt.Component.dispatchEvent(Component.java:3903)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)Edited by: onslow77 on Dec 16, 2009 5:00 PM
    Edited by: onslow77 on Dec 16, 2009 5:04 PM

    Hello again!
    Anyone that can help me figure out how to implement this in an MVC layout, I feel stuck.
    I post a little program that open and display an image file so that you better can understand what I whant to do.
    ShowImage
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.File;
    import javax.swing.filechooser.*;
    public class ShowImage extends JFrame{
         //Variables
         JFileChooser fc = new JFileChooser();
         PicturePanel pp = null;
         ShowImage () {
              super("Show"); //Title
              //Create the GUI
              JPanel top = new JPanel();
              add(top, BorderLayout.NORTH);
              JButton openBtn = new JButton("Open");
              top.add(openBtn);
              openBtn.addActionListener(new Listner());
              //Settings for the GUI
              setDefaultCloseOperation(EXIT_ON_CLOSE);
              pack();
              setVisible(true);
         class Listner implements ActionListener {
              public void actionPerformed(ActionEvent ave) {
                   int answer = fc.showOpenDialog(ShowImage.this);
                   if (answer == JFileChooser.APPROVE_OPTION){
                        File f = fc.getSelectedFile();
                        //Check
                        System.out.println(f);
                        System.out.println(pp);
                        if (pp != null)
                             remove(pp); //Clean so that we can open another image
                        //Check
                        System.out.println(pp);
                        //Set the PicturePanel
                        pp = new PicturePanel(f.getAbsolutePath());
                        //Check
                        System.out.println(pp);
                        //Add PicturePanel to frame
                        add(pp, BorderLayout.CENTER);
                        validate();
                        pack();
                        repaint();
         //Main
         public static void main(String[] args) {
              new ShowImage();
    }PicturePanel
    //Import Java library
    import javax.swing.*;
    import java.awt.*;
    public class PicturePanel extends JPanel {
         //Variables
         private ImageIcon picture;
         //Method to get information of the selected file
         PicturePanel (String fileName) {
              picture = new ImageIcon (fileName); //Get the filename
              int w = picture.getIconWidth(); //Get the image with
              int h = picture.getIconHeight(); //Get the image height
              //Set preferable size for the image (Use the properties for the selected image)
              setPreferredSize(new Dimension(w, h));
              setMinimumSize(new Dimension(w, h));
              setMaximumSize(new Dimension(w, h));
         //Method to draw the selected image
         protected void paintComponent(Graphics g) {
              super.paintComponent(g); //We invoke super in order to: Paint the background, do custom painting.
              g.drawImage(picture.getImage(), 0, 0, this); //Draw the image at its natural state
    }//The endEdited by: onslow77 on Dec 16, 2009 7:30 PM

  • How can I create a new table in a MySQL database in MVC 5

    I have an MVC 5 app, which uses MySQL hosted in Azure as a data source. The point is that inside the database, I want to create a new table called "request". I have already activated migrations for my database in code. I also have the following
    code in my app.
    Request.cs: (inside Models folder)
    public class Request
    public int RequestID { get; set; }
    [Required]
    [Display(Name = "Request type")]
    public string RequestType { get; set; }
    Test.cshtml:
    @model Workfly.Models.Request
    ViewBag.Title = "Test";
    <h2>@ViewBag.Title.</h2>
    <h3>@ViewBag.Message</h3>
    @using (Html.BeginForm("SaveAndShare", "Home", FormMethod.Post, new { enctype = "multipart/form-data" }))
    @Html.AntiForgeryToken()
    <h4>Create a new request.</h4>
    <hr />
    @Html.ValidationSummary("", new { @class = "text-danger" })
    <div class="form-group">
    @Html.LabelFor(m => m.RequestType, new { @class = "col-md-2 control-label" })
    <div class="col-md-10">
    @Html.TextBoxFor(m => m.RequestType, new { @class = "form-control", @id = "keywords-manual" })
    </div>
    </div>
    <div class="form-group">
    <div class="col-md-offset-2 col-md-10">
    <input type="submit" class="btn btn-default" value="Submit!" />
    </div>
    </div>
    @section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
    HomeController.cs:
    [HttpPost]
    public ActionResult SaveAndShare(Request request)
    if (ModelState.IsValid)
    var req = new Request { RequestType = request.RequestType };
    return RedirectToAction("Share");
    The point is that, I want the user to fill the form inside the Test view and click submit, and when the submit is clicked, I want a new entry in the new table to be created. But first of course I need to create the table. Should I create it using SQL query
    through MySQL workbench? If yes, then how can I connect the new table with my code? I guess I need some DB context but don't know how to do it. If someone can post some code example, I would be glad.
    UPDATE:
    I created a new class inside the Models folder and named it RequestContext.cs, and its contents can be found below:
    public class RequestContext : DbContext
    public DbSet<Request> Requests { get; set; }
    Then, I did "Add-Migration Request", and "Update-Database" commands, but still nothing. Please also note that I have a MySqlInitializer class, which looks something like this:
    public class MySqlInitializer : IDatabaseInitializer<ApplicationDbContext>
    public void InitializeDatabase(ApplicationDbContext context)
    if (!context.Database.Exists())
    // if database did not exist before - create it
    context.Database.Create();
    else
    // query to check if MigrationHistory table is present in the database
    var migrationHistoryTableExists = ((IObjectContextAdapter)context).ObjectContext.ExecuteStoreQuery<int>(
    string.Format(
    "SELECT COUNT(*) FROM information_schema.tables WHERE table_schema = '{0}' AND table_name = '__MigrationHistory'",
    // if MigrationHistory table is not there (which is the case first time we run) - create it
    if (migrationHistoryTableExists.FirstOrDefault() == 0)
    context.Database.Delete();
    context.Database.Create();

    Hello Toni,
    Thanks for posting here.
    Please refer the below mentioned links:
    http://azure.microsoft.com/en-us/documentation/articles/web-sites-dotnet-deploy-aspnet-mvc-app-membership-oauth-sql-database/
    http://social.msdn.microsoft.com/Forums/en-US/3a3584c4-f45f-4b00-b676-8d2e0f476026/tutorial-problem-deploy-a-secure-aspnet-mvc-5-app-with-membership-oauth-and-sql-database-to-a?forum=windowsazurewebsitespreview
    I hope that helps.
    Best Regards,
    Sadiqh Ahmed

  • How to get background color in MVC programming

    Hi Experts,
    I am new to BSP.
    I am working in CRM 7.0 version and designing a view using MVC method in BSP.
    I have two doubts::
    1. How can i get background color in a view ?
    2. How can i attach a picture, that is in paint-brush, in background ?
    Thanks in Advance.
    Nitin Karamchandani.
    Edited by: Nitin Karamchandani on Jun 3, 2009 8:10 AM

    Hi,
    several html tags have the attribute bgcolor, like
    <body bgcolor="red">  or <body bgcolor="RRGGBB">  where RR, GG, BB is an hexadecimal value according to RGB color palette.
    you can also work with CSS and in this case you affect the attribute style, which is also available in several tags:
    document.body.style.backgroundColor="#EEEEEE"

  • Can some one explain me oracle MVC configuration or point me to a guide

    I use oracle MVC in my application. cle20.jar is used for it. The application was working fine and now all of sudden I get a null pointer exception in my code where i use this line of code: "ProcessInfo info = (ProcessInfo)getInfo(aKey);" where getInfo is from the oracle.cle.process.GenericProcess and aKey is not null.
    Any help or direction will help. I debugged the application and see that getInfo is always returning null value for all values of aKey.
    Error Message is as follow:
    ERROR [STDERR] java.lang.NullPointerException
    15:23:32,752 ERROR [STDERR]      at myapp.application.process.GetData.persist(GetData.java:302)
    15:23:32,752 ERROR [STDERR]      at oracle.cle.process.PersistingProcess.start(PersistingProcess.java:83)
    15:23:32,752 ERROR [STDERR]      at oracle.cle.process.CLEStateMachine.start(CLEStateMachine.java:61)
    15:23:32,752 ERROR [STDERR]      at oracle.cle.process.Process.start(Process.java:108)
    15:23:32,752 ERROR [STDERR]      at oracle.cle.process.GenericProcess.start(GenericProcess.java:84)
    15:23:32,752 ERROR [STDERR]      at oracle.cle.process.ParentProcess.start(ParentProcess.java:226)
    15:23:32,752 ERROR [STDERR]      at oracle.cle.process.DisplayGroup.start(DisplayGroup.java:75)
    15:23:32,752 ERROR [STDERR]      at oracle.cle.process.CLEStateMachine.start(CLEStateMachine.java:61)
    15:23:32,752 ERROR [STDERR]      at oracle.cle.process.Service.start(Service.java:389)
    15:23:32,752 ERROR [STDERR]      at oracle.clex.process.controller.HttpServletController.doPost(HttpServletController.java:422)
    15:23:32,752 ERROR [STDERR]      at oracle.clex.process.controller.HttpServletController.doGet(HttpServletController.java:836)
    15:23:32,752 ERROR [STDERR]      at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
    15:23:32,752 ERROR [STDERR]      at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
    15:23:32,752 ERROR [STDERR]      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
    15:23:32,752 ERROR [STDERR]      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    15:23:32,752 ERROR [STDERR]      at myapp.application.servlets.SessionFilter.doFilter(SessionFilter.java:42)
    15:23:32,752 ERROR [STDERR]      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
    15:23:32,752 ERROR [STDERR]      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    15:23:32,752 ERROR [STDERR]      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
    15:23:32,752 ERROR [STDERR]      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
    15:23:32,752 ERROR [STDERR]      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    15:23:32,752 ERROR [STDERR]      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
    15:23:32,752 ERROR [STDERR]      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
    15:23:32,752 ERROR [STDERR]      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
    15:23:32,752 ERROR [STDERR]      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
    15:23:32,752 ERROR [STDERR]      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
    15:23:32,752 ERROR [STDERR]      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
    15:23:32,752 ERROR [STDERR]      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
    15:23:32,752 ERROR [STDERR]      at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
    15:23:32,752 ERROR [STDERR]      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
    15:23:32,752 ERROR [STDERR]      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
    15:23:32,752 ERROR [STDERR]      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
    15:23:32,752 ERROR [STDERR]      at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
    15:23:32,752 ERROR [STDERR]      at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
    15:23:32,752 ERROR [STDERR]      at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
    15:23:32,752 ERROR [STDERR]      at java.lang.Thread.run(Thread.java:595)
    Thanks in advance....
    Edited by: user1694903 on Feb 10, 2009 12:46 PM
    Edited by: user1694903 on Feb 10, 2009 12:48 PM

    KB 60446, How to clean an LCD Panel

  • MVC Design Help, Single Servlet, How do I access the Model and DB

    Hi all. New here and looking for some help.
    I am currently writing a website that allows the creation of users, that may upload articles and post comments on articles. Im trying to develop using MVC. I have a single controller servlet that processes POST actions throughout the site (eg. InsertArticle, DeleteArticle, ModifyArticle, etc..)
    Now my problem is, just how do I retrieve the articles from the database? .. for example, if I load up a page http://localhost/articles.jsp which should display all the articles currently in the site.. I would have a function say getAllArticles() which should return a collection of all the articles. I can then iterate through the articles in the jsp page.
    I am trying to use <jsp:useBean...etc.> BUT.. my articles bean constructor takes a databaseconnection object as a parameter. If I use useBean I cant pass the databaseconnection object to the bean and I get an error because it cannot create the bean.
    Any help on this would be appreciated as well as any tutorial links. I also looked at the petstore blueprint program on the sun website, but that program has me completely lost with all the xml. I would prefer not to use custom tags or struts for now. I would like to keep it simple with snippets of java code in the jsp pages for data retrieval and display while keeping all the business logic in the beans of the model. I would also like to keep this relatively secure. I am developing using Oracle Jdeveloper 10g.
    Thanks
    Jazz

    Hey steve, thanks for that.. but thats exactly what i
    dont want to do. I also realize that ive been writing
    the ejb's incorrectly to begin with and have begun to
    rewrite them. However maybe I can make it easier..
    what im trying to do is precisely what is in this
    diagram..
    http://gsraj.tripod.com/jsp/jsp.html
    the problem im having is where it passes data back to
    the jsp page.. entity beans cant (or shouldnt?) be
    accessed directly from jsp pages.. which means i
    create a session bean which interacts with the entity
    bean and can return information to the jsp page.. i
    understand what i have to do.. i just dont know how to
    do it.. been searching for google for tutorials and
    etc.. this site is the closest ive come but .. as you
    can see it says "more to come" ..
    thanks again guys really appreciate itAhhh. EJBs. Enterprise Java Beans and JavaBeans are two completely different beasts. I know nothing about EJBs, except:
    1) They are much harder to use (and serve a different purpose I assume) then JavaBeans
    2) Tomcat (the server I use) doesn't support them.
    Sorry I can't be of more help.

  • Login to WebApi (MVC + WebApi) with Microsoft Account from Windows Store App

    Hi
    How can I access a WebApi Controller (ASP.NET MVC+WebApi) that is secured with Microsoft Account from a Windows Store App?
    I have no idea how to login. I tried the LiveSDK but this gives me only access to OneDrive, Callender and so on.
    Could someone please point me in the right direction.
    Thanks
    Guenter

    Hi Guenter,
    To be clear, you are using Microsoft account as login and at same time you have your own REST service for other functionalities?
    Let's say if you login with LiveSDk, you should be able to get some access token, see this for more information:
    Signing users in, after that use the token to access your REST service, as I understand REST service is a kind of http request, we can use HTTPClient to request data from the address.
    I'm afraid there is no existing sample here but the only thing I found is HTTPClient sample:
    https://code.msdn.microsoft.com/windowsapps/HttpClient-sample-55700664, you can use POST to send your token information to the server.
    --James
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Pagination not working when RDL report is integrated with MVC web application using ascx control reportviewer

    I have the below code in my User control ASCX page.
    <form id="form1" runat="server">
        <asp:ScriptManager runat="server"></asp:ScriptManager>
        <table>
    <tr>
                <td>
                    <rsweb:ReportViewer ID="rvDracas" runat="server" Height="100%" Width="100%" ProcessingMode="Local"
                        DocumentMapCollapsed="true" SizeToReportContent="True" PromptAreaCollapsed="True"
                        ShowCredentialPrompts="false" ShowBackButton="False" ShowPrintButton="true"
                        AsyncRendering="false" ShowFindControls="false" ToolBarItemBorderStyle="None" ShowToolBar="true"
                        ShowReportBody="True" ShowPromptAreaButton="True" ShowRefreshButton="True" ShowZoomControl="False"
                        ShowParameterPrompts="False"  ViewStateMode="Enabled" OnLoad="rvDracas_Load" onclick="window.App.submitting
    = true;" style="margin-bottom: 0px" OnPageNavigation="rvDracas_Load"  >
                    </rsweb:ReportViewer>
                </td>
            </tr>
        </table>
    </form>
    In page load I am filling the RDL with the data source.
    When I click on Page navigation control it is throwing me the below error.
    "Unhandled exception at line 885, column 13
    0x800a139e - JavaScript runtime error: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed.
    Please help...

    Hello,
    Welcome to MSDN forum.
    I am afraid that the issue is out of support range of VS General Question forum which mainly discusses
    the usage of Visual Studio IDE such as WPF & SL designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help System
    and Visual Studio Editor.
    Because you are doing ASP.NET MVC app development, I suggest that you can consult your issue on ASP.NET forum:
    http://forums.asp.net/
     for better solution and support.
    Best regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Unable to open MVC project in Visual Studio 2008

    I started working on an Asp.net MVC website using Visual Web Developer Express 2008 a while ago. Just recently, I managed to get my hands on a copy of Visual Studio 2008 Professional (through
    DreamSpark ). I installed the Service Pack, and also the MVC2 files for Visual Studio.
    However, now I can't open my project anymore. When I try to open the solution in Visual Studio, it tells me that the project type is not supported. Does this mean that I have to resort to using VWD Express again? Is there perhaps some way that I can edit
    the project file so that it will load and compile correctly?
    Note: I installed MVC2 through the Web Platform Installer, and it says that it installed successfully. However, I notice that MVC references in my unit-test project don't seem to be resolved either - is this perhaps because MVC2 isn't actually installed
    properly?

    Hi A_m0d,
    This forum is for the support of Visual Studio installation. Since your issue is related to ASP.NET, you could post your thread on
    ASP.NET Forum. This will make answer searching in the forum easier and be beneficial to other community members as well.
    Thank you for your understanding.
    Best regards,
    Yichun ChenPlease remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.

  • New MVC 5 project build fails in Visual Studio Online using TFS

    Here are some of the errors I'm getting.
     Controllers\AccountController.cs (44): The type or namespace name 'AllowAnonymous' could not be found (are you missing a using directive or an assembly reference?)
     App_Start\BundleConfig.cs (2): The type or namespace name 'Optimization' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)
     App_Start\IdentityConfig.cs (2): The type or namespace name 'AspNet' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)
     App_Start\IdentityConfig.cs (3): The type or namespace name 'AspNet' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)
     App_Start\IdentityConfig.cs (4): The type or namespace name 'AspNet' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)
     App_Start\IdentityConfig.cs (5): The type or namespace name 'Owin' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)
     App_Start\IdentityConfig.cs (12): The type or namespace name 'UserManager' could not be found (are you missing a using directive or an assembly reference?)
     App_Start\IdentityConfig.cs (59): The type or namespace name 'IIdentityMessageService' could not be found (are you missing a using directive or an assembly reference?)
     App_Start\IdentityConfig.cs (68): The type or namespace name 'IIdentityMessageService' could not be found (are you missing a using directive or an assembly reference?)
     App_Start\RouteConfig.cs (5): The type or namespace name 'Mvc' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)
     App_Start\Startup.Auth.cs (1): The type or namespace name 'AspNet' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)
     App_Start\Startup.Auth.cs (2): The type or namespace name 'AspNet' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)
    The project builds fine in VS 2013 (since its a new project).
    It seems that it is not recognizing all the packages. How do I fix this problem?

    It doesn't work for me either. It's an MVC 5.2.2.0 project straight out of the Wizard. It's part of a solution with other projects which appear to be working. I tried configuring NuGet to download missing assemblies on the build machine as it suggested on
    some other sites. That didn't help. According to the list of installed software on the Hosted Build Controller, I don't see MVC explicitly listed. (getting-started/hosted-build-controller-..) page in the TFS project site.
    It definitely doesn't work. I'm trying out Visual Studio Premium 2013 and Team Foundation Service on the 90 day trial offer. I can't find any mention of an MVC restriction. I don't want to have to include the package binaries in source control.
    Edit: I tried a standalone MVC 5 project and it worked fine on the Hosted Build Controller. If you add an MVC 5 project using the wizard to an existing solution with other projects, you get the errors below. So it isn't the Hosted Build Controller.
    Strange.
    App_Start\BundleConfig.cs (2): The type or namespace name 'Optimization' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)
     Controllers\AccountController.cs (200): The type or namespace name 'ValidateAntiForgeryToken' could not be found (are you missing a using directive or an assembly reference?)
     Controllers\AccountController.cs (200): The type or namespace name 'ValidateAntiForgeryTokenAttribute' could not be found (are you missing a using directive or an assembly reference?)
     Controllers\AccountController.cs (226): The type or namespace name 'AllowAnonymous' could not be found (are you missing a using directive or an assembly reference?)
     Controllers\AccountController.cs (226): The type or namespace name 'AllowAnonymousAttribute' could not be found (are you missing a using directive or an assembly reference?)
     Controllers\AccountController.cs (234): The type or namespace name 'AllowAnonymous' could not be found (are you missing a using directive or an assembly reference?)
     Controllers\AccountController.cs (234): The type or namespace name 'AllowAnonymousAttribute' could not be found (are you missing a using directive or an assembly reference?)
     Controllers\AccountController.cs (242): The type or namespace name 'HttpPost' could not be found (are you missing a using directive or an assembly reference?)
     Controllers\AccountController.cs (242): The type or namespace name 'HttpPostAttribute' could not be found (are you missing a using directive or an assembly reference?)
     Controllers\AccountController.cs (243): The type or namespace name 'AllowAnonymous' could not be found (are you missing a using directive or an assembly reference?)
     Controllers\AccountController.cs (243): The type or namespace name 'AllowAnonymousAttribute' could not be found (are you missing a using directive or an assembly reference?)
     Controllers\AccountController.cs (244): The type or namespace name 'ValidateAntiForgeryToken' could not be found (are you missing a using directive or an assembly reference?)
    It seems that my working stand alone project has the dlls in the packages folder tree added to source control. Whereas in the composite project, only the corresponding .xml files are added to source control. So with the standalone project, the build server
    is locating these dlls and using them.

  • How to import and edit a 3D video made with Sony HDR-TD10E camcorder, with .MVC file?

    How to import and edit a 3D video made with Sony HDR-TD10E camcorder, with .MVC file?
    I have PremierePro-CS5 installed.
    This stereo 3D camcorder (Sony HDR-TD10E), output an .MVC (MultiViewCoding) file, coded in H.264 format.
    This format is already compatible with Bluray3D stereoscopic format.
    1) But, how to edit the .MVC in Premiere?
    2) What plugin should I use (if exists) for PremiereProCS5?
    3) Cineform Neo3D, can manage the .MVC format? Can convert it to Cineform format file, for import it into Premiere?
    4) What software should I use to convert an .MVC video to an AVCHD H.264 file, and import it into PremierePro CS5 or CS5.5 for editing?
    Thanks!
    Horsepower0171.

    Sorry, I am Italian, it is very difficult for me to understand what he says!
    I can just read the english text, or follow the actions of a videotutorial!
    Thus my question is the same:
    -What software can do that?
    -Sony Vegas 10 do the Bluray3D authoring?
    -For MVC editing, should I wait for Adobe CS6? Or is it planned an update for CS5.5?

  • How can i use tag library in the mvc?

    hello
    in some tag libraris such as jakarta tag library and jrun tag library,there is database
    access tag, it provide convenient function to access database from jsp page,but i wonder how can i use such a tag within MVC architecture.
    as we know,in MVC architecture,all requests from the jsp pages are submit to the controller servlet,then the controller manipulate ejb to access database,it don't allow the database access from the jsp page.
    who can tell me how can i combine the tag library with mvc architecture appropriately?
    thank you!

    You can't! If you decide to limit the JSP to be part of the View component, obviously you should not include tags that directly access the database. If the strict MVC architecture is less important to you, then the tags can save coding time. It's your choice.

  • Communication between two MVC's

    Hi.
    I want a communication between two MVC's, offcourse in one project.
    What I have:
    MainWindowView (MVC)
      |
      +--> MenuView (MVC)In my Menu MVC there is a button Logout. When this one is pressed the model had to tell the MainWIndowView that he can close.
    How can I do this?
    Statix.

    I have a solution... but I don't know if this is a neat one..
    This is my MenuModel:
              case 3:
                   MainWindowController.closeMainWindow();
                   LoginModel loginModel = new LoginModel();
                   LoginController loginController = new LoginController(loginModel);
                   break;
              ...This one communicates directly with a public static void closeMainWindow () method which disposes the view (JFrame)
         public static void closeMainWindow (){
              mvcView.dispose();
         }     Is this a solution so I stick to the MVC pattern??? I hope so... I wouldn't know another way...
    Thanks in advance!

  • Is there a way to specify MVC model in a Wizard?

    I am fairly new to JDeveloper so forgive me if I ask a stupid question....
    In a past web project I used IBM Websphere and Visual Age developing environments. For an upcoming project I am going to be using JDeveloper but with the same basic MVC architecture with the Servlets being the Controllers and JSP as the View. In Websphere there was a wizard that we could use to create a Java Bean based on our SQL statement. Within this wizard we could also select what 'model' we wanted to use and if we chose 'Servlet model' it would not only create the Java Bean but it would also crate the corresponding Servlet, XML file and JSP. All we had to do after that was bring up the JSP in the test environment and everything was hooked together already. If it was a simple select statement then the JSP displayed the results in a table. The JSP could then be facncied up or whatever. What I want to know is if there is something similar to that in JDeveloper. I know there are wizards to create Servlets and JSPs but is there any way to specifiy a 'model' and have everything to connected up without manually going into the code and doing it? I know this is kinda cheating and being lazy but I just wanted to ask if this type of feature existed before going ahead and doing unneccessary work. So if anyone can follow what I am saying and has an answer or perhaps can direct me to some documentation, that would be much appreciated. Thanks in advance for your help!
    Janis

    Janis,
    JDeveloper ships with a handy, built-in J2EE application framework called Business Components for Java that provides a full-functionality J2EE MVC model layer for you.
    You can get a nice overview of the framework's functionality from this whitepaper:
    Simplify J2EE Applications with the Oracle BC4J Framework
    For a quick overview of how the BC4J framework components implement the familiar collections of value objects design pattern for you, see:
    Implement Collections of Value Objects for MVC Apps with BC4J
    To answer your question about the wizards, you can (in no time flat)
    [list]
    [*]Create a new connection in the System Navigator
    [*]Create a new package of BC4J framework components ("New Business Components Package...")
    [*]On the last panel of the BC4J package wizard, you can select existing tables to reverse-engineer into framework data-access and business logic components (view objects and entity objects, respectively)
    [*]Then, you can use one of our other wizards to produce, for example, a BC4J+Struts application, a BC4J+JSP application, or a BC4J+JClient/Swing (rich client) application
    [list]
    Hope this helps.

Maybe you are looking for