Thanks guys,
I was able to get the trace part working (it helps having someone in the office
with more OO experience than myself!) Hopefully my management will be able to
send me to class soon - I've gone way past that one C class I took about 10
years ago!
My next question:
Can anyone point me to an example of using a filter function on one data source
to populate two UI controls? I can see while debugging that it's giving me the
correct data in the first ArrayCollections as it executes, but the second
filter is stepping on the first even though my two ArrayCollections have
different names:
=================================
private function get_result(event:ResultEvent):void
{
this.indeptApprovers = event.result as ArrayCollection;
this.indeptApprovers.filterFunction = indeptFilterFunc;
this.indeptApprovers.refresh();
this.INDEPT_APPROVERS.dataProvider = indeptApprovers;
this.crosdeptApprovers = event.result as ArrayCollection;
this.crosdeptApprovers.filterFunction = crosdeptFilterFunc;
this.crosdeptApprovers.refresh();
this.CROSDEPT_APPROVER.dataProvider = crosdeptApprovers;
}
private function indeptFilterFunc(item:Object):Boolean
{return item.APPROVAL_TYPE_CODE == "INDEPT";}
private function crosdeptFilterFunc(item:Object):Boolean
{return item.APPROVAL_TYPE_CODE == "CROSDEPT";}
==========================================
Thanks,
Andy
----- Original Message -----
From: "Douglas Knudsen" <[email protected]>
To: [email protected]
Sent: Monday, January 12, 2009 10:59:06 PM GMT -05:00 US/Canada Eastern
Subject: Re: [AFFUG Discuss] Another (probably) stupid question...
FYI, use ObjectUtil.toSrting() to get a 'dump' of a object. You should see the
object type too. If you see Object Object, then you are NOT using typed
objects. I'm not entirely sure what your stored proc has to do with your client
code. Have your Flex code pass a typed object graph to your middle tier and
have your midle tier code handle communicating and massaging into the SP. Of
course this can be done in XML too, I just like typed objects and Remoting :)
Douglas Knudsen
http://www.cubicleman.com
this is my signature, like it?
On Mon, Jan 12, 2009 at 10:49 PM, Robert A. Green < [email protected] >
wrote:
The reason you are getting [object Object] is because you are not specifying
which property you want from the ArrayCollection. If you, for example have an
XML file:
…
<foo>
<name>Robert</name>
<dept>01</dept>
</foo>
<foo>
<name>Andy</name>
<dept>02</dept>
</foo>
Then when you bind it:
indeptApprovers = event.result.INDEPT;
On your trace you need to:
Trace(indeptApprovers.name); where name represents the node name from the XML
file your output would be
Robert
Andy
Hope this helps with that part.
Your other questions seems easy to, but I'd like for you to explain it to me in
simple business terms.
· What is the business requirement. What specifically are you trying to do,
what is the business problem here?
· The prodeduce you spoke off, can you show me exactly what it is expecting?
o (i.e., (A T-SQL example)
§ Create procedure sProc_tbl_SOMETHING
§ @param1 nvarchar(150),
§ @param2 nvarchar(150),
§ As
§ …. Do some processing here
o Can you put in the format of a function like function1(param1:string,
param2:string); or are you expecting an function1(args:Object) object as the
argument?
· Either way, can you please clarify?
Hope this helps…
Regards,
Robert A. Green, MBA
Done Right Solutions
Sr. IT Consultant
2591 Piedmont Road
Suite 2416
Atlanta, GA 30324
web: http://www.DoneRightSolutions.com
email: [email protected]
Linked: http://www.LinkedIn.com/in/RobertAGreen
direct: +1 678 457 2844
fax: +1 678 212 5051
My Thoughts Become My Words, My Words Become My Actions, My Actions Become My
Habits, My Habits Become My Character, and My Character Determines My Destiny
The information transmitted is intended only for the person or entity to which
it is addressed and may contain confidential, proprietary, and/or privileged
material. Any review, retransmission, dissemination or other use of, or taking
of any action in reliance upon this information by persons or entities other
than the intended recipient is prohibited. If you received this in error,
please contact the sender and delete the material from all computers. GA625
From: [email protected] [mailto: [email protected] ] On Behalf Of
[email protected]
Sent: Monday, January 12, 2009 5:09 PM
To: [email protected]
Subject: Re: [AFFUG Discuss] Another (probably) stupid question...
Tr y this
this.indeptApprovers = event.result.INDEPT as ArrayCollection ;
Jay Jayaraman
Central Billing Services
Financial Management and Planning
(404) 498-8453 (W)
(404) 273-7131 (C)
"Fox, Andrew J" < [email protected] >
Sent by: [email protected]
01/12/2009 04:33 PM
Please respond to
[email protected]
To
discussion < [email protected] >
cc
Subject
[AFFUG Discuss] Another (probably) stupid question...
I need to take the data from one column of a DataGrid, add a constant, specify
row and column delimiters, do the same for two additional ComboBox fields with
the same data structure, then pass all of that to a stored procedure when the
user clicks the Save button. Is there any easy way of doing this?
What the procedure is expecting is something like this:
bsmith3, internal; jdoe4, internal; sgreen2, internal; sgrant3, external;
The dataProvider is a Bindable ArrayCollection that specifies the array (one of
three returned):
[Bindable]
private var indeptApprovers:ArrayCollection = new ArrayCollection();
...
this.indeptApprovers = event.result.INDEPT;
this.INDEPT_APPROVERS.dataProvider = indeptApprovers;
When I do a trace(indeptApprovers), I get "[object Object],[object
Object]"(repeated for the number of records in the result set - 2 in this
case.)
--
Andy Fox
Systems Analyst III
Georgia Tech OIT-EIS
404-894-4413
-------------------------------------------------------------
To unsubscribe from this list, simply email the list with unsubscribe in the
subject line
For more info, see http://www.affug.com
Archive @ http://www.mail-archive.com/discussion%40affug.com/
List hosted by http://www.fusionlink.com
-------------------------------------------------------------
-------------------------------------------------------------
To unsubscribe from this list, simply email the list with unsubscribe in the
subject line
For more info, see http://www.affug.com
Archive @ http://www.mail-archive.com/discussion%40affug.com/
List hosted by FusionLink
-------------------------------------------------------------
-------------------------------------------------------------
To unsubscribe from this list, simply email the list with unsubscribe in the
subject line
For more info, see http://www.affug.com
Archive @ http://www.mail-archive.com/discussion%40affug.com/
List hosted by FusionLink
-------------------------------------------------------------
-------------------------------------------------------------
To unsubscribe from this list, simply email the list with unsubscribe in the
subject line
For more info, see http://www.affug.com
Archive @ http://www.mail-archive.com/discussion%40affug.com/
List hosted by FusionLink
-------------------------------------------------------------
--
Andy Fox
Systems Analyst III
Georgia Tech OIT-EIS
404-894-4413
-------------------------------------------------------------
To unsubscribe from this list, simply email the list with unsubscribe in the
subject line
For more info, see http://www.affug.com
Archive @ http://www.mail-archive.com/discussion%40affug.com/
List hosted by http://www.fusionlink.com
-------------------------------------------------------------