A query regarding Cairngorm events

I'm new to cairngorm.
I'm designing a StudentApplication using Flex with Cairngorm.
I am struck at writing a Cairngorm event class. Please guide me

Assume that this StudentApplication is suppourting Create, Delete, Update, read operations.

My question is what I have to write 4 event classes, every representative of this operation.

Or is it possible to do so in an event class by taking 4 different constant Sring, each representing the appropriate Action.

package com.control
{
import com.adobe.cairngorm.control.CairngormEvent;

public class CreateEvent extends CairngormEvent
{


}
public static const EVENT_CREATE_STUDENT: String = "EVENT_CREATE_STUDENT";
}

My question is what I need to do Create, Update, Delete, reading for all events
Event of my Application?

Please guide me.

Thanks in advance.

Hi Kiran,

You can write all the events in a class single say StudentEvent class and perform the appropriate action according to the type of event (delete, update, add... etc) but if you do you need to process the result returned by the remote service based on the type of event in command later and write your logic.

for ex:

In your layer (StudentCommand) command in the results... Manager function you need to treat them that way...

public function result (data: Object): void

{

If (data! = null)

{

If (_eventtype is "deletestudent")

{

Write you the logic to remove the student

}

ElseIf (_eventtype == "createstudent")

{

Write logic to create the student

}

ElseIf (_eventtype == "updatestudent")

{

Write logic to update students

}

on the other

{

Write you logic to read the details of the student

}

}

}

deletestudent, createstudent, updatestudent and readsrstudent are the event four guys who you here as of constant static in StudentEventclass.

If you want to write event 4 classes for all then also its good so that you can have the class wrapper for all events.

If you want to have custom and reduces the code, then use the single event class. Its based on your requirement...

Thank you

Jean Claude Chari

Tags: Flex

Similar Questions

  • A query regarding the creation of shared objects.

    Hello

    I have a query regarding the creation of shared objects.

    I saw an example where the author is creatining Shared Object as shown
    below:


    SharedObj = null;
    sharedObj = SharedObject.getLocal ("myTasks");

    and there is nothing related to the word "myTasks" anywhere in the Application.

    Can someone please let me know what this word "myTasks" mean here?

    Thanks in advance.

    Hello

    With a shared object, it will create one if it does not exist, then "myTasks" becomes the name of the shared object or if it exists it will load all the objects that are in the shared object.

    Here is a simple example that uses the sharedobjects to store the connection information.

    http://gumbo.flashhub.NET/login/

    David

  • Cannot send a Cairngorm event!

    I have a Cairngorm event:

    ////////////////////////////////////////////////////////////////////////////////////////// ///////////////

    ////////////////////////////////////////////////////////////////////////////////////////// ///////////////

    public class ChangeData extends CairngormEvent

    {

    public static var EVENT_CHANGE_DATA:String = "ChangeData;

    public function ChangeData (type: String, bubbles: Boolean =fake, cancelable: Boolean =fake)

    {

    Super (Charts_FrontController.EVENT_CHANGE_DATA);

    }

    }

    ////////////////////////////////////////////////////////////////////////////////////////// /////////////////

    I stated the following in the FrontController:

    public static const = "ChangeData; Charts_FrontController.EVENT_CHANGE_DATA:String

    and now I can't get this to work:

    ////////////////////////////////////////////////////////////////////////////////////////// ////////////////////

    import flash.events.Event;

    import com.adobe.cairngorm.control.CairngormEventDispatcher;

    public function ChangeData(e:MouseEvent): Sub

    {

    var ev:ChangeData = new ChangeData ('ChangeData');

    CairngormEventDispatcher.getInstance () .dispatchEvent (ev);

    }

    ////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////

    It gives me two errors:

    Type was not found or was not a compile-time constant: ChangeData

    Method cannot be used as a constructor

    Help, please

    change the name of the method - it interferes with the name of the class

  • Query regarding to_date for special requirements

    Hi all

    We have a purge script that should be run every day at 03:00 on the oracle database. This script deletes data for the duration of 22:00 to 03:00.

    This is the part of query that specifies the duration.

    Could you please suggest how to change to_date so that created_time meets our requirement.

    ( String getMessageGroupIds = «SELECT Group_id FROM MEDIATOR_INSTANCE WHERE COMPONENT_STATE IN ('4', '7') and created_time > = to_date (6 August 2013 13:55 ",)" MM/DD/YYYY HH24:MI:SS') and created_time < = to_date (6 August 2013 15:55 "," MM/DD/YYYY HH24:MI:SS') and the name of the component as '% default/UpdateSalesOrderOSMCFSCommsJMSConsumer%' ';

    Thank you and best regards,

    Bob

    912286 wrote:

    Hi Marty/Etbin,

    I tried to request below:

    String getMessageGroupIds = ' SELECT Group_id FROM MEDIATOR_INSTANCE WHERE COMPONENT_STATE IN ('4 ', ' 7') and created_time > = to_date (TRUNC (SYSDATE-1) + 22 / 24) and created_time.<= to_date(trunc="" (sysdate)="" +="" 3="" 24="">

    but it does not give the result desired, rather, it is the outcome of sysdate-1 to sysdate and countless hours.

    TIA,

    Bob

    you use to_date on the date data type

    String getMessageGroupIds = ' SELECT Group_id FROM MEDIATOR_INSTANCE WHERE COMPONENT_STATE IN ('4 ', ' 7') and created_time > = TRUNC (SYSDATE-1) + 22 / 24 and created_time.<= trunc="" (sysdate)="" +="" 3="">

    Concerning

    Etbin

  • query regarding link by

    I have the following table, named student: -.


    NAME
    --------------------
    one
    b
    c
    d

    Now, I stumbled upon a clause connect by but I can't understand how it works. I know this has something to do with the treelike structures. But when I issued the following query:
    Select * student connect you prior name > name;
    -the following report was produced: -.



    NAME
    --------------------
    one
    b
    one
    c
    one
    b
    one
    d
    one
    b
    one

    NAME
    --------------------
    c
    one
    b
    one

    15 selected lines.



    I really don't understand how it works. Help, please.
    Thanks in advance

    Published by: user11930797 on April 27, 2010 05:02

    Published by: user11930797 on April 27, 2010 05:03

    Published by: user11930797 on April 27, 2010 05:04

    Maybe it help if you choose the level and the full path, like this:

    SQL> with student as
      2  ( select 'a' name from dual union all
      3    select 'b' from dual union all
      4    select 'c' from dual union all
      5    select 'd' from dual
      6  )
      7   select name
      8        , level
      9        , sys_connect_by_path(name,' --> ') scbp
     10     from student
     11  connect by prior name > name
     12  /
    
    N      LEVEL SCBP
    - ---------- --------------------------------------------------
    a          1  --> a
    b          1  --> b
    a          2  --> b --> a
    c          1  --> c
    a          2  --> c --> a
    b          2  --> c --> b
    a          3  --> c --> b --> a
    d          1  --> d
    a          2  --> d --> a
    b          2  --> d --> b
    a          3  --> d --> b --> a
    c          2  --> d --> c
    a          3  --> d --> c --> a
    b          3  --> d --> c --> b
    a          4  --> d --> c --> b --> a
    
    15 rows selected.
    

    Now, it shows that you generate 4 trees. One for each record, because there is no clause "begins by" specified. And then the tree is constructed using the clause "previous name > name", hence this exit.

    I hope this helps.

    Kind regards
    Rob.

  • Cairngorm events

    I just picked up on Cairngorm and it seems somewhat confusing. I hope someone could help me clarify this point. I have an array of files that I would like to import. How can I run each command without manually create commands and delegates for each of these files. In the end, I might have probably more than just 2 files, 100's.

    private var _file:Array = new Array("file1.xml","file2.xml");

    private void importFiles(): void
    {
    for each (var: string element in _files)
    {
    var event: ItunesEvent = new ItunesEvent (item);
    CairngormEventDispatcher.getInstance () .dispatchEvent (event);
    }
    }

    I essentially want to happen is that when 'file1.xml' is done importing, run the same command to import "file2.xml", etc. and so forth.

    Thank you.

    Nice... looks like than what I wrote just worked. What I did was create a table entitled 'list files' in my model.

    then in the initial start, I have this:

    private var _playListPath:Array;

    for each (var: string element in _playListPath)
    {
    model.fileList.push (item);
    }

    var event: ItunesEvent = new ItunesEvent(model.fileList[0]);
    CairngormEventDispatcher.getInstance () .dispatchEvent (event);

    Then in my order:

    model.fileList.shift ();
    If (model.fileList.length! = 0)
    {
    var e:ItunesEvent = new ItunesEvent(model.fileList[0]);
    CairngormEventDispatcher.getInstance () .dispatchEvent (e);
    }

  • Query regarding different refreshing data from the grid when returned from a workflow

    Hi Experts,

    JDEV version is: 11.1.1.5

    Our application uses dynamic tabs the user interface shell.

    Whenever the user connects, it is taken in A TAB.

    Since the TAB A, the user navigates to TAB B.

    TAB B has a GRID B(table with a few records).

    Column A on TAB B has a hyperlink which, once clicked on will open a stream of different tasks in a different tab.

    Click on the column of hyperlink for the different lines will open different tf (under certain conditions).

    By clicking on the hyperlink, that the method _launchActivity(String title, String taskflowId, boolean newTab) is used, which the TF open in a new tab.

    The user works on the TF (in a new tab) which opened on click of a hyperlink in the column is and click on SAVE.

    Click to save some operation and removeCurrentTab method is called which will close the current tab, and control passes to the first tab (TAB A).

    The problem:

    Once the user tries to click or to return to the TAB B the WHAT GRID B is never updated that we cannot get the descriptor to refresh the data in the grid.

    Any suggestions would be much appreciated.

    Thank you

    Jean Claude

    huh, I thought it was another library in question.

    In all cases, you can use contextual event (when you close the current tab).

    The second option is to navigate to the method executeQuery by code call activities:

    https://blogs.Oracle.com/jdevotnharvest/entry/how-to_navigate_in_bounded_task_flows

  • Query regarding oracle functions

    Hi all

    I tried to work with decode them and output of NVL to get the following:

    Output value
    1 NULL
    0 1
    1 1
    2 2
    3 3


    to do this, I wrote the following query:
    SELECT DECODE (NVL(high_value,1), 0.1, NVL(high_value,1)) in tab1.

    Can there be a replacement of this using other functions?

    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
    PL/SQL Release 10.2.0.4.0 - Production
    CORE 10.2.0.4.0 Production
    AMT for Solaris: release 10.2.0.4.0 - Production
    NLSRTL Version 10.2.0.4.0 - Production

    Thank you
    Nikhil

    Can be with decoding

    with t_data as
    (
    select null as val from dual union all
    select 0 from dual union all
    select 1 from dual union all
    select 2 from dual union all
    select 3 from dual
    )
    SELECT
         val,decode(val,null,1,0,1, val) output
    from t_data
    
  • Query regarding CPU patches

    Hello

    According to my understanding CPU patches are released every quarter for each version & the realease of oracle database.

    I use Oracle 10.2.0.3 on IBM - AIX 5.3 (64-bit).

    I checked the link to metalink below.

    Patches and updates-> Oracle Server/tools-> last Patchsets-> latest version of the Oracle/tools Patchsets-> server then selected oracle database and OS version-> Patch Type selected as all-> ranking selected under high security-> Go

    But the above gives me a list of CPU patches!

    So it is not mandatory that each and every six months we will have a new patch oracle CPU? Or I make a mistake in the selection above?


    Thanks in advance.


    Best regards
    oratest

    Hello

    Patches of CPU Oracle releases for currently taken versions support only.

    And the latest patch of CPU to 10.2.0.3 was Jan 2009 CPU-7592354

    I hope this helps...

  • Query regarding recovery of selected records from table

    Hi all

    I have a table as below:

    NUM1 NUM2 TYPE

    1 2
    1 2 S
    2 3 S
    3 4
    3 4 S
    4 5S


    If for a record TYPE = 'A' then do not select the records for these num1 and num2.

    For example: for 1 = num1 and num2 = 2 there are two records with type = 'A' and ', recorded only with the type 'A' should be selected.

    Output should be like this:

    NUM1 NUM2 TYPE

    1 2
    2 3 S
    3 4
    4 5S

    Please could someone help me in this query.

    Any help would be much appreciated.

    Thanks and greetings
    Anuj

    Just the MIN function will get what you want

    SQL> with t
      2  as
      3  (
      4     select 1 num1, 2 num2, 'A' type from dual union all
      5     select 1, 2, 'S' from dual union all
      6     select 2, 3, 'S' from dual union all
      7     select 3, 4, 'A' from dual union all
      8     select 3, 4, 'S' from dual union all
      9     select 4, 5, 'S' from dual
     10  )
     11  select num1, num2, min(type) type
     12    from t
     13  group by num1,num2
     14  order by num1,num2
     15  /
    
          NUM1       NUM2 T
    ---------- ---------- -
             1          2 A
             2          3 S
             3          4 A
             4          5 S
    
  • Query regarding SQL logs

    I'm currently working on database forensics, if I do some manual changes in the database through some sql queries there no entry in the logs to prove...

    Can anyone suggest me some tools that can give the desired result. (i.e. pulled the log of all manual queries)

    PS I am using SQL Server 2005

    Any help would be appreciated

    Thank you.

    Hello

    Your question is beyond the scope of this community.

    Please repost your question in the SQL Server TechNet Forums.

    https://social.technet.Microsoft.com/forums/SQLServer/en-us/home?category=SQLServer

    See you soon.

  • Query regarding VCA and clustered environment

    Hi all, we are currently a slight dilemma and need some advice/help with the installation of clustered environments in VC 4.1.

    Here's our installation composed of 2-pole in a data center:

    Cluster_01

    VCA Mode on Intel 45nm Core 2 Xeon

    2 x servers Dell PowerEdge M600 blade installed with ESX 3.5 (failure of waiting to rebuild with esxi 4.1)

    4 Dell PowerEdge M600 blade servers with ESXi 4.1 x
    E5450 CPU Chipset
    Enough clustered resources to satisfy a host failure.

    Cluster_02

    People with disabilities VCA

    2 x Blade Server PowerEdge of Dell M610 installed with ESX 4.0 (failure of waiting to rebuild with esxi 4.1)
    E5540 CPU Chipset
    Resources on the host for the loss of a node in the cluster.

    * We combine the hosts in a single cluster and enjoy the VCA mode the question?
    * It would be any degradation of performance of guests running?
    * If the newest blades are added to this group in the future what exam must we do? Once again, if CPU

    features are hidden to make it compatible with the cluster that would frustrate the purpose of again model

    Blade and features of the CPU?
    * If we consolidate the clusters we simply turn off guests, remove hosts in the cluster and add the cluster 1 then restarts?

    * Don't disable us the VCA mode in Group 1 and keep configuration cluster 2?

    Your help is greatly appreciated.

    Because the virtual machine are running on a recent processor without activating EVC, you can't allow him to 'downgrade' function CPU.

    You must stop the virtual machine, put the host in maintenance mode and migration in the EVC cluster.

    André

  • Query regarding the change of the background color of an input text

    Hello
    I want to change the background color of an input text element. When I tried with the background color inline style, he has changed the color of the label instead of changing the background color. Is there a way I could do?
    Thanks in advance

    Hello

    Use the contentStyle property (or counting af: inputText::content if you want to change it in one place for all input text fields)

    Frank

  • Query regarding changing the type of human task

    Hello
    I'm new to BPM. I created a process to two tasks and selected by mistake the two human tasks with the motif of the initiator. And now I get this compilation error that says my process contains several tasks of initiator. Is there a way I can change the type of simple human task after the process has been created?
    Thanks in advance

    afraid to say it, but you must create a human task once more... Sorry, but once created, HT is not editable through front end Oracle BPM

  • Query regarding namespaces

    Hello
    I am quite new to XML format. Last day, I read on namespaces. I read that they are used to resolve name conflicts. Is there another reason to use? Another question that came in my mind was this: suppose that I write the following text: -.


    <? XML version = "1.0"? >
    < root xmlns:ns1 = "http://www.abc.com.
    xmlns:ns2 = "http://www.abc.com" >

    < ns1:name > CBA < / ns1:name >
    < ns2:name > XYZ < / ns2:name >

    < / root >


    In the example XML document above, ns1 and ns2 refer to the same URL. Then there will be an error, or it will mean that the two name tags reside in the same namespace? Could you help me with some links where I can study the namespaces?
    Thanks in advance

    Published by: user11930797 on July 24, 2010 04:48

    Hello

    with
    xample
    as
    (select xmltype('
    ABC
    XYZ
    ') x
    from dual)
    select extract(x, '/root/ns1:name', 'xmlns:ns1="http://www.abc.com"')
    from xample
    

    As a result:

    ABC
    XYZ
    

    So yes, both of these are in the same namespace.

    There are definitive sources on namespaces
    XML 1.0 http://www.w3.org/TR/REC-xml-names/
    XML 1.1 http://www.w3.org/TR/xml-names11/

    HTH,

    Chris

Maybe you are looking for

  • AppleScript to move files that are old &gt; 30 days

    Hi, I'm looking for a folder action script to move files that are older than 30 days of my 'NEW' file to: files volumes, NEW to my 'OLD' files folder: files/volumes/OLD folder.  I searched and found only the scripts to remove old files using the 'upd

  • I installed Firefox, Mozilla - 16.0.0.305 NPAPI but Flash Player does not appear in my Plug-ins

    Firefox version is 35.0.1. Although I can play Flash content on certain sites, others return messages such as "video content Camtasia Studio presented here requires a more recent version of Adobe Flash Player. If you are - activate it you using a bro

  • Dynadock power management problem

    I have a Dynadock which I connected with an another equiptment using the serial port.The connection was fine at the beginning (after startup), but it is lost after that my laptop is active for a while.Once I got loose and anchor the Dynadock, the con

  • ReadyCloud account

    Hallo. I'm new to the community and also new to Nas storage system and I need your help. I created my Netgear account and registered the product. I; Im trying to connenct to the page ReadyCLOUD using my Netgear account. The 104 Nas is discovered, but

  • Create a user account specific for the base game.

    I would like to be able to create a user account to install a basic version of a game that has expansion packs installed on a different user account. is this possible?