MVC pattern - update the view

Here's the scenario. The application is based on the MVC pattern.

The model reads and stores the data in a database.

Whenever I clicked on one to save, edit, or delete Viewbutton, the model updates the database without any problems.

However, I failed to make the model to update the view by using this.subscribers [i] .update () in the notifyChanges of the observer method;

To improvise, I used the logic very developed to "recreate" view whenever the database is updated. This is why the number of cases is increasing rapidly.

I need help to update the same instance of the view, without having to "recreate".

See below the complex logic of the main class that makes me worth:

Whenever the area add, change or Remove button is clicked, two things happen.

1: public newData Boolean is set to true.

2nd: a "refreshData" event is dispatched. In response to the event "refreshData", the database is updated via nodel.updateDatabase ().

After completing the update of the database, a "dataReady" event is dispatched. In response to the 'dataReady' event, with addChild (view) is executed.

This results in thousands of instances of the composite view of the child with her children.

package {}

import flash.events.EventDispatcher;
import flash.display.Sprite;
import flash.display. *;
import flash.events. *.

SerializableAttribute public class Main extends Sprite {}

private var: model;

public void Main() {}

model = new Model10Vns();

model.addEventListener ("refreshData", refreshData);
model.addEventListener ("dataReady", runStrategy);


function refreshData(event:Event):void {}
{if (Model.newData)}
model.updateDatabase (); Database update
}
}


}
private void runStrategy(event:Event):void {}
controller: controller of var = new Controller (model);
view of var = new View(model,controller);
addChild (view);
}

}
}

You cannot use super in an anonymous function.

Tags: Adobe Animate

Similar Questions

  • How can I update the view without freezing?

    Hi all

    I am trying to load more items in a list, as does the Twitter app

    When I want to load more items, I have done the following:

    • I shows Loader
    • I do the networking activity
    • I'm updating the view

    The problem is that the application UI freezes during the stage of "update view" (for 2 or 3 seconds).

    Because I'm not in the main thead element I update the gwendoline in the following way:

    UiApplication.getUiApplication().invokeLater(new Runnable() {
                public void run() {
                    synchronized (UiApplication.getEventLock()) {
                        while (MyList.hasMoreElements()) {
                             ...
                              ScrollableList.add(item);
                              ...
                        }
                         hideLoader();
                    }
                }
            });
    

    Is it possible to update the view without fix it the interface?

    Thanks to you all.

    Welcome to the support forum.

    invokelater enough, you don't have to synchronize the lock of the event.

    I don't know what is ScrollableList, but if you want to use a ListField, for example, you can add all the entries at a time.
    Even in other cases, as a normal Manager, addAll could be much better performance.

  • Problem to update the views by using templates

    Hi all

    I'm trying to implement the model of presentation using Cairngorm in my flex application. I have a problem to update the views using the presentation model.

    Here's what I do.

    1. I am trying to create a login screen.
    2. To store the current of the user logged in ModelLocator, I created a "currentUser" property
    3. My Member information screen (the screen is displayed after successful login) displays the username like this.
      • < mx:Label label = "{memberUI.fullname}" / > "
    4. I created a template, memberUI for Member information screen. It has a property called "name", which stores the full name of the current user.
    5. I created a method in the presentation model called setFullname() which does the work of definition of the fullname property. This function is called in the answering machine for the connection event.

         public function setFullname():void {
              var appModel:AppModelLocator = AppModelLocator.getInstance();
              appModel.currentUser = event.result as UserVO;
              var uim:memberUI = new memberUI();
              uim.fullname = appModel.currentUser.firstname + " " + appModel.currentUser.lastname;
         }
    

    But even when I was able to login, I am unable to display the full name in the view. Why is this happening?

    Can someone tell me what I am doing wrong?

    Thanks and greetings

    ShiVik

    I've seen two approaches to this within the PM + Cairngorm architectures.

    (1) pass a reference of your MP in your Cairngorm event to allow the command / responder call Update with the results of a service. It's an approach simple but tie your orders and the speakers to your PM class, which makes them less versatile.

    (2) have your PM record reminders with your Cairngorm event to allow results to be returned to your MP. Reminders may take the form of event, function references listeners or an object that implements IResponder.

    Unfortunately, I'm not aware of many examples online for this, but the following link to get (2) passing references to functions:

    http://www.allenmanning.com/?p=31

  • Update the view with, if the terms of other

    Hi all my version if 11 GR 2, I have a simple condition to check it will be great if someone can help me.

    I need to update a view using if else condition that I have created an application wants to see if it's right or not

    Update AIV_MASTER_ENTERPRISE_USERS (name of the view)

    IF supervisor = Supervisor_Copy

    THEN

    Set Is_Supervisor_Changed = 'No' where LAST_NAME is not null

    On the other

    {

    the value Is_Supervisor_Changed = "Yes",

    Set Supervisor_Copy = supervisor

    where LAST_NAME is not null

    }

    end if

    Is_Supervisor_Changed is an indicator that we must define either Yes or no.

    First if we check if supervisor = Supervisor_Copy and set the flag Is_Supervisor_Changed = 'no '.

    on the other must be defined

    the two Is_Supervisor_Changed ='Yes and set the value of supervisor in Supervisor_Copy

    Thank you.

    Sorry, does not consider that your column can be null. Try:

    update aiv_master_enterprise_users
      set is_supervisor_changed =
              case
                when nvl(supervisor, -1) = nvl(supervisor_copy, -1) then 'No'
                else 'Yes'
              end
          ,supervisor_copy =
              case
                when lnnvl( supervisor = supervisor_copy) then supervisor
                else supervisor_copy
              end
    where last_name is not null
    
  • Photoshop CS4 won't refresh or update the view

    Hello

    My Photoshop CS4 will be not updated / refresh the window after that any changes to layers or settings. The view will refresh only if the view is changed, such as the zoom or hand tool. This makes Photoshop near theme. Did some research on the net and I saw a few responses to situations similar to this, but none of them are on a Mac. It comes to my work computer so that you can understand my frustration.

    Presentation of the material:

    Model name: Mac Pro
    Model ID: MacPro4, 1
    Processor name: Intel Quad - Core Xeon
    Processor speed: of 2.66 GHz
    Number of processors: 1
    Total number of Cores: 4

    Memory: 6 GB

    NVIDIA GeForce GT 120:

    Chipset model: NVIDIA GeForce GT 120
    VRAM (Total): 512 MB
    Provider: NVIDIA (0x10de)


    LED Cinema Display:
    Resolution: 1920 x 1200
    Depth: 32-bit color
    Main Image: accelerated material
    Main screen: Yes
    Mirror: Off
    Online: Yes
    Quartz Extreme: supported
    Rotation: support
    Connection type: DisplayPort

    Any ideas on how I can solve this problem would be greatly appreciated, I need to use PS on a daily basis here, and it kills me to be unable to use it.

    Thank you

    Isaac

    Designer at the University of Texas at Dallas

    Have you applied the Photoshop 11.0.1 update?

    Try to turn off OpenGL and relaunch Photoshop.  The problem goes away?

  • Update the view of the objects when existing entity object is changed

    I created display objects of entity objects.  recently, I added a function that creates a guid in a field to these entity objects.  a little, I suppose that if I open the view related object, it would show this guid generator function in the default value field.  but it does not.

    so, you can synchronize the view objects and entity objects with the database, how you synchronize objects of respective view when their principal object attribute properties is changed?

    Thank you

    By default in EO and VO properties are not related.

    In OE, the default value is applied when you create a new line.

    Vo, the default value is applied to the transition attribute.

    Dario

  • Then apply a pattern updated the content overlaps the previous contents

    Hello

    Massive headacke side... I really need to solve this problem – work on the line.

    I'm trying to update a site created by my predecessor offline. I've updated the model used, which created an insane amount of problems, more including fixed like today. When you try to update a single page using the template, the content of overlap. I find myself with 2 headers, footers 2 etc...  I thought it was because all the documents on the site (total 53, not too big) are detached from all models and the name of the editable regions on the documents do not exist, but even trying to match the areas to move the contents to the new regions just made a mess of things. My goal (I hope) is too simply update the site without going through all those contents that overlap. Please help, everybody.

    Here is my template code:

    <! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional / / IN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" > ""
    "< html xmlns ="http://www.w3.org/1999/xhtml">".
    < head >
    < meta http-equiv = "Content-Type" content = text/html"; charset = utf-8 "/ >"
    < title > QMS: AFM < /title >
    < style type = "text/css" >
    <!--
    {body
    Police: 100% Verdana, Arial, Helvetica, without serif.
    Background: #666666;
    margin: 0; / * It is advisable to zero, the margin and the filling of the body to hold element has a different default browser * /.
    padding: 0;
    text-align: center; / * This centers the container in IE 5 * browsers. The text is then set left aligned by default in the #container selector * /.
    Color: #000000;
    background-color: #D7D7D7;
    background-repeat: repeat-x;
    border-bottom-color: #066;
    border-right-color: #066;
    border-bottom-color: #066;
    border-left-color: #066;
    }

    / * Tips for Elastic layouts
    1. Since the elastic layouts overall size is based on the user's default font size, they are more unpredictable. Used correctly, they are also more accessible for those who need larger fonts given the length of the line remains proportionate.
    2. sizing of the divs in this provision are based on 100% font size in the body element. If you decrease the overall size of the text by using a font size: 80% on the body element or the #container, remember that the complete provision will reduce proportionally. You can increase the widths of the divs to compensate for this.
    3. If the sizing of fonts is changed in different quantities on each div instead of on the overall design (ie: #sidebar1 is a font size of 70% and #mainContent has a font size of 85%), this will change proportionally each of the overall size of divs. You can adjust the base on your final sizing of fonts.
    */
    .twoColElsLtHdr #container {}
    Width: 46em;  / * This width will create a container that can fit in a 800px browser window if text is left to default browser font sizes * /.
    background: #FFFFFF;
    margin: 0 auto; / * margins (in conjunction with a width) auto Center the page * /.
    border: 30px no #C4C4C4;
    text-align: left; / * This setting overrides the text-align: center on the body element. */
    padding-left: 10px;
    background-color: #FFF;
    border-bottom-color: #C4C4C4;
    border-right-color: #C4C4C4;
    border-bottom-color: #C4C4C4;
    border-bottom-style: outset;
    border-left-style: outset;
    border-top-width: thick;
    border-right-style: outset;
    border-top-style: outset;
    border-left-color: #C4C4C4;
    border-right-width: thick;
    border-bottom-width: thick;
    border-left-width: thick;
    }
    .twoColElsLtHdr #header {}
    padding: 0 10px;  / * This filling is the alignment to the left of the items in the div that appear below. If an image is used in the #header instead of text, you can remove the padding. */
    background-color: #FFF;
    }
    .twoColElsLtHdr #header h1 {}
    margin: 0; / * zero setting of the margin of the last element in the #header div tag will prevent the collapse of margin - inexplicable space between divs. If the div has a border around it, this isn't necessary, which also allows to avoid the collapse of margin * /.
    padding: 10px 0; / * padding instead of margin will allow you to keep the edges of the div element * /.
    }

    / * Sidebar1″ tips:
    1 be aware that if you set a value for the font size on this div, the width of the div will be adjusted accordingly.
    2. as we work in ems, it is preferable not to use the filling in the sidebar itself. It will be added to the width for browsers compatible standards creating a real unknown width.
    3. the space between the wall of the div and the items it contains can be created by placing a margin left and right on these items as seen in the rule ".twoColElsLtHdr #sidebar1 p.
    */
    {.twoColElsLtHdr #sidebar1}
    float: left;
    Width: 12em; / * the background color will be displayed for the length of the content of the column, but no further * /.
    Padding: 15px 0; / * upper and lower padding create a Visual space within this div * /.
    background-color: #066;
    background-repeat: repeat-x;
    border-top-width: thin;
    border-top-style: none;
    border-right-style: none;
    border-bottom-style: none;
    border-left-style: none;
    border-right-width: thin;
    border-bottom-width: thin;
    border-left-width: thin;
    color: #FFF;
    padding-left: 0px;
    Clear: left;
    }
    H3 .twoColElsLtHdr # sidebar1″, .twoColElsLtHdr #sidebar1 p {}
    margin-left: 10px; / * the left and right margins should be to all of the items that will be placed in the side columns * /.
    margin-right: 10px;
    background-color: #066;
    text-decoration: inherit;
    }

    / * MainContent tips:
    1. If you give this div #mainContent a value of different size of the div # sidebar1″, the margins of the #mainContent div will be based on the font size and the width of the div #sidebar1 depend on the size of the font. You can adjust the values of these divs.
    2. the space between the mainContent and sidebar1″ is created with the left on the mainContent div margin regardless of how content div the sidebar1″ contains, the space of the columns will remain. You can remove the left margin if you want the #mainContent div text to fill the space of #sidebar1 when the content of #sidebar1 is complete.
    3. to avoid falling of float, you may have to test to determine the size of the image/approximate maximum element because this provision is based on the calibration of fonts the user combined with the values that you set. However, if the user has their browser game lower than normal font size, less space will be available in the #mainContent div that you see on the test.
    4. in the Internet Explorer conditional comment below, the zoom property is used to give the mainContent "hasLayout". This avoids several specific IE bugs that may occur.
    */
    {.twoColElsLtHdr #mainContent
    margin: 1.5em 0 0 13em; / right margin can be given in pixels or ems. He created space on the right side of the page. */
    color: #069;
    background-color: #FFF;
    border-top-style: none;
    border-right-style: none;
    border-bottom-style: none;
    border-left-style: none;
    }
    .twoColElsLtHdr #mainContent a: link {}
    text-decoration: none;
    color: #069;
    }
    .twoColElsLtHdr #mainContent a: visited {}
    text-decoration: none;
    color: #069;
    }
    .twoColElsLtHdr #mainContent a: hover {}
    text-decoration: underline;
    color: #069;
    background-color: #FFF
    }
    .twoColElsLtHdr #mainContent a: active {}
    text-decoration: none;
    color: #069;
    }
    .twoColElsLtHdr #footer {}
    padding: 0 10px;
    line-height: 0pt;
    color: #069;
    background-color: #FFF;
    do-size: 10px;
    }
    .twoColElsLtHdr #footer p {}
    margin: 0; / * zero setting the margins of the first element in the footer will avoid the possibility of the collapse of the margin - a space between the div tags * /.
    padding: 10px 0; / * padding on that element will create space, just as it would the margin, free margin collapse question * /.
    background-color: #FFF;
    }

    / * Various classes for reuse * /.
    .fltrt {/ * this class can be used to float right to the item in your page.} The floating element must precede the element it should be next to the page. */
    float: right;
    left margin: 8px;
    }
    .fltlft {/ * this class can be used to float an element on your page to the left * /}
    float: left;
    right margin: 8px;
    }
    .clearfloat {/ * this class must be placed on an element div or break and should be the last item before closing a container should completely contain a float * /}
    Clear: both;
    height: 0;
    font size: 1px;
    line-height: 0px;
    }
    H1 {}
    color: #069;
    do-size: 16px;
    border-bottom-color: #069;
    border-top-width: thin;
    border-right-width: thin;
    padding-right: 0px;
    padding-left: 0px;
    }
    body, td, th {}
    do-family: verdana;
    text-decoration: none;
    color: #069;
    border-bottom-color: #069;
    border-right-color: #069;
    border-bottom-color: #069;
    border-left-color: #069;
    border-top-style: solid;
    border-right-style: solid;
    border-bottom-style: solid;
    border-left-style: solid;
    border-top-width: thin;
    border-right-width: thin;
    border-bottom-width: thin;
    border-left-width: thin;
    }
    a: link {}
    text-decoration: none;
    color: #FFF;
    }
    a: visited {}
    text-decoration: none;
    color: #FFF;
    }
    a: hover {}
    text-decoration: underline;
    color: #FFF;
    background-color: #;
    background-repeat: repeat-x;
    background-position: center;
    border-bottom-color: #069;
    border-right-color: #069;
    border-bottom-color: #069;
    border-left-color: #069;
    }
    a: active {}
    text-decoration: none;
    color: #FFF;
    border color: #FFF;
    padding-left: 20px;
    }
    ->
    < / style > <!-[if IE] >
    < style type = "text/css" >
    / * place patches css for all versions of Internet Explorer in this conditional comment * /.
    .twoColElsLtHdr #sidebar1 {padding-top: 30px ;}}
    .twoColElsLtHdr #mainContent {zoom: 1; padding-top: 15px ;}}
    / * the owner above zoom gives IE the hasLayout property, avoid several bugs * /.
    < / style >
    <! [endif]-->

    "" < link href = "file:///U|/AFM/Dreamweaver/Left sidebar.css" rel = "stylesheet" type = "text/css" / >
    < / head >

    < body link = "#006699" class = "twoColElsLtHdr" >
    < div id = "container" > <!-TemplateBeginEditable name = "Header"->
    < div id = "header" >
    "" "" < h1 > < img src = "file:///P|/RPS/AFMS/Quality Management System/QMS website/ENGLISH SITE/Assets/pwgsc-e.gif" width = "364" height = "33" align = "left" alt = "wordmark" / > < img src = "file:///P|/RPS/AFMS/Quality Management System/QMS website/ENGLISH SITE/Assets/wordmark_canada.gif" width = height "83" = "21" align = "right" alt = "wordmark2" / > < / h1 >
    < p > < / p >
    "" "< p > < img src ="file:///P|/RPS/AFMS/Quality Management System/QMS website/ENGLISH SITE/assets/AFM QMS features "width ="709"height ="80"alt ="banner"border ="0"/ > < a href ="mailto:[email protected] "" > < img src = "file:///P|/RPS/AFMS/Quality Management System/QMS website/ENGLISH SITE/Assets/Contactus-e.JPG" width = "110" height = "21" alt = 'contactus-e' border = '0' "/ > < /a > < img src ="file:///P|/RPS/AFMS/Quality Management System/QMS website/ENGLISH/elements of " "" SITE / French - e.JPG "width ="115"height ="21"alt = 'french-e' border = '0' / > < a href ="file:///P|/RPS/AFMS/Quality Management System/QMS website/ENGLISH SITE/ContinualImprovement - e.html "" > < img src = "file:///P|/RPS/AFMS/Quality Management System/QMS website/ENGLISH SITE/Assets/Help-e.JPG" width = "115" height = alt '21' = 'help-e' border = '0' "/ > < img src ="file:///P|/RPS/AFMS/Quality Management System/QMS website/ENGLISH SITE/Assets/Search-e.JPG "width ="115"height ="21"alt = 'search-e' border = '0' / > < /a >" "< a href ="http://source.tpsgc-pwgsc.gc.ca "" > < img src = 'file:///P|/RPS/AFMS/Quality Management System/QMS website/ENGLISH SITE/Assets/thesource.jpg "width ="120"height ="21"alt ="TheSource"border = '0'" / > < img src = "file:///P|/RPS/AFMS/Quality Management System/QMS website/ENGLISH SITE/Assets/Home-e.jpg" width = "104" height = "21" alt = 'Host-e' border = '0' / > < /a > < /p > "
    < p > < / p >
    < / div >
    <! - TemplateEndEditable - >
    < div class = "twoColElsLtHdr" id = "sidebar1″" >
    "" < p > < a href = "... / HOME QMS/QMSHome - e.html" > < strong > home QMS < facilities > < /a > < /p >
    < hr / >
    "" < p > < a href = "... /ABOUTAFM/AboutAFM-e.html" > < strong > on AFM < facilities > < /a > < /p >
    < hr / >
    "" < p > < a href = "... /AdminProcedures/AdminProcedure-e.html" > < of strong administrative procedures > < / strong > < /a > < /p >
    < hr / >
    "" < p > < a href = "... /BusinessUnits/BusinessUnits-e.html" > < strong > < /a > < /p > < facilities > business units
    < hr / >
    "" < p > < a href = "... /POINTSOFINTEREST/pointsofinterest-e.html" > < strong > < facilities > < /a > < /p > Points of interest
    < hr / >
    "" < p > < a href = "... /Achievements/Achievements-e.html" > < strong achievements > < / strong > < /a > < /p >
    < hr / >
    "" < p > < strong > < a href = "... /MeasuringPerformance/measuringperformance-e.html" > measuring Performance < /a > < / strong > < / p >
    < hr / >
    "" < p > < a href = "... /References/References-e.html" > < strong references > < / strong > < /a > < /p >
    < hr / >
    "< p > < a href ="file:///P|/RPS/AFMS/Quality Management System/QMS website/ENGLISH SITE/ContinualImprovement - e.html "> < continuous improvement strong > < / strong > < /a > < /p >"
    < hr / >
    Corners of strong regions > < p > < < / strong > < / p >
    < / div >
    <!-TemplateBeginEditable name = 'Body'->
    < div id = "mainContent" >
    Header < h2 > < / h2 >
    Paragraph < p > < /p >
    Sub header < h1 > < / h1 >
    < p > < / p >
    < h1 > < / h1 >
    < h2 > < / h2 >
    < h1 > < / h1 >
    < p > < / p >
    < h2 > < / h2 >
    <!-end #mainContent->
    < / div >
    <! - TemplateEndEditable - > <!-this element of compensation should immediately follow the #mainContent div in order to force the #container div to contain all the child-> fleet

    < br class = 'clearfloat' / >
    < /p >
    <!-TemplateBeginEditable name = "Footer"->
    < div id = "footer" >
    < hr width = "100%" size = "8" noshade "noshade" color = "#006666" id = = "color = & quot; 069 & quot; "color ="#069"/ >
    < p > < strong > followed by: ASQM < facilities > < / p >
    < p > < strong > updated: 25-03-2013 < facilities > < / p >
    <!-end #footer->
    < / div >
    <! - TemplateEndEditable - > < script type = "text/javascript" >
    <!--

    ->
    < /script >
    < / h3 >
    <!-end #container->
    < / h3 >
    < / div >
    < script type = "text/javascript" >
    <!--

    ->
    < /script >
    < / body >
    < / html >

    Make sure you have editable regions in the body of your template set properly before you start it. Also, make sure that you have made a backup copy of your current site (copy the ROOT folder and paste it somewhere on your disk).

    OK - Here's what you need to do:

    0 make a backup of your current website (copy the ROOT folder and paste it somewhere on your disk).

    1. create a new page in your current template (file > New > Site templates > (Site) > (model selection) > Create.) Make sure the checkbox "Update Page when the template is changed" is checked.

    2. thanks to this new page open, open page 1 of 51 pages and copy and paste the contents of each editable area of page 1 in the same area can be changed to your new page.

    3. close page 1.

    4. save the new page with the name of the page of 1 so that the old page 1 is replaced by a new one.

    5. Repeat this operation for all 51 pages.

    Sorry, it's so tedious, but in the end, you will once more a fully controlled model site.

    Moreover, before leaving page 1 and the graphs closing this file, please post here any questions you may have.

  • Update App Viewer to v27

    Hello

    I m is a bit confused about the upgrade process. I want to upgrade to the spectator v27 mainly to solve the problem with the Twitter API. Our publications build with v26 era does not appear twitter RSS.

    My doubts are what happens when the upgrade of the viewer of the App.

    If we submit v27 in the app store, v26 publications already downloaded work?.

    The user has already downloaded publications numbers 1 and 2, made with v26. Now release us number 3 built with v27. To download this publication I m assuming he´ll have also update the viewer v27... but won´t need to re - download the publications by v26... Is this true?

    Please tell me the update procedure recommended for Viewer App when West's existing content.

    Thank you

    The upgrade of the application should have no effect on already published folios.

  • Slow to display in the viewer of content of pages

    I'm in the Middle, producing a new folio for one of my clients apps, and I started to test it in the content viewer. It's only a month since I was last working with DPS, but now I find that pages take longer to render and appear very blurry at first.

    Everyone knows this?

    I've updated the Viewer to v26, but put the folio to v25, the app has been positioned to v25.

    Folios now defaults to the PDF format, unless you explicitly set it PNG when you created the folio is what's going on.

    Neil

  • Impossible to update the display data

    Hello
    I created a simple view based on a table, but I can't update the data in the view. How can I do that.

    Thank you

    You will need create an INSTEAD OF trigger to update the base table of way...

    for example

    SQL> select * from test1;
    
         EMPID DT                        SALES       COMM
    ---------- -------------------- ---------- ----------
             1 26-SEP-2009 10:19:05        200          0
             1 29-SEP-2009 10:19:05        300          0
             1 06-OCT-2009 10:19:05        100          0
             2 01-OCT-2009 10:19:05        400          0
             2 04-OCT-2009 10:19:05        150          0
    
    SQL> create view vw_sales as
      2  select empid, sum(sales) as sales, sum(comm) as comm from test1
      3  group by empid;
    
    View created.
    
    SQL> select * from vw_sales;
    
         EMPID      SALES       COMM
    ---------- ---------- ----------
             1        600          0
             2        550          0
    
    SQL> update vw_sales set comm = sales*0.1;
    update vw_sales set comm = sales*0.1
           *
    ERROR at line 1:
    ORA-01732: data manipulation operation not legal on this view
    

    So, as a standard, we can update the display because it contains aggregates.

    If we create instead of trigger on the view, we can grab the update and update "instead of" the view's base tables...

    in my example, I'll answer to update the commission on the employee, by spreading the commission also on all sales for this employee records...

    SQL> ed
    Wrote file afiedt.buf
    
      1  create or replace trigger trg_vw_sales instead of update on vw_sales
      2  begin
      3    update test1
      4    set comm = :new.comm / (select count(*) from test1 where empid = :new.empid)
      5    where empid = :new.empid;
      6* end;
    SQL> /
    
    Trigger created.
    

    So now, we should be able to update the view...

    SQL> update vw_sales set comm = sales*0.1;
    
    2 rows updated.
    
    SQL> select * from vw_sales;
    
         EMPID      SALES       COMM
    ---------- ---------- ----------
             1        600         60
             2        550         55
    

    It's looks right. The commission shall be 10% of the total value of sales. :)

    And if we check the base table...

    SQL> select * from test1;
    
         EMPID DT                        SALES       COMM
    ---------- -------------------- ---------- ----------
             1 26-SEP-2009 10:19:05        200         20
             1 29-SEP-2009 10:19:05        300         20
             1 06-OCT-2009 10:19:05        100         20
             2 01-OCT-2009 10:19:05        400       27.5
             2 04-OCT-2009 10:19:05        150       27.5
    
    SQL>
    

    ... the commission is evenly distributed over the sales as we wanted.

    ;)

  • I updated itunes to 12.4.0.119 and now find under the column of the view may not display the duplicate songs

    I have updated itunes to 12.4.0.119 and now impossible to find in the duplicate songs of column - the view

    I had the same problem, but a solution was found in another forum:

    Once more, Apple settled things. It is now at...

    file/library/show-duplicate-items

    These guys are worse with each update iTunes

  • Print the view current option disappeared after the last update. Where at - it go?

    Print the view current option disappeared after the last update. Where at - it go?

    Hi wpaldridge,

    Please click on 'Other Options' in the Pages to print to get the current view.

    Thank you

    Abhishek

  • My adobe will open and say "install updates" but it stops at 5% and told to try to connect to the server. It won't go past that. I tried to update through the view, but it still does the same thing.

    My adobe will open and say "install updates" but it stops at 5% and told to try to connect to the server. It won't go past that. I tried to update through the view, but it still does the same thing. I tried to reinstall, but it usually because of my other apps I have. How can I fix it?

    Hi crystal,

    Please see the following link for assistance on this issue;

    https://helpx.Adobe.com/creative-cloud/kb/download-update-errors.html

    Concerning

    Harsha

  • There is no such thing as a black line on the content of folio in the viewer adobe after update.

    Several days after an update of a shared folio in the viewer Adobe (iPad Retina), there is a black line on the content on the right side of the screen (possibly a the scroll bar that no scrolling). There was also a notification that an update was available (downloaded very quickly, no updates had been pushed in days). This line does not exist when you use the Office Viewer, non-retine iPad or iPhone.

    Please see other threads on the subject.

    It is currently under review

    This seems to be a problem with Content Viewer (v32.5) in the App Store.

    If I build one from the App 32.4.4 Constructor (same v32.5), the bar is in its original position.

    Not a solution, but could be a workaround for some until this problem is corrected.

  • View database do not update the ADF application

    Greetings,

    IM facing a weird problem in my application (11.1.2.4.0 - ADF JDeveloper). All this time I was working directly with tables (VO), but now I also started to use database views.

    Everything works fine, when I add a new row in a table that is associated with my point of view of database it refresh properly.

    BUT if I manually remove lines of my database, the view is not updated in my application, not by refreshing the page.

    redeploy the application, execution of the query of the view inside the view object object. The only way to display the DB to be

    update inside the JDeveloper and at the time of deployment is to restart JDeveloper. I try to add an action on my OV of the re - run when

    I do something in particular, I hope that will reset the cache and retrieve the view DB again, but without success...

    Fixed: now, it's not yet update on restart jdeveloper.

    Just for accuracy, I'm talking about database views, and not only opposing views. I create a view of the object inside the application to retrieve data

    According to the results of the database view.

    Can you help me on this please?

    Yes the queries in SQLDeveloper showed me the correct results.

    But I am disappointed... When I went to close SQLDeveloper to try something, it me pop a message to change commit / rollback.

    After I commit to them, my app show too many correct results.

Maybe you are looking for