Flex Help - Accordion List - External XML - Duplicate Values

Hi, I am having what's got to be a really simple problem. You see: http://acompanydesign.com/wcr/11/
The menu headings come out fine, however the links within all duplicate. Can't seem to figure out why. Can you help?
MXML
<mx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
import mx.utils.ArrayUtil;
import mx.rpc.events.ResultEvent;
import flash.events.Event;
import mx.core.Application;
public var app:Object = mx.core.Application.application;
//public var myComp1:Menu1 = app.Menu1.newLink;
//[Bindable]
//public var navData:ArrayCollection;
[Bindable]public var str:String;
[Bindable] public var httpServiceURL:String;
[Bindable]public var xmlData:Object = new Object();
[Bindable]public var headingData:Object = new Object();
[Bindable]public var linkData:Object = new Object();
[Bindable]public var newLink:String;
private function init():void{
  httpServiceURL  = "properties1.xml?" + Math.round(Math.random() * ( 1+1000 ));
  srv.send();
private function getHeadings(evt:ResultEvent):void{
  xmlData = evt.result;
  headingData = xmlData.a_nav;
  linkData = headingData.heading[1];
private function getLinkObject(a:Number):Object{
linkData = headingData.heading[a];
return linkData;
public function getLinks(a:Number):String{
str = linkData.link[a].linkname;
return str;
public function StrapPrint(event:MouseEvent):void
newLink = event.currentTarget.getRepeaterItem();
app.VideoWindow.source = newLink;
app.VideoWindow.play();
//ExteriorUpperPrint(event)
//navigateToURL(new URLRequest(event.currentTarget.getRepeaterItem()), '_top')
]]>
</mx:Script>
<mx:HTTPService id="srv" url="{httpServiceURL}" resultFormat="object" result="getHeadings(event);"/>
<mx:Accordion id="accordion" width="193" height="380" x="0" y="0">
<mx:Repeater id="rep" dataProvider="{headingData.heading}">
<mx:VBox label="{rep.currentItem.title}" styleName="headerBox" backgroundColor="#fafafa" width="{rep.currentItem.width}" height="{rep.currentItem.height}">
<mx:Repeater id="rep2" dataProvider="{getLinkObject(rep.currentIndex).link}">
<mx:LinkButton click="StrapPrint(event)" label="{getLinks(rep2.currentIndex)}" />
</mx:Repeater>
</mx:VBox>
</mx:Repeater>
</mx:Accordion>
XML
<a_nav>
    <heading title="Category5" width="230" height="500">
<link linkname="Video 45">2</link>
<link linkname="Video 46">3</link>
<link linkname="Video 47">4</link>
<link linkname="Video 48">5</link>
<link linkname="Video 49">6</link>
<link linkname="Video 50">7</link>
<link linkname="Video 51">8</link>
<link linkname="Video 52">9</link>
<link linkname="Video 53">10</link>
<link linkname="Video 54">11</link>
<link linkname="Video 55">1</link>
    </heading>
    <heading title="Category 6" width="230" height="500">
<link linkname="Video 56">http://www.acompanydesign.com</link>
<link linkname="Video 57">http://www.acompanydesign.com</link>
<link linkname="Video 58">http://www.acompanydesign.com</link>
<link linkname="Video 59">http://www.acompanydesign.com</link>
<link linkname="Video 60">http://www.acompanydesign.com</link>
<link linkname="Video 61">http://www.acompanydesign.com</link>
<link linkname="Video 62">http://www.acompanydesign.com</link>
<link linkname="Video 63">http://www.acompanydesign.com</link>
<link linkname="Video 64">http://www.acompanydesign.com</link>
<link linkname="Video 65">http://www.acompanydesign.com</link>
<link linkname="Video 66">http://www.acompanydesign.com</link>
    </heading>
        <heading title="Category 7" width="230" height="500">
<link linkname="Video 56a">http://www.acompanydesign.com</link>
<link linkname="Video 57a">http://www.acompanydesign.com</link>
<link linkname="Video 58a">http://www.acompanydesign.com</link>
<link linkname="Video 59a">http://www.acompanydesign.com</link>
<link linkname="Video 60a">http://www.acompanydesign.com</link>
<link linkname="Video 61a">http://www.acompanydesign.com</link>
<link linkname="Video 62a">http://www.acompanydesign.com</link>
<link linkname="Video 63a">http://www.acompanydesign.com</link>
<link linkname="Video 64a">http://www.acompanydesign.com</link>
<link linkname="Video 65a">http://www.acompanydesign.com</link>
<link linkname="Video 66a">http://www.acompanydesign.com</link>
    </heading>
</a_nav>

Hi, I am having what's got to be a really simple problem. You see: http://acompanydesign.com/wcr/11/
The menu headings come out fine, however the links within all duplicate. Can't seem to figure out why. Can you help?
MXML
<mx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
import mx.utils.ArrayUtil;
import mx.rpc.events.ResultEvent;
import flash.events.Event;
import mx.core.Application;
public var app:Object = mx.core.Application.application;
//public var myComp1:Menu1 = app.Menu1.newLink;
//[Bindable]
//public var navData:ArrayCollection;
[Bindable]public var str:String;
[Bindable] public var httpServiceURL:String;
[Bindable]public var xmlData:Object = new Object();
[Bindable]public var headingData:Object = new Object();
[Bindable]public var linkData:Object = new Object();
[Bindable]public var newLink:String;
private function init():void{
  httpServiceURL  = "properties1.xml?" + Math.round(Math.random() * ( 1+1000 ));
  srv.send();
private function getHeadings(evt:ResultEvent):void{
  xmlData = evt.result;
  headingData = xmlData.a_nav;
  linkData = headingData.heading[1];
private function getLinkObject(a:Number):Object{
linkData = headingData.heading[a];
return linkData;
public function getLinks(a:Number):String{
str = linkData.link[a].linkname;
return str;
public function StrapPrint(event:MouseEvent):void
newLink = event.currentTarget.getRepeaterItem();
app.VideoWindow.source = newLink;
app.VideoWindow.play();
//ExteriorUpperPrint(event)
//navigateToURL(new URLRequest(event.currentTarget.getRepeaterItem()), '_top')
]]>
</mx:Script>
<mx:HTTPService id="srv" url="{httpServiceURL}" resultFormat="object" result="getHeadings(event);"/>
<mx:Accordion id="accordion" width="193" height="380" x="0" y="0">
<mx:Repeater id="rep" dataProvider="{headingData.heading}">
<mx:VBox label="{rep.currentItem.title}" styleName="headerBox" backgroundColor="#fafafa" width="{rep.currentItem.width}" height="{rep.currentItem.height}">
<mx:Repeater id="rep2" dataProvider="{getLinkObject(rep.currentIndex).link}">
<mx:LinkButton click="StrapPrint(event)" label="{getLinks(rep2.currentIndex)}" />
</mx:Repeater>
</mx:VBox>
</mx:Repeater>
</mx:Accordion>
XML
<a_nav>
    <heading title="Category5" width="230" height="500">
<link linkname="Video 45">2</link>
<link linkname="Video 46">3</link>
<link linkname="Video 47">4</link>
<link linkname="Video 48">5</link>
<link linkname="Video 49">6</link>
<link linkname="Video 50">7</link>
<link linkname="Video 51">8</link>
<link linkname="Video 52">9</link>
<link linkname="Video 53">10</link>
<link linkname="Video 54">11</link>
<link linkname="Video 55">1</link>
    </heading>
    <heading title="Category 6" width="230" height="500">
<link linkname="Video 56">http://www.acompanydesign.com</link>
<link linkname="Video 57">http://www.acompanydesign.com</link>
<link linkname="Video 58">http://www.acompanydesign.com</link>
<link linkname="Video 59">http://www.acompanydesign.com</link>
<link linkname="Video 60">http://www.acompanydesign.com</link>
<link linkname="Video 61">http://www.acompanydesign.com</link>
<link linkname="Video 62">http://www.acompanydesign.com</link>
<link linkname="Video 63">http://www.acompanydesign.com</link>
<link linkname="Video 64">http://www.acompanydesign.com</link>
<link linkname="Video 65">http://www.acompanydesign.com</link>
<link linkname="Video 66">http://www.acompanydesign.com</link>
    </heading>
        <heading title="Category 7" width="230" height="500">
<link linkname="Video 56a">http://www.acompanydesign.com</link>
<link linkname="Video 57a">http://www.acompanydesign.com</link>
<link linkname="Video 58a">http://www.acompanydesign.com</link>
<link linkname="Video 59a">http://www.acompanydesign.com</link>
<link linkname="Video 60a">http://www.acompanydesign.com</link>
<link linkname="Video 61a">http://www.acompanydesign.com</link>
<link linkname="Video 62a">http://www.acompanydesign.com</link>
<link linkname="Video 63a">http://www.acompanydesign.com</link>
<link linkname="Video 64a">http://www.acompanydesign.com</link>
<link linkname="Video 65a">http://www.acompanydesign.com</link>
<link linkname="Video 66a">http://www.acompanydesign.com</link>
    </heading>
</a_nav>

Similar Messages

  • Select List to check duplicate values before putting into another item

    Hi All ,
    I have a select list which contains .. country regions like ( APAC , EMEA etc ) .
    When I select any region , all the countries belonging to the region fills in another item .
    Suppose I select APAC , all the countries like India , Japan etc all fills in another item .
    But the problem is , if I select twice APAC , it fills duplicate values . Its filling duplicate values .
    I want to put validation or check for country value ...
    Suppose I select ' APAC ' it fills all APAC countries in another item . Now Again If I select APAC then it first check the item whether the country is there or not . If already APAC countries are there in the Item then it will show an error message that " Value already Exist ' .
    I am not able to fix this problem . it is creating duplicate values in database table .
    Please some one help me on this ..
    Thanks
    Prashant

    Patrick ,
    Sorry , I am correcting my words ..
    I am using Multiselect List ( P11_REGION) having regions APAC , EMEA , LAD etc .
    When I select Region like APAC , it fills all the countries of APAC and puts into a List .
    If again I select APAC , it again fills all the APAC countries and puts into a list which causes duplicacy .
    I have one Application Process which returns Country according to Region selection and puts in the list .
    So , what i want is when user twice selects region APAC , it searches the list whether APAC countries are there or not . If countries are already exists then it show an error otherwise Puts the countries in the list .

  • Unable to Enforce Unique Values, Duplicate Values Exist

    I have list in SP 2010, it contains roughly 1000 items.  I would like to enforce unique values on the title field.  I started by cleaning up the list, ensuring that all items already had a unique value.  To help with this, I used the export
    to excel action, then highlight duplicates within Excel.  So as far as I can tell, there are no duplicates within that list column.
    However, when I try to enable the option to Enforce Unique Values, I receive the error that duplicate values exist within the field and must be removed.
    Steps I've taken so far to identify / resolve duplicate values:
    - Multiple exports to Excel from an unfiltered list view, then using highlight duplicates feature > no duplicates found
    - deleted ALL versions of every item from the list (except current), ensured they were completely removed by deleting from both site and site collection recycle bins
    - Using the SP Powershell console, grabbed all list items and exported all of the "Title" type fields (Item object Title, LinkTitle, LinkTitleNoMenu, etc) to a csv and ran that through excel duplicate checking as well. 
    Unless there's some rediculous hidden field value that MS expects anyone capable of attempting to enforce unique values on a list (which is simple enough for anyone to figure out - if it doesn't throw an error), then I've exhausted anything I can think
    of that might cause the list to report duplicate values for that field.
    While I wait to see if someone else has an idea, I'm also going to see what happens if I wipe the Crawl Index and start it from scratch.
    - Jon

    First, I create index for a column in list settings, it works fine no matter duplicate value exists or not;
    then I set enforce unique values in the field, after click OK, I get duplicate values error message.
    With SQL Server profiler, I find the call to proc_CheckIfExistingFieldHasDuplicateValues and the parameters. After reviewing this stored procedure in content database,
    I create the following script in SQL Server management studio:
    declare @siteid
    uniqueidentifier
    declare @webid
    uniqueidentifier
    declare @listid
    uniqueidentifier
    declare @fieldid
    uniqueidentifier
    set @siteid='F7C40DC9-E5D3-42D7-BE60-09B94FD67BEF'
    set @webid='17F02240-CE04-4487-B961-0482B30DDA84'
    set @listid='B349AF8D-7238-419D-B6C4-D88194A57EA7'
    set @fieldid='195A78AC-FC52-4212-A72B-D03144DC1E24'
    SELECT
    * FROM TVF_UserData_List(@ListId)
    AS U1 INNER
    MERGE JOIN
                NameValuePair_Latin1_General_CI_AS
    AS NVP1 WITH (INDEX=NameValuePair_Latin1_General_CI_AS_MatchUserData)
    ON NVP1.ListId
    = @ListId AND NVP1.ItemId
    = U1.tp_Id
    AND ((NVP1.Level
    = 1 AND U1.tp_DraftOwnerId
    IS NULL)
    OR NVP1.Level
    = 2)
    AND NOT((DATALENGTH(ISNULL(NVP1.Value,
    = 0)) AND U1.tp_Level
    = NVP1.Level
    AND U1.tp_IsCurrentVersion
    = CONVERT(bit, 1)
    AND U1.tp_CalculatedVersion
    = 0 AND U1.tp_RowOrdinal
    = 0 INNER
    MERGE JOIN
                NameValuePair_Latin1_General_CI_AS
    AS NVP2 WITH (INDEX=NameValuePair_Latin1_General_CI_AS_CI)
    ON NVP2.SiteId
    = @SiteId AND NVP2.ListId
    = @ListId AND NVP2.FieldId
    = @FieldId AND NVP2.Value
    = NVP1.Value
    AND NVP2.ItemId <> NVP1.ItemId
    CROSS APPLY TVF_UserData_ListItemLevelRow(NVP2.ListId, NVP2.ItemId,
    NVP2.Level, 0)
    AS U2 WHERE ((NVP2.Level
    = 1 AND U2.tp_DraftOwnerId
    IS NULL)
    OR NVP2.Level
    = 2)
    AND NOT((DATALENGTH(ISNULL(NVP2.Value,
    = 0))      
    I can find the duplicate list items based on the result returned by the query above.
    Note that you need to change the parameter values accordingly, and change the name of NameValuePair_Latin1_General1_CI_AS table based on the last parameter of the
    proc_CheckIfExistingFieldHasDuplicateValues stored procedure. You can review the code of this stored procedure by yourself.
    Note that direct operation on the content database in production environment is not supported, please do all these in test environment.

  • How to reflect data changes back to the external XML

    Hi,
    In one of my application,
    I use data for (any of) my Flex component from an external XML (thru a HTTPService) request & a Java backend function provides the XML data.
    I bind the HTTPService result to XMLListCollection & I supply this data for the dataprovider for my component.
    So, if I make any data changes (by adding / creating new items ) in the component, it will be reflected in the XMLListCollection (resulting in adding / modifying new nodes)
    My Question is how to make these data changes reflect back in the external XML?
    - Sen

    Well not necessarily. While binding directly to the service in view is fast is
    also not very clean and reusable. Try to put your data inside model classes,
    view binds to those classes instead of the service. Also use a custom class to
    wrap your service and that gives you flexibility to change server properties or
    make 2 different calls with the same service. You need to write code yourself
    but in the end it will be easier to adjust changes. So when you load data you
    actually populate the model instead of bringing data straight to the view. This
    code usually gets executed inside a command class. So to be more specific:
    CustomService
    - var HTTPService
    function getData
    -- in here you have the service calling the get data method on the service
    function setData
    -- in here you have the service calling the save data on the server
    View
    var model:DataModel
    - controls binds to the model and display data from model
    - when click on save or whatever gesture you use for saving you dispatch an
    event with the new data.
    You  should use some MVC framework to do this for you..
    When event is dispatched the framework will create a command class instance and
    run it ...
    GetSaveCommand
    - var service:CustomService
    service.saveData(event.Data)
    service.getData()
    function result()
    function fault() - for the success or fault of the service call ...
    you can perform additional data transformation here id needed or employ the use
    of other class to do that if necessary ...
    Hope this makes sense. It is more work involved as you can see.
    Or you can go with 2 HTTPService instance in the view ...
    C

  • External XML data files to add values to drop down lists

    I would like to have external XML data files to add values to drop down lists in my form.. But when i create a data connection it is working properly only in the Preview in Livecycle Designer.. but not in the PDF form(Adobe Reader). Moreover im not sure whether it will work in the form manager..!plzz help me!
    Raghava Kumar V.S.S.

    Hi,
    For the case of raghavakumar, Is it really that I need to have LiveCycle Reader Extensions? Is there any other way that could do the same?
    Thank you

  • Help Required on Reading an External XML file in flex

    Hi Experts
    I want some help regarding flex.
    I want to read an external xml file in flex and want to show
    different datas in different components
    So bacically i need what is the procedure to call an external
    xml file and the procedure to catch the value of the xml tags and
    the option (options means ex: "id" or "type inside" "row" tag ) in
    side the xml file.
    Here is My xml file named "skn_organ.xml"
    <?xml version="1.0" encoding="UTF-8"?>
    <slide>
    <r>7</r>
    <c>8</c>
    <row id="A01" type="g">
    <organ>Skn</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    <row id="A02" type="g">
    <organ>Brt</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    <row id="A03" type="g">
    <organ>Spl</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    <row id="A04" type="g">
    <organ>Lnode</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    <row id="A05" type="g">
    <organ>Ske</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    <row id="A06" type="g">
    <organ>Lun</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    <row id="A07" type="g">
    <organ>Sgl</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    <row id="A08" type="g">
    <organ>Liv</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    <row id="B01" type="g">
    <organ>Gal</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    <row id="B02" type="g">
    <organ>Pan</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    <row id="B03" type="g">
    <organ>Ton</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    <row id="B04" type="g">
    <organ>Eso</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    <row id="B05" type="g">
    <organ>Sto</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    <row id="B06" type="g">
    <organ>Sto</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    <row id="B07" type="g">
    <organ>Sbl</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    <row id="B08" type="g">
    <organ>Col</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    <row id="C01" type="g">
    <organ>Skn</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    <row id="C02" type="g">
    <organ>Brt</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    <row id="C03" type="g">
    <organ>Spl</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    <row id="C04" type="g">
    <organ>Lnode</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    <row id="C05" type="g">
    <organ>Ske</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    <row id="C06" type="g">
    <organ>Lun</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    <row id="C07" type="g">
    <organ>Sgl</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    <row id="C08" type="g">
    <organ>Liv</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    <row id="D01" type="g">
    <organ>Gal</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    <row id="D02" type="g">
    <organ>Pan</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    <row id="D03" type="g">
    <organ>Ton</organ>
    <link>
    http://www.designgarbage.com</link>
    </row>
    </slide>

    Hi sanjivsutar,
    Put your xml file under folder "assets", the application demo
    is as following
    ====================================================================
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    initialize="init()">
    <mx:Script>
    <![CDATA[
    private var mainXML:XML;
    private var loader:URLLoader;
    private function init():void {
    loader = new URLLoader();
    loader.addEventListener(Event.COMPLETE, onComplete);
    loader.load(new URLRequest('assets/skn_organ.xml'));
    private function onComplete(evt:Event):void {
    mainXML = new XML(loader.data)
    out.text += "xml loaded, using E4X syntax: \n\n";
    out.text += "Row 1: "+mainXML.row[0]+"\n"
    out.text += "Row 6: organ = "+mainXML.row[5].organ+"\n"
    out.text += "Row(id='D02'): link =
    "+mainXML.row.(@id=="D02").link+"\n"
    ]]>
    </mx:Script>
    <mx:TextArea id="out" width="400" height="300"/>
    </mx:Application>
    ======================================================================
    Jeffrey

  • How to Edit the xml node value using flex from the front end UI

    Hi All,
    I am having a use case with flex 4.6
    1> To read the external xml file
    2> Display the tree structure in the front end UI
    3> Edit the node values of the xml file from the front end UI and save it back
    How to go about the above use case, any blogs or links on the above case will be help
    Thanks,
    Alok

    Check this is example:
    http://blog.flexexamples.com/2009/07/23/deleting-nodes-from-an-xml-object-in-flex/

  • Removing duplicate values from selectOneChoice bound to List Iterator

    I'm trying to remove duplicate values from a selectOneChoice that i have. The component binds back to a List Iterator on the pageDefinition.
    I have a table on a JSF page with 5 columns; the table is bound to a method iterator on the pageDef. Then above the table, there are 5 separate selectOneChoice components each one of which is bound to the result set of the table's iterator. So this means that each selectOneChoice only contains vales corresponding to the columns in the table which it represents.
    The selectOneChoice components are part of a search facility and allow the user to select values from them and restrict the results that are returned. The concept is fine and i works. However if i have repeating values in the selectOneChoice (which is inevitable given its bound to the table column result set), then i need to remove them. I can remove null values or empty strings using expression language in the rendered attribute as shown:
    <af:forEach var="item"
    items="#{bindings.XXXX.items}">
    <af:selectItem label="#{item.label}" value="#{item.label}"
    rendered="#{item.label != ''}"/>
    </af:forEach>
    But i dont know how i can remove duplicate values easily. I know i can programatically do it in a backing bean etc.... but i want to know if there is perhaps some EL that might do it or another setting that ADF gives which can overcome this.
    Any help would be appreciated.
    Kind Regards

    Hi,
    It'll be little difficult removing duplicates and keeping the context as it is with exixting standard functions. Removing duplicates irrespective of context changes, we can do with available functions. Please try with this UDF code which may help you...
    source>sort>UDF-->Target
    execution type of UDF is Allvalues of a context.
    public void UDF(String[] var1, ResultList result, Container container) throws StreamTransformationException{
    ArrayList aList = new ArrayList();
    aList.add(var1(0));
    result.addValue(var1(0));
    for(int i=1; i<var1.length; i++){
    if(aList.contains(var1(i)))
         continue;
    else{
    aList.add(var1(i));
    result.addValue(var1(i));
    Regards,
    Priyanka

  • Help needed in removing the duplicate nodes in an xml file

    Hi Friends,
    I need some help in removing the duplicates from a xml file using the Excel Spreadsheet. The xml Im using does not have any schema.
    Can some one please let me know the steps.
    Thanks a lot.

    Hi,
    I got the answer.
    Go to the developers Tab and click on export.
    Select the column where we want to delete the duplicates and click on Remove Duplicates from Data Tab.
    OR go to Home Tab> Conditional Formatting> High light Cell Rules> Duplicate Values. It will highlight all the duplicate values and then remove them manually.
    Thanks.

  • Flex/Actionscript External XML Scope Issue

    I am processing an external XML file in an event listener
    after the URLLoader is complete. The issue I'm having is that I
    want getProduct() to return the XML data. How can I get the data
    from the event listener getXML(). I tried creating a public
    variable outside of the functions but I can't access it from within
    the two functions.
    package messages
    import flash.events.Event;
    import flash.net.*;
    //Returns the current product
    public class FetchXMLData
    public static function getXML(e:Event):void {
    var myProduct:XML = new XML(e.target.data);
    trace(myProduct.product);
    public static function getProduct():XML{
    var loader:URLLoader = new URLLoader();
    loader.addEventListener(Event.COMPLETE,
    FetchXMLData.getXML);
    loader.load(new URLRequest("
    http://www.example.com/api"));
    var myProducts:XML = new XML();
    //get the value from the listener?!
    return myProducts;
    }

    I'm also running into this problem.  I'm running on Eclipse 3.4 w/ the WBEJ_plugin 3.2.
    Everyon else using this application isn't have a problem saving and the encoder doesn't mess up their SOAP requests, but each time I send, SOAP double-encodes the &, resulting in the error you described.  The problem I was running into was then dealing w/ that XML on a return SOAP, where I'm expecting well formed XML, and instead I get &amplt;WhateverName&gt;, which Flex reinterprets as &lt;, and not <.  I made an ugly hack for that that will just split/join any of those, but if there is a real reason why this is happening, that would be great to find out.

  • Need help-SQL with result format suppressing duplicate values

    I am trying to write a SQL which would select data from the below tables(in reality i have many other tables also) but I wanted to know how do i get the data in the format given below.
    The scenario is :-A training_plan can N no. of OBJECTIVES and EACH objective has N no.of activities
    Insert into TEST_TRAINING_PLAN
       (TPLAN_ID, TPLAN_NAME, TPLAN_DESC, T_PERSON_ID
    Values
       ('111', 'test_name', 'test_name_desc', '****')
    Objectives table:-
    Insert into TEST_TRAINING_OBJECTIVE
       (T_OBJECTIVE_ID,  T_OBJECTIVE_NAME,T_owner)
    Values
       ('10', 'objective1', '1862188559')
    Objective and Training Plan relationship table where TPLAN_ID is the foreign key.
    Insert into TEST_TP_OBJECTIVE
       (TPLAN_TOBJ_ID, TPLAN_ID, T_OBJECTIVE_ID, 
        REQUIRED_CREDITS)
    Values
       ('1', '111', '10',5)
    Objective and Activity relationship table where T_OBJECTIVE_ID is the foreign key from the TEST_TRAINING_OBJECTIVE table.
    Insert into TEST_TRAIN_OBJ_ACTIVITY
       (TOBJ_TRAIN_ACTIVITY, T_OBJECTIVE_ID, ACTIVITY_ID, IS_REQUIRED, STATUS,
        ACTIVITY_TYPE, ITEM_ORDER, IS_PREFERRED)
    Values
       ('1000', '10', 'selfstudy event', SS1, NULL,
        'Event', 0, 0);
    Insert into TEST_TRAIN_OBJ_ACTIVITY
       (TOBJ_TRAIN_ACTIVITY, T_OBJECTIVE_ID, ACTIVITY_ID, IS_REQUIRED, STATUS,
        ACTIVITY_TYPE, ITEM_ORDER, IS_PREFERRED)
    Values
       ('1001', '10', 'SQLcourse', 1, NULL,
        'Course', 1, 0);
    Insert into TEST_TRAIN_OBJ_ACTIVITY
       (TOBJ_TRAIN_ACTIVITY, T_OBJECTIVE_ID, ACTIVITY_ID, IS_REQUIRED, STATUS,
        ACTIVITY_TYPE, ITEM_ORDER, IS_PREFERRED)
    Values
       ('1002', '10', 'testSQL', 1, NULL,
        'test', 2, 0);
    COMMIT;
    firstname     emplid     Tplan name     Number of activities/credits completed(for TP)     Objective Name     Number of required activities/Credits (for objective)     Number of activities/credits completed(for objective)     activity  name     activity completion status
    U1     U1     TP1     5                         
                        OBJ1     4     3     C1     PASSED
                                       C2     PASSED
                                       C3     WAIVED
                                       T1     ENROLLED
                                       T2     ENROLLED
                        OBJ2     3     2          
                                       S1     ENROLLED
                                       S2     PASSED
                                       T3     WAIVED
    U1     U1     TP2                         C4     INPROGRESS
                   50     OBJ11     50     30     C11     PASSED
    **The second row where we have another training_plan record and accordingly all objectivesand their objective.**similarly ,i need to display many Training_plan records in such tabular format.Please help with the SQL query to select and display data in the above format
    If you want to suppress duplicate values in some of your results columns
    I am using toad 9.1 using Oracle 10g version 2

    Hi,
    You can use the BREAK command to suppress duplicate values.
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14357/ch12009.htm#SQPUG030
    (scroll down for an example)
    It's a 'SQL*Plus-ism', not sure if TOAD's capable to handle it.
    Simple example:
    HR%xe> break on department_name
    HR%xe> select l.department_name
      2  ,        e.last_name
      3  ,        e.first_name
      4  from     departments l
      5  ,        employees e
      6  where    e.department_id = l.department_id;
    DEPARTMENT_NAME                LAST_NAME                 FIRST_NAME
    Executive                      King                      Steven
                                   Kochhar                   Neena
                                   De Haan                   Lex
    IT                             Hunold                    Alexander
                                   Ernst                     Bruce
                                   Austin                    David
                                   Pataballa                 Valli
                                   Lorentz                   Diana
    Finance                        Greenberg                 Nancy
                                   Faviet                    Daniel
                                   Chen                      John
                                   Sciarra                   Ismael
                                   Urman                     Jose Manuel
                                   Popp                      Luis
    Purchasing                     Raphaely                  Den
                                   Khoo                      Alexander
                                   Baida                     Shelli
                                   Tobias                    Sigal
                                   Himuro                    Guy
                                   Colmenares                Karen
    Shipping                       Weiss                     Matthew
                                   Fripp                     Adam
                                   Kaufling                  Payam
                                   Vollman                   Shanta
                                   Mourgos                   Kevin
                                   Nayer                     Julia
                                   Mikkilineni               Irene
                                   Landry                    James
    Public Relations               Baer                      Hermann
    Accounting                     Higgins                   Shelley
                                   Gietz                     William
    106 rijen zijn geselecteerd.

  • Form with dropdown lists using external XML data - Distribution

    Hi all,
    I have created a form which has a series of drop down lists that populate dynamically from an external XML file. The option selected in the first list determines what data can be selected in the second, and so on.
    This functionality worked well within designer when I previewed the form - the problem I have is when I go to distribute. I (perhaps mistakenly) assumed that when I distributed the form, the external XML file would be absorbed into the main PDF, but this as not the case. Not only that, even if the XML file is in the same location as the published PDF, the dropdowns no longer populate with any data.
    Am I doing something wrong? Is there a setting to draw in external XML when a form is published? Is there another method to dynamically populate dropdowns that will provide me with a single PDF as a final product?
    Cheers,
    Lachlan.

    Hello Lachlan,
    Before distributing the form have you opened that form in Acrobat and imported the XML and saved it ?
    Thanks.
    Bibhu.

  • Search help - from a list of user  secific valu

    hi
    how to create a serach help for a select-options or parameters
    which contains only a list of user specified values not entirely of the DDIC values
    Thx for any replies

    For example ...
    DATA: ltab_fields LIKE help_value OCCURS 0 WITH HEADER LINE,
            BEGIN OF ltab_values OCCURS 0,
              feld(40) TYPE c,
            END OF ltab_values.
      create F4 for Molga.
    SELECT-OPTIONS : s_molga for t500l-molga.
    AT SELECTION-SCREEN  ON VALUE-REQUEST FOR s_molga-low.
      clear : ltab_fields[] ,
              ltab_values[].
      ltab_fields-tabname    = 'T500T'.
      ltab_fields-fieldname  = 'MOLGA'.
      ltab_fields-selectflag = 'X'.
      APPEND ltab_fields.
      ltab_fields-tabname    = 'T500T'.
      ltab_fields-fieldname  = 'LTEXT'.
      ltab_fields-selectflag = space.
      APPEND ltab_fields.
    *-- Fill values
      SELECT * FROM T500T WHERE spras = sy-langu
                          and   MOLGA in <b>r_molga.</b>
        ltab_values-feld = T500T-molga.
        APPEND ltab_values.
        ltab_values-feld = T500T-LTEXT.
        APPEND ltab_values.
      ENDSELECT.
    or Append the ltab_values with your own values .. first should be the value and the
    second should be the text for it ...
    Here I have r_molga which is a range ... and has user specified values ..
    say 10 , 11 , 12 , ......... 20
      CALL FUNCTION 'HELP_VALUES_GET_WITH_TABLE'
           EXPORTING
                fieldname                 = 'MOLGA'
                tabname                   = 'T500T'
               title_in_values_list      = 'Select a value'
                 show_all_values_at_first_time = 'X'
           IMPORTING
                select_value              = s_molga-low
           TABLES
                fields                    = ltab_fields
                valuetab                  = ltab_values
           EXCEPTIONS
                field_not_in_ddic         = 01
                more_then_one_selectfield = 02
                no_selectfield            = 03.
    Similarly for High .. just replace the LOW with High ...
    Hope this helps you ...

  • Help!  List Item Selected Value. . .

    I am trying to update a table based on a list item element that is selected in runtime, but I am struggling with how this is done in Oracle Forms. I have a list item box, which is populated by a column in TEST table. Based on which item is selected, I want to update a different column in TEST table for the selected item, when a user presses a button. Thanks for your help.
    David

    I can't get what excatly you want to do but ... Forms list item have 3 values: a label - what you see, the actual value - for the label you see, and Index value - the order number of the list element.
    Based on this you can update.
    1) Get the label trough the build-in Get_List_Element_Label
    2) Value simply can be referenced as :My_List_Item or use Get_List_Element_Value.
    3) The index? This is tough thing - you have to create your own function. However Get_List_Element_Count should return the count of the list items. And you need index in order to use 1) or 2)
    Write me a mail if you need some code/hints how to do it.

  • Duplicate Value comming while filter the Calculate Column in Sharepoint 2013 custom list. Thanks in advance

    

    Hi SanjayPradhan,
    Based on your formula, I could reproduce this issue in my SharePoint 2013 without any CUs.
    Then I created a new column using other types not Date&Time, add the formula =IF(ISBLANK([New Column]),"Employee","ExEmployee"), there is no duplicate values when filtering the calculated column. It seems that this issue only
    happens when judging Date&Time column in a calculated column.
    I tested in my SharePoint Online, and found I could not reproduce this issue on SharePoint Online.
    So, for your issue, please check whether you install any CUs 
    for your SharePoint 2013. And please install the latest CU for SharePoint 2013.
    You can find the latest CU for SharePoint as the link:
    http://www.toddklindt.com/blog/Lists/Posts/Post.aspx?ID=346
    Best Regards,
    Wendy
    Wendy Li
    TechNet Community Support

Maybe you are looking for

  • Can/May I append some classes to rt.jar

    I want to append one package to rt.jar provided by sun. I am able to do it with jdk1.4 and jdk1.5. But I cant do it in case of jdk1.6 or its updates. How can i do it? Is it legal to do it? Many Thanks,

  • Trying to upload content from previous i-phone to a newer model

    I am trying to set up my I-phone 4 and need to download the content from my old i-phone 3. The i-phone 4 does show up when conected to i-tunes via a cable to my mac. Can you help?

  • N95-2 restarting when keyboard is used to start WL...

    I have had this issue for a while now, but it was not until today when i figured out how it was happening Every time I use my Nokia Bluetooth keyboard to start the WLAN wizard my phone restarts. It works just fine when using the phones navigation but

  • Windows Mail/calendar on vista 64 compatability

    Before I go and shell out for a new outlook setup on my new home pc, wondering if it's possible to use/sync the included windows mail and calendar programs installed w/vista 64 w/the 755p?  just trying to save some headaches and I appreciate the help

  • How can I access the paypal shippping interface BEFORE I sell and item?

    I want to sell some stuff, but I don't know how much it would cost to ship via all the different ways my 'canadian' post office would do it. Is it possible somehow to access the paypal shipping center Before I ship an item before I list it? I'd like