Set and get the value of indicator of ActionScript

Hello

I have an Actionscript class

the util package
{

public class flag
{
public var viewNamesample:String;
public function getFlagvalue (): String {}
Return viewNamesample;
}

}
}

In one of my MXML file I do this use of above Actionscript class and defining its value as

< mx:script >
public var flag: flag = new Flag();

If()
flag.viewNamesample = "A";

on the other
flag.viewNamesample = "Two";

< / mx:script >

How can I access this value of flag.viewNamesample in my MXML another file?

Please tell me.

It is difficult to know exactly what you are trying to achieve, but maybe it will be you point in the right direction



http://www.Adobe.com/2006/mxml '.
Layout = "vertical".
verticalAlign = "top".
"backgroundColor ="white"xmlns:local =" * ">
   
   
        [Bindable]
public var flag: flag = new Flag();

protected function button1_clickHandler(event:MouseEvent):void
{
flag.viewNamesample = "A";
}
           
protected function button2_clickHandler(event:MouseEvent):void
{
flag.viewNamesample = "Two";
}

]]>
   
   
   
       
       
       
   

   

package
{
public class flag
{
[Bindable]
public var viewNamesample:String;
       
public function getFlagvalue (): String {}
Return viewNamesample;
}
       
       
}
}


http://www.Adobe.com/2006/mxml">
   
   
        [Bindable]
public var flag: String;
]]>
   

   
   
   

Tags: Flex

Similar Questions

  • Set and get the value of the item application in Javascript

    Hello guys,.
    Can you tell me an example how to set and get the value of the application element in Javascript, and how do I check if the value of the point of application is null in Javascript, too. I have read a few replies, but nothing worked (e.g. $x (app_item), $v (app_item), $s (app_item) and so on).

    Thanks in advance!

    To get the value of an element, use the following syntax:

      alert("The value of MY_TEST_ITEM is " + $x("MY_TEST_ITEM").value);
    

    to set the value that you have just made

      $x("MY_TEST_ITEM").value="Set to this value";
    

    Keep in mind however that you need to send the page in order so that he could be picked up by APEX - javascript is CLIENT SIDE, ONLY! Either that or use AJAX to put on the side server.

  • AF:iterator and get the values of a particular line

    Hello

    I use af:iterator to browse a set of results in the original Version.

    < af:iterator binding = "#{backingBeanScope.backing_subscribe.i1} '"
    value = "#{bindings." SubscriptionPublicView1.collectionModel}.
    var = "row".
    ID = "i1" >

    At each iteration, I display a row of data since my VO in a box.

    Each box has a Link command.

    In general, the bean of my support, I do something like this to get an iterator attribute out of sight.

    Line currentRow = getIterator("SubscriptionPublicView1Iterator").getCurrentRow ();
    int sid = (Integer) currentRow.getAttribute ("Sid");


    However, in this case, I always get the "sid" from the first record in the collectionModel and not the "sid" which corresponds to the commandLink selected by the user.

    What is the best way to do when using an af:iterator?

    Thank you

    Joel

    Joel,
    Take a look at this video: http://download.oracle.com/otn_hosted_doc/jdeveloper/11gdemos/classic_api_mistakes_part2/classic_api_mistakes_part2.html
    In there, Frank shows how to use af:iterator and af:forEach and to avoid warnings.

    It seems that you do not set the current line, so that you always get the value of the first row.

    Timo

  • Set and get the custom text Sceen Reader

    Hi all

    I know not how to get and set the legend, the name & tool tip a field but I was wondering is there a way to set and or get whats in the custom screen reader text.

    I want to do this javascript example for the ToolTip his

    fieldname.assist.toolTip.value

    Thank you

    Brad

    Hi Apemancity,

    You can use fieldname.assist.speak.value

    Thank you

    Rous

  • compare a value to the range of values in the table and get the value of corr

    Hi all

    I'm a begineer and glued at one point.
    I have a table that has 2 fields
    number of days and the number of cards with values such as:

    number of days number of cards 20 1

    40 2
    60 3
    I have a SELECT query that returns the number of days, I need to get the number of cards based on the number of days.
    As if the select returns 30 I should get 1 as the number of cards, if select returns 48 I should get 2 and so on.

    Please help me

    Thanks and greetings
    SELECT MAX(num_of_cards)
    FROM   your_table
    WHERE  num_of_days <= X
    
  • Get the value of the field notes.

    Hi all

    I just started with powercli.

    I want to set and get the value of the field notes.

    Put in it, is done by, virtual Set-machine - VM "Name VM" - Description "text1 text2 etc." - confirm: $false

    But how to get the value of the field notes? I it could be done like: Get-VM-name 'VM ' | Get-Annotation CustomAttribute - Description

    However, I get an error:

    Get-Annotation: 08/07/2012 11:11:28 Get Annotation found Cu

    stomAttribute with the name "Description".
    On line: 1 char: 44
    + Get - Vm "klj - bastionhost | Get-Annotation < < < <-CustomAttribute description
    n
    + CategoryInfo: ObjectNotFound: (Description: String) [Get-annotated
    tion], VimException
    + FullyQualifiedErrorId: Core_ObnSelector_SelectObjectByNameCore_ObjectNo
    tFound, VMware.VimAutomation.ViCore.Cmdlets.Commands.GetAnnotation

    kim look

    You can get the field notes VM with:

    Get - VM | Select-Object - Property Name, Description

  • How to get the value of messageStyledText that is present in the other RN

    Hello

    I have xxcompscore messageStyledText in the region 1 (separate controller) and xxobjscore messageStyledText in the region.2 (separate controller).

    The two values are doubles.

    My requirement is to get that value from another region (layout) and adds that the values and display in the RN.

    How to do this, I tried a lot but I get error NullPointerException.

    HI San,

    According to my understanding, you have the following requirement.

    xxcompscore messageStyledText in the region1 (separate controller) - Say controller is XxxRN1CO
    xxobjscore messageStyledText in region.2 (separate controller). -The controller is XxxRN2CO
    Page Layout RN - Say controller is XxxPageLayoutRNCO

    If you try to get the value of the region1 - PR Noire2 and display in Pagelayout cannot be achieved by the way you write the code...
    What follows is drawn sequence of the controller...
    1 XxxPageLayoutRNCO--> processRequest
    XxxRN1CO--> processRequest
    XxxRN2CO--> processRequest

    XxxRN2CO--> processFormRequest
    XxxRN1CO--> processFormRequest
    XxxPageLayoutRNCO--> processFormRequest

    So you can't get the session values configured in XxxRN1CO--> processRequest or XxxRN2CO--> processRequest in XxxPageLayoutRNCO--> processRequest.

    You need to take the following approach to get these values.

    -> If the underlying VO for the region1/region.2 is executed in PageLayout controller or controller of the region1
    then you can get the required values of the underlying attributes of your calculation VO do and set the value of TotalScoreText
    on the other
    If executed in the level controller VO region then you will need to run these vo also in pageLayout controller and
    get the values of the attributes of VO and do your math and set the value to TotalScoreText

    Let me know if you need assistance.

    Kind regards
    RAM

  • How set the value of a LOV in CO prgramatically and get the Pkey value?

    Hello

    I need to get the Primaykey LOV will return and set a value for a LOV, say ItemLOV in a page through CO. How can I achieve this?

    Req:
    1. set the nom_element, say "DELL_1618" so that the page displays this in the LOV.
    2 get the PK value returned by LOV in the backend in an attribute of VO say Item_ID, ' 100009881'.

    Thank you
    Sicard.

    Hi Santosh,

    Sorry, I responded to general LOV scenario, but want to put it right,

    You need run your LOV query to the controller for the "DELL_1618" element using the prepared command, get the value of the value display and Id and assign the LOV and FormVlaue in the PR of the controller.

    Kind regards
    Out Sharma

  • get the value of the attribute of Advanced Table &amp; set

    Hello

    I am a beginner in the OPS, that's why your help is very appreciated. _


    Can one advice me please how I can get and set values for the attributes in Advanced Tabel.

    I have an advanced array (dtls_advance_tbl) that contains 5 columns and I want to get the value of the attribute (class_1) and change the value of the attribute (class_1_image) on this basis.

    Please advice the code and what class / method I have to write it (I mean it is in the controller / VOImpl)?

    Thanks in advance.

    Kind regards... Ashraf

    No ok ok, so no need to go to rowreference or PPR.

    change the code below and the writeh in the PR of the extended controller method

    OAViewObject vo = (OAViewObject) getEmployeeSummaryVO1 ();
    Line EmployeeSummaryVORowImpl = null;

    This tells us the number of lines that were recovered in the
    Rowing together and away the extra lines as some of the
    other methods 'get County '.

    int fetchedRowCount = vo.getFetchedRowCount ();

    We use a separate iterator - even if we could scroll the
    the lines without it - because we do not want to influence the currency of the line.

    RowSetIterator deleteIter = vo.createRowSetIterator("deleteIter");

    If (fetchedRowCount > 0)
    {
    deleteIter.setRangeStart (0);
    deleteIter.setRangeSize (fetchedRowCount);

    for (int i = 0; i)< fetchedrowcount;="">
    {
    line = (EmployeeSummaryVORowImpl) deleteIter.getRowAtRangeIndex (i);

    For performance reasons, we generate ViewRowImpls for all
    Objects in view. When we need to get an attribute value,
    We use the accessors appointed instead of a generic string search.

    Number primaryKey = (Number) row.getAttribute ("EmployeeId"); / / Get two rows here at a time when you want to compare

    Number primaryKey = row.getEmployeeId ();

    If (make the comaprison here)
    {
    write your logic here
    break; only one selected line in this case
    }
    }
    }

    deleteIter.closeRowSetIterator ();

    Thank you
    Pratap

  • How to get the value of viewattribute and how to assign the text field. URG

    Hi all,
    I created messagestyled text programmatically and I want the value of viewAttribute.
    I don't know how to define the instance of the view and display attribute.

    I tried this way, it is what is called the vo class but after that i dnt know how to set

    Here the code that I used...

    (1) I create the messagestyled text
    OAFormattedTextBean cctextbean = (OAFormattedTextBean) pageContext.getWebBeanFactory () .createWebBean (pageContext, FORMATTED_TEXT_BEAN, OAWebBeanConstants.VARCHAR2_DATATYPE, "CCText");

    OAMessageStyledTextBean ccidbean = (OAMessageStyledTextBean) pageContext.getWebBeanFactory () .createWebBean (pageContext, MESSAGE_STYLED_TEXT_BEAN, OAWebBeanConstants.VARCHAR2_DATATYPE, "CCId");

    (2) and I called the view object
    OAViewObject ccview = (OAViewObject) AM.findViewObject ("CmpnyDetVO1");

    (3) I want to set the view instance and viewattribute using code. This stage i dnt know how to define.

    (4) I want to know, how to get the value of the attribute to display and how to set the value to the messagestyled text field.

    I'm new to OFA. It's Urgent.

    Thanks in advance
    Fabrice

    Hello

    use
    Import oracle.jbo.Row;

    OAViewObject ccview = (OAViewObject) AM.findViewObject ("CmpnyDetVO1");
    Line line (Row) = ccview.first ();
    Test String = (String) row.getAttribute ("");

    then to set the value of the text of messagestyled

    OAMessageStyledTextBean bean = (OAMessageStyledTextBean) webBean.findindexedchildrecursive ("CCId");
    bean.setText (test);

    Thank you
    Gerard

    Published by: Gauravv on August 4, 2009 09:38

  • How to get the value of the property and the hierarchy specified in a global property, by javascripts

    Hi DRM team:

    I want to get a property value and precise when the hierarchy from. So, I thought that LocalNodeObjects method GetReferenceInHier (hierAbbrev), but the question is coming, I'm working on a global property, node. GetReferenceInHier (hierAbbrev) is not available. How can I get the value of the specified node hierarchy?

    Thanks for any response.

    Jim

    Hi Jim.cyciopes

    Try this-

    var worm is node. Version;

    var hier_ref = worm. HierByAbbrev ("name of your hierarchy");

    var node_ref is hier_ref. NodeByAbbrev (node. ABBREV);

    {if(node_ref!=null)}

    var propval is node_ref. VarValeurProp ("YourPropertyName");

    }

    Return propval;

    Thank you

    Denzz

  • [JDev12c, ADF] How to get the value of a field from the selected line in af:table and...

    Hallo,

    I want to double click on a line of an af:table to call a page that displays a form (based on a View object) with the details of the selected line.

    I need to go to the second page the value of a field on the line that is selected on the first page.

    How can I do this? In particular, how can I get the value of a field from the selected line? How can I call the second page on double-click on the af line: table?

    Thank you

    F.

    Why would user, you need to pass a value of the line to the shape?

    The framework selects the line you want to display in the form. All you have to do is to show the form with the selected line. It is the framework automatically as long as you use e vo even the same data control.

    Timo

    Post edited by: Timo Hahn
    And the handling double-clicks is described here http://www.oracle.com/technetwork/developer-tools/adf/learnmore/56-handle-doubleclick-in-table-170924.pdf

  • installed Acrobat DC and get the error indicating the serial number is valid but cannot find any product calling on my computer

    installed Acrobat DC and get the error indicating the serial number is valid but cannot find any product calling on my computer

    As indicated, with an upgrade (apparently what you bought) you will get a request for both the new S/N in the old S/N - assuming that a qualifying product is not installed).

  • How to get the value of the outputtext in javascript and send it to backing bean

    Hi Experts ADF,

    JDev Version 11.1.1.7.0

    I have the following: the value of the outputtext must be treated in javascript and the serverlistener method has the same value. I founded this value returns a string that wshould see the mouseover NIJ.

    Help, please. Thanks in advance.

    < af:column sortProperty = "#{bindings." OrderProposalReadClient.hints.exceptions.name}.

    filterable = "true" sortable = "true".

    headerText = "#{suiviewBundle.EXCEPTIONS} '"

    ID = "c16" >

    < af:outputText value = "#{row.exceptions}" id = "ot32" clientComponent = "true" > "

    < af:clientListener type = "mouseOver".

    method = "customJsFunction" / >

    < af:serverListener type = "mycustomserverEvent".

    Method="#{pageFlowScope.ChangeOrderProposalBean.handleServerEvent}"/ >

    < / af:outputText >

    < / af:column >

    JavaScript

    < af:resource type = "javascript" >

    var customJsFunction = function (event)

    {

    var exceptiondata = AdfPage.PAGE.findComponentByAbsoluteId ('ot32');

    AdfCustomEvent.queue ();

    Returns true;

    }

    < / af:resource >

    BackingBean

    public String handleServerEvent(EC ClientEvent)

    {

    Please let me know how to get the value that javascript code sends here.

    Let's say javascript sends the value of outputtext as "001".

    So, I have to check "001" in my list and return a value that appears on mouseover.

    }

    Kind regards
    Roy

    Hello, Roy.

    To use the value on another component of the user interface, I shows an example:

    -code of the page

    shortDesc = "shortDesc" >

    method = "customJsFunction" / >


    -the javascript code

    var customJsFunction = function (event)

    {

    var exceptiondata = event.getSource ().findComponent("ot32").getValue ();

    AdfCustomEvent.queue (event.getSource (),

    "mycustomserverEvent,"

    {param1:exceptiondata},

    (true);

    Returns true;

    }

    -OutputTextCase11.java

    public void handleServerEvent (EC ClientEvent)

    {

    String param = (String) ce.getParameters () .get ("param1");

    RichOutputText outputText = (RichOutputText) ce.getComponent () .findComponent ("ot1");

    outputText.setShortDesc (param);

    outputText.setValue (param);

    AdfFacesContext.getCurrentInstance () .addPartialTarget (outputText);

    }

    I hope this helps you.

    RFH.

  • Starting from two data tables, how do you get the values in two columns using values in a column (values get col. If col. A is not null values and get the pass. B if col. A is null)?

    Two tables provided, how you retrieve the values in two columns using values in a column (the pass get values. If col. A is not null values and get the pass. B if col. A is null)?

    Guessing

    Select nvl (x.col_a, y.col_b) the_column

    from table_1 x,.

    table_2 y

    where x.pk = y.pk

    Concerning

    Etbin

Maybe you are looking for