I have attempted the second approach. It's not working. I am not sure I am
applying it correctly. See how I defined it.

<!-- <sp:FlexContainer className="home_side_area" wrap="false">
      <sp:Icon> </sp:Icon>
      <sp:Button text="Add New" flavor="cta"></sp:Button>
      <sp:List id="navLinks" className="home_side_nav"
labelField="description" dataProvider="{menuItemList}"
       change="onSelectMenu(event)"/>
      <sp:Button text="Log Out" click="logOut(event)"></sp:Button>
  </sp:FlexContainer> -->

  <sp:FlexContainer className="home_side_area" wrap="false">
      <sp:Icon> </sp:Icon>
      <sp:Button text="Add New" flavor="cta"></sp:Button>
      <sp:List id="navLinks" className="home_side_nav" labelField=
"description"
      dataProvider="{newMenuItemList}" change="onSelectMenu(event)">
       <sp:beads>
           <js:ArrayListSelectionModel />
           <js:DataItemRendererFactoryForArrayList/>
        </sp:beads>
      </sp:List>
      <sp:Button text="Log Out" click="logOut(event)"></sp:Button>
  </sp:FlexContainer>


Note: in the commented out code above, I supplied an array. It works fine.

Did I apply it correctly ?

Another question, which one do you use for your apps in production ?


On Wed, Jan 12, 2022 at 2:09 PM Harbs <harbs.li...@gmail.com> wrote:

> Any one of those three should work.
>
> On Jan 12, 2022, at 3:09 PM, Harbs <harbs.li...@gmail.com> wrote:
>
> CSS:
> #uploadsList{
>   IBeadModel:
> ClassReference("org.apache.royale.html.beads.models.ArrayListSelectionModel");
>   IDataProviderItemRendererMapper:
> ClassReference("org.apache.royale.html.beads.DataItemRendererFactoryForArrayList");
> }
>
> MXML:
>   <sp:beads>
>     <js:ArrayListSelectionModel/>
>     <js:DataItemRendererFactoryForArrayList/>
>   </sp:beads>
>
> ActionScript:
>   addBead(new ArrayListSelectionModel());
>   addBead(new DataItemRendererFactoryForArrayList());
>
> On Jan 12, 2022, at 2:44 PM, Roman Isitua <romanisi...@gmail.com> wrote:
>
> How can this be applied let say for example on an sp:List ? As a bead ?
>
>  Let's say I want to use arrayList  as data provider.
>
>
> On Wed, 12 Jan 2022, 13:41 Harbs, <harbs.li...@gmail.com> wrote:
>
>> Yes.The default IDataProviderItemRendererMapper is
>> DataItemRendererFactoryForArrayData.
>>
>> If you are using collections you should
>> use DataItemRendererFactoryForArrayList or
>> DataItemRendererFactoryForCollectionView instead.
>>
>> HTH,
>> Harbs
>>
>> On Jan 12, 2022, at 1:35 PM, Roman Isitua <romanisi...@gmail.com> wrote:
>>
>> Hence the reason, I need to confirm from Harbs the array data type that
>> is supported in spectrum.
>>
>>
>>
>> On Tue, 11 Jan 2022, 21:33 Maria Jose Esteve, <mjest...@iest.com> wrote:
>>
>>> Hi,
>>>
>>> From what I see in the "ListModel.as" code it allows Object, IArray and
>>> IArrayList.
>>>
>>>
>>>
>>> Hiedra
>>>
>>>
>>>
>>> *De:* Roman Isitua <romanisi...@gmail.com>
>>> *Enviado el:* martes, 11 de enero de 2022 20:40
>>> *Para:* users@royale.apache.org
>>> *Asunto:* Re: Spectrum UI components
>>>
>>>
>>>
>>> It is now displaying. The issue was not related to the sp:List as I
>>> initially thought.
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> <sp:Group>
>>>
>>>
>>>
>>> <sp:beads>
>>>
>>>         <js:ContainerDataBinding />
>>>
>>>     </sp:beads>
>>>
>>>
>>>
>>>
>>>
>>>   <sp:FlexContainer className="home_side_area" wrap="false">
>>>
>>>       <sp:Icon> </sp:Icon>
>>>
>>>       <sp:Button text="Add New" flavor="cta"></sp:Button>
>>>
>>>       <sp:List id="navLinks" className="home_side_nav" labelField=
>>> "description" dataProvider="{menuItemList}"
>>>
>>>        change="onSelectMenu(event)"/>
>>>
>>>       <sp:Button text="Log Out" click="logOut(event)"></sp:Button>
>>>
>>>   </sp:FlexContainer>
>>>
>>>
>>>
>>>    <sp:Container id="mainArea">
>>>
>>>       <sp:Label text="Overview area"></sp:Label>
>>>
>>>    </sp:Container>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> </sp:Group>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> I changed the parent component from flex container to group. Though that
>>> had nothing to do  with the issue I was having.
>>>
>>>
>>>
>>> My current question
>>>
>>>
>>>
>>> is Array data type the only collection class that is supported in
>>> spectrum ?
>>>
>>>
>>>
>>>
>>>
>>> On Tue, Jan 11, 2022 at 6:30 PM Roman Isitua <romanisi...@gmail.com>
>>> wrote:
>>>
>>> Hi,
>>>
>>>
>>>
>>> I am trying to populate my first List <sp:List> for some reason it is
>>> not being populated. Here is my code snippet.
>>>
>>>
>>>
>>> <sp:beads>
>>>
>>>         <js:ContainerDataBinding />
>>>
>>>     </sp:beads>
>>>
>>>
>>>
>>>
>>>
>>>   <sp:FlexContainer className="home_side_area" wrap="false">
>>>
>>>       <sp:Icon> </sp:Icon>
>>>
>>>       <sp:Button text="Add New" flavor="cta"></sp:Button>
>>>
>>>       <sp:List id="navLinks" className="home_side_nav" dataProvider=
>>> "{newMenuItemList}"
>>>
>>>       labelField="description" change="onSelectMenu(event)"/>
>>>
>>>       <sp:Button text="Log Out" click="logOut(event)"></sp:Button>
>>>
>>>       <sp:beads> <js:ContainerDataBinding />  </sp:beads>
>>>
>>>   </sp:FlexContainer>
>>>
>>>
>>>
>>>
>>>
>>> I have the following questions
>>>
>>> 1. what is the expected data provider ? Array,
>>> or org.apache.royale.collections.ArrayList ?
>>>
>>> I have tried both none of them works.
>>>
>>>
>>>
>>> 2.  Did I register data binding correctly ?
>>>
>>> The above ui is wrapped by a FlexContainer.
>>>
>>>
>>>
>>> my data source is supposed to be an arrayList of data transfer objects
>>> (MenuItemDTO) with get set functions for each field.
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> On Sat, Jan 8, 2022 at 5:47 PM Harbs <harbs.li...@gmail.com> wrote:
>>>
>>> Use a <sp:PasswordField>
>>>
>>> > On Jan 8, 2022, at 4:34 PM, Roman Isitua <romanisi...@gmail.com>
>>> wrote:
>>> >
>>> > Hi Harbs,
>>> >
>>> > I am trying to create a login form. How do I hide the password in
>>> >
>>> > <sp:TextField placeholder="Enter password"/>
>>> >
>>> >  could it be that it does not support password hiding ? Do I have to
>>> resort to using royale basic text field ?
>>>
>>>
>>
>
>

Reply via email to