QML createObject with parameters
Is it possible to pass parameters to the function createObject QML?
QML use us createObject to create objects of a definition of component dynamically.
i.e.
attachedObjects:]
{ComponentDefinition}
ID: myDef
{Of container
property int fooBar
}
}
]
var myobject = myDef.createObject)
Now, according to the documentation below, we can pass a JSON structure to initialize the properties of the new object, who get installation before creating objects and allow things like the links work correctly:
https://developer.BlackBerry.com/Cascades/reference/QML-component.html#CreateObject-method
In theory I should be able to do this:
var myobject = myDef.createObject (null, {"fooBar": 1234})
I can't get this work though - does anyone have a solution?
Yes, this code does not work.
Try this
var component = Qt.createComponent("MyPage.qml"); var mypage = component.createObject(null, {"fooBar": 1234}); mycontainer.add(mypage)
It should work.
Tags: BlackBerry Developers
Similar Questions
-
HP 40GS systems of linear equation with parameters
Hello
I'm in the learning curve of the HP 40GS - a very interesting tool.
Is it possible to solve systems of equations with parameters, for example:
A * X + Y = 2 * 12
5 * X - 3 * A * Y = 5
HP 50 g, this isn't a big deal, but with HP 40GS I don't have an idea so far.
If this is not possible, it will be possible if I have a third equation (so 3 equations in 3 unknowns)?
Thank you very much in advance,
Joachim
P.S.: So far, I feel very comfortable with the HP 40GS and menus!
----------------------------------------
I am not a member of the HP Calculator development team - unfortunately!Hello
now, I found a way to calculate the systems of equations with symbolic coefficients:
See the document: http://www.hp.com/ctg/Manual/c00829737.pdf to page 346ff
With the command 'linsolve', it is possible to calculate with more unknown than equations.
I hope this helps anyone with the same or close problem.
Have fun with your calculators and do not hesitate to write other ways of calculations.
Greetings,
Joachim
-
Calling stored procedures with parameters with the database connectivity Toolkit
Hi all
I'm new to the forum and struggling to find a solution to a particular problem I have in this respect, using the LabVIEW Database Connectivity Toolkit on a project, I am currently working on my work. I have a database in which I tables and stored procedures with parameters. Some of these stored procedures have input, output and return parameters.
I tried to follow this example, but to no avail: http://digital.ni.com/public.nsf/allkb/07FD130746083E0686257300006326C4?OpenDocument
Such a stored procedure I am working on the implementation is named "dbo.getAllowablePNs", running "SELECT * from DeviceType" (DeviceType is the table). In this case, it requires no input parameter, it has an output parameter that generates the table [cluster] and has a return parameter that returns an integer value (status code for execution) to show if an error occurred. The DeviceType table has 3 columns; ID (PK, int not null), PN (nvarchar ((15), null) and NumMACAddresses (int, null).) I have surpassed many examples and I talk to the support OR try to implement this and similar procedures stored in LabVIEW but have not been successful. I am able to connect to the database with the VI of open connection without error, but spin in some confusion as a result of this step. I then try to use the VI of parameter query create to call the stored procedure and set the parameters. I guess I would then use the Set parameter value for each parameter that is connected to the entry of parameters on the previous query with parameters VI VI? I am also having some confusion during and after these steps as well. I would greatly appreciate advice or suggestions that anyone could have in this situation because I am not a SQL expert. Also, I would be happy to provide more information that might be useful.
Kind regards
Jon
Here's what I use to do this. I think I had to change him create parameterized query VI for him to work. There is a post on the forum about this somewhere.
-
Help, please!
I am currently working on a version of BB10 to an existing application. The application calls a Web service with parameters (including a key). The service then returns the data. It works very well on java with HttpConnection. I'm having a hard time doing the same thing in c ++. I am following the tutorial here:
It works very well for URLS with the format:
""http://developer.blackberry.com/cascades/files/documentation/images/model.xml " "
But what happens if my URL looks like this:
How to pass the parameter "serviceKey"?
If you use the url that you have shown, did you get a response in your browser?
-
Run SQL through batch file, with parameters
Hi all
I run SQL through Batch files before, but I am a little confused with the execution of the sql with parameters. For example, if I have a named sql file:
I can run this problem normally, but including the substitution variables, as in the batch (.bat) file called Execute_insert.cmd is a bit annoying... I played a little with it and cannot operate.insert.sql Insert into TableA select * from TableB where service_dt >= '&&x_start_dt' and service_dt <= '&&x_end_dt';
Any help would be appreciated.
Thank you
EdChange your insert.sql to something more like:
Insert into TableA select * from TableB where service_dt >= TO_DATE('&1', 'format mask') and service_dt <= TO_DATE('&2', 'format mask');
Then, would you call it:
sqlplus user/password @insert.sql 01-oct-2012 31-oct-2012
John
-
How to call a method of the AM with parameters of Bean managed?
Hello world
I have a situation where I need to call the Managed bean (setDefaultSubInv) AM, under value changes Listner method. Here's what I do, I added the AM method on page links, and then at the bean call it
Class [] paramTypes = {};
Object [] params = {};
invokeEL ("#{bindings.setDefaultSubInv.execute}", paramTypes, params);
It works and be able to call this method, if there are no parameters. Say that I pass a parameter to setDefaultSubInv(String a) method AM, I tried to call it bean but raise an error
The string available = 'test ';
Class [] paramTypes = {String.class};
Object [] params = {DISP};
invokeEL ("#{bindings.setDefaultSubInv.execute}", paramTypes, params);
I'm not sure this is the right way to call the method with parameters. Can anyone tell how to call a method of the AM with bean to manage settings
Thank you
San.Just do the following
1. your method in the Client Interface.
2 - Add to Page Def.
3 - Customize your Script like below one to reach your goal.BindingContainer links = getBindings();
OperationBinding operationBinding = bindings.getOperationBinding("GetUserRoles");
operationBinding.getParamsMap () .put ("username", "oracle");
operationBinding.getParamsMap () .put ("role", "F1211");
operationBinding.getParamsMap () .put ("Connection", "JDBC");
Object result = operationBinding.execute ();
If (! operationBinding.getErrors () .isEmpty ()) {}
Returns a null value.
}
Returns a null value.
}I hope it helps you
Thank you -
Branch to the Page identified by the element with parameters
A certain page we originally had a 'branch at or the Page URL' that has parameters associated with it (which one who reset the element on the page the branch goes back to the current value of the item page before branching him given that this necessary element to stay with the current value of population but was erased when he branched out) but now I have a new Application process that defines an element of the request for the page that should be branched to.
Since Apex does not recognize the elements of the Application in a "branch of Page or URL", I need to create a "branch of Page identified by Item", the problem is that there is no "Set these elements" "with these values" with this type of branch or the option to include parameters in a URL target. I already tried to use the "branch Page or the URL" with the Application in the URL element, but that no longer works.
Any suggestions on how I might branch to a page based on an element of the Application (if not this way, somehow creates a branch to a page based on a value in an application process) with the settings?
What does not make sense to me, is that you could create a branch to a Page with a value of Page element with parameters defining the elements with certain values, but you can do this when identified by the item or it is not yet Application_Items in a Branch_to_Page/URL.
Thank you in advance,
-BrianBrian,
Have you tried to use the Type of the branch "Branch to the Page identified by the (name of the use element) element" and put the name of your APP_ITEM like
APP_ITEM
?
This should work for you.
Denes Kubicek
------------------------------------------------------------------------------
http://deneskubicek.blogspot.com/
http://www.Opal-consulting.de/training
http://Apex.Oracle.com/pls/OTN/f?p=31517:1
------------------------------------------------------------------------------ -
Lauch a shortcut to my .exe with parameters
Hi guys,.
I would like to know if it is possible to set the parameters after the path 'target' in the shortcut of my .exe to launch my application.
That is to say:
shortcut key 1:
Like 'C:\labview\MyAppli.exe' /File_Config_1
2 shortcut key:
/File_Config_2 "C:\labview\MyAppli.exe".
Then read good config file in my app.
Thank you
There is a bundled with LabVIEW example called "CommandLine" which shows how to do what you want.
-
Dynamic action calling JavaScript with parameters
I have a DA who called some JavaScript to Hide/Show/cancel 2 P110_PARENT_SOLUTION_ID text elements, P110_ANSWER_TEXT be part of radio P110_DIRECTORY_TYPE.
DA > settings > Code:
If ($v ("P110_DIRECTORY_TYPE") == 'R') {}
$("label[for=P110_HEADER_TEXT]").text ("name of the root directory")
$x_Hide ('P110_PARENT_SOLUTION_ID');
$x_Value('P110_PARENT_SOLUTION_ID',"");
$x_Hide ('P110_ANSWER_TEXT');
} ElseIf ($v ("P110_DIRECTORY_TYPE") == 'E') {}
$("label[for=P110_HEADER_TEXT]").text ("header text")
$x_Show ('P110_PARENT_SOLUTION_ID');
$x_Show ('P110_ANSWER_TEXT');
} ElseIf ($v ("P110_DIRECTORY_TYPE") ==' no) {}
$("label[for=P110_HEADER_TEXT]").text ("directory name")
$x_Show ('P110_PARENT_SOLUTION_ID');
$x_Hide ('P110_ANSWER_TEXT');
$x_Value('P110_ANSWER_TEXT',"");
}
This works perfectly, however I need to reproduce this code for 2 more areas on the same page. To do this, I created a JavaScript function with 3 parameters and call it in the dynamic action
Page header > Javascript > function and Global Variable declaration:
function ProcessDirType
(I_DirectoryType
I_ParentSolutionId
I_AnswerText
)
{
If ($v (I_DirectoryType) == 'R') {}
$("label[for=P110_HEADER_TEXT]").text ("name of the root directory")
$x_Hide (I_ParentSolutionId);
$x_Value(I_ParentSolutionId,"");
$x_Hide (I_AnswerText);
} ElseIf ($v (I_DirectoryType) == 'E') {}
$("label[for=P110_HEADER_TEXT]").text ("header text")
$x_Show (I_ParentSolutionId);
$x_Show (I_AnswerText);
} ElseIf ($v (I_DirectoryType) ==' no) {}
$("label[for=P110_HEADER_TEXT]").text ("directory name")
$x_Show (I_ParentSolutionId);
$x_Hide (I_AnswerText);
$x_Value(I_AnswerText,"");
}
}
DA > settings > Code:
ProcessDirType
("P110_DIRECTORY_TYPE"
, "P110_PARENT_SOLUTION_ID".
, "P110_ANSWER_TEXT".
);
Her DA stopped working correctly, I tried to replace the parameters with single quotes but not joy.
Can someone give me the correct syntax so that I can make my code more generic and call in three different DA?
Concerning
ADE
I didn't think there would be syntax errors, everything looks good from here. Single or double quotes can be used.
Maybe it's something to do with the way in which the dynamic action is called. Is what event listening? Nothing has been changed in order to manage several regions?
You can add this sort of thing to your javascript to help determine what is invoked and view the output in the javascript console.
console.log('I_DirectoryType:'+I_DirectoryType);
-
The execution of a method of DC with parameters: variable bindings or pageFlowScope?
I use a data control method to send the email that has parameters. Based on the behavior I see when I drag and drop methods of data control to a page and I have JDeveloper automatically generate a form of parameter, I did the following which uses to store the settings.
My data control method sendEmail method that has two input parameters 'recipient' and 'sender '.
<af:commandImageLink id="cil1" icon="/images/email.png" actionListener="#{bindings.sendEmail.execute}"> <af:setActionListener from="#{row.recipient}" to="#{bindings.sendEmail_recipient.inputValue}"/> <af:setActionListener from="#{row.sender}" to="#{bindings.sendEmail_sender.inputValue}"/> </af:commandImageLink>
Can I manually set the sendEmail_recipient and sendEmail_sender variables in the definition of page like this file...
<variableIterator id="variables"> <variable Type="java.lang.String" Name="sendEmail_recipient" IsQueriable="false"/> <variable Type="java.lang.String" Name="sendEmail_sender" IsQueriable="false"/> </variableIterator> . . . <attributeValues IterBinding="variables" id="sendEmail_recipient"> <AttrNames> <Item Value="sendEmail_recipient"/> </AttrNames> </attributeValues> <attributeValues IterBinding="variables" id="sendEmail_sender"> <AttrNames> <Item Value="sendEmail_sender"/> </AttrNames> </attributeValues>
.. then I put my method parameters in the definition of page like this file...
<methodAction id="sendEmail" RequiresUpdateModel="true"
Action="invokeMethod" MethodName="sendEmail"
IsViewObjectMethod="false" DataControl="CustomDC"
InstanceName="CustomDC.dataProvider">
<NamedData NDName="recipient"
NDValue="#{bindings.sendEmail_recipient}"
NDType="java.lang.String"/>
<NamedData NDName="sender"
NDValue="#{bindings.sendEmail_sender}"
NDType="java.lang.String"/>
</methodAction>
Notice that I use the GUI to define the parameters of the method, but the changes to the XML here is the same.
A colleague asked why it saying that it is just as easy to put my data in pageFlowScope like that...
<af:commandImageLink id="cil1" icon="/images/email.png" actionListener="#{bindings.sendEmail.execute}">
<af:setActionListener from="#{row.recipient}" to="#{pageFlowScope.sendEmail_recipient}"/>
<af:setActionListener from="#{row.sender}" to="#{pageFlowScope.sendEmail_sender}"/>
</af:commandImageLink>
.. then change the method like this...
<methodAction id="sendEmail" RequiresUpdateModel="true"
Action="invokeMethod" MethodName="sendEmail"
IsViewObjectMethod="false" DataControl="CustomDC"
InstanceName="CustomDC.dataProvider">
<NamedData NDName="recipient"
NDValue="#{pageFlowScope.sendEmail_recipient}"
NDType="java.lang.String"/>
<NamedData NDName="sender"
NDValue="#{pageFlowScope.sendEmail_sender}"
NDType="java.lang.String"/>
</methodAction>
In this way does not require that I define "variables" in the definition of page file.
My question is why or why not this method of using pageFlowScope appropriate or better than using "links" to store my parameter values and the link between my commandImageLink and the method of backend?
User, tell us your version of Jdev, please!
The iterator variable lives only with the page. Scope of page file lives in the course of the entire task. If a difference is the scope of variables. It is not necessary to their scope of flow layout. You can use views instead. The two approaches can be used, but I would like to put these partners in the iterator as variable they so clearly show its use here. You go green like any other attribute of the link layer that gives you more consistent programming experience.
A question, if you move the method into the page create a form of parameter, parameter variables must be created automatically by the framework of he. From your description, I understand that this was not the case?
Timo
-
I use Jdev 11.1.2.3.
I have inputVO with the query asSelect "store", as a double.
The VO store attribute, I have inputlistofvalues that comes from storesLOVVO, which the query is like
Select store_name, store_id from all_stores.
Now I drag store to inputVO on the page of the user interface as inputListofValue. The user selects the value and runs the page and everything goes as you wish and in no time at all.
Now the user manually removes the selected value from the store of the user interface and clicks a button to deal with something. But instead of calling the method that is present on the actionlistener for this method, the query of storesLOVVO runs on the server (I can see in the newspapers) for a very long time with store_name as null as a condition.
If I run this query in SQL developer, it gives results in 0.02 sec, even with store_name as null clause added.
Why jdev performs this LOV VO when there is no parameters?
And if she runs the VO, why are so slow... its almost take 2 minutes and then the rest of the processing occurs.
Yet,.
Take a look at this to see if it helps: Andrejus Baranovskis Blog: anti-patterns ADF: dangerous tutorials - a real experience in the ADF
-
I have about 35 with Select INSERT in a single script file (example below) and they all accept two parameters (username, location).
What is the best way to create a package in this case?
And, instead of coding in hard pass UserID and its location; How to pass those values to the package?
declare
sUserID varchar2 (6): = "ABC112";
Location varchar2 (6): = "US0009";
INSERT INTO MyTempTable (city, State, Zip)
SELECT City, State, zip from MyTable1
WHERE UserID = 'JDOE01' AND the location = "US0009".
commit;
INSERT INTO MyTempTable (city, State, Zip)
SELECT City, State, zip from MyTable2
WHERE UserID = 'JDOE01' AND the location = "US0009".
commit;
And so on...
Hello
881668 wrote:
I have about 35 procedures in a single script file (example below) and they all accept two parameters (username, location).
What is the best way to create a package in this case?
And, instead of coding in hard pass UserID and its location; How to pass those values to the package?
declare
sUserID varchar2 (6): = "ABC112";
Location varchar2 (6): = "US0009";
INSERT INTO MyTempTable (city, State, Zip)
SELECT City, State, zip from MyTable1
WHERE UserID = 'JDOE01' AND the location = "US0009".
commit;
INSERT INTO MyTempTable (city, State, Zip)
SELECT City, State, zip from MyTable2
WHERE UserID = 'JDOE01' AND the location = "US0009".
commit;
And so on...
The code you posted is not ' t have procedures. When you say 'procedure', do you mean 'anonymous block '?
Maybe you want a package body that looks like this:
CREATE or REPLACE PACKAGE BODY fubar
ASPROCEDURE insert_MyTempTable
(
sUserID in VARCHAR2
in_Location IN VARCHAR2
)
IS
BEGININSERT INTO MyTempTable (city, State, Zip)
SELECT City, State, zip
From MyTable1
WHERE UserID = sUserID
AND location = in_Location
UNION ALL
SELECT City, State, zip
From MyTable2
WHERE UserID = sUserID
AND the location = in_Location;commit; -Maybe
END insert_MyTempTable;Fubar END;
/
DISPLAY ERRORSBefore you create the package body, however, you must create a package specification, which can be just the names of procedure and lists of arguments of the package body, like this;
CREATE or REPLACE PACKAGE fubar
ASPROCEDURE insert_MyYempTable
(
sUserID in VARCHAR2
in_Location IN VARCHAR2
)
;Fubar END;
/
DISPLAY ERRORSNote that you can declare the types of the arguments (for example, VARCHAR2) in the package, but no details such as the maximum length (in other words, you don't tell VARCHAR2 (6).) The actual size is determined by the appellant.
If a variable is used in a SQL statement, make sure that there not exactly the same name as a column in any table used in this declaration. Since the argument is used in a SQL statement, and the statement references a table that has a column called location, location isn't a good name for the argument. That's why I called it in_location.
It may be better not to be INVOLVED in the procedure. It is better to give the appellant the opportunity to COMMIT or ROLLBACK later.
-
Call taskflow ADF with parameters using POST
Hello
Can you give an example or point me to an example describing citing taskflow adf with settings?
The requirement is to have the parameters passed using the POST method and not by passing the parameters in the url.
Jdev: 11.1.1.4.0
Thank you!
Thanks Frank!
My use case was to invoke a jspx (using the POST form) that has a taskflow for the region.
I was able to invoke the jspx via POST and move the jspx attributes to the taskflow using the #{param. PARAM_NAME} (where PARAM_NAME is defined in form invoking the jspx).
I was able to invoke the taskflow adf of external application without adding parameters in the url. By calling jspx and taskflow not directly, I was able to avoid transmitting the taskflow id and location.
-
FND_REQUEST PL/SQL procedure with parameters
Hi guys
I created a concurrent program, using the PL/SQL procedure that has 2 parameters. I try to call the concurrent program to help
v_req_id: = FND_REQUEST. SUBMIT_REQUEST ('INV', 'OMS_POP_INVVALUES_P',
NULL, SYSDATE, FALSE, l_on_date, l_org_id,.
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
);
COMMIT;
However, the competitor programming always fail with
* Starts * August 26, 2013 14:02:31 error ORACLE 6550 for Cause of FDPSTP: FDPSTP failed due to the ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in the call to 'OMS_POP_INVVALUES_P' ORA-06550: line 1, column 7: PL/SQL: statement ignored
and I doubt that it is because the database procedure call is not correct.
I put four parameters with the simultaneous program, as they were with the procedure itself, which are
p_on_date BY DATE, NUMBER, errbuff OUT VARCHAR2, OUT VARCHAR2 retcode p_org_id
Help, please
Kind regards
REDA
Okay I solved the problem of
1. change the order of the parameters in the procedure
CREATE OR REPLACE PROCEDURE OMS_POP_INVVALUES_P)
errbuff OUT VARCHAR2, retcode ON NUMBER, p_on_date AS, p_org_id in NUMBER)
IS
and by changing the call of simultaneous program as follows
l_req_id: =.
fnd_request.submit_request ('INV', 'OMS_POP_INVVALUES_P',
NULL, SYSDATE, FALSE, l_in_date, l_org_id, CHR (0));
: SYSTEM. Message_Level: = '25';
COMMIT;
After removing all the parameters of the list of program parameters. No need to pass a value for errbuff and retcode, just pass other parameters and put an end to the list of parameters with CHR (0). Hope it's useful for someone else there.
Kind regards
REDA
-
Hello!
This is my first powerCLI-scripting.
I want to start a powerCLI-Script Windows - batch. And I have to make the script a parameter ('1' or '0').
My test.bat file:
%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe - PSConsoleFile "C:\Programme\VMware\Infrastructure\vSphere PowerCLI\vim.psc1" - command '& {C:\bat\USV\vmware\test.ps1} '.
Test.ps1 I want to manage settings of commited "0" and "1". But I don't know how.
Where can I configure the settings I want to commit?
Is this correct?
%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe - PSConsoleFile "C:\Programme\VMware\Infrastructure\vSphere PowerCLI\vim.psc1" - command '& {C:\bat\USV\vmware\test.ps1 parameter} '.
THX
Hansis
Passing parameters to the .ps1 file, as you did in the 2nd line.
In the .ps1 file, you can access the parameters in the table $args, i.e. $args [0], $args [1]...
Or you can have a Param statement at the beginning of your script and work with named parameters.
Param($argument1,$argument2)
Maybe you are looking for
-
Firefox 8 tab and activity indicator
After fighting it for many months now, I had to finally update my Firefox after that my icons were themselves (never updated because I was used to the one I already had) reset. Now the problem is I want to move the tab icon and the icon of the indica
-
Race test it came under test system... noise.running memory watch qoef31-5r67gm-mfh14k-404f03 product I would like to: lk182av #aba. This test failed. I need major help can not find codes anywhere on this site start up to this test passed. When I go
-
Games break on my box of device HTC surround someone help?
each game of xbox live I tried to listen to excerpts on this device has crashed? Y at - it something I am doing wrong during installation?
-
Iconia W3-810 cannot boot from the recovery disc
Hi, I have a 32 GB Iconia W3-810. The original recovery disk was lost. I made a Bootable DVD of 8.1 and also Win 8.1 bootable USB key. These two have been tested on another laptop, and both can start this laptop to the installation environment. I a
-
Why Microsoft isn't an option in their email clients (Outlook, Outlook Express, Live Mail, hot Mail) block IP addresses that send spam?