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

Tags: Flex

Similar Questions

  • 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.

  • 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 while updating the number of lines.

    Hello..

    Im very new to obiee and now to learn things.

    I'm using the following link to learn how to create a repository and work with it.

    [http://www.oracle.com/technology/obe/obe_bi/bi_ee_1013/bi_admin/biadmin.html]

    and im facing problem by updating the number of lines.

    get a dialog like...

    There is an error while updating the number of lines for "SH"... "" SH ". "" CHANNELS ".
    + [nQSError:17001] Oacle Eroorcode:942, message: ORA - 00942:table or view does not exist the OIC OCIStmtExecute call: select count (*) channels. +
    + [nQSError:17011] SQL statement execution failed. +

    Wat could be the problem? can anyone help?

    thnx in advance.

    Have you downloaded zip included in the tutorial and placed in the right place?

  • problem updating the contract line using OKC_CONTRACT_PVT.update_contract_line

    Hi all

    I am facing a problem trying to update the end of contract line dateusing the api OKC_CONTRACT_PVT.update_contract_line. When executing the procedure that calls the api it returns the State S without error and also update the table of base that is OKC_K_LINE_B with new end date successfully.

    The problem is that whenever I'm if commit the changes to the front end, application - contract line record gets endangered. What is happening to all instances of the element. Here are the settings I am passing through the api,

    p_chrv_rec.ID: = < id for row in the okc_k_lines_b table >;
    p_chrv_rec.end_date: = < new_end_date >;
    p_chrv_rec. VALIDATE_YN: = 'N'; -I don't want the api to validate attributes

    Please note that the api is correctly updating the record base table but not able to display in the application. I tried to compare the same record before and after the update to confirm if no value of the indicator is is changed due to the record does not appear in applications. but there is no such changes except the new date and the annualiazed_factor. Can is it you pls let me know no work around as if any option profile must be changed to achieve the same.

    Navigation to the im application to check the update new end date of contract line is:

    Oracle Install Based Agent user-> Instance element-> contracts

    Thanks in advance.

    Kind regards
    Hespel.

    Published by: user10545574 on July 8, 2010 06:56

    Hello

    Shouldn't you be using the public api (OKC_CONTRACT_PUB) rather than the private sector? By directly using the package private, you are probably bypassing some features that could cause problems like the one you are talking about.

    Kind regards.

  • Problem in update of views presentation models

    Hi all

    I am trying to create a login using cairngorm screen and presentation model. I created a main screen that has two components - the screen logon and member. They appear according to the connection process. The problem is that even after the successful - connection, I can not update view.

    I know why - because I create two instances of presentation model for Main.mxml in Main.mxml and format for it.

    // Presentation model for Main.mxml
    public class MainModel {
         public var prop:String;
         public function callbackFunc( value:String ) {
              prop = value;
         }
    }
    

    // Presentation model for Login.mxml
    public class LoginModel {
         public function doLogin( username:String, password:String ) {
              var mainModel:MainModel = new MainModel(); // Instance created
              var event:LoginEvent = new LoginEvent( mainModel.callbackFunc, username, password );
              event.dispatch();
         }
    }
    

    <!-- Main.mxml -->
    <mx:Script>
    <![CDATA[
         [Bindable]
         public var model:MainModel = new MainModel(); // Another instance created
    ]]>
    <mx:ViewStack id="views" selectedIndex="{model.prop}">
         <views:MemberScreen />
         <views:Login />
    </mx:ViewStack>
    

    <!-- Login.mxml -->
    <mx:Script>
    <![CDATA[
         [Bindable]
         public var model:LoginModel = new LoginModel();
    ]]>
    <!-- form elements here -->
    <mx:Button label="login" id="btnLogin" click="{model.doLogin( 'abc', 'def' )}" />
    

    In this scenario, I make use of the callback function to the display to get updated when the loginEvent fires. But the view not updated because of two separate proceedings.

    How should I use the presentation model pattern in this scenario, as well as callback functions?

    Thanks and greetings

    ShiVik

    You could do a Singleton to the principal so that way everywhere, you use it, you use the same instance of it. Or if you use the Cairngorm ModelLocator (not that I recommend) has a single instance of the principal and you access anywhere else via the ModelLocator.

  • 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?

  • Problems after updating the BIOS on Satellite Pro P200

    I recently buy a Satellite Pro P200 running Windows Vista Business. Yesterday, I updated the BIOS to the version 1.50 supplied with the machine to 1.80 available on the Toshiba site. I double checked that I was using BIOS correct update for the Pro P200 Satellitel running Vista.

    After updating the BIOS, I have now two problems:

    1. whenever I start and join the office, I get an error message "record of Vista has stopped working". This problem has been identified as toshibavistaregistration.exe here: [link: http://forums.computers.toshiba-europe.com/forums/thread.jspa?messageID=99805]

    2 Control Panel > system now shows the processor and the memory (RAM) as "not available". Execution of the diagnostic PC Toshoba tool and looking at basic information show also no information on the memory (RAM) Although the processor information here. There may be pieces others missing too under the eyes of list shorter than before the update of the BIOS.

    Basically, I want to get everything working again as it should, but cannot find any information on these issues.

    After further review, it appears that the update of the BIOS is not the cause of the problems.

    Immediately after updating the BIOS, I had a major system crash. It turns out that this is what has caused problems.

    After a system restore to a point before the update of the BIOS and the major system crash, now everything is working again with BIOS version 1.8 in place.

  • 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
    
  • How can I update the BIOS without using a CD?

    Hello!

    I recently decided to update my RAM from 2 GB to 4 GB. After installation, I started my computer to find that it would not recognize the new memory. After doing some troubleshooting, I decided to try to update the BIOS, like the 2010 version. I have downloaded the update to the BIOS boot CD implementation of lenovo, burned a disk and restarts, I found that the boot order has no CD contained thereon. Here's the catch: I do not have the supervisor password. It is a mobile phone in hand, and I tried to find the password nothing is done. It's the current boot order: USB key, hard drive.

    My question is, can I create a BIOS update disk using a USB key, or update the BIOS of another way?

    I understand that it is impossible to recover the supervisor password without having served (that I prefer to not do, even if I have to return my Crucial RAM)

    My system features:

    ThinkPad L512

    BIOS version: 1.04

    BIOS date: 2010-3-26

    Controller of Embeded Version: 1.01

    Windows 7 32 bit

    Thanks for your help.

    Welcome to the forum!

    Two things here:

    (a) If you run the system update, it should offer the latest BIOS for your machine as well. I never did on a protected device, so it may or may not work, but perhaps worth it.

    (b) I doubt the ability of the system to recognize the new RAM has something to do with the BIOS. Much older than your ThinkPads will take place 4-8 GB of RAM with an old BIOS, older than your machine initially.

    Good luck.

  • Problem connecting to the server by using the url with the logical name!

    Hi all!

    I looked for information on this subject, but have not seem to found a solution.

    I'm developing a Smartphone application that needs to connect to a server to retrieve data. Then I use a direct connection with the correct settings (I hope):

    URL = "url of the server" + "deviceside:true" + "AFN:...» »

    The problem is that the connection should be done without Hardcoding the "apn". These are the tests I've done so far (assuming I'm always add the ' deviceside: true ' parameter):

    URL (logical name) + AFN OK!
    FAILURE of the URL (logical name)
    URL (static IP) OK!

    * by logical name, I mean a url as www.google.com

    What I need is to use the logical name, without the parameter apn!  Maybe I'm missing another parameter that I don't know?

    Some additional info that might be useful! :

    -The server is a server of Vodafone, which, as has been explained to me, should be on the list of white of the RIM (not sure what that means, but I guess it has to do with the fact that BB connection through the RIM at one point servers, and be in this list gives a sort of 'privilege' when you browse servers of RIM) , and I don't know it is publicly accessible as (see following)

    -An android version of the application works fine without Hardcoding the AFN and using the logical name (I guess it has to do with the RIM servers!)

    Any help or ideas towards the solution that it is greatly appreciated!  If I'm missing some info that you think I should add! Please tell me!

    Thanks for your help!

    Juan

    Thanks Peter!

    I could solve it by looking at the code of the alternative of the Api network in the link sent you me!

    The solution was the addition of the ConnectionUID parameter to the url String!  as to why this solves the problem I still don't understand it! (If you can enlighten me with the reason, I would be very grateful)

    This value is found in the service books!, I have the zip code just in case it helps someone!

    Hogshead string = null;

    Full book sb = ServiceBook.getSB ();

    Reviews [] ServiceRecord = sb.getRecords ();

    for (int i = 0; i)< records.length;="">

    {

    String cid = records [i] .getCid () .toLowerCase ();

    String uid = records [i] .getUid () .toLowerCase ();

    If ((cid.indexOf ("wptcp")! = - 1) & (uid.indexOf ("wifi") ==-1) & (uid.indexOf ("mms") ==-1))

    {

    Hogshead = records [i] .getUid ();

    }

    }

    then add the parameter: ConnectionUID = Hogshead

    Once again, thank you!

  • How to install or update the store applications using the dongle

    I don't have a wifi connection. I want to download or update applications on the store of windows in my pc. How can I do because he just waits for Wi-Fi every time I try to install or update an application.

    Hi Abhishek,

    Thanks for posting your question on the Microsoft community.

    Thank you for details on the issue.

    I also like the fact you want to update or install applications using the USB.

    I suggest you to connect your computer to the Internet using the USB dongle.

    You can refer to this article:
    http://Windows.Microsoft.com/en-us/Windows/Connect-Internet#1TC=Windows-8

    Without the Internet, apps will not install or update.

    You can also light updates automatic app.
    Reference:
    http://Windows.Microsoft.com/en-in/Windows-8/automatic-app-updates-help

    See also:
    https://support.Microsoft.com/en-us/KB/2800086

    I hope this information helps.

    Please let us know if you need more help.

    Thank you

  • After effects CC problems encoding (tilted the view and doubled the by-Side sequence)

    Although starting at the Adobe Creative Cloud space, there is some awareness of the main functions of the system, as well as a few additional details. However, a problem occurred on the encoding and export project Adobe after effects (AE) to Adobe Media Encoder (SOUL) such as the 2D plane (or rather the version preview in AE is flat and not transformed) becomes 3D so that the sequence becomes tilted and lined with a line between clips of same in preview rendering within the SOUL. The system currently used is a MacBook Air, and the Adobe programs were recently installed from 2016. Such a question has never become eminent or circumstantial to anyone on the forum? If there are other details, please ask by responding to this post. Thank you for your time and effort!

    This is an image depicting the situation previously described:

    Screen Shot 2016-01-15 at 10.01.39 PM.png

    First check the file in another player software. If this is a real problem, we need to know the exact encoding parameters. Such behavior usually indicates an incompatible CoDec which does not have the custom of handloe correctly resolution settings...

    Mylenium

  • Problem with updating the firmware on 40TL838G

    Hello

    I am very happy owner of Toshiba 40TL838 screen (G).
    Recently, I tried to update the firmware on it.
    Next steps in the user manual I tried to do the update of the network. "No new updates available" poped upward. I goggled solutions and came across a manual update of the USB.

    I downloaded the firmware recent Telefilm, coppied to usb (4 GB, formatted FAT32).
    Following the online instructions I have unplluged TV power.
    Plugged in USB. Connected TV to the power and he lit. And nothing happened.

    After 20-30 sec info abut being plugged usb pop uped question I wish to put on the Media Player.

    Firmware: 6.1.0M.1
    MBoot: 00480288
    MFC: 240226

    Any ideas how to proceed with this case.

    Concerning
    SLim

    Hello

    The firmware can be downloaded and updated via the network.
    But as far as I know you need to change the drive media or software update settings can not be started.
    Media Player-> USB media player-> installation
    Then press left or right, and select THE
    Now we turn on the TV
    Insert the USB key containing the firmware and after inserting the USB firmware update information appears on the screen.
    Then choose YES

  • problems to update the SDK 5.0

    I recently installed the complete installation of Blackberry java plugin version 1.5.0.201110141512 and I want to install the blackberry java SDK 5.0.0.25, but I still get this error... the strange thing is the user and the password are valid. Connect to the developers space every time I get the error and I have no problem:

    An error occurred collecting elements to install
    session context has beenprofile = SDKProfile, phase is org.eclipse.equinox.internal.p2.engine.phases.Collect, operand =, action is).
    Cannot read the repository to the: https://www.blackberry.com/Downloads/auth/contactFormPreload.do?code=DC727151E5D55DDE1E950767CF861CA... Too many connection attempts that failed.

    Thanks in advance

    Horacio Morales Gonzalez

    Hello again

    I've solved this problem... the URL to download the SDK was incorrect!... it needs to be http://www.blackberry.com/go/eclipseUpdate/3.6/java instead of 3.5.

    Thanks for your time!

Maybe you are looking for

  • New SSD - clean install USB 10.11.5 fails

    I have a mini Mac 2012 delay servier I use as a desktop computer. He had more storage that I needed if I swapped the boot with an OWC Mercury Extreme Pro 6 G SSD drive in the lower Bay, I left a second 1 TB drive 'data' in the upper Bay. The exchange

  • How to remove the firefox address bar and simply only the top menu bar

    I want to only have the menu bar at the top of the screen... and not do anything else;as the address bar.would appreciate any help.I made a java update and wonder if that could be part of the problem. Thank you

  • Toshiba Recovery CD update

    Is it possible to update the toshiba recovery cdwith Windows XP SP 2 and other patches or find newupdated toshiba recovery CD?

  • LasrerJet P1606dn Toner flashing light

    My wife bought a HP LaserJet P1606dn two weeks ago. The printer was working fine until the toner light began to blink in the middle of a print job. Knowing that the drum unit that comes with the printer wouldn't replace us it with a new HP ink cartri

  • Add or remove programs will not fill

    In Control Panel, click Add/Remove programs. Nothing, just white.