Set the property to an XML string

Hi all

An another newbie question, sorry. I'm trying to set a certain XML attribute before adding it to a dataprovider of datagrid without too much luck. Here is the code I'm working on that does not work:

var newType:XML = < type_equipement

equip_type_id =""

equip_manufacturer_id =""

STR_NAME = "Click to add a new type" / >


newType.attribute ('equip_manufacturer_id') = dgMfg.selectedItem.@equip_manufacturer_id;
dgType.dataProvider.addItem (newType);

Basically, I'm defining the Mfgid before it is added to the grid type. I mean, it's "Target of assignment must be a reference value".

Any ideas?

Thank you

Rick

attribute() returns an attribute and cannot be used to define an attribute.

Use .@myattribute.

If this post answers your question or assistance, please mark it as such.

Greg Lafrance - Flex 2 and 3 certified ACE

www.ChikaraDev.com

Flex / development, training, AIR and Support Services



  
    
          
          
        ;
      private var xml2:XML =
        
          
          
        ;

      [Bindable] private var xlc:XMLListCollection;
      [Bindable] private var xlc2:XMLListCollection;

      private function init():void{
        xlc = new XMLListCollection(xml..equipment_type);
        xlc2 = new XMLListCollection(xml2..equipment_type);
      }

      private function addNew():void{
        var newType:XML = 
        newType.@equip_manufacturer_id = dgMfg.selectedItem.@equip_manufacturer_id;
        dgType.dataProvider.addItem(newType);
      }
    ]]>
  
  
  
    
      
    
  

Tags: Flex

Similar Questions

  • Can I set the property to any system of my application

    Hello, good afternoon.

    I have an application called has, can I set the property to any system to my app has? so that whenever I want to start or stop my application has from other applications, I need to check this property value sytem and inspiring that I need start or stop my application has.

    Note: if there is no option, suppose I put a 'Start' at my request other applications when trying to stop this application hasthe property system, I need to change this property value of the system up to request A leave of "start" to "stop". "" ""

    Please let me know clearly weather it is possible or not, if possible how can I do this?

    You can use RuntimeStrore and the status of the Application and define the Golbal events and other application B using the Golbal headphones you can stop the Application A.

  • How to set the property to the parameter out

    Hi all
    I want to set a property to the parameter out in the application process.
    If the parameter has value, then I need the column with the value on a page.
    If the parameter out is not having a value, then I need to hide the columns on a page.

    I write the below code for this, but I did not get value and also the column appeared in the Page.

    ' Public Sub processRequest (pageContext OAPageContext, OAWebBean webBean)
    {
    super.processRequest (pageContext, webBean);
    Am = (XxcustdtlsmainAMImpl) pageContext.getApplicationModule (webBean) XxcustdtlsmainAMImpl;

    If (PageContext.GetParameter ("PpcustID")! = null)
    {
    String vpID = pageContext.getParameter ("PpcustID");
    System.out.println ("cust in PR trxn id:" + vpID);
    am.passTocustlinetrxn (vpID);
    }
    If (pageContext.getParameter ("PCustomID")! = null)
    {
    If (PageContext.GetParameter ("PbtchID")! = null)
    {
    If (PageContext.GetParameter ("POrdNum")! = null)
    {
    If (PageContext.GetParameter ("PInvceNum")! = null)
    {
    String vcustoID = pageContext.getParameter ("PCustomID");
    String vOrdNums = pageContext.getParameter ("POrdNum");
    String vInvNum = pageContext.getParameter ("PInvceNum");
    System.out.println ("cust in drill PR id:" + vcustoID);
    am.srchCusttrxnlineupdatedtls (vcustoID);
    OAMessageStyledTextBean mInvBean = (OAMessageStyledTextBean) webBean.findChildRecursive ("InvoiceNum");
    OAMessageStyledTextBean mTextBean = (OAMessageStyledTextBean) webBean.findChildRecursive ("OrderNumber");

    if(mTextBean!=null)
    {
    mTextBean.setText (vOrdNums);
    } else
    {
    mTextBean.setRendered (Boolean.FALSE);
    }

    if(mInvBean!=null)
    {
    mInvBean.setText (vInvNum);
    } else {}
    mInvBean.setRendered (Boolean.FALSE);
    }
    }
    }
    }
    }
    }

    Thank you

    Hello

    Pls make the changes in public relations as given:

    If (pageContext.getParameter ("PCustomID")! = null)
    {
    If (PageContext.GetParameter ("PbtchID")! = null)
    {
    If (PageContext.GetParameter ("POrdNum")! = null)
    {
    If (PageContext.GetParameter ("PInvceNum")! = null)
    {
    String vcustoID = pageContext.getParameter ("PCustomID");
    String vOrdNums = pageContext.getParameter ("POrdNum");
    String vInvNum = pageContext.getParameter ("PInvceNum");

    am.srchCusttrxnlineupdatedtls (vcustoID);

    OAViewObject vo = (OAViewObject) am.findViewObject ("XxcustdrilldownVO1");
    Line row = vo.first ();
    System.out.println ("Hello I'm in spell112");
    row.setAttribute ("HideOrdNum", Boolean.TRUE);
    row.setAttribute ("HideInvNum", Boolean.TRUE);

    OAMessageStyledTextBean mInvBean = (OAMessageStyledTextBean) webBean.findChildRecursive ("InvoiceNum");
    OAMessageStyledTextBean mTextBean = (OAMessageStyledTextBean) webBean.findChildRecursive ("OrderNumber");

    if(mTextBean!=null)
    {
    System.out.println ("I'm in passivation");
    mTextBean.setValue (pageContext, vOrdNums);
    }
    if(mInvBean!=null)
    {
    mInvBean.setValue (pageContext, vInvNum);
    }

    Concerning
    Meher Irk

  • How to set the property node maximum xscale for several scale XY Chart

    Hello

    I use a graph XY with three X axis and three scales of axis Y to draw the three sets of data. This works well.

    What I do now is to set the Xscale.Maximum property node for one of the x-axis (the other two autoscale). If I click right in the (Create Blockdiagram; Node property; X scale; Maximum) I can not choose what x-axis I want to put the Maximum for.

    So my question: how to select a specific axis allows you to set the XScale.Maximum property node when having several axes?

    Thank you for your help, any suggestions are appreciated!

    Hello

    After some more research and experimentation, I found that using the scale property X Active I can determine/set for which the XScale.Maximum Xscale is used.

    This solved my problem.

    I hope someone else can save themselves a few hours with this thread!

    Thank you

  • How to set the property iepe in labview signalexpress

    Hi, I have Labview 8.5 here connected to a USB-9234. We try to use the accelerometer that should be configured as IEPE, I tried like a post on this forum: http://forums.ni.com/ni/board/message?board.id=100&message.id=1976&query.id=143505#M1976

    but I can't find it in the Labview signalexpress or when I watched as the address in this post.

    Here's my search addess: C:\Program NIUninstaller Instruments\LabVIEW 8.5\vi.lib\DAQmx,is than at the time?

    Hi Lester14,

    To configure your as IEPE accelerometer, you'll want to do go in LabVIEW, rather than trying to navigate to it in C:\Program Files (you will need a property node that cannot be easily navigated to - the other post on the forum where this has been mentioned talks about using DAQmxBase that uses screws to set this property rather than a property node).  I think that all the information you need is in This KB.  Let me know if you need help!

  • Set the property record updateble / no updateble dynamically

    Dear friends,

    When I run the query in the form of oracle data is retrieved and displayed but I want to set the record the record recoveries property (updateble / no updateble) based on a value of text element in the file.

    How do we establish who and in what trigger.


    Thanx

    Manish Manyal

    Hello

    I think it's better trigger a Times-News-Record-Instance as after query fires only once, at the time of the query.

    François

  • How to set the property

    In my backingbean, I need set the Ant property value.

    How to do?

    Thank you.

    chk this
    http://juwit.blogspot.com/2009/11/calling-Ant-targets-programmatically.html

  • How to set the ID target in xml?

    Hi all

    I have read the documentation online here: call

    Unfortunately, I'm a bit confused as to where I put the target in my XML source identification code, and if I put target ID my application or I need to find somewhere.

    Thanks in advance.

    any help will be thanks and marked solutions.

    Kind regards

    Brandon

    It must be placed in your file of bar - descriptor.xml, the id is the one that you registered your package name, in the file of the bar - descriptor.xml.

    It's usually your reverse website, i.e. com..

  • Setting the property model length for Dashed/DottedStrokeStyle [JS CS4]

    I tried to create a custom stroke style. There is a property in the interface called length of model that does not have a counterpart in the InDesign CS4 (6.0) Object Model (DashedStrokeStyle entry):

    Style created in InDesign:

    My code. First part to try to read the properties of a style and see what InDesign uses (I know it is dotted vs annihilated, but the properties of both types follow the same paradigm). Second part to create a custom style:

    var thisDoc = app.activeDocument;
    Thispage var = thisDoc.pages [0];

    Reading an existing style:
    //
    var thisPremadeStrokeStyle = thisDoc.dottedStrokeStyles.item ("Crazy Dots");

    $.writeln (thisPremadeStrokeStyle);
    outputs: solve ("/ document [@name = \"test strokes.indd\"]/")

    $.writeln (thisPremadeStrokeStyle.toSource ());
    (' [' output: dotted-stroke-style[@name=\"Crazy Dots\"] ')

    $.writeln (thisPremadeStrokeStyle.getElements ());
    Poster: [object DottedStrokeStyle]

    $.writeln (thisPremadeStrokeStyle.getElements (.properties));
    outputs: undefined

    A new style of edge entry
    //
    thisDoc.dashedStrokeStyles.add ({name: "Crazy dash"});
    var thisNewStrokeStyle = thisDoc.dashedStrokeStyles.item ("Crazy dashes");

    thisNewStrokeStyle.patternLength = "0.5i";
    Object does not support property or method 'patternLength.
    //
    thisNewStrokeStyle.length = "0.5i";
    Object does not support the property or method 'length '.
    //
    thisNewStrokeStyledonut = "0.5i";
    Object does not support property or method 'range '.
    //
    // ???
    //
    thisNewStrokeStyle.dashArray = [0,0.0625, 0.125,0.125, 0.375,0.125];
    thisNewStrokeStyle.strokeCornerAdjustment = StrokeCornerAdjustment.DASHES_AND_GAPS;

    Style created by the above code:

    The document I want to do is entirely programmatically. I'm ready to first create styles in InDesign, export to a file StrokeStyles and import back into a document created programmatically (Although there are problems with this approach), but wanted to see if there was an alternative, first.

    It may just be a coincidence that your 0,0625 + 0.125 + 0.125 + 0.375 + 0.125 equals 0,8125?

    I think, if you enter these values in the UI, then replace 0,1825 by its double 0.3625 value, you will see your individual table values will double as well.

  • How to set the property on a orginOfOrder order REST

    Just started to work with the REST api and building on some harniess/poc test.

    What I have so far is the following:

    Result RestResult = RestComponentHelper.getPropertyValue ("/ atg/store/order/purchase/CartFormHandler", "order", null, mSession);
    String responseData = result.readInputStream ();

    This property returns back
    {'order': "order [type: default;]"} ID: o54180002; Status: INCOMPLETE. Transitional: false; profileId:24549804; ]"}


    I want to do is be able to set originOfOrder on the order.

    What you were doing in your code, it's that you have called the method CartFormHandler.getOrder () customer thru REST.

    If you want to set a value any order, you must write you still own method and call from your code.

    Peace
    Shaik

  • The analysis of an XML string

    Hi, I wonder if it is possible to skip creating a physics .xml file and parse the XML message I receive directly?

    normally, it takes

    builder.parse(fileConn.openInputStream());
    

    but it is not possible to open an InputStream on a string...

    ByteArrayInputStream built from String.getBytes () [or whatever we call.]

    It implements something like the idea of stringstream c ++.

  • Extract the contents of an XML string in offline mode

    HI gentlemen,

    Could you help me solve this problem? I had a string of Java (see below) read in a smart German eHealth card. I have to extract the tag values and put them in local variables for further processing in my Java module. How to move forward without connecting to a database, it is enough to analyze the source - the string variable? Note that the lines are separated by only 0x0A.
    <?xml version="1.0" encoding="ISO-8859-15" standalone="yes"?>
    <UC_PersoenlicheVersichertendatenXML CDM_VERSION="5.1.0" xmlns="http://ws.gematik.de/fa/vsds/UC_PersoenlicheVersichertendatenXML/v5.1">
        <Versicherter>
            <Versicherten_ID>X110101627</Versicherten_ID>
            <Person>
                <Geburtsdatum>19840717</Geburtsdatum>
                <Vorname>Johanna</Vorname>
                <Nachname>Düsterbehn</Nachname>
                <Geschlecht>W</Geschlecht>
                <StrassenAdresse>
                    <Postleitzahl>93055</Postleitzahl>
                    <Ort>Regensburg</Ort>
                    <Land>
                        <Wohnsitzlaendercode>D</Wohnsitzlaendercode>
                    </Land>
                    <Strasse>Sulzfeldstraße</Strasse>
                    <Hausnummer>7</Hausnummer>
                </StrassenAdresse>
            </Person>
        </Versicherter>
    </UC_PersoenlicheVersichertendatenXML>
    Thank you very much for your help,
    sincere friendships of

    Miklós HERBOLY
    java.lang.NoClassDefFoundError: XpathSampleClass (wrong name: XPathSampleClass)
    

    If you use my code sample in extenso, the class is named 'XPathSampleClass' (capital P), and of course the .class file must have the same name.

  • To set the property Insert allowed dynamically

    I'm putting the Insert allowed to true in the region of the child: submarkets from if flag stuck on the market: parent area is set to 'Y' IE blocked flag on the parent is checked.

    This is the authorized isert property used on the area of the child:
    #{jhsUserRoles['ADMIN, BR'] && bindings.BlockingRuleBlockingRuleStatus.inputValue =='In Process' && bindings.BlockingRuleMarketBlockedFlag.inputValue =='Y'}
    But it behaves conversely. When the blocked flag is unchecked (I can see the display attribute is set to 'n'), I could see the symbol more on region submarket. When blocked market flag is checked ((je peux voir l'attribut d'affichage correspondant a la valeur "Y"), so I couldn't see the symbol more on the market.) It is happening wheather I use BlockingRuleMarketBlockedFlag.inputValue == 'Y' or BlockingRuleMarketBlockedFlag.inputValue == 'n'. Can anyone suggest?

    Thank you, Pradeep

    Pradeep,

    You can create a dummy output on your page with this expression text to see how it evaluates?

    In addition, create a text out dummy for the parts of the expression: #{bindings. BlockingRuleBlockingRuleStatus.inputValue} and #{bindings. BlockingRuleMarketBlockedFlag.inputValue}.

    Note that you may need to use .attributeValue instead of .inputValue if you are using a link list with these attributes.

    Steven Davelaar,
    JHeadstart team.

  • Error "Cannot set the property 'innerHTML' undefined reference or zero" during the installation of Flash player 18.0.0.209

    Check the status of my modules I've seen "update" notice for flash player.

    I clicked the button to update and was taken at Adobe to start the process. I clicked on the "Download" button and the download of the installer has set and completed normally.

    I clicked on the file Installer downloaded and started the installation. Then this error message appeared (see snapshot). By pressing 'Yes' or 'no' buttons causes the message reappear continually. I had to use the Task Manager to kill the process.

    MY version of FF is 39.0. The version of flash player that is 18.0.0.209. OS is W7 Home Premium (update).

    I have to wait until Adobe releases another version? Thanks in advance for your help.

    Hi, can try you if the installation works with the offline installation program, you can download on http://www.adobe.com/products/flashplayer/distribution3.html (for use of firefox windows-exe for plugin-based browsers)?
    otherwise, you may contact adobe technical support to get their product to work...

  • ERROR: UIObjectPrivate::notifyMessage: unable to set the property

    I get this error now in the console (by pulling down the menu definition) after the addition of the ActionItem and this error (at the outbreak of the ActionItem to show this SystemDialog)

    Everything seems to work properly on the device, the icon image and everything.

    I have another menu ActionItems he never says this error before adding this ActionItem and I another SystemDialog that he never shows this error for.

    I was wondering what it could mean

    Thank you

    ActionItem {

    ID: reset

    imageSource: "icons/ic_clear_list.png.

    Title: qsTr ("Reset")

    onTriggered: {}

    resetPrompt.show)

    }

    }

    And the dialog box

    SystemDialog {

    ID: resetPrompt

    body: qsTr ("what you would like to reset?")

    confirmButton.label: qsTr ("whole table")

    customButton.label: qsTr ("cell widths only")

    onFinished: {}

    If (result is SystemUiResult.ConfirmButtonSelection)

    {

    resetWarning.show)

    } Else if (result == SystemUiResult.CustomButtonSelection)

    {

    app.resetCellWidths)

    }

    }

    }

    ignore it. It's just a warning in the console.

Maybe you are looking for