Calling a method of the Peoplecode Java
HelloWe are responsible to PeopleSoft HRHD a Single Sign On to a third party using the 3DES encryption, based in the email of the user to the third party. We managed to get the java program that was used to encrypt the e-mail and use it to treat the decryption side of Peoplesoft.
First of all, we are right to the SignOn Peoplecode, and then creating a Peoplecode file dealing with the encrypted string that was passed via the URL?
Assuming that we are right in this first step, what do we call this java method? We placed the java class in the PS_HOME/appserv/classes directory, and we kind of stuck on this part of the Peoplecode.
< Peoplecode >
& oDecrypt = CreateJavaObject ("SSOCrpyto");
& strDecEmail = oDecrypt.decryptString (& strEncEmail);
The Java class decryptString part is built like this.
public String decryptString (message [] byte) throws Exception {}
.. ethical here...
}
We are not familiar on how the parameter is passed when the type of data in java is an array of byte [] (if I understood).
Thank you.
Jeremy Leung
Published by: 934351 on May 15, 2012 12:36
I don't think I am able to provide advice on the mistakes of java, since my java knowledge is at a level of writing reading / (starting). Sorry about that.
Looking on the net, you see this error a lot and indeed it something to do with the entry is a multiple of 8 and while padding encoding is used to "fill" the 8 bytes.
Tags: Oracle Applications
Similar Questions
-
How to call a method of the Module of the Application of a class of ViewObjectImpl?
Howdy,
With the help of Studio Edition Version 11.1.1.3.0.
I have a setup where a user between an element and a price. When the item and the price is committed, I want this event to then influence the price of his parents. My idea is to do a ViewRowImpl class and then call an AppModuleImpl class that is her parents and it affects their attributes.
Question:
(1) how to call a method on the Module of the Application of a class of ViewObjectImpl?
(2) when I set an attribute on a view through the AppModuleImpl object, I'll make an infinite loop in this way? that is the AppModuleImpl calls the ViewRowImpl class on a setAttribue (< name >, < value >)?public void setPrice(Number value) { setAttributeInternal(PRICE, value); DCBindingContainer bindings = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry(); BindingContext bctx = bindings.getBindingContext(); DCDataControl control = bctx.findDataControl("AppModuleDataControl"); ApplicationModule am = (ApplicationModule ) control.getDataProvider(); //uh now what?? // am.getProperty("method call(getTipsNum())") ? }
Thank you guys.It's an interesting problem, I'll take a stab to solve here.
First let's see I understand the data model:
(a) there is a table called BOM with a self referencing FK creating a hierarchy of data
(b) each record BOM is usually a child to another record BOM, so using your example, a van is composed of frames and tires - Let's say that this amounts to 3 records in the Schedule table.
(c) check parent, truck, is the root of the hierarchy, and so the FK relationship sucks.
(d) the price of a truck consists of its children. So if the frame costs $1,000 and tires $500, the pickup truck costs total $1,500.
(e) a change in the price of any folder BOM, upwards or downwards must be propagated to its parent folder BOM. As an example, if the tires up to $600, the pickup truck is now $1600 ($1000 frame + tires $600).Does this sound right?
Well, that I understand the data model, here's what I'd do build in what concerns objects ADF BC:
(1) an entity BOM (EO) object - let's call this Bom
(2) a BOM BOM EO association (representing the self referencing FK)-Let's call it BomBomFkAssoc
(3) an object to view BOM (VO) based on the EO - let's call it BomView
(4) BOM VO view link BOM VO based on EO of #2 association - call BomBomFkLinkNext, we create the Java constructs:
(5) #1 ensures that the EntityImpl has been created
(6) #4 guarantees for the EO association that it generates the required Java accessorsNow the additional code:
(7) for the EntityImpl # 5, in the field of setter setPrice() something like the following:
public Number setPrice(Number value) { Number diffPrice = value.minus(getPrice()); setAttributeInternal(PRICE, value); BomImpl parentBom = getBom(); // from step #6, the EntityImpl should have an accessor method to it's parent BomImpl record Number parentDiffPrice = parentBom.getPrice().add(diffPrice); parentBom.setPrice(parentDiffPrice); }
From a point of view JSF, now when I change a specific record of the Nomenclature in an edit form, a change for the price of registration for the Bill to submit time will automatically propagated to the top of the hierarchy of the BOM because the method setPrice() of the current OS of BOM will walk to the top of the hierarchy of the BOM to the parent following the call it is setPrice() method , which will be then walk to the next BOM record and so forth. At the time all BOM records with changes should be committed to the database.
You don't need to test this in JSF, but simply the browser component of company on the Application template project Module.
.... Of course... If I misunderstood your data model, it will be of no help whatsoever.
CM.
-
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 -
Calling a method in the Parent of window title component
Hi all
I have a parent component that opens a window of title when I click on a button. Now, I want to call a method in the parent of the title window component. How do I do this in Flex? Could someone give me a tip please.
Thanks in advance for the helpThis is a good start:
http://weblogs.Macromedia.com/pent/archives/2007/11/popup_can_you_h.html -
How an applet instance can call a method in the context of the proceeding one another?
Consider an applet Java Classic Card with multiple instances that need to share data in a variable byte [] (e.g. persistent mutable, i.e. EEPROM/Flash), containing information common to all instances.
Variable static ubyte [] would be perfect, but these happen to be prohibited by the validation rules imposed on me (I am told: as a way to tote to show that UN-instantiating an instance releases this she distributed on instantiation).
This would be solved if an instance of the slave could call one of the method of the applet in the context of an instance of master (perhaps initially identified by AID, or/and/then in another way). How is that possible? Any example?Hello
So I think that you don't need other assistance,
The link you provide, has a useful exampleKind regards
Hana -
What is the best way to call a method in the bean on the adf page loading?
Hello
which is the best way to call a method in managing the beans on the adf page loading.
My version of jdev 11.1.1.5.0
Thank youI don't know if it's the right answer for your question try this...
In taskflow for properties of method call, you must return a value when you use #{pageFlowScope.returnvalue} (returnvalue is a variable), so you can use your return value in the taskflow... Please let me if this is correct...
-
Calling a method in the BPM of jsp page object
Hi all
I try to call a method of object of BPM using < f: invokeUrl >
I change the properties of the method server to yes-side.
and then how can I get an object request and response within the BPM method.
Thank you.To create a bit of this kind of argument method yo have to
(1) create a method - right click on the object of BPM-> new method
(2) add the arguments - in the variables pane, find the Arguments section, then click Add ICO, give it a name, click on the... button to select a type, choose aand type 'Fuego.Net.HttpResponse' in the research section. Also you can find it on the catalog of components-> Fuego-> Net-> HttpResponse
Do the same for Fuego.Net.HttpRequestIt's what you want to know?
-
Call a method after the signature of the user
I got my application with the ADF security. After that the user logged on, I want to inform me of ViewObjects. I want to store this information in a managed bean in session. I tried to use a HttpSessionListener but when I create the managed bean session I get an exception: oracle.adf.controller.ControllerException: ADFC-12013: State of the controller has not been initialized for the current request.
@Override
{} public void sessionCreated (HttpSessionEvent event)
InitializerBean userBean = new InitializerBean();
userBean.init ();
event.getSession () .setAttribute ("securityBean", userBean);
}
In addition, the listener is called when a session is created and not only when a user logged on. JDev 11 GR 2
Hello
If you redirect to a specific page after authentication, you can use an afterMethod on the f: view component to listen to RESTORE them after VIEW (to avoid the execution logic for all phases of the life cycle) and then query the information. You want to maintain a flag of session once you read the user information so that it is read again unnecessarily.
Another option would be to use a JSF PhaseListener (after RESTORATION of VIEW with a flag of session to indicate that the query has been run)
Frank
-
Call a method before the following operation to set the selected values
Use case: I display a VO as an ADF multiple checkbox select. This VO is the detail of a master/detail. I managed to store the selection state in a bean managed on autoSubmit. Then the user navigate to the record of the master, and then goes back to the previous record. The buttons next and previous were created using operations in data controls. I want to back up the State of the selection by clicking previous or next.
There are a lot of tutorial on how to get the selected values, but none on how to set the selected values. How would you do it?
11 GR 1 material JDev
What I ended up doing:
1 redefine listener action for the navigation buttons
{} public void nextQuestion (ActionEvent event)
saveSelectedState();
navigateQuestion ("Next");
restoreSelectedState();
}
{} private void navigateQuestion (string operation)
OperationBinding operationBinding = ADFUtils.findOperation (operation);
operationBinding.execute ();
}
2 Save and restore the selection state using bindings
Guava Multimap
Private ListMultimap
selectedIndices. private void saveSelectedState() {}
Get id question
DCIteratorBinding questionBinding = ADFUtils.findIterator ("QuestionsView1Iterator");
Question of rank = questionBinding.getCurrentRow ();
Number questionId = (Number) question.getAttribute ("Id");
JUCtrlListBinding listBinding = (JUCtrlListBinding) ADFUtils.getBindingContainer () .get ("AnswersView2");
int [] valueIndices = listBinding.getSelectedIndices ();
selectedIndices.putAll (questionId, Ints.asList (valueIndices));
}
private void restoreSelectedState() {}
Get id question
DCIteratorBinding questionBinding = ADFUtils.findIterator ("QuestionsView1Iterator");
Question of rank = questionBinding.getCurrentRow ();
Number questionId = (Number) question.getAttribute ("Id");
int [] valueIndices = Ints.toArray (selectedIndices.get (questionId));
JUCtrlListBinding listBinding = (JUCtrlListBinding) ADFUtils.getBindingContainer () .get ("AnswersView2");
listBinding.setSelectedIndices (valueIndices);
}
-
The current user is not allowed to call this method. in CF10
Hi all
After installing CF10 and our report, I am able to connect to the report.
After awhile all of a sudden I get the below error and I am unable to connect to our reporting module.
"" the current user is not allowed to invote this error of method".
When I checkd surprised newspapers that CF is looking for some files under E:\cf10_final\cfusion\wwwroot\CFIDE\adminapi\accessmanager.cfc
I don't have E drive in my pc.
can someone help me to solv the problem? (any patches / workarounds), installed the hotfix7 and mandatory patch in our computer.
Thanks in advance.
------------------------------- logs start---------------------------------------------
"The current user is not allowed to call this method. «The specific sequence of files included or processed is: C:\inetpub\wwwroot\da-idcsap001_TM\index.cfm, line: 48»
coldfusion.runtime.CustomException: the current user is not allowed to call this method.
at coldfusion.tagext.lang.ThrowTag.doStartTag(ThrowTag.java:142)
at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2799)
to cfaccessmanager2ecfc974154242$ funcCHECKADMINROLES.runFunction (E:\cf10_final\cfusion\wwwro ot\CFIDE\adminapi\accessmanager.cfc:48)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472)
at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47)
to coldfusion.runtime.UDFMethod$ ArgumentCollectionFilter.invoke (UDFMethod.java:368)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:655)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:444)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:414)
at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2432)
to cfdatasource2ecfc1679861966$ funcSETODBCSOCKET.runFunction (E:\cf10_final\cfusion\wwwroot\C FIDE\adminapi\datasource.cfc:814)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472)
to coldfusion.runtime.UDFMethod$ ReturnTypeFilter.invoke (UDFMethod.java:405)
to coldfusion.runtime.UDFMethod$ ArgumentCollectionFilter.invoke (UDFMethod.java:368)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:518)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:660)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:469)
at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2373)
at cfcreateCFDatasource2ecfm667208776.runPage (C:\inetpub\wwwroot\da-idcsap001_TM\createCFDat asource.cfm:41)
at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:244)
at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:444)
at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2799)
at cfsecure_init2ecfm1698353119.runPage (C:\inetpub\wwwroot\da-idcsap001_TM\secure_init.cfm:2 31)
at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:244)
at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:444)
at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2799)
to cfApplication2ecfm465443671.runPage(C:\inetpub\wwwroot\da-idcsap001_TM\Application.cfm:5)
at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:244)
at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:444)
at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65)
at coldfusion.filter.CfincludeFilter.include(CfincludeFilter.java:33)
at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:346)
at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48)
at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)
at coldfusion.filter.PathFilter.invoke(PathFilter.java:112)
at coldfusion.filter.LicenseFilter.invoke(LicenseFilter.java:30)
at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:94)
at coldfusion.filter.ClientScopePersistenceFilter.invoke (ClientScopePersistenceFilter.java:2 8)
at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46)
at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:62)
to coldfusion. CfmServlet.service (CfmServlet.java:219)
at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.j ava: 305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at coldfusion.monitor.event.MonitoringServletFilter.doFilter (MonitoringServletFilter.java:42)
at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.j ava: 243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:928)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:414)
at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:204)
to org.apache.coyote.AbstractProtocol$ AbstractConnectionHandler.process (AbstractProtocol.jav one: 539)
to org.apache.tomcat.util.net.JIoEndpoint$ SocketProcessor.run (JIoEndpoint.java:298)
to java.util.concurrent.ThreadPoolExecutor$ Worker.runTask (ThreadPoolExecutor.java:886)
to java.util.concurrent.ThreadPoolExecutor$ Worker.run (ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
--------------------End logs------------------------
Hello
Solved the problem by installing the latest pathces CF.
Kind regards
Phani
-
How can I call method on the view controller Business components
Hello
I did a general method to display messages at the view level,
How can I call this method in the method after validation in the EntityImpl appears automatically after the validation operation.
Gold how can I call it in _ validationbutton to display after validation;
public class MessageBeans
*{*
public static void showMessage (String title, String msgBody, String msgType)
*{*
FacesContext fctx = FacesContext.getCurrentInstance ();
FacesMessage msg = new FacesMessage (FacesMessage.SEVERITY_INFO, title, msgBody);
fctx.addMessage (null, msg);
*}*
*}*1 - Drag and drop the operation of control of data validation on the page.
2 - Double click on the button, this will bring the dialog box link Action property that allows you to link the button action method in the bean.
3 - Select the managed bean, or create a new and enter the name of the method. and click Ok.
3. This will create a method for you to like those posted before, you just need to change the method and show the message after successful validation. -
Is it possible to call a custom method in the App Module to a backing bean?
I would like to know if a custom in the App Module method can be called from inside of a pod of support.
I don't know if it is logically just call, to a backing bean, a custom in the App Module method. But I would like to know if this is necessary or if it is possible.Hello..
Yes it is possible. You must add this interface method customer of AppModule.Now you can see this method in data Controls(Refresh the data control). To call this method using bean, should be added as an action method links (click on links > + > methodAction > and create the binding of the action).
Now, you can call this method in the bean class.
Check like uses this concept to run the display criteriahttp://ADF-Lk.blogspot.com/2011/05/Oracle-ADF-create-view-criteria-and_4727.html
-
Error when calling a method AM of Bean managed
Hi friends,
JDev's Studio Edition Version 11.1.2.4.0
I have a page (HomePG) that has a read-only table. Select a field in the table and you enter a value for the inputText and then clicking on a button, the selected employee's salary should be replaced by the value entered in the inputText field.
I am trying to call a method of the managed bean AM and I get an error while doing this. I created a link to the method in the page where the call is made.
Here is the code of the AOS
' Public Sub hikeSelectedRow (Key key, BigDecimal val) {}
ViewObjectImpl emp = getEMPVO1();
RowSetIterator empVO = emp.createRowSetIterator ("Test");
System.out.println ("in selected Update");
System.out.println ("in selected, Update key:" + key);
Row [] selectedEmpArr;
selectedEmpArr = empVO.findByKey (key, 1); -> Error comes here
System.out.println ("in selected, Update key:" + key.toString ());
EMPVORowImpl selectedEmp = (EMPVORowImpl) selectedEmpArr [0];
selectedEmp.setSal (selectedEmp.getSal () .add (val));
System.out.println ("added, made Bravo");
getTransaction () .commit ();
}
The line is selected in the Managed bean and is also selected. However during appraisal findByKey get the performance I get the below error. Can someone please.
The error I get is
< ActionListenerImpl > < processAction > java.lang.NumberFormatException: for input string: "[oracle.jbo.Key [7566]].
javax.faces.el.EvaluationException: java.lang.NumberFormatException: for input string: "[oracle.jbo.Key [7566]].
at org.apache.myfaces.trinidad.component.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:51)
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:190)
to oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$ 1.run(ContextSwitchingComponent.java:130)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:461)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:134)
at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:112)
to oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$ 1.run(ContextSwitchingComponent.java:130)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:461)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:134)
KeyVal key = new key (new Object() {Integer.parseInt (((List) tableIterator.next ()) m:System.NET.SocketAddress.ToString ())});
So, what will return: (tableIterator.next ()) m:System.NET.SocketAddress.ToString () (list)?
I suppose this relates a strange string?
Check out this blog for a correct use of the RowKeySet (and is also described in a easier way to get the current line in the case of single selection): ADF:TABLE - Get selected or lines. John Brunswick
Dario
-
How to call other functions within the ScriptableFunction class
I am trying to create an extension of javascript class which will record audio, but the problem is that I can't call other methods in the class.
clear explanation about my problem:
It's my Scriptable class
public final class OCNUtilsNamespace extends Scriptable { VoiceRecord vr; public OCNUtilsNamespace() { this.vr = new VoiceRecord(); } public Object getField(String name) throws Exception { else if(name.equals("VoiceRecorder")){ return this.vr; } else if (name.equals("stopRecording")) { this.vr.stopRecording(); return new String("Stopped Recording"); } else if (name.equals("startRecording")) { this.vr.startRecording(); return new String("Started Recording"); } return super.getField(name); } }
and here's my ScriptableFunction class:
public class VoiceRecord extends ScriptableFunction { String status = "start"; public Object invoke(Object obj, Object[] args) throws Exception{ if(status.equals("start")) return new String("Started Recording"); if(status.equals("stop")) return new String("Stopped Recording"); return new String("nothing"); } public void stopRecording(){ status = "stop"; return; } public void startRecording(){ status = "start"; return; } }
in my javascript every time I call
alert(OCN.OCNUtils.VoiceRecorder());
I get the response as "recording started"
but whenever I tried to call
alert(OCN.OCNUtils.startRecording());
I don't get all respose and the script will stop working at that time here.
Why is happening like that?
I'm doing something wrong?
I did not understand this concept of scriptablefunction anyone please explain what is happening?
have to apply Runnble to the future because I have to record the sound of the microphone
I suggest that you simply pass an argument of your javascript in your extension like this:
public final class OCNUtilsNamespace extends Scriptable { VoiceRecord vr; public OCNUtilsNamespace() { this.vr = new VoiceRecord(); } public Object getField(String name) throws Exception { if(name.equals("VoiceRecorder")){ return this.vr; } return super.getField(name); } }
and on your class that extends a ScriptableFunction,.
public Object invoke(Object obj, Object[] args) throws Exception{ String param = args[0].toString(); // Cast a parameter from your js to a string if(param.equals("start")) return startRecording(); if(status.equals("stop")) return stopRecording(); return new String("nothing"); } public String stopRecording(){ status = "stop"; return status; } public String startRecording(){ status = "start"; return status; }
Finally, call your extension via javascript like this:
alert(OCN.OCNUtils.VoiceRecord("start")); // Call the startRecording() on your VoiceRecord class alert(OCN.OCNUtils.VoiceRecord("stop")); // Call the stopRecording() on your VoiceRecord class
Hope this helps
-
How to get the return value of the activity of the method in the stubborn workflow
Hi all
I use Jdeveloper 11 g R2 (11.1.2.3) & Weblogic 10.3.5.0
I have a stubborn workflow, default activity is a call method than calling a method in the app module
This method returns an id
I need this code in my project to do something else
Is there a way I can access the return value of the method call activity?
Concerning
MohsenSet the value of return as #{{pageFlowScope.myBean.returnValue} pageFlowScope.myBean.returnValue} in the method, call the property inspector and get the value in your managed bean.
String returnParam = (String) JSFUtil.getFromPageFlow ("returnValue");
Maybe you are looking for
-
iPhoto and building memory books
I'm busy building a book to buy as a souvenir printed pictures of a trip. I finished the book, but found a few more pictures and imported into the original event that I used for photos pic of for the book. I can't find a way to add pictures of the
-
I ran the beta before, recently I downloaded version 3.6.8 and replaces the beta version. How can I download and run each as separate application without a crash? IS S/O
-
my field of research is lagging extremly. It starts from 1 hour and I do not know why. Here is a picture: Why? Please help me? My browser: Safari! love, Liri
-
How to protect the piracy labview application
To begin to create an application for the market, the first thing that comes to mind are the issue of piracy. So, I wanted to know how an application labview base could be saved by piracy.
-
C:\WINDOWS\Offline Web Pages