Value returned by the script JSFL in Javascript
Hello all, please I need your help, I have a file called loader.js, and this is my code:
var csi=new CSInterface();
function evalScript(script, callback) {
new CSInterface().evalScript(script, callback);
}
var docName = evalScript('fl.getDocumentDOM().name');
alert(jsfl);
I want the code to display the name of a document to a flash file, and I put it on a javascript file (to create an extension of html5 to Flash CC). Unfortunately, the variable docName
showing always undefined
. But if I change the code to be like this:
var docName = evalScript('fl.trace(fl.getDocumentDOM().name);');
The code above can make the variable docName
showing my 'document name' inside in the flash IDE output panel. How can I get the name of the document and put it on the variable docName
(if it's possible, I don't want to load any external jsfl file). Thanks for your help and sorry for my bad English,
"recall" must be based, so you can write as below:
(function () { 'use strict'; var csInterface = new CSInterface(); function init() { $("#button").click(function () { csInterface.evalScript('function getNm(){return fl.getDocumentDOM().name;}getNm();', function(payload){ alert("My documents name : "+ payload); }); }); } init(); }());
First arg of callback as JSFL function return value (string).
Tags: Adobe
Similar Questions
-
How to navigate to the next page based on the value returned by the method call inside the action attribute of the command key.
I use JDeveloper 12.1.2.0.0
< af:button id = "tt_b2".
rendered = "#{attrs.nextRendered} '"
partialSubmit = 'true '.
action = "#{attrs.backingBean.nextAction} '"
Text = "next".
Disabled = "#{attrs.nextDisabled}" / >
private static final String NEXT_NAVIGATION_ACTION = "controllerContext.currentViewPort.taskFlowContext.trainModel.getNext";
public String nextAction() {}
If (validate()) {}
updateModel();
Return NEXT_NAVIGATION_ACTION;
}
Returns a null value.
}
Use case is made for model train, which is being implemented based on this blog: http://javacollectibles.blogspot.co.UK/2014/10/ADF-train-template.html
We define a generic action following in the model, but the action must be called under certain conditions, based on the question of whether all validation controls had been passed on no.
You can do this in two ways:
1 returnValue = (String) ADFUtils.invokeEL("#{controllerContext.currentViewPort.taskFlowContext.trainModel.getNext}");
return returnValue;
2.
public String getNextTrainStop() {}
String nextStopAction = null;
ControllerContext controllerContext = ControllerContext.getInstance ();
ViewPortContext currentViewPortCtx = controllerContext.getCurrentViewPort ();
TaskFlowContext taskFlowCtx = currentViewPortCtx.getTaskFlowContext ();
TaskFlowTrainModel taskFlowTrainModel = taskFlowCtx.getTaskFlowTrainModel ();
TaskFlowTrainStopModel currentStop = taskFlowTrainModel.getCurrentStop ();
Terminus of TaskFlowTrainStopModel = taskFlowTrainModel.getNextStop (currentStop);
nextStopAction = nextStop.getOutcome ();
_logger.fine ("train, next stop:"+ nextStopAction ");
Return nextStopAction;
}
-
I'm currently testing our website with CF11. He is currently working with CF8 however after the migration to a new server running CF11 I met the following error.
The value returned by the function of load is not numeric.
The error occurred in
D:/applications/CFusion/CustomTags/NEC/COM/objects/address.cfc: line 263
Called from D:/apps/CFusion/CustomTags/NEC/com/objects/contact. CFC: line 331Called from D:/applications/CFusion/CustomTags/NEC/COM/objects/user.cfc: line 510
Called from D:/applications/CFusion/CustomTags/NEC/COM/objects/user.cfc: line 1675
Called from D:/website/NECPhase2/action. Validate.cfm: line 54
261: < cfif isNumeric (get.idCountry) >
262: < cfset rc = this.objCountry.setID (get.idCountry) >
263: < cfset rc = this.objCountry.load () >
264: < / cfif >
265: < cfset this.sPostcode = get.sPostcode >
Were there any changes between CF8 and CF11 which can cause this error?
Does anyone have any ideas?
The problem is in the charge function. There is a real return at the end of the function. The returntype of the function is set to digital. True is not digital, it will trigger an error.
-
How to locate the values returned by the data adapter
I have a need to internationalise/locate a string which our data adapter returns to the web client to fill out things like the table of inventory for our type of object.
In other words, I would need to make the location in my Java code on the service side.
But what I do not know how to do is how do I know what locale, the answer must be returned for. I don't get the locale information in the query for the data.
Looks like I found my answer: I can get information from the UserSession returned by the UserSessionService.
One thing I discovered, is that the user must connect to the web client with the regional settings in place. If you change the value of & local once the user is connected, the new value takes effect. You will need to sign out and then sign back in.
-
Store of value returned by the procedure in the shell variable
Hi gurus,
I am trying to store THE return value of the procedure parameter in the variable shell like below;
RET_VAL = "sqlplus $DB_USER / $DB_PASS < < EOT |" egrep. > $SCRIPT.tmp
Set linesize 2500 pagesize 0 echo off road feedback off verify off
Line of VARIABLE VARCHAR2 (4000)
exec UPCStreamDiffNodeVersions($MStreamName,$oldVersion,$newVersion,:line);
print the line;
EOT'
echo $RET_VAL
I can print what is in the variable line, but can not enter in the $RET_VAL. Please suggest.
Concerning
FoxSolomon Yakobson says:
EdStevens wrote:
This not only would get the return code of execution of sqlplus itselfNOP, he returned to any output (no return code) produced by SQL * Plus the term:
create or replace procedure in_out( v_in varchar2, v_out out varchar2 ) is begin v_out := v_in; end; /
prompt > export IN = EdStevens
prompt > RET_VAL ='sqlplus-s /.<>
Set feedback off
Go head
Line of VARIABLE VARCHAR2 (4000)
exec in_out('$IN',:line);
print the line;
EXPRESSIONS OF FOLKLORE"
prompt > echo $RET_VAL
EdStevens
Guest >SY.
I was wrong. And after thinking it an another half minute... Well, of course!
;-) -
The value returned by the function is not of type query
I couldn't understand why I got this error. I put the default var query. Help, please. If qLocal files then fine back, but when the archives qLocal is empty throw errors. I set a default value.
< name cffunction = "getName" access = "public" returnType = out of the "query" = "false".
Hint = "this method returns a query." >
< cfargument name = "id_fk" required = "no" default = "0" >
< cfargument name = "id2_fk" required = "no" default = "0" >
< cfset var qQuery = "" > "".
< name cfquery = "qLocal" datasource = "#db #" >
SELECT *.
FROM tbl
WHERE id = < cfqueryPARAM value = "#id_fk #" CFSQLType = "CF_SQL_INTEGER" > AND id2 = < cfqueryPARAM value = "#id_fk2 #" CFSQLType = "CF_SQL_INTEGER" >
< / cfquery >
< cfif qLocal.recordcount >
< cfquery name = "qQuery" datasource = "db" >SELECT *.
FOR tbl2
WHERE tbl2id = < cfqueryPARAM value = "#qLocal.id #" CFSQLType = "CF_SQL_INTEGER" >
< / cfquery >
< / cfif >
< cfreturn qQuery >
< / cffunction >The query named qQuery only runs if the qLocal returned entries. You initialized qQuery as a variable, which is not a query object. If you initialize qQuery as a query object using the QueryNew (columnlist) that should work.
-
Value returned by the function
SQL * more: Release 10.2.0.1.0 - Production on Sun 17 may at 11:41:10 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64 bit Production
With partitioning, OLAP and Data Mining options
SQL > create table testdata
() 2
facid number 3.
4 data varchar2 (10));
Table created.
SQL > insert into testdata (facid, data) values ('10 ', 'Data');
1 line of creation.
SQL > insert into testdata (facid, data) values ('20', 'Qdata');
1 line of creation.
SQL > select * from testdata;
FACID DATA
---------- ----------
10 data
20 Qdata
SQL > create or replace function testdata_fn (v_facid number)
2 back tank
3 is
4
number of tempid 5;
6
7. start
8
9. Select facid in tempid testdata where facid = v_facid;
10
11. IF tempid is null then
12 DBMS_OUTPUT. PUT_LINE ('TEMPID' | tempid);
13 back 'n';
14 on the other
15 return "Y";
16 end if;
17
18 end testdata_fn;
19.
The function is created.
SQL > select distinct testdata_fn (10) of testdata.
TESTDATA_FN (10)
--------------------------------------------------------------------------------
THERE
SQL > SELECT distinct testdata_fn (38) FROM testdata;
TESTDATA_FN (38)
--------------------------------------------------------------------------------
SQL >
I was expecting a "n" If there is no corresponding data.
Is this possible in a single query? I will join this query for an existing query.
Please give your comments.you need an exception for this handler:
.... exception when no_data_found then return 'N' end testdata_fn;
-
Unexpected 'cpuCount' value returned by the command "LIST CELL DETAIL" cellcli EI
Hello
After execution of cellcli EI 'LIST CELL DETAIL' command to a server of the cell, I noticed that the output of the 'cpuCount' attribute was 24/24.
In most of the Exadata environments I've worked with, the output is only 1 number, for example: 16
Just the curiosity, what is the sense of value 24/24 for the attribute 'cpuCount'?
I believe that this reflects the total number of CPU cores that are active on the host vs. the total number of cores of CPU on the host computer. When you run the ability to demand (or as an eighth rack), the number indicates a fraction. For example, a compute node X 5-2 contains 36 physical processor cores, but there only 18 cores enabled. In this case, the attribute coreCount on the compute node would show 18/36.
I see this on my rack X 4-2 running the version of the 12.1.2.1.2 image, while my X 3-2 12.1.2.1.1 still running rack displays the number using the old method, so it seems that it may have been introduced with this version.
[root@enkx4db01 ~] # dbmcli EI list dbserver detail | grep-e "name | coreCount | makeModel | releaseVersion.
name: enkx4db01
coreCount: 24/24
makeModel: Oracle SUN SERVER Corporation X 4-2
releaseVersion: 12.1.2.1.2.150617.1
[root@enkx3db01 ~] # dbmcli EI list dbserver detail | grep-e "name | coreCount | makeModel | releaseVersion.
name: enkx3db01
coreCount: 16
makeModel: Oracle Corporation SUN FIRE X 4170 M3
releaseVersion: 12.1.2.1.1.150316.2
-
Bug report: lv2010. Incompatible value returned by sub - vi
LV2010 WIndows XP
I have a vi that always writes to a variable via a local variable.
In the next section of the sequence, the variable may be written if this case, it is incorporated in is true.
In lv2009 when I called this vi he also returns the result to expect.
In lv2010 if I call vi in slow-mo debugging it always returns the correct value
If lance in real-time execution speed, it returns 0 if the case of writing embedded is NOT running.
The value of the indicator on the front of the Sub vi is always correct, even if the value returned to the caller vi is not.
If I change the vi to write in the variable for each case, the returned value is consistent.
It is worrying that I now need to check each vi to see if I have integrated unique business written variable
Appellant vi are run as re-entrant with multiple instances running - but all, but we the vi are idle.
I have not checked if this is relevant, that is to say also is it a calling not renetrant
My vi is complicated I need to see if I can reproduce it with a simpler version.
Michael
-
Save as not fill not custom metadata value defined by the rule of the world
I created a global rule to set the default value for the date of creation of custom as the date metadata field current system. This rule works fine for normal recording but when I use check in a similar feature of the AAU, the value created is is filled with metadata value of original content instead of the default value defined by the rule. Is it possible to fill the date of creation as default value defined by the rule even when checking in a similar role.
Thanks in advance!
Published by: 906120 on January 5, 2012 04:42Similar check-in does not script in the field "use defaultvalue", since it must copy the metadata values. However, you can add the script to the "derived field" as well. Don't use dprDefaultValue but dprDerivedValue =
This script will be evaluated before the check-in operation and any value contained in the metadata field will be replaced by the value set by the script.Kind regards
Boris -
catch the collection returned by the function in a SQL statement
I have a select like query: (I need all the values returned by the function in the select list)
Select t1.col1, t2.col2, (by selecting t.a, t.b., t.c in fn (t2.col3) t)
Of
T1, t2
where t1.col1 = t2.col2;
My function is like:
FN (T2.col3) returns an array in format of the object
Here, I was able to select only one value from the table returned by the funcation both. If I select all of the values as above, she gave too much error vales.
Please someone help me in thisuser13044793 wrote:
I have a select like query: (I need all the values returned by the function in the select list)Select t1.col1, t2.col2, (by selecting t.a, t.b., t.c in fn (t2.col3) t)
Of
T1, t2
where t1.col1 = t2.col2;No specific reason for this? It adds additional complexity to the projection of SQL, and there are additional costs of failover for the motor of PL/SQL (per line) of context. Overall - not your typical approach and one that should have sound justification.
With regard to the basic method - the SQL multiset() function should be used to create a collection. Here is an example of the approach:
SQL> create or replace type TFoo as object( 2 id number, 3 bar varchar2(5) 4 ); 5 / Type created. SQL> SQL> create or replace type TFooSet as table of TFoo; 2 / Type created. SQL> SQL> create or replace function GetSomeFoo( n number ) return TFooSet is 2 foo TFooSet; 3 begin 4 foo := new TFooSet(); 5 foo.Extend( 5 ); 6 7 for i in 1..5 8 loop 9 foo(i) := new TFoo( n+i-1, to_char(i-1,'0000') ); 10 end loop; 11 12 return( foo ); 13 end; 14 / Function created. SQL> SQL> select 2 object_id, 3 object_name, 4 cast( 5 multiset( select * from table(GetSomeFoo(object_id)) ) as TFooSet 6 ) as FOO 7 from all_objects 8 where owner = 'SYS' 9 and rownum <= 5; OBJECT_ID OBJECT_NAME FOO(ID, BAR) ---------- ------------------------------ -------------------------------------------------- 27538 /1000e8d1_LinkedHashMapValueIt TFOOSET(TFOO(27538, ' 0000'), TFOO(27539, ' 0001') , TFOO(27540, ' 0002'), TFOO(27541, ' 0003'), TFOO (27542, ' 0004')) 28544 /1005bd30_LnkdConstant TFOOSET(TFOO(28544, ' 0000'), TFOO(28545, ' 0001') , TFOO(28546, ' 0002'), TFOO(28547, ' 0003'), TFOO (28548, ' 0004')) 11718 /10076b23_OraCustomDatumClosur TFOOSET(TFOO(11718, ' 0000'), TFOO(11719, ' 0001') , TFOO(11720, ' 0002'), TFOO(11721, ' 0003'), TFOO (11722, ' 0004')) 30094 /100c1606_StandardMidiFileRead TFOOSET(TFOO(30094, ' 0000'), TFOO(30095, ' 0001') , TFOO(30096, ' 0002'), TFOO(30097, ' 0003'), TFOO (30098, ' 0004')) 684122 /1023e902_OraCharsetUTFE TFOOSET(TFOO(684122, ' 0000'), TFOO(684123, ' 0001 '), TFOO(684124, ' 0002'), TFOO(684125, ' 0003'), TFOO(684126, ' 0004')) SQL> SQL> with dataset as( 2 select 3 object_id, 4 object_name, 5 cast( 6 multiset( select * from table(GetSomeFoo(object_id)) ) as TFooSet 7 ) as FOO 8 from all_objects 9 where owner = 'SYS' 10 and rownum <= 5 11 ) 12 select 13 d.object_id, 14 d.object_name, 15 f.id, 16 f.bar 17 from dataset d, 18 table(d.foo) f 19 / OBJECT_ID OBJECT_NAME ID BAR ---------- ------------------------------ ---------- --------------- 217 DUAL 217 0000 217 DUAL 218 0001 217 DUAL 219 0002 217 DUAL 220 0003 217 DUAL 221 0004 268 SYSTEM_PRIVILEGE_MAP 268 0000 268 SYSTEM_PRIVILEGE_MAP 269 0001 268 SYSTEM_PRIVILEGE_MAP 270 0002 268 SYSTEM_PRIVILEGE_MAP 271 0003 268 SYSTEM_PRIVILEGE_MAP 272 0004 271 TABLE_PRIVILEGE_MAP 271 0000 271 TABLE_PRIVILEGE_MAP 272 0001 271 TABLE_PRIVILEGE_MAP 273 0002 271 TABLE_PRIVILEGE_MAP 274 0003 271 TABLE_PRIVILEGE_MAP 275 0004 274 STMT_AUDIT_OPTION_MAP 274 0000 274 STMT_AUDIT_OPTION_MAP 275 0001 274 STMT_AUDIT_OPTION_MAP 276 0002 274 STMT_AUDIT_OPTION_MAP 277 0003 274 STMT_AUDIT_OPTION_MAP 278 0004 815 RE$NV_LIST 815 0000 815 RE$NV_LIST 816 0001 815 RE$NV_LIST 817 0002 815 RE$NV_LIST 818 0003 815 RE$NV_LIST 819 0004 25 rows selected. SQL>
-
The default value based on the field from another table to a custom object
I'm trying to set the default value to a field in the custom object to the value of a field of account. I tried the syntax 50 ways different and just don't get the case. The label for the account field displays the form of s/n, the integration of the tag is ltDBA_ACCT and it appears in the fx reports area as Account.Text_22.
The field of custom object that I am triying update is also called s/n, which was originally the required field 'NAME '. The name of the table, account, should it be included? Do I need a function to the field?
I've updated the external ID using the line with syntex < ID > ID (at least higher ID) so I know that it is possible to define a default value, but s / < n >, < ltDBA_ACCT >, 'account '. "" S/n "and so on are simply not working.
If anyone knows how to get into what I would be really grateful for the help.OK, so if you default a field to the value of another object, you must use the JoinFieldValue function. I think you understand that, based on your original post, but I want to be sure you do.
Then this won't work by default if the folder is created from the object that you want to join the because a default works in record creation and the ID must be available so that it works correctly. It will not work if you choose the record of the related object after that registration of the custom object is created. You can set the default after, but that does not meet your requirements.
The syntax of the default are the following: JoinFieldValue (ref_record_type, foreign_key, field_name).
In your case, ref_record_type is '
', foreign_key is [ ] and field_name is ' '. The best way is to determine what is the name of the field to create a new workflow for the account and use the Workflow Rule Condition expression builder to choose your field ("DBA") in the list. The value returned by the expression builder must be placed in the field_name variable in the function JoinFieldValue (minus the parentheses and quotes). Give it a shot and let me know how you do.
Thom -
How to get the value of the global element using javascript or ajax!
Hello!
How can I read at global(point application created in the shared components) using ajax or javascript?
You can imagine that I need to get the value of this element by function as:
-----
Function getText() {var itemVal = $x ('MY_GLOBAL_ITEM') .value;} Return itemVal; }
-----
.. .but I can't do it because it is not made to couse of the page it is global element! so, anyone know no work around to do?
I know that I can make point page and read the value of that, but not what I really need!
If I have 100 pages and all pages need to use my function, it would take 100 Articles :) - that's why its no good average!
Please, share your ideas!
THXRafix,
You must use a little AJAX to retrieve a request element value. Three steps in this solution. Implementation of a callable JavaScript function, creating an application process on the request and call the JavaScript function with dynamic action.
1 set up a JavaScript function that can be called by:
This function calls the process of application level which has a visibility of the element of your application and then returns the value of points.
Edit your page and JavaScript code according to the code in the 'function and Variable global statement' of your page. You can also add to the model page, that you use, but you also have to encapsulate this code in the script tags.
getAppItem = function(pItemName){ var get = new htmldb_Get(null,$v('pFlowId'),'APPLICATION_PROCESS=GET_APP_ITEM',$v('pStepId')); get.addParam('x01',pItemName); gReturn = get.get(); get = null; return gReturn; }
2. creating an application on request process:
The application of level process has visibility to your application-level element. It is to retrieve the value of points and it prints the htp buffer. Essentially, this acts as a way to return the values of AJAX calls (the javascript function we set previously);
go to the shared components > procedures > Create.
Point process: "We Demand: run this application...". »
Name: GET_APP_ITEM
Type: Anonymous PL/SQL blockdeclare -- get the item name passed into the JavaScript function. app_item_name varchar2(30) := apex_application.g_x01; begin -- print its value to the buffer htp.p(v(app_item_name)); end;
3. call the JavaScript function with dynamic action:
The function call allows to specify an application-level element name and have its returned value. The trigger event is specific to what you need, but the action must be of type to run JavaScript code. In my case immediately the value of P1_NUMBER to my value of demand points. This code doesn't have to be in a dynamic action, but it helps to stay organized. you could call it from any script tag.
$s('P1_NUMBER',getAppItem('MY_APP_ITEM'));
See you soon,.
Janet Tyson -
By the way the value of the report column in Javascript
Dear magicians Apex,
I am a bit stuck now to implement a modal pop-up/iframe/javascript and this forum is my last hope to solve this problem.
Anyway, I will try to explain what I'm trying to accomplish.
What I need, is: I want to have a SQL report, as first column I want to have an 'ID' of my table numbers and I want this column to have a "link in the column" located in the appropriate links "column attributes. The thing is that when I click on the link of the column (when I run my report on the Apex page) I need a JQuery modal window where the pop-up in IFrame will be another page and this page uses an 'ID' of my link URL column to display the data. So, basically, I want to pass a value of 'ID' of my page parent to my page of the child which appears in an iFrame modal window.
And here's what I have:
1. I have a SQL report:
2 then, in 'The column attributes' to 'SUBNET_ID' a have put a "link in the column" URL like:select SUBNET_ID, long2ip(NETWORK_ADDRESS), long2ip(SUBNET_MASK), long2ip(END_HOST), long2ip(START_HOST), MAX_HOSTS, long2ip(BROADCAST_IP), NETWORK_CLASS, NETWORK_SIZE, HOST_SIZE from YC_CM_IP_SUBNETS
3. now, when I run my page and point my mouse over any item in my column "SUBNET_ID", I see that she receives a number of "SUBNET_ID" of my table and it shows it in the button of the browser as:javascript:ViewNetworkDetails(#SUBNET_ID#);
, or (2) or anything that is 'SUBNET_ID '. So, that's good.javascript:ViewNetworkDetails(1);
4 and here I am confused, basically, I need to pass a value of
, which seems to work as it gives me good numbers of my table to my 'ViewNetworkDetails' JavaScript function, then it can paste this value in "f?" p =... "IFrame URL. Here is my Jquery Modal script form and Javascript to redirect me to my popup page (the script is located in the HTML header):javascript:ViewNetworkDetails(#SUBNET_ID#);
PS My hypothesis is that there is a problem with this part of my script<script type="text/javascript"> function ViewNetworkDetails(){ var apexSession = $v('pInstance'); var apexAppId = $v('pFlowId'); var subnetIDNumber = document.getElementById(#SUBNET_ID#); $(function(){ vRuleBox = '<div id="ViewNetworkDetailsBox" title="View Subnet Details"> <iframe src="f?p='+apexAppId+':103:'+apexSession+'::NO:103:P103_SUBNET_ID:'+subnetIDNumber+' "width="875" height="500" title="View Subnet Details" frameborder="no"></iframe></div>' $(document.body).append(vRuleBox); $("#ViewNetworkDetailsBox").dialog({ buttons:{"Cancel":function(){$(this).dialog("close");}}, stack: true, modal: true, width: 950, resizable: true, autoResize: true, draggable: true, close : function(){$("#ViewNetworkDetailsBox").remove(); location.reload(true); } }); }); } </script>
where I can't get my "SUBNET_ID" value fromvar subnetIDNumber = document.getElementById(#SUBNET_ID#);
in 'subnetIDNumber' variable and that's why I can't spend my iFrame URL.javascript:ViewNetworkDetails(#SUBNET_ID#);
P.S. P.S. the child page 103 has a "Automated row fetch", is not a problem. In addition, I did a simple test, where I had a page element 'P102_Value' with values and in my script I had instead
Thisvar subnetIDNumber = document.getElementById(#SUBNET_ID#);
and it worked perfectly fine... but cannot operate against the SQL Select statement :-(var subnetIDNumber = $v('P102_Value');
HEEEEEEEEEEEEEELLLLLPPPP.
Thank youChange your column to link to send the value of the subnet_id column to the function call (you mentioned, but I don't know if you've actually done m)
JavaScript:ViewNetworkDetails(#SUBNET_ID#);
You pass the value of the parameter to the function, but not defined all the parameters in the function definition (this is possible in JS, no other parameter is ignored)
For example, to change the function to accept the subnet ID parameter (I'm really surprised how you missed it) and assign this parameter to a variable.eehelp_c