Loading ...
Sorry, an error occurred while loading the content.

RE: Problem with Repeater

Expand Messages
  • Michael Hnat
    Hi, that s interessting. I ve have a standard FLEX 1.5 installation in the evaluation mode and it doesn t. Is my installation broken? Can I check this somehow?
    Message 1 of 6 , Feb 1, 2005
    • 0 Attachment
      Hi,

      that's interessting. I've have a standard FLEX 1.5 installation in the
      evaluation mode and it doesn't. Is my installation broken? Can I check this
      somehow?

      Thanks,
      Michi



      Message: 10
      Date: Mon, 31 Jan 2005 23:43:35 +0530
      From: Manish Jethani <manish.jethani@...>
      Subject: Re: Problem with Repeater.

      Michael Hnat wrote:

      > My example with multiple DataGrids (see below) is not displaying the
      correct
      > headerText. It should be a value from the dp:Array.

      Indeed it does. I tried your code on my Flex installation.

      Manish
    • Dirk Eismann
      Hi, I don t think that your installation is broken. Your sample code shows the same effect you re describing on my machine. In fact, data binding on a
      Message 2 of 6 , Feb 1, 2005
      • 0 Attachment
        Hi,

        I don't think that your installation is broken. Your sample code shows the same effect you're describing on my machine. In fact, data binding on a DataGridColumn's headerText attribute doesn't seem to work at all inside a Repeater. I changed your code to

        <mx:DataGridColumn headerText="{foo}" columnName="Day" width="100"/>

        and defined foo as

        var foo:String = "Test";

        inside the script block. Still the DataGrid shows "Day" as its headerText and not "Test" as expected.

        Dirk.

        > that's interessting. I've have a standard FLEX 1.5 installation in the
        > evaluation mode and it doesn't. Is my installation broken?
        > Can I check this somehow?
      • Richard Schutten
        Hi there, I m using Flex 2.0 Beta 1 and having a problem with using a Model as dataProvider for the Repeater. I entered an example code beneath:
        Message 3 of 6 , Feb 21, 2006
        • 0 Attachment
          Hi there,

          I'm using Flex 2.0 Beta 1 and having a problem with using a Model as
          dataProvider for the Repeater.
          I entered an example code beneath:

          <mx:Model id="test">
          <result>
          <item>Item 1</item>
          </result>
          </mx:Model>

          <mx:VBox>
          <mx:Repeater id="rep" dataProvider="{test.result.item}">
          <mx:Label text="{rep.currentItem}"/>
          </mx:Repeater>
          </mx:VBox>

          When the model contains one item, this code will not run. Using more items
          see code:

          <mx:Model id="test">
          <result>
          <item>Item 1</item>
          <item>Item 2</item>
          <item>Item 3</item>
          </result>
          </mx:Model>

          And it will run correctly!

          As i read in the documentation the Repeater can be used for one or more
          components.

          Does anyone know what's wrong?


          Greetings,

          Richard
        • Matt Chotin
          You need to use mx.utils.ArrayUtil.toArray(). Matt ... From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Richard Schutten Sent:
          Message 4 of 6 , Feb 21, 2006
          • 0 Attachment
            You need to use mx.utils.ArrayUtil.toArray().

            Matt

            -----Original Message-----
            From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On
            Behalf Of Richard Schutten
            Sent: Tuesday, February 21, 2006 6:40 AM
            To: flexcoders@yahoogroups.com
            Subject: [flexcoders] Problem with Repeater

            Hi there,

            I'm using Flex 2.0 Beta 1 and having a problem with using a Model as
            dataProvider for the Repeater.
            I entered an example code beneath:

            <mx:Model id="test">
            <result>
            <item>Item 1</item>
            </result>
            </mx:Model>

            <mx:VBox>
            <mx:Repeater id="rep" dataProvider="{test.result.item}">
            <mx:Label text="{rep.currentItem}"/>
            </mx:Repeater>
            </mx:VBox>

            When the model contains one item, this code will not run. Using more
            items
            see code:

            <mx:Model id="test">
            <result>
            <item>Item 1</item>
            <item>Item 2</item>
            <item>Item 3</item>
            </result>
            </mx:Model>

            And it will run correctly!

            As i read in the documentation the Repeater can be used for one or more
            components.

            Does anyone know what's wrong?


            Greetings,

            Richard



            --
            Flexcoders Mailing List
            FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
            Search Archives:
            http://www.mail-archive.com/flexcoders%40yahoogroups.com
            Yahoo! Groups Links
          • Richard Schutten
            Hi Matt, It works for my example, but when i m using two nested Repeaters i m in trouble again. See my example code:
            Message 5 of 6 , Feb 22, 2006
            • 0 Attachment
              Hi Matt,
               
              It works for my example, but when i'm using two nested Repeaters i'm in trouble again. See my example code:
               
               <mx:Model id="test">
                   <result>
                       <item>
                           <name>Item 1</name>
                           <subitem>
                                 <name>Subitem 1</name>
                           </subitem>
                      </item>
               
                  </result>
               </mx:Model>

               <mx:ArrayCollection id="testAC" source="{mx.utils.ArrayUtil.toArray(test.item)}"/>
               
               <mx:VBox>
                     <mx:Repeater id="rep" dataProvider="{testAC}">
                           <mx:Label text="{rep.currentItem.name}"/>
                           <mx:HBox>
                               <mx:Repeater id="rep2" dataProvider="{rep.currentItem.subitem}">
                                   <mx:Label text="{rep2.currentItem.name}"/>
                               </mx:Repeater>
                           </mx:HBox>
                     </mx:Repeater>
               </mx:VBox>
               
              The same problem i don't get the subitems only if i use more subitems!
              Must i use two ArrayCollections?
               
              Richard
               
              Thanx!
              -----Original Message-----
              From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com]On Behalf Of Matt Chotin
              Sent: Wednesday, February 22, 2006 6:45 AM
              To: flexcoders@yahoogroups.com
              Subject: RE: [flexcoders] Problem with Repeater

              You need to use mx.utils.ArrayUtil.toArray().

              Matt

              -----Original Message-----
              From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On
              Behalf Of Richard Schutten
              Sent: Tuesday, February 21, 2006 6:40 AM
              To: flexcoders@yahoogroups.com
              Subject: [flexcoders] Problem with Repeater

              Hi there,

              I'm using Flex 2.0 Beta 1 and having a problem with using a Model as
              dataProvider for the Repeater.
              I entered an example code beneath:

              <mx:Model id="test">
                    <result>
                          <item>Item 1</item>
                    </result>
              </mx:Model>

              <mx:VBox>
                    <mx:Repeater id="rep" dataProvider="{test.result.item}">
                          <mx:Label text="{rep.currentItem}"/>
                    </mx:Repeater>
              </mx:VBox>

              When the model contains one item, this code will not run. Using more
              items
              see code:

              <mx:Model id="test">
                    <result>
                          <item>Item 1</item>
                          <item>Item 2</item>
                          <item>Item 3</item>
                    </result>
              </mx:Model>

              And it will run correctly!

              As i read in the documentation the Repeater can be used for one or more
              components.

              Does anyone know what's wrong?


              Greetings,

              Richard



              --
              Flexcoders Mailing List
              FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
              Search Archives:
              http://www.mail-archive.com/flexcoders%40yahoogroups.com
              Yahoo! Groups Links






            • Matt Chotin
              Yeah, use the ArrayUtil for rep.currentItem.subitem as well. ________________________________ From: flexcoders@yahoogroups.com
              Message 6 of 6 , Feb 22, 2006
              • 0 Attachment

                Yeah, use the ArrayUtil for rep.currentItem.subitem as well.

                 


                From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Richard Schutten
                Sent: Wednesday, February 22, 2006 1:39 AM
                To: flexcoders@yahoogroups.com
                Subject: RE: [flexcoders] Problem with Repeater

                 

                Hi Matt,

                 

                It works for my example, but when i'm using two nested Repeaters i'm in trouble again. See my example code:

                 

                 <mx:Model id="test">

                     <result>

                         <item>

                             <name>Item 1</name>

                             <subitem>

                                   <name>Subitem 1</name>

                             </subitem>

                        </item> 

                    </result>

                 </mx:Model>


                 <mx:ArrayCollection id="testAC" source="{mx.utils.ArrayUtil.toArray(test.item)}"/>
                 
                 <mx:VBox>
                       <mx:Repeater id="rep" dataProvider="{testAC}">
                             <mx:Label text="{rep.currentItem.name}"/>
                             <mx:HBox>
                                 <mx:Repeater id="rep2" dataProvider="{rep.currentItem.subitem}">
                                     <mx:Label text="{rep2.currentItem.name}"/>
                                 </mx:Repeater>
                             </mx:HBox>
                       </mx:Repeater>
                 </mx:VBox>

                 

                The same problem i don't get the subitems only if i use more subitems!

                Must i use two ArrayCollections?

                 

                Richard

                 

                Thanx!

                -----Original Message-----
                From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com]On Behalf Of Matt Chotin
                Sent: Wednesday, February 22, 2006 6:45 AM
                To: flexcoders@yahoogroups.com
                Subject: RE: [flexcoders] Problem with Repeater

                You need to use mx.utils.ArrayUtil.toArray().

                Matt

                -----Original Message-----
                From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On
                Behalf Of Richard Schutten
                Sent: Tuesday, February 21, 2006 6:40 AM
                To: flexcoders@yahoogroups.com
                Subject: [flexcoders] Problem with Repeater

                Hi there,

                I'm using Flex 2.0 Beta 1 and having a problem with using a Model as
                dataProvider for the Repeater.
                I entered an example code beneath:

                <mx:Model id="test">
                      <result>
                            <item>Item 1</item>
                      </result>
                </mx:Model>

                <mx:VBox>
                      <mx:Repeater id="rep" dataProvider="{test.result.item}">
                            <mx:Label text="{rep.currentItem}"/>
                      </mx:Repeater>
                </mx:VBox>

                When the model contains one item, this code will not run. Using more
                items
                see code:

                <mx:Model id="test">
                      <result>
                            <item>Item 1</item>
                            <item>Item 2</item>
                            <item>Item 3</item>
                      </result>
                </mx:Model>

                And it will run correctly!

                As i read in the documentation the Repeater can be used for one or more
                components.

                Does anyone know what's wrong?


                Greetings,

                Richard



                --
                Flexcoders Mailing List
                FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
                Search Archives:
                http://www.mail-archive.com/flexcoders%40yahoogroups.com
                Yahoo! Groups Links







              Your message has been successfully submitted and would be delivered to recipients shortly.