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
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
  • 776
  • 2
  • 11
  • 32
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,570
  • 5
  • 46
  • 71
2
votes
1 answer

Fastest way to get an Objects values in as3

Ok, so I swear this question should be all over the place, but its not. I have a value object, inside are lots of getters/setters. It is not a dynamic class. And I desperately need to search an ArrayCollection filled with them. The search spans all…
2
votes
0 answers

add field on result of Dql

I'm trying to associate a field of my entity with a left join : $query = $em ->createQueryBuilder() ->select('Page, partial Template.{id,name}') ->from('WHCmsBundle:Page', 'Page') ->leftJoin('WHCmsBundle:Template', 'Template', 'WITH',…
user3646875
  • 143
  • 1
  • 9
2
votes
1 answer

Emberjs array controller

My route is: export default Ember.Route.extend({ model: function (params) { var blocks = this.store.find('block', {'objectId': 777}); this.controllerFor("blocks").set('model', blocks); return Ember.RSVP.hash({ …
Costa
  • 634
  • 3
  • 18
2
votes
6 answers

How Do I Add Value To All Previous Values In Array

Lets say I have the following array: my_array = [1, 5, 8, 11, -6] I need to iterate over this array and add the values prior to the current value together. An example will probably be easier to understand. I need to return an array that should…
James
  • 220
  • 2
  • 11
2
votes
2 answers

ArrayCollection error in Flex does not accept single XML nodes - alternatives?

i get this error when i retrieve an XML that only has 1 node (no repeating nodes) and i try to store in an ArrayCollection. -When I have MORE than 1 "name" nodes...i do NOT get an error. TypeError: Error #1034: Type Coercion failed: cannot convert…
Rees
  • 1,757
  • 9
  • 33
  • 50
2
votes
0 answers

Symfony2: Transform ArrayCollection to File

I get an error when trying to store a form with multiple file input. I have two entities: Inquiry and UploadedDocumend which are in a one-to-many relation. Here is the transformer for the uploaded files: public function…
2
votes
1 answer

Doctrine doesn't store ArrayCollection

I have an Entity that has a array field like this: ... /** * @var array * * @ORM\Column(name="tels", type="json_array") */ private $tels; ... I fill this using form and it fills correctly as after submit…
Ariyan
  • 14,760
  • 31
  • 112
  • 175
2
votes
1 answer

Using one data source for multiple datagrids in Flex3

I want to use one data source (e.g. an Array) for multiple Datagrids that have different filterFunctions attached and show different columns. First, I thought I use a very straight forward apporach: create the Array create an ArrayCollection for…
cboese
  • 104
  • 6
2
votes
1 answer

Named collection keys in ArrayCollection

I'm looking for a way to have an associative array keys for a ODM ArrayCollection. The entity has the following mapping: /** * $fields * * The entities fields * * @ODM\ReferenceMany(targetDocument="JobboardEntity\Entity\EntityField",…
AlexP
  • 9,906
  • 1
  • 24
  • 43
2
votes
1 answer

How to get the memory size of an ArrayCollection in Flex

I have built an image cache which is an ArrayCollection containing images. I have built functionality so that the cache can hold a max of 250 images. However, the images can be of a different size, so it's better to limit the total memory size of…
Maurits de Boer
  • 1,907
  • 4
  • 23
  • 30
2
votes
3 answers

Flex looping through object

Im trying to extend the flex ArrayCollection to be able to search for an object containing specific data and give it back. Here is my function: public function getItemContaining(value: String): Object { //Loop through…
Thonelon
  • 21
  • 1
  • 2
2
votes
2 answers

ArrayCollection: retrieve collection in a form

I made a web application with Symfony2, in which a User has an array correlation ManytoMany with the entity Mission. The User can upload the entity $product through a form, and one of the data passed by the form is the mission associated to the…
Gianni Alessandro
  • 860
  • 6
  • 11
  • 28
2
votes
1 answer

Array Collection, symfony: add a relation

I'm new of Symfony and php, and I'm trying to understand, without outcome, the array collection. Now I have two entity, Mission and User, in relation ManytoMany. I have a form to create new Missions and a form to create new User. Now I have to…
Gianni Alessandro
  • 860
  • 6
  • 11
  • 28