Major Plugin Bug Passing Boolean Parameters via JavaScript
Calling an applet method that sets a boolean property fails under IE with the 1.3.1 Plugin. Method signature in a public object contained by the applet is:
public void setShowTitle(boolean newVal)
Attempting the following javascript in an HTML page fails with a "Type Mismatch" error:
document.MyChart.getChartObject().setShowLegend(true);
Interestingly, a method with a similar signature, which is in the top level object works fine:
document.MyChart.updateChart(true);
Definitely a bug in the plugin!
- Rick Bullotta
CTO
Lighthammer Software
Hi,
IE can only access attributes and methods from a class derived from java.applet.Applet. Therefor, Javascript cannot call methods from the object which is returned from your call to document.MyChart.getChartObject().
You should create a method (public void showLegend(boolean)) in your applet which can directly be accessed from Javascript, and let this method call the non-Applet derived methods (getChartObject().setShowLegend(boolean)).
Regards,
Kurt.
Similar Messages
-
Call Plugin-Function with parameters via JavaScript
Hi!
I have following problem: I wrote a plugin for Illustrator CS2 in C++ and now I would like to call a function of the plugin from outside of illustrator (from a JavaScript).
This can be done with the Actionsuite. But how could I then give some parameters to my function?
For example:
In the plugin, I have a function "void myFun(char * test)" and I want to call this function in JavaScript with test="Hello World" for example.
The only possible way right now seems to write parameters into a file and open that file in the plugin to "receive" them.Hi,
Could you send your plugin coding.
Regards,
Maria -
Passing boolean parameters to Oracle
Hello there everyone.
I have just started to work with Oracle stored procedures. I
have written a procedure that takes a boolean value as one of its
input parameters, but I cannot find out how to get Coldfusion to
pass the value in correctly. If I execute the procedure within the
Oracle client itself it works OK but CF always gives the error
"PLS-00306: wrong number or types of arguments in call to
'PROC_TEST' ORA-06550: line 1, column 7: PL/SQL: Statement
ignored", no matter how I try to pass my boolean value. I have
tried to use all combinations of CF_SQL_BIT and CF_SQL_INTEGER and
"1" and "true" and "TRUE" in the <cfprocparam> tag, but none
of them are working. I guess I could change the code to use an
integer instead, but using a boolean for this example makes the
most sense.
If anyone has any ideas, that would be great.
Regards
Barry.Hi Phil thanks for replying!
I continued searching Google and came up with the same
conclusion you mention. Here are a couple of links:
http://www.oracle.com/technology/tech/java/sqlj_jdbc/htdocs/jdbc_faq.htm#34_05
http://www.utexas.edu/its/unix/reference/oracledocs/v92/B10501_01/java.920/a96654/tips.htm #1005343
What a strange situation to be in. On one hand they say that
"booleans" can't be used outside of PL/SQL, but what ARE stored
procedures if not PL/SQL? Musing about this does not move us
forward though I think.
I will change my boolean parameter to be something more SQL
(without the PL!) friendly.
Thanks for getting back to me.
Barry -
Pass connect parameters via URL
I have two applications using authentication method in login page. I need submit URL from one application to another and don't show again connect page.
I try like this
http://localhost:port/pls/apex/f?p=appl_no:page::&SESSION.::::p101_username,p101_password,p101_ldap_domain::p101_username,:p101_password,:p101_kbr_ldap_domain:GO
It still show me login page in another application. I don't need see connect page. I need to start in home page.
Thanks MBThe login page and connect page is same.
Like I said we have two applications and login page in both applications is identical (our company standard) -- user (ldap), password, domain.
I want to jump from one application to another and not see again login page, instead of login like the same user, password and domain and see the application page.
The URL, I typed it and accidentally put additional: This is real URL
http://houorcl302.corp.kbr.com:7777/pls/apexit2/f?p=126:101:&SESSION::::p101_username,p101_password,p101_ldap_domain::p101_username,:p101_password,:p101_kbr_ldap_domain
Where: p101_username--> user
p101_password -- password
p101_domain -- LDAP server
In both application the same
Thanks MB -
Passing Parameters via Post Method from Webdynpro Java to a web application
Hello Experts,
I want to pass few parameters from a web dynpro application to an external web application.
In order to achieve this, I am referring to the below thread:
HTTP Post
As mentioned in the thread, I am trying to create an additional Suspend Plug parameter (besides 'Url' of type String) with name 'postParams' and of type Map.
But when I build my DC, I am getting the same error which most of the people in the thread have mentioned:
Controller XXXCompInterfaceView [Suspend]: Outbound plug (of type 'Suspend') 'Suspend' may have at most two parameters: 'Url' of type 'string' and 'postParams' of type 'Map'.
I am using SAP NetWeaver Developer Studio Version: 7.01.00
Kindly suggest if this is the NWDS version issue or is it something else that I am missing out.
Also, if it is the NWDS version issue please let me know the NWDS version that I can use to avoid this error.
Any other suggestion/alternative approach to pass the parameters via POST method from webdynpro java to an external web application apart from the one which is mentioned in the above thread is most welcome.
Thanks & Regards,
AnuragHi,
This is purely a java approach, even you can try this for your requirement.
There are two types of http calls synchronous call or Asynchronous call. So you have to choose the way to pass parameters in post method based on the http call.
if it is synchronous means, collect all the values from users/parameters using UI element eg: form and pass all the values via form to the next page is nothing but your web application url.
If it is Asynchronous means, write a http client in java and integrate the same with your custom code and you can find an option for sending parameters in post method.
here you go and find the way to implement Asynchronous scenario,
http://www.theserverside.com/news/1365153/HttpClient-and-FileUpload
http://download.oracle.com/javase/tutorial/networking/urls/readingWriting.html
http://digiassn.blogspot.com/2008/10/java-simple-httpurlconnection-example.html
Thanks & Regards
Rajesh A -
Passing of BOOLEAN parameters to PL/SQL stored procedures
Hi ,
How i can pass BOOLEAN parameter to store Procedure or do i need to pass it as Integer?
waiting for quick reply
Thanks in advance ,
PramodDisclaimer: I work for the company that makes the product mentioned below.
Procedures that take boolean parameters can be called using JDBC without having to modify them or write additional 'wrapper' procedures. The secret is to write an anonymous block that accepts a numeric parameter and sets a boolean PL/SQL variable with it before calling the procedure.
[url http://www.orindasoft.com/]OrindaBuild is a utilty made by my employer that does this along with a bunch of other stuff. If you open
[url http://www.orindasoft.com/public/Java2HTML/com/orindasoft/demo/generated/plsql/simpleExamplesDirectFlightAvailable.java.html]this URL and scroll to the bottom you'll see an example of this technique in use for a BOOLEAN OUT parameter. The relevent code is:
public String getProcCallStatement()
236 {
237 return("DECLARE \n"
238 +"/* Generated By OrindaBuild 4.0.1919 */ \n"
239 +"/* Which can be obtained at www.orindasoft.com */ \n"
240 +"p_fromcity VARCHAR2(32767) := ?; \n"
241 +"p_tocity VARCHAR2(32767) := ?; \n"
242 +"p_direct BOOLEAN := null; \n"
243 +"p_direct_SN SIGNTYPE := null; \n"
244 +"BEGIN \n"
245 +"SIMPLE_EXAMPLES.DIRECT_FLIGHT_AVAILABLE(p_fromcity,p_tocity,p_direct); \n"
246 +" \n"
247 +"IF p_direct IS NULL THEN \n"
248 +" p_direct_SN := 0; \n"
249 +"ELSIF p_direct = FALSE THEN \n"
250 +" p_direct_SN := -1; \n"
251 +"ELSIF p_direct = TRUE THEN \n"
252 +" p_direct_SN := 1; \n"
253 +"END IF; \n"
254 +"? := p_direct_SN; \n"
255 +"END; ");
256 } 'p_direct' is a boolean variable we use to capture the result of the stored procedure.
'p_direct_SN' is a variable of SIGNTYPE, a numeric datatype that can have the values -1, 0, or 1. This makes it ideal for representing booleans. The IF statement afte the procedure call sets p_direct_SN based on the value of p_direct. The magic code is in line 254:
? := p_direct_sn;
If you bind '?' as a numeric out parameter you get -1, 0 or 1 back when you run call the stored procedure.
This technique allows you to call PL/SQL procedures that have boolean parameters without having to write additional PL/SQL code. The only drawback is that you have to work with -1,0 and 1 on the Java side.
David Rolfe
Orinda Software
Dublin, Ireland
David Rolfe
Dublin, Ireland -
Pass parameters via POST in WDPortalNavigation.navigateAbsolute method
Hi,
how can i pass parameters via POST method from WD Application using WDPortalNavigation.navigateAbsolute method
Should i pass the parameters as part of the NavigationTarget URL or they should be passed via different parameter?
Thanks,
Yuly RobermanWhat is the procedure to pass parameters via POST using WebDynpro ?
I am required to pass XML Data via POST.
I have gone through the following :
a) http://help.sap.com/saphelp_nw04/helpdata/en/9e/a073001903c9419592b14c2aa63669/content.htm
b) Inter Navigation Application in Web Dynpro
However, I could not find any reference to do the same via POST.
Can anyone throw light on the same ?
Best Regards,
Subramanian V. -
Pass procedure/function parameters via URL
how to pass procedure or function parameters via URL? External link processes payment, and returns some data. I have an example procedure that forms correct URL like:
http://www.website.lt:7777/apex/f?p=109:6:1512552728675996::::P23_LOGIN_ID:UTREEP7Q84FHG
but the other procedure returns with URL (and its wrong):
http://www.website.lt:7777/apex/nora.pay_cancel?token=EC-76F379209K155914F
the source of pay_cancel procedure:
create or replace procedure pay_cancel
(token in varchar2)
as
begin
owa_util.redirect_url('f?p='||'109'||':'||'5'); --some test page
end pay_cancel;
whats wrong with the return variable?Sorry, permission problems, everything is OK with +<schema>.<procedure>?<variable>=<value>+ syntax.
Execute sql: grant execute on pay_cancel to public; -
Passing Parameters from JavaScript to method in backingbean
Hi,
I use JDev 11.1.1.2.0
I want when I press a button I call a javaScript function, This function get IP Address and Mac Address of the client machine and send it to the method in backingbean.
How can I get the IP Address and Mac Address and send it to the method in backingbean?
Thank You...
Sameh NassarThank you Arunkumar.
I get the Mac Address by this method
function call(event) {
var source = event.getSource();
var obj = new ActiveXObject("WbemScripting.SWbemLocator");
var s = obj.ConnectServer(".");
var properties = s.ExecQuery("SELECT * FROM Win32_NetworkAdapterConfiguration");
var e = new Enumerator (properties);
var mac;
while(!e.atEnd())
e.moveNext();
var p = e.item();
if(!p) continue;
if(p.Caption == "[00000008] Intel(R) PRO/100 VE Network Connection"){
alert(p.MACAddress);
mac=p.MACAddress;
break;
AdfCustomEvent.queue(source,"callServer",{sa:mac},false);
}and the passing the parameters working fine.
Thank You...
Sameh Nassar -
How to pass parameters to javascript from HTMLB Button Click
Hi Experts,
I am using a HTMLB Button, I need to pass parameters to JavaScript onClientClick.
Whether we can pass parameters to javascript function from HTMLB button.
I tried to pass parameters to javascript in onClientClick, but on load of the page it is saying that its a Syntax error.
This is the code that i have created Script
Note: The parameters and the Button are dynamically created. Also there are n Numbers of buttons created.
Please help me in this regard to solve the issue. If there are any error in syntax please let me know.
Thanks & Regards,
PalaniRather than using SQL loader, you could just use similar syntax in an external table definition. It both cases, the file may need to be at the OS level.
http://www.psoug.org/reference/externaltab.html
If your file is stored in an Apex table's clob column, you can just loop through the individual lines (but then need to parse the lines yourself). See clob2line here http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:285215954607#388438800346703098
Or you can dump the clob to the OS first (using utl_file or dbms_lob), and then read it back using external table, taking advantage of your control file definition. sqlloader has the disadvantage of needing user/pass usually.
http://www.psoug.org/reference/dbms_lob.html
http://www.psoug.org/reference/utl_file.html -
Pass URL parameters from BSP to WDA for ABAP (via Post )
Dear Gurus,/ Joerge,
I am unable to post my Code here, but with the guidance provided by Joerge i am able to solve this
i Have been through the Below thread
Pass URL parameters from WD to BSP via Post
Dear Gurus,
"Since I am unable to Post new thread i am Continuing this thread, though this Issue has been
" resolved,i need some more info on the following issue, Kindly guide me,
I have gone through the below thread but left with no clue
Pass URL parameters from WD to BSP via Post
Here i have 2 Issues
First one is --->
" After pressing the Button I am calling this URL which is WDA for ABAP
action="http://company/sap/bc/webdynpro/sap/zuser"> " I am calling WDA for ABAP URL here
" Kindly guide me how to pass the Value
Second one is -->
" This value need to be passed to the URL above and
" How to capture the Same in WINDOWINIT method of WDA for ABAP
" And how to Capture this Value in Webdynpro INIT method
"Here am using Form and method = post , I am removing this as it is causing some problem while posting
action= my WDA For ABAP URL here " I am calling WDA for ABAP URL here
" Kindly guide me how to pass the Value
" This value need to be passed to the URL above and
" How to capture the Same in WINDOWINIT method of WDA for ABAP
Thanks and Regards
Ramchander Rao.KHi,
let me see if I understand you well.
BSP -
You wrote the code for catching the user name in the event OnCreate, which means that you know who´s working with the BSP application when it starts.
Somewhere you must have a button or something with text like "Call WDA application". When user presses the button, it triggers events OnInputProcessing. Here you must write the code for the cookie that "sends" the parameter(s), something like:
CALL METHOD cl_bsp_server_side_cookie=>set_server_cookie
EXPORTING
name = 'MY_COOKIE'
application_name = 'ZUSER_NAME_GET'
application_namespace = 'ZUSER_NAME_GET'
username = sy-uname
session_id = 'SAME_FOR_ALL'
data_value = PAGE_DATA
data_name = 'PAGE_DATA'
EXPIRY_TIME_REL = 3600.
you call then the URL for the WDA application.
WDA -
probably in method WDDOINIT of the component controller you´ll write the code for reading the "content" of the cookie:
CALL METHOD cl_bsp_server_side_cookie=>get_server_cookie
EXPORTING
name = 'MY_COOKIE'
application_name = 'ZUSER_NAME_GET'
application_namespace = 'ZUSER_NAME_GET'
username = sy-uname
session_id = 'SAME_FOR_ALL'
data_name = 'PAGE_DATA'
CHANGING
data_value = PAGE_DATA.
read more about the cookies in SDN, because I am not sure if this is the correct example for transmiting values. I´ve used it in conjunction of instructions IMPORT and EXPORT for transmiting an internal table.
if this is not working properly, then try with IMPORT TO MEMORY and EXPORT FROM MEMORY. -
[CS3] Calling scriptable PanelTreeView via JavaScript?
Hello!
As far as I can see is the PanelTreeView sample already a scriptable plugin, i.e. it can be called from JavaScript.
Does anybody know how to call the plugin via JavaScript?
I get an error at following line:
var PTVRunner = app.PanelTreeView;
Thanks,
Alois BlaimerYou should be able to look at the source code to see what script names it publishes and where it publishes them to - which bosses etc. ExtendScript's data view lets you look at what methods and parameters are available on current items - you can probably look at app to see what names are published there.
Ian -
What is the better way to pass input parameters between components?
Hi all,
I had a dispute with a colleague about passing data between different WDP Development Components. The situation is like this:
Colleague has a SearchWDP (parent) und I have a BrowseWDP (child). After searching for some objects and clicking a hit in the SearchWDP, the corresponding details should be shown in BrowseWDP, via passing a bunch of parameters such as selected item's id, etc.
Now which of the following is the better practice:
- Defining a node in BrowseWDP (child) with isInputParameter set to TRUE, creating a similar node from the same type (simply via ModelBinding, both WDPs are using the same model) in SearchWDP, and defining a mapping between them so that SearchWDP fills the input nodes. From BrowserWDPs perspective, I'd call this Pull method.
or...
- Defining a node in BrowseWDP (child) with isInputParameter set to FALSE, creating a setter method in BrowseWDP Interface Controller for the collection (to be passed as parameters) and calling a wdContext.nodeBlaBla().bind(pInputParameterFromModelType). From BrowserWDPs perspective, I'd call this Push method.
The colleague's argumentation in favor of Push has not convinced me at all and I'd like to ask your opinions. Is there a best practice or recommendation for this scenario? TIA
ps: Any answer will be rewarded.Hi Cuneyt,
Refer the links below, they are very informative!
http://help.sap.com/saphelp_nw04s/helpdata/en/22/15a441cd47a209e10000000a155106/content.htm
http://help.sap.com/saphelp_nw04s/helpdata/en/67/cc744176cb127de10000000a155106/content.htm
These links are a part of the WebDynpro ABAP documentation, but the concepts are same for WDA and WDJ.
Considering your scenario, I would recommend the first alternative you have mentioned (if you refer the second link its called External Context Mapping), where component controller context node of component A (SearchWDP) is the source for Interface controller context (same name) of component B (BrowseWDP).
Thanks.
Chitrali -
How to get elements in a multi-value field via javascript?
The following will set variables.variable1 to variables.variable2 when the "Script Link" component is clicked...
<Field>
<Display class='Javascript'>
<String>
function myScript() {
el=getElement(document.mainform,"variables.variable1");
el2=getElement(document.mainform,"variables.variable2");
el.value=el2.value;
</String>
</Display>
</Field>
<Field name='Script Link'>
<Display class='Link'>
<Property name='URL'>
<String>javascript:myScript();submitCommand(document.mainform,%20'Recalculate');</String>
</Property>
</Display>
</Field>
My issue is, if variables.variabl2 is a list / multivalued, i get errors trying to traverse through the "array".
How can i read and set an a list element via javascript function above? I've tried things like get() , and variables.variable2[0] .
any help would be appreciated....
is there an API somewhere i can reference?Hi,
thanks for your reply!
If I have the parameters in the URL and use the method GET it works all right.
but I need the method to be POST. I suppose, I have the wrong way identifying the parameter name
This is from VB
varTarget = "http://localhost:9090/gm/getData" ' getData is my servlet
xmlSendStr = "SQLStmt=SELECT TCPD_Cars.* From TCPD_Cars WHERE (((TCPD_Cars.CarIdent)=45));"
xmlHttp.Open "POST", varTarget, True 'True means asynchronous
xmlHttp.Send xmlSendStrthis is part of my Servlet
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html");
PrintWriter writer = response.getWriter();
String SQLStmt = request.getParameter("SQLStmt") ;
//make the database query and get the returns
writer.println(GetSQLData(SQLStmt));
//close the write
writer.close();
}I would appreciate any suggestions -
How can I add a watermark via JavaScript that includes the current datestamp?
Part of my daily work process here is to scan in a huge stack of inbound mail. I then OCR the scans, delete the blank pages, and add a watermark. I've got a batch process set up for the first two steps, but I can't make a watermark for the datestamp itself and need to do so via JavaScript, but I have a luddite-level understanding of it.
As of right now, these are my settings I'm using to add the datestamp:
What I want to do is run a script to do the same thing and insert the current date where I have mm-dd-yy currently, but I don't have the first clue of where to start. Any help you could offer would be hugely appreciatedYou can use the doc.addWatermarkFromText() method as a JavaScript step in an Action.
for example
var dt = new Date();
var stoday = (dt.getMonth() + 1) + '-' + dt.getDate() + '-' + dt.getFullYear();
this.addWatermarkFromText({
cText: "Deposit\r" + stoday,
nTextAlign: app.constants.align.right,
nHorizAlign: app.constants.align.right,
nVertAlign: app.constants.align.top,
nHorizValue: -72, nVertValue: -72
See the SDK Help files for information on what all the parameters do.
Maybe you are looking for
-
Hello Experts, I need to implement the scenario RFC ->XI->SMS. I have already implemented the RFC to Email using XI, and all the mails that are sent are forwared to my telephone number by the Telephone Service. All the mails that i recieve are in htm
-
Newline feed not interpreted correctly by Java
In my project, rexx passes data to lotus notes thru mqseries. These data has newline feed characters. here java is used to read data from mqseries and create documents in lotus. now my problem is, this newly created document is showing some junk char
-
Preview Disabled after crossgrade
Hello. Well, I finally plunged into the deep end and installed 5.1 on my system with a clean install after staring at the crossgrade disks for weeks. I installed the Blackmagic drivers, fcp rescue etc. Unfortunately, when I now try to capture, I get
-
"Disk Images Fail to Mount/ OS X 10.4.10/Security Update 2007-006?"
Whilst downloading the most recent Mac OSX Update, 10.4.10 to a PPC G3, 600 MHz, with 1 GB SDRAM, I received an un-explained error message. Since then, my USB Web Cam doesn't function, some applications don't load, and I consistently get a Warning Me
-
To change the po(to add two fields values in main window)
hai experts, i have a purchase order with output type z933.in the main window i have two variables freight and clearance.for these variables i need to fetch the values from the db tables and show it in the po.can anybody give the sol