You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by Carlos Rovira <ca...@apache.org> on 2016/12/10 18:00:19 UTC

[FlexJS] rowIndex in item renderer

Hi,

I have a IR extended from MXMLItemRenderer, so I should have "rowIndex"
property available, but I get nothing when I tried to write the value to
span tag.
Is this variable updated?

What I wan to get is the row index printed in the IR, how is the most safe
way to get it?

additionaly, If I want to make a subcomponent in the MXML IR to output
based on rowIndex how could I get this done? (i.e : output only if is the
first row in the list)

-- 
Carlos Rovira
http://about.me/carlosrovira

Re: [FlexJS] rowIndex in item renderer

Posted by Carlos Rovira <ca...@codeoscopic.com>.
As Yishay said, "index" shows the right index and it's in set data method
(don't get the value output in other part)
I didn't saw a creationComplete method, I'll ask about this in another
dedicated thread.
Thanks

2016-12-11 8:06 GMT+01:00 Alex Harui <ah...@adobe.com>:

>
>
> On 12/10/16, 10:02 PM, "Yishay Weiss" <yi...@hotmail.com> wrote:
>
> >
> >
> >From: Yishay Weiss<ma...@hotmail.com>
> >Sent: Sunday, December 11, 2016 8:01 AM
> >To: Carlos Rovira<ma...@apache.org>
> >Subject: RE: [FlexJS] rowIndex in item renderer
> >
> >
> >Try reading index instead of rowIndex. rowIndex doesn’t look like it gets
> >updated which is probably a bug. Also, try overriding function set data()
> >for displaying data and index based info.
> >
>
> Hmm.  Looks like some of these interfaces need some cleaning up.
> IItemRenderer shouldn't have listData, DataItemRenderer probably doesn't
> need quite so many properties.
>
> FWIW, whenever you need more properties passed to the ItemRenderer, you
> can replace the IDataProviderItemRendererMapper and pass more things into
> the IItemRenderer.
>
> -Alex
>
>


-- 

Carlos Rovira
Director General
M: +34 607 22 60 05
http://www.codeoscopic.com
http://www.avant2.es

Este mensaje se dirige exclusivamente a su destinatario y puede contener
información privilegiada o confidencial. Si ha recibido este mensaje por
error, le rogamos que nos lo comunique inmediatamente por esta misma vía y
proceda a su destrucción.

De la vigente Ley Orgánica de Protección de Datos (15/1999), le comunicamos
que sus datos forman parte de un fichero cuyo responsable es CODEOSCOPIC
S.A. La finalidad de dicho tratamiento es facilitar la prestación del
servicio o información solicitados, teniendo usted derecho de acceso,
rectificación, cancelación y oposición de sus datos dirigiéndose a nuestras
oficinas c/ Paseo de la Habana 9-11, 28036, Madrid con la documentación
necesaria.

Re: [FlexJS] rowIndex in item renderer

Posted by Alex Harui <ah...@adobe.com>.

On 12/10/16, 10:02 PM, "Yishay Weiss" <yi...@hotmail.com> wrote:

>
>
>From: Yishay Weiss<ma...@hotmail.com>
>Sent: Sunday, December 11, 2016 8:01 AM
>To: Carlos Rovira<ma...@apache.org>
>Subject: RE: [FlexJS] rowIndex in item renderer
>
>
>Try reading index instead of rowIndex. rowIndex doesn’t look like it gets
>updated which is probably a bug. Also, try overriding function set data()
>for displaying data and index based info.
>

Hmm.  Looks like some of these interfaces need some cleaning up.
IItemRenderer shouldn't have listData, DataItemRenderer probably doesn't
need quite so many properties.

FWIW, whenever you need more properties passed to the ItemRenderer, you
can replace the IDataProviderItemRendererMapper and pass more things into
the IItemRenderer.

-Alex


FW: [FlexJS] rowIndex in item renderer

Posted by Yishay Weiss <yi...@hotmail.com>.

From: Yishay Weiss<ma...@hotmail.com>
Sent: Sunday, December 11, 2016 8:01 AM
To: Carlos Rovira<ma...@apache.org>
Subject: RE: [FlexJS] rowIndex in item renderer


Try reading index instead of rowIndex. rowIndex doesn’t look like it gets updated which is probably a bug. Also, try overriding function set data() for displaying data and index based info.



From: Carlos Rovira<ma...@apache.org>
Sent: Saturday, December 10, 2016 8:00 PM
To: dev@flex.apache.org<ma...@flex.apache.org>
Subject: [FlexJS] rowIndex in item renderer



Hi,

I have a IR extended from MXMLItemRenderer, so I should have "rowIndex"
property available, but I get nothing when I tried to write the value to
span tag.
Is this variable updated?

What I wan to get is the row index printed in the IR, how is the most safe
way to get it?

additionaly, If I want to make a subcomponent in the MXML IR to output
based on rowIndex how could I get this done? (i.e : output only if is the
first row in the list)

--
Carlos Rovira
http://about.me/carlosrovira