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
1
vote
3 answers

AddItemAt() of arraycollection is not working in flex

I am trying to add an item in arraycollection which is sorted and filtered using addItemAt(). But addItemAt() is not adding item to the specified index. Do anyone knows the solution for the above problem.
monica
  • 11
  • 1
  • 2
1
vote
0 answers

Symfony 5.2 - Form - CollectionType - The form's view data is expected to be a "App\Entity\...", but it is a array

I have this error when I try to render the form AvisType: The form's view data is expected to be a "App\Entity\DTO\DocumentDTO", but it is a "array". You can avoid this error by setting the "data_class" option to null or by adding a view…
Zabon
  • 241
  • 2
  • 18
1
vote
2 answers

Flex 3: Empty keys in array collection... possible?

Does flex allow empty, or missing, keys within an array collection? For example, would the following code be okay: var myAC:ArrayCollection = new ArrayCollection; myAC.addItemAt("hi", 0); myAC.addItemAt("hola", 4); myAC.addItemAt("bye",…
Brds
  • 1,035
  • 3
  • 17
  • 37
1
vote
1 answer

Flex ArrayCollection - accesing object methods / attributes?

Maybe i didn't get the real meaning of the ArrayCollection, but first of all some code public var test1:AkwRep = new AkwRep(1,200,200,2,86,2010,2012,334342,"Typ","Standort","Testname","url","owner",true); // Objekte in ein Array public var…
ABLX
  • 716
  • 2
  • 7
  • 18
1
vote
1 answer

Different filtered dataProviders for the same data?

I have several lookup tables, some of which refer to or are relationships between others. For instance, I have membership type included inventory which has Membership ID and Inventory Type ID and is the amount of each Inventory Type that one gets…
1
vote
3 answers

Flex 3: removing items from an array collection when the user clicks a button and reflecting that in a repeater

I have an arrayCollection with the following structure: projectErrorsAC 0 project1number project2number position1number position2number project1name project2name student 1 …
Brds
  • 1,035
  • 3
  • 17
  • 37
1
vote
2 answers

flex 3: Can anybody help me optimize this array -> arrayCollection function?

I'm using a parent to pass a multi-dimensional array to a child. Structure of the array, named projectPositions is as follows (with example data): projectPositions[0][0] = 1; projectPositions[0][1] = 5; projectPositions[0][2] =…
Brds
  • 1,035
  • 3
  • 17
  • 37
1
vote
1 answer

CollectionType with mixed entry_type

In Symfony 3 / PHP 7, I need a form who accept an array of mixed type (string, int and array). "entry_type" param for CollectionType only accept a unique Type. How can I have a mixed type ? $builder ->add('value', CollectionType::class, array( …
Nivek
  • 11
  • 3
1
vote
1 answer

Removing Null values from an Array Collection using Flex

I have an ArrayCollection that I want to have all null or empty values removed. What line in the code might accomplish this?
Dave
  • 11
  • 2
1
vote
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,457
  • 8
  • 43
  • 63
1
vote
1 answer

Expected argument of type "App\Entity\Theme", "Doctrine\Common\Collections\ArrayCollection" given at property path "themes"

I have a many to many relationship between Customer, Formation and Theme entities. The insertion form of Customer does not work. I explain what I want to do : I want to add "Customer" by adding one or more "Formation" and one or more "Themes"…
SkroS2
  • 81
  • 1
  • 12
1
vote
1 answer

Refreshing HiearachicalData based on Source Updates?

I have an ArrayCollection we'll call "Items". It is essentially a flat collection of hierarchical data (each item has Parent and Children properties). I want an AdvancedDataGrid to display the data in hierarchical form, so essentially I could just…
1
vote
0 answers

Why doesn't non doctrine-mapped ArrayCollection get initialized?

My Setup is a Symfony 3.4 App with the typical 'ManyToMany'-Relation with additional fields, something like this: Entity Article Entity Specialty Entity ArticleSpecialtyRelation In a Form for an Article i wanted it to look like as if it were a…
1
vote
2 answers

How can I filter doctrine query by related id (Symfony 4)?

In my entity: /** * @ORM\ManyToMany(targetEntity="Productgroup", inversedBy="fields") * @ORM\JoinColumn(name="productgroup", referencedColumnName="id") */ private $productgroup; public function getProductgroup() { return…
peace_love
  • 6,229
  • 11
  • 69
  • 157
1
vote
1 answer

(Doctrine) Select where array collection is not empty?

I have a class Post: /** * @ORM\Entity(repositoryClass="App\Repository\PostRepository") */ class Post { const TYPE_TEXT = 1; const TYPE_PHOTOS = 2; const TYPE_VIDEO = 3; /** * @ORM\OneToMany(targetEntity="Photo",…
Brent Heigold
  • 1,213
  • 5
  • 24
  • 50