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

340 questions
3
votes
2 answers

symfony2 form multiple select with arraycollection

I would like to create a form to edit my users. Users and roles connected with ManyToMany. In UserUsers entity I have a $roles variable which is ArrayCollection: public function __construct() { $this->roles = new ArrayCollection(); } On my form…
lordjancso
  • 135
  • 2
  • 2
  • 10
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
  • 151
  • 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,697
  • 6
  • 48
  • 60
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
  • 250
  • 3
  • 12
2
votes
0 answers

Symfony 6 - Error while inserting a new Entry with a ManyToMany Relationship

I am currently working on a symfony 6 project where I came across the following problem: I have to entites "Article" and "ColorPalette". The relationship between the both of these is a ManyToMany Relationship. Now I have a form for creating new…
schwaluck
  • 115
  • 9
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
1 answer

Prevent Doctrine from using ArrayCollection for relations

Is there a way to prevent Doctrine from using array collections when fetching relations ? The goal is to ban ORM code (includes) from the entities (Domain layer), so layers are independant, I'm playing with the clean architecture. I have this…
AR7CORE
  • 268
  • 1
  • 8
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,351
  • 6
  • 61
  • 98
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
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
  • 826
  • 7
  • 21
2
votes
2 answers

Doctrine2 ArrayCollection

Ok, I have a User entity as follows
Optimus
  • 1,703
  • 4
  • 22
  • 41
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
  • 4,493
  • 2
  • 20
  • 35
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
  • 2,791
  • 3
  • 26
  • 55
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
  • 1,043
  • 2
  • 19
  • 34
1 2
3
22 23