[flexcoders] setting focus back to component that fails validation?

2005-09-08 Thread cruegger2000

I create a form dynamically and need to do my data validations
within ActionScript code. I generate a TextInput component that
must be numeric. What I'd like to have happen is that if the
user enters non-numeric data, I issue an alert; when the user
clicks ok, the focus goes back to the TextInput field that failed
validation. However, I can't get the focus to go back to the
failed component (even if I dont issue an alert). Code snippets
below, any ideas what I'm doing wrong?
Thanks in advance:

mxml snippet


ActionScript:
var myValidator:NumberValidator = new NumberValidator();
public function itemChanged(event): Void
{
  var ok:Boolean =
NumberValidator.validateNumber(myValidator,
   event.target.text,
   null,
   "text");

  if (ok == false)
  {
// Force focus to failed component
event.target.setFocus();
  }
}





 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] drilling down to get dynamically generated form values

2005-09-07 Thread cruegger2000

I create a form dynamically using a repeater shown below. When the 
user hits the "Submit" button, I want to be able to "drill down" to
get all of the values for the TextInput fields. How can I get to
them in ActionScript code for submitForm() starting from "form1"?
Thanks in advance.


  

  


  


  


  

  

  
  






 Yahoo! Groups Sponsor ~--> 
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/T8sf5C/tzNLAA/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] invoking function on mxml file load/init?

2005-09-07 Thread cruegger2000
Is there a way to cause a function to invoke when the mxml file
first loads/initializes? How would I specify this?
Thanks in advance





 Yahoo! Groups Sponsor ~--> 
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/T8sf5C/tzNLAA/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] passing array of Form values in VO

2005-09-01 Thread cruegger2000
I want to have a form on the client side that accepts
a list of items of the same type/meaning, for example people's names.
I would then send a value object to a server side Delegate object 
using the  construct.
 
However, I don't know how to indicate that a form variable
is an "array" without getting duplicate component id errors.
In essence, I want to do what is shown below. How can I have a 
"vector" form variable using Flex?
Thanks in advance.

mxml file:


  



  



  



Client side value object:
-
class Foo
{
  public var names: Array;
}


Server Side value object:
-
public class Foo
{
  private String[] names; (or List)
  
  // accesors
}









 Yahoo! Groups Sponsor ~--> 
Most low income households are not online. Help bridge the digital divide today!
http://us.click.yahoo.com/cd_AJB/QnQLAA/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] Does Flex have equivalent of JSTL ?

2005-08-31 Thread cruegger2000

I need to iterate through a collection of polymorphic objects
and build a form dynamically. Depending on the current type
of object, I  need to output 1, 2, or 3  components.
I'm using a Repeater to iterate through the collection.

Does Flex have the equivalent of JSTL  or some other
logic tags that will let me conditionally generate mxml?

Thanks in advance.






 Yahoo! Groups Sponsor ~--> 
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/T8sf5C/tzNLAA/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] can flex build dynamic form

2005-08-15 Thread cruegger2000
I was wondering if Flex has the equivalent of the Struts
 tag and the JSTL  tag to perform
conditional rendering?

I have  alist of polymorphic objects that I need to both display and
allow updates to by the user. Each object (based on its type) may
have 1, 2, or 3 input fields. I need to loop through the object list
and build a dynamic form, outputting the correct number of input
fields for each object. 

I can do this in Struts/JSTL but is there a way to do it Flex?
Thanks in advance





--
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] custom data grid solution

2005-08-15 Thread cruegger2000
I have a requirement for a custom data grid:
1. 1st column will be a "link" value. you click on it and it takes you 
to a different view in a viewStack.
2. columns 2 through n-1 will be regular Strings
3. column n will be a checkbox.

What's the best approach for building such a custom data grid object?
Are there any examples out there that show something like this?
I imagine that I will need to extend the DataGrid object to add 2 
different column Renders for columns 1 and n?

Any pointers/references appreciated.




 Yahoo! Groups Sponsor ~--> 
http://us.ard.yahoo.com/SIG=12h5o9lgf/M=362335.6886445.7839731.1510227/D=groups/S=1705007207:TM/Y=YAHOO/EXP=1124131847/A=2894361/R=0/SIG=13jmebhbo/*http://www.networkforgood.org/topics/education/digitaldivide/?source=YAHOO&cmpgn=GRP&RTP=http://groups.yahoo.com/";>In
 low income neighborhoods, 84% do not own computers. At Network for Good, help 
bridge the Digital Divide!.
~-> 

--
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] Newbie Question about Value Objects on client side

2005-08-04 Thread cruegger2000
I've been reading the docs for about 2 days now and have a simple 
question I can't find the answer to. Please no flames, I have made
an attempt to find the answer to this question by reading all the
documentation I can find.

I'm using Flex with Websphere 6.0. I have a POJO business delegate 
class that returns a value object. I access the delegate class from 
my mxml file using the mxRemoteObject tag. Suppose I have a very 
simple Value Object on the server side called Person that is being 
returned by the business delegate:

public class Person
{
  private String firstName;
  private String lastName;
  // get & set accessors
}

I'd like to use the values returned in the Person object to populate 
controls on the client side, display data, etc.

QUESTION:
Do I *have* to create a corresponding Person class on the client side 
using ActionScript to access the attributes (firstName and lastName) 
on the client, and use registerObject()? If I don't create a 
corresponding Person class on the client side, how I can I access the 
properties in the Person object returned? What am I getting back on 
the client side?

I'd rather not create analogous value objects on the client side if I 
can avoid it, to avoid the classes getting out of sync.

Thanks in advance for any help! Pointers to documentation that 
address this (which I obviously cannot find) appreciated.
-Chris






 Yahoo! Groups Sponsor ~--> 
http://us.ard.yahoo.com/SIG=12hgvtr8p/M=362329.6886308.7839368.1510227/D=groups/S=1705007207:TM/Y=YAHOO/EXP=1123165532/A=2894321/R=0/SIG=11dvsfulr/*http://youthnoise.com/page.php?page_id=1992
">Fair play? Video games influencing politics. Click and talk back!.
~-> 

--
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] accessing returned ValueObject properties in mxml file

2005-08-03 Thread cruegger2000

I want to access the properties of a Value Object returned from a 
Java business delegate to populate some flex controls (label text, 
grid data, etc.).  However, I do not want to have to write an 
analogous Value Object class in ActionScript code (don't want to have 
to keep them in synch). Is this possible? If so, how? I have not been 
able to find documentation that addresses this.

Here are background details:

On the server side I have:
--
public class HelloDelegate
{
  public HelloVO getHello()
  {
return new HelloVO();
  }
}
public class HelloVO implements Serializable 
{
  private int id;
  private String name;
  // get accessors for id and name
}

On the client side I have:
--
hello.mxml:
  

  

  
  
  

  public function getHello():Void
  {
var pendingCall = helloDelegate.getHello();
pendingCall.resultHandler = 
  mx.utils.Delegate.create(this,gotHello);
  }
  private function gotHello(result) : Void
  {
// At this point result is a HelloVO value object. How can I
// access id and name properties here?
  }










 Yahoo! Groups Sponsor ~--> 
http://us.ard.yahoo.com/SIG=12h7d998l/M=362131.6882499.7825260.1510227/D=groups/S=1705007207:TM/Y=YAHOO/EXP=1123094472/A=2889191/R=0/SIG=10r90krvo/*http://www.thebeehive.org
">Get Bzzzy! (real tools to help you find a job) Welcome to the Sweet Life 
- brought to you by One Economy.
~-> 

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