How to get ArrayCollection length in initial function?
Hi,
I am working for conver Application form Flex 2 to Flex 3.
I have the following code,I can see in the dataGrid and
ArrayCollection length in the label "loopNumber",but why I can not
get ArrayCollection length in initPage() for Flex 3 and the loop
doesn't work.
But I can get ArrayCollection length in initPage() in Flex 2.
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
... creationComplete="initPage()">
>
<mx:Script>
<![CDATA[
import ....;
import ....;
[Bindable]
private var modelLocator:AdminModel =
AdminModel.getInstance();
private function initPage():void{
Alert.show(modelLocator.acProcess.length.toString());
for ( var j : int =0; j <modelLocator.acProcess.length ;
j++)
]]>
</mx:Script>
<mx:DataGrid x="42" y="64" id="proceeList"
dataProvider="{modelLocator.acProcess}" width="300"
updateComplete="initPage()">
<mx:columns>
<mx:DataGridColumn headerText="Bursary Online"
dataField="processName"/>
</mx:columns>
</mx:DataGrid>
<mx:Label id="loopNumber" x="32" y="428"
text="{modelLocator.acProcess.length}"/>
</Application>
What error do you get with Flex 3?
Thanks,
Gaurav Jain
Flex SDK Team
Similar Messages
-
How to get sysnr value in a Function Module
Hi all,
I need to get the sysnr(system number) value of the R/3 system. I execute a RFC function module and need to get the value of sysnr of the system it executes in as a return parameter. Can somebody tell me how to get this value in the function module and return it.
Thanks and Regards,
PratikHello Pratik
The system number has to be defined in the RFC destination. Thus, select on your local system (where you call the RFC function module) the corresponding RFC destination from table <b>RFCDES</b>. In field RFCDES-RFCOPTIONS you will find a string like this:
H=<ip address>,S=21,R=N, ...
S=system number
Regards
Uwe -
How to get the length of apex_item in javascript?
Hello all
I am having a tabular report using apex_item, I want to know how can i get the length of the item in javascript? like we do in pl/sql using apex_application.g_f01.count().
and one more thing, when I go to certain page, tab of that page is getting disabled, what should I do to make tab available always whether I am on that page or on any other page.
Thanks
TauceefHi Oli
Thanks for replying, In my first question actually I am validating the report values in javascript for that I need the length of the apex_item to run the loop that many times.
Like we can get the length using apex_application.g_f011.count in pl/sql process how to get the length in the javascript, is there a way for that?
I got the answer for the second question, this is the one.
Thanks
Tauceef -
How to get response from such a function
How to get response from such a function (in MODULE USER_COMMAND_0010 INPUT I get "ODGOVOR" 'X'
FUNCTION Z_SEENKRAT.
""Local Interface:
*" EXPORTING
*" REFERENCE(ODGOVOR) TYPE MSEG-KZEAR
DATA ok_code LIKE sy-ucomm.
DATA: test like mseg-kzear.
BREAK-POINT.
call screen 10.
test = ODGOVOR.
ENDFUNCTION.
*& Module CLEAR_OK_CODE OUTPUT
text
MODULE clear_ok_code OUTPUT.
CLEAR ok_code.
ENDMODULE. " CLEAR_OK_CODE OUTPUT
*& Module USER_COMMAND_0010 INPUT
text
MODULE USER_COMMAND_0010 INPUT.
DATA odgovor LIKE mseg-KZEAR.
CASE ok_code.
WHEN 'DA'.
ODGOVOR = 'X'.
ENDCASE.
ENDMODULE. " USER_COMMAND_0010 INPUTHi,
You need to declare the ODGOVOR variable in the TOP include, then you will get the value
Regards
Sudheer -
How java gets objet collections from DB function
This is database function. my question is how java get those values from the function.
Could you please post some sample code also?
CREATE OR REPLACE
Type T_PREO_RoleINFO is Object
ROLE_ID NUMBER(10),
ROLE_NAME VARCHAR2(20))
CREATE OR REPLACE
TYPE T_RoleInfo IS TABLE OF PREORDER.
T_PREO_RoleINFO
Function F_GetUserRole(Userid in number)
return T_RoleInfo as
V_Role T_RoleInfo;
begin
select T_PREO_RoleINFO(PREO_Role.ROLE_ID,PREO_Role.ROLE_NAME)
BULK COLLECT INTO V_Role
from preorder.PREO_Role, preorder.PREO_User_Role
where PREO_Role.Role_id = PREO_User_Role.Role_id
and PREO_User_Role.user_id = userid;
return V_Role;
end;check this out
http://www.experts-exchange.com/Programming/Programming_Languages/Java/Q_20878677.html -
How to get the length in bytes of a string
My string has both latin (1 byte) and chinese (2 bytes).
My program is in unicode system.
How to measure the length in bytes of the string?
the xlen function does not work.Hello,
parameters : p_str type string.
data : len type i.
len = strlen( p_str ).
write : / len.
With Regards,
BVS
Hi BSV, your code return the number of characters not bytes.
Remember chinese character in US are encoded with 2 bytes.
And my string contain both latin and chinese characters.
thanks -
How to get the length of a audio file without play it ?
Now I know a method to get the length of a audio file by play it:
1 Create a Player, and add a ControllerListener
2.Start the Player
3.In the ControllerListener's controllerUpdate method, use getMediaTime() by receiving a EndOfMediaEvent
However I think this method is not convenience, if I don't want to play it how I can get the length of the audio file?
Is anyone can help me?Really thanks a lot !I got the answer here:
http://forum.java.sun.com/thread.jspa?threadID=5149132&tstart=15
I tried getDuration() before, but it always return a same time, I think maybe I didn't realize the player. -
How to get value stored in javascript function and display in a JSP
i am doing a questionaire which is for user to input data in every question, After user input the data, a javascript function will be called to do some score calculation. Since each question will carry its final score after the calculation by the javascript function, so i use an array to store those scores and then display those scores in the same page.
However, i have to make a confirmation page to display both data and calculated score in another jsp, i only know how to display the data as it is a textfield that i can get the value by "request.getParameter("textfield1"); but i dun know how to get those scores as they are stored in an array in the javascript function, what way i can do??thank you for all your help!
I have chosen to set the score value to the hidden field when every time run the function
<script language="javascript">
function cal(index){
var thisForm = document.MC;
thisForm.score1.value=score[index];//set value to the hidden field
</script>
<input type="hidden" name="score1" value="">
<input type="hidden" name="score2" value="">
<input type="hidden" name="score3" value="">
The function will calculate only one score when every time being called. So that i can only assign one score to one hidden value at a time.
e.g, assign score[1] to thisForm.score1.value
assign score[2] to thisForm.score2.value
assign score[3] to thisForm.score3.value
how can i do this?? -
How to get type any table in function module... or something
Moderator message: Please use a more informative subject in future, and NOT IN ALL CAPITALS.
Hi experts,
how to get type any table option.
in source code.
*" CHANGING
*" REFERENCE(S_EKORG) TYPE ANY TABLE OPTIONAL
Thank you.
Edited by: Matt on Feb 17, 2009 2:27 PM - subject editedIn Function module...... Under changing tab, give the parameter name and type enter associated type any.... You would get that same in the source code and also choose Optional check box.....
You will see exact code in the FM source code -
How to get ArrayCollection's total data after filter
after i use filterFunction to filter data of some
ArrayCollection. so how to get the total original data of this
ArrayCollection?
NOT use filterFunction = null, because i use the filter data
to show at the same time!
thank you!You can get the underlying array by accessing the
ArrayCollection's "source". -
How to get the length of a field.
Hi all,
I m working on dynamic internal table.There is a need to get the length of a field, filled dynamically.How can we get it.
Thanks in advance.
Regards,
Swati gargSwati,
DATA: text(8) TYPE c,
len TYPE i.
DESCRIBE FIELD text LENGTH len IN CHARACTER MODE.
Field LEN contains the value 8.
================================
For ouput length :
DATA: float TYPE f,
out TYPE i,
len TYPE i.
DESCRIBE FIELD float LENGTH len OUTPUT-LENGTH out.
This example results in the field LEN containing the value 8, while the field OUT contains the value 22.
Don't forget to reward if useful..... -
How to get the length of a field value, not the length of DB's CHAR(20)
Hello.
I'm trying to handle a String from my DataBase and get its length:
String myName;
int i;
PreparedStatement sql = Conn.prepareStatement("SELECT NAME FROM MY_TABLE");
ResultSet results = sql.executeQuery();
results.next();
myName = results.getString("NAME");
i = myName.length();
out.println("The value is " + myName + " and the length is " + String.valueOf(i) );
I get:
" The value is Tom and the lengh is 20 "
20 is the length of the field (it's a CHAR (20) ), but I would like to get the length
of 'Tom'.
On other hand, I would like to detect if this value is 'Tom' or not, but trying with:
if (myName.equals("Tom")) {...}
or
if (myName == "Tom") {...}
There is no response.
Any experience?myName = results.getString("NAME");
if(myName!=null) myName = myName.trim(); //Take out trailing spaces
i = myName.length();Sudha -
How to get transaction id of a function called in background
Hi all,
does someone know how to retrieve t-id of a function called in background (tRFC) client side? I found
'ARFC_GET_RECEIVER_TID'
'ARFC_GET_TID'
but these works server side (function called knows its t-id .. caller no). Is there some similiar client side so that after calling function I can retrieve its transaction id ? I know it's not the same context, for explaining better, what I need it's something like fork() in C, where process father (the one that forks) receive as return value process id of process forked.
SEARCHING ON FORUM I see that many people answered on question about transaction id with sy-tcode misunderstanding the question. This transaction id it's not the tcode. This is the char 32 unique transaction code
thank you
regards
GabrieleYou can have a look at function TRFC_RECEIVER_INFO
[qRFC API for the Inbound Queue|http://help.sap.com/saphelp_nw04/helpdata/en/21/5c5f3ca0dd9770e10000000a114084/content.htm] -
How to get the value from a function using a select statement
I have a function(user defined not built in) that returns multiple values(like an array). My question is how do i get those values in a select statement. when i tried to retrieve it,
select pack.my_members from dual;
i am getting an error
ORA-00902: invalid datatype
I am sure this must be a syntax error with the select statement
The following is the function that give the array of data
package pack
package spec
Type my_table is table of varchar2(25);
function the_members
return pack.my_table;
pakcage body
function the_members return pack.my_table
Remarks: This function returns a table containing names of the
members
is
tm pack.my_table:= pack.my_table('first member','second member','third member','fourth member');
begin
return tm;
end the_members;Check this example on Pipelinedfunction
-
How to get the returned value from Functions with Callable statement?
I was glad to find that stored procedures can be invoke with Java class code by the object of Callable statement like :
String stmt = "BEGIN departments_pkg.do_select(?,?,?); END;";
and getting the output variables by
populateAttribute(DEPARTMENTNAME,st.getString(2),true,false);
But i would like to get values returned from FUNCTION other than stored procedure, how can i achieve it? Thanks a lot!Here is my code
PROCESS BEFORE OUTPUT.
MODULE STATUS_1202.
MODULE subscreen_find.
CALL SUBSCREEN SUBSEARCH INCLUDING sy-cprog dynnr.
PROCESS AFTER INPUT.
MODULE USER_COMMAND_1202.
CALL SUBSCREEN SUBSEARCH.
MODULE subscreen_find.
case sy-ucomm.
when 'SELECTED'. "fcode
case 'ZSKILL_SEARCH'. "data element
when '01'. " value range
dynnr = 0110.
when '02'.
dynnr = 0111.
endcase.
endcase.
ENDMODULE.
kindly tell me what is wrong
Edited by: Raji Thomas on Feb 8, 2010 10:20 AM
Maybe you are looking for
-
Please help me for Parameters of the reports in client server mode
Dear reader, I have a problem, suppose there is a hierarchy of listings in reports e.g. countries, states, provinces, districts. in the parameter if i want to list the districts of the selected provinces, provinces of the selected states, states of t
-
Pages not loading properly and can't install add ons (Solved)
http://i.imgur.com/oDhq3XA.png http://i.imgur.com/ABdOAx0.jpg the problem is with only the pages on mozilla's site and add-on.
-
Incorporating web service in an ABAP web dynpro view
Hi, I am trying to call an external web service to have its results displayed in an ABAP web dynpro view. I've seen various threads that are dealing with the same issue, but none of them seemed to have helped me (I am quite new at this so maybe I'm j
-
Hi All, Jdeveloper 11.1.1.6 with WC Extension Included RIDC Library in my project Integrated WLS has the oracle.ucm.ridc.app-lib(11.1.1,11.1.1) as a shared library present. I get the error as in the subject when I run my application and try to check
-
Customizing Reports In BPM Worklist
Hi all I have a 11g BPM worklist. Inside the BPM worklist i find a Link called *"Reports"*,going into it iam able to find 5 reports which is defaulty available. Now my question is that how can i create my own reports inside BPM worklist. Where do i n