Questions tagged [arraycollection]

The ArrayCollection class is a wrapper class that exposes an Array as a collection in Flex which can be accessed and manipulated. Use this tag for questions related to arraycollection.

The ArrayCollection class is a wrapper class that exposes an Array as a collection that can be accessed and manipulated using the methods and properties of the ICollectionView or IList interfaces. Operations on a ArrayCollection instance modify the data source; for example, if you use the removeItemAt() method on an ArrayCollection, you remove the item from the underlying Array.

Reference

336 questions
3
votes
3 answers

Flex: Convert ArrayCollection to XML

In Flex, it's easy to convert the XML to Object and to ArrayCollection by using var decoder:SimpleXMLDecoder = new SimpleXMLDecoder(); decoder.decodeXML( xml ); But is there a good way to convert ArrayCollection to XML. I have search a while on…
maoanz
  • 121
  • 1
  • 5
  • 15
2
votes
3 answers

How to customize data-prototype in symfony2 form collections?

I've got a collection of hidden fields in my form.
  • (...)
I use jQuery (and data-prototype) to add new roles. The problem is that I would…
ioleo
  • 4,369
  • 5
  • 42
  • 59
2
votes
3 answers

Flex arraycollection getitemindex always return -1

I'm facing the same problem. Can some explain me with a example? My code is: var dataList:ArrayCollection = new ArrayCollection([{name:"alauddn"}, {name:"ansari"}]); private function getItemInd(event:MouseEvent):void{ var item:Object = new…
Alauddin Ansari
  • 232
  • 3
  • 12
2
votes
2 answers

Flex applying the sort/filter on an arraycollection without dispatching event

I have a object that is extended from arraycollection. This object has to access and manipulate the arraycollections source object. When this happens, the local sorted/filter copy of data goes out of sync with the source data. To line things up…
2
votes
2 answers

Flex - ArrayCollection - adding and removing a filterFunction

I am using Adobe Flash Builder 4 Premium. I have a mx:DataGrid and a s:TextInput, and I am trying to set up a search box that filters the DataGrid on each key press. This page shows a nearly perfect example of what I'm trying to do, except that I'm…
Travesty3
  • 14,336
  • 6
  • 52
  • 95
2
votes
2 answers

How to get rid of already selected items in combobox

Am having an issue with combobox duplications i have 10 autocomplete comboboxes with all having same dataprovider... suppose like this array collection public var costCenter:ArrayCollection = new …
vardit
  • 29
  • 6
2
votes
3 answers

Flex: Swapping two elements in Array Collection

What's the best-approach to swap to elements in a Flex Array Collection? I am binding a ArrayCollection as a dataprovider to combo-box. Selecting a row, should move the object to the top of the combo-box list, and move the top-object to selected…
Satish
  • 6,337
  • 7
  • 39
  • 62
2
votes
1 answer

How can I check if a value exists in my Object PersistantCollection?

My object "fields": array:4 [▼ 0 => Fields {#10900 ▶} 1 => Fields {#11222 ▶} 2 => Fields {#11230 ▼ -id: 8 -name: "Tier" -uuid: "5f60107fe4" -productgroup: PersistentCollection {#11231 ▶} -options: PersistentCollection…
user10800263
2
votes
1 answer

Select value of a DropDownList via actionscript in Flex 4

I'm sure this is a easy one but I've been searching for a while how to select a DropDownList element with actionscript. In this scenario, I'd like to be able to specify the selectedItem based either on ddlLabel or ddlData
Jivago
  • 816
  • 7
  • 21
2
votes
2 answers

Doctrine2 ArrayCollection

Ok, I have a User entity as follows
Optimus
  • 1,567
  • 4
  • 21
  • 39
2
votes
1 answer

Symfony: Filter ArrayCollection by associated entity id

I have a User entity and a Usecase entity. This 2 entities are associated by a ManyToMany association, but this association also holds another property, called "environment". To implement this relationship I also have an entity called UserUsecase…
iiirxs
  • 3,836
  • 2
  • 17
  • 30
2
votes
3 answers

clone doctrine ArrayCollection without reference

When I do $originalTags = $task->getTags(); $task->removeTag($tag1); then $tag1 is also removed in $originalTags. So the assignment of ArrayCollections is made by reference, how can I clone it to a new ArrayCollection?
Asara
  • 1,780
  • 1
  • 14
  • 42
2
votes
2 answers

Iterate or count ArrayCollection from twig

symfony 2.8 Ok, I have a Category entity which looks like this: class Category { // ... // /** * @ORM\OneToMany(targetEntity="Classified", mappedBy="category") */ private $classified; // ... // public function…
shaNnex
  • 883
  • 2
  • 14
  • 28
2
votes
1 answer

Symfony : How to sort ArrayCollection in a OneToMany relation (3 entities)?

I have a product which can has one or many tags. For a particular reason, I have 3 entities which correspond to : Product Tag ProductTag (relation) : I want to order by type my ArrayCollection of tags. This collection contains ProductTag…
Eve
  • 606
  • 1
  • 9
  • 24
2
votes
1 answer

doctrine2 ArrayCollection error

I am trying to follow the advice from the doctrine docs on this page - initialising a class member with the ArrayCollection. All works well for the example given in the docs. I'm trying to do it with an inherited class but get an error saying: Class…
waigani
  • 3,490
  • 5
  • 40
  • 68
1 2
3
22 23