Re: [flexcoders] Problem with repeater and datagrid -- Please help!

2005-10-14 Thread Manish Jethani
On 10/14/05, Parekh, Shweta - BLS CTR <[EMAIL PROTECTED]> wrote:

> So then two mxml files will be accessing the same actionscript. In one mxml,
> the member is set and the other mxml accesses the member. That might work
> for me. But can two mxml files access the same actionscript?

This is the structure of the objects in your application:

  main.mxml
-- component1.mxml
-- component2.mxml
...

component1 can access the public properties in main using
parentApplication/parentDocument


 Yahoo! Groups Sponsor ~--> 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/nhFolB/TM
~-> 

--
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

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 






RE: [flexcoders] Problem with repeater and datagrid -- Please help!

2005-10-14 Thread Tracy Spratt
Title: Message










In your code, you do not have “two
mxml files”.  It does not matter where the code for a component
comes from.  When the component gets instantiated, it is “in”
the application, and you can reference the parent application as Manish
suggests.

 

Be careful with binding.  While I am
not sure about parentApplication or parentDocument references, I AM sure about
the mx.core.Application.application style reference from within a component: 
It will NOT reliably support binding, because of data typing issues.  If
you need to bind to something in the application scope, post, and I’ll
suggest some solutions.

 

Tracy

 









From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Parekh, Shweta - BLS CTR
Sent: Friday, October 14, 2005
1:49 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Problem
with repeater and datagrid -- Please help!



 



So then two mxml files will be accessing
the same actionscript. In one mxml, the member is set and the other mxml
accesses the member. That might work for me. But can two mxml files access the
same actionscript?





 





-Shweta





-Original Message-
From: flexcoders@yahoogroups.com
[mailto:flexcoders@yahoogroups.com] On Behalf Of Mink, Joseph
Sent: Friday, October 14, 2005
1:18 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Problem
with repeater and datagrid -- Please help!

Or you can create a static actionscript
class with a private member.  Set that member, and then everyone who
accesses the static class will get the same value for that static member:

 

class StaticClass

{

  public static var theValue;

}

 

...

 

StaticClass.theValue = something;

 

...

 

if (StaticClass.theValue == something)

...

 

Does that help?

 







From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Manish Jethani
Sent: Friday, October 14, 2005
12:27 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Problem
with repeater and datagrid -- Please help!

On 10/14/05, Parekh, Shweta - BLS CTR <[EMAIL PROTECTED]>
wrote:

> 1. Are there global variables in Flex so that
I can take the result from
> remote call in a global variable and then use
it anywhere -- in my case in
> the child component?

You can save the result in the application and
then refer to it from
child components using the _expression_
"parentApplication.myResult"
(can even bind to it I guess).








--
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



   Visit your group "flexcoders" on the web. 
   To unsubscribe from this group, send an email to: [EMAIL PROTECTED] 
   Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  











RE: [flexcoders] Problem with repeater and datagrid -- Please help!

2005-10-14 Thread Parekh, Shweta - BLS CTR
Title: Message





So 
then two mxml files will be accessing the same actionscript. In one mxml, the 
member is set and the other mxml accesses the member. That might work for me. 
But can two mxml files access the same actionscript?
 
-Shweta

  
  -Original Message-From: 
  flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
  Mink, JosephSent: Friday, October 14, 2005 1:18 
  PMTo: flexcoders@yahoogroups.comSubject: RE: 
  [flexcoders] Problem with repeater and datagrid -- Please 
  help!
  Or you can create a static actionscript class with a 
  private member.  Set that member, and then everyone who accesses the 
  static class will get the same value for that static 
  member:
   
  class StaticClass
  {
    public static var theValue;
  }
   
  ...
   
  StaticClass.theValue = something;
   
  ...
   
  if (StaticClass.theValue == 
something)
  ...
   
  Does that help?
  
  
  From: flexcoders@yahoogroups.com 
  [mailto:[EMAIL PROTECTED] On Behalf Of Manish 
  JethaniSent: Friday, October 14, 2005 12:27 PMTo: 
  flexcoders@yahoogroups.comSubject: Re: [flexcoders] Problem with 
  repeater and datagrid -- Please help!
  On 10/14/05, Parekh, Shweta - BLS CTR 
  <[EMAIL PROTECTED]> wrote:> 1. Are there global variables 
  in Flex so that I can take the result from> remote call in a global 
  variable and then use it anywhere -- in my case in> the child 
  component?You can save the result in the application and then refer to 
  it fromchild components using the _expression_ 
  "parentApplication.myResult"(can even bind to it I guess).





--
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



   Visit your group "flexcoders" on the web. 
   To unsubscribe from this group, send an email to: [EMAIL PROTECTED] 
   Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









RE: [flexcoders] Problem with repeater and datagrid -- Please help!

2005-10-14 Thread Mink, Joseph





Or you can create a static actionscript class with a 
private member.  Set that member, and then everyone who accesses the static 
class will get the same value for that static member:
 
class StaticClass
{
  public static var theValue;
}
 
...
 
StaticClass.theValue = something;
 
...
 
if (StaticClass.theValue == something)
...
 
Does that help?


From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of Manish 
JethaniSent: Friday, October 14, 2005 12:27 PMTo: 
flexcoders@yahoogroups.comSubject: Re: [flexcoders] Problem with 
repeater and datagrid -- Please help!
On 10/14/05, Parekh, Shweta - BLS CTR 
<[EMAIL PROTECTED]> wrote:> 1. Are there global variables 
in Flex so that I can take the result from> remote call in a global 
variable and then use it anywhere -- in my case in> the child 
component?You can save the result in the application and then refer to 
it fromchild components using the _expression_ 
"parentApplication.myResult"(can even bind to it I guess).





--
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



   Visit your group "flexcoders" on the web. 
   To unsubscribe from this group, send an email to: [EMAIL PROTECTED] 
   Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









Re: [flexcoders] Problem with repeater and datagrid -- Please help!

2005-10-14 Thread Manish Jethani
On 10/14/05, Parekh, Shweta - BLS CTR <[EMAIL PROTECTED]> wrote:

> 1. Are there global variables in Flex so that I can take the result from
> remote call in a global variable and then use it anywhere -- in my case in
> the child component?

You can save the result in the application and then refer to it from
child components using the expression "parentApplication.myResult"
(can even bind to it I guess).


 Yahoo! Groups Sponsor ~--> 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/nhFolB/TM
~-> 

--
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

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





[flexcoders] Problem with repeater and datagrid -- Please help!

2005-10-14 Thread Parekh, Shweta - BLS CTR
Title: Problem with repeater and datagrid -- Please help!








Hi,


I have a problem with repeater and datagrids.

I have a repeater in ItemSpec.mxml file (below) which includes an mxml component: itemSpecInfo.


File:  itemSpec.mxml

   

    …...

   

 


ItemSpecInfo.mxml has a datagrid in it. The ItemSpecInfo, being in the repeater, is repeated five times. So basically it displays a page with 5 datagrids.

ItemSpecInfo.mxml also has a remote object call which gets the result from Backend and that result is the dataprovider for the datagrid. The mxml file corresponds to ItemSpecInfo.as actionscript  file. As this ItemSpecInfo is in the repeater, the remote call is made five times which is something I want to avoid. I want the remote call being made only once. So logically I need to put the remote call before the repeater code in ItemSpec.mxml file above. But as I use the result from the remote call in the ItemSpecInfo.as  actionScript file for the dataProvider in ItemSpecInfo, I cannot have the remote call in ItemSpec.mxml because the component child file will not understand the result got in the parent file. 

File:  itemSpecInfo.mxml

 



    

 

            {itemSid}

            {irMonth}

            {monthNo}  

     

    



…





…



I guess there are 2 options and I wanted to know what would work for me:

1. Are there global variables in Flex so that I can take the result from remote call in a global variable and then use it anywhere -- in my case in the child component?

2. Instead of calling the component in the repeater, stick in the entire code for component ItemSpecInfo inside the repeater. But this is causing problems with my datagrid as I need to  indicate which datagrid I am manipulating because my repeater repeats the component 5 times, so I have 5 datagrids displayed. 

columnar_dg[0].addColumnAt(0, " "); --> I need to specify indexes for my datagrid. 


Any help will be highly appreciated. 

Thanks in advance, 

Shweta










--
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



   Visit your group "flexcoders" on the web. 
   To unsubscribe from this group, send an email to: [EMAIL PROTECTED] 
   Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.