How to update a Javascript Objects value in D.B

Hello Friends,
Can some one pass me any example pages or documentation related to using the values of HTML/Java Script objects in a PL/SQL region to update the D.B.
Appreciate any help.
Thanks,
Satya.

It works now. I made these changes:
1. In your app process you used the column name EMP_ID instead of EMPNO
2. In the call to your app process you used two different quotation marks for 'APPLICATION_PROCESS=GET_ENAME'
3. In the Javascript code you used the PL/SQl notation (/* */) for comments, instead of the javascript notation (//).
4. I changed the getElement calls to the APEX shortcuts ($v and $s). Doesn't matter much, but is way shorter!
So the code is:
function get_ename(){
var emp_id = $v('P4_EMPID');
var get = new htmldb_Get(null,$v('pFlowId'),'APPLICATION_PROCESS=GET_ENAME',0);
get.add('P4_EMPID',emp_id);
var gReturn = get.get();
$s('P4_ENAME', gReturn);
}

Similar Messages

  • How to update ADF VO object to refresh the data in ADF Pivot table

    I need to know how to update the View object so that the date in pivot table is refreshed/updated/filtered.
    here are the steps I performed to create ADF pivot table application using VO at design time.
    1) created a collection in a Data Control (ViewObject in an ApplicationModule) that provides the values I wanted to use for row and column labels as well the cell values (Used the SQL query)
    2) Dragged this collection to the page in which wanted to create the pivot table
    3) In the pivot table data binding editor specified the characteristics of the rows (which attribute(s) should be displayed in header), the columns (likewise) and the cells.
    Now, I have a requirement to update/filter the data in pivot table on click of check box and my question is how to I update the View object so that the date in pivot table is refreshed/updated/filtered.
    I have got this solution from one of the contact in which a WHERE clause on an underlying VO is updated based upon input from a Slider control. In essence, the value of the control is sent to a backing bean, and then the backing bean uses this input to call the "filterVO" method on the corresponding AppModule:
    but, I'm getting "operationBinding" object as NULL in following code. Please let me know what's wrong.
    here is the code
    Our slider component will look like
    <af:selectBooleanCheckbox label="Unit" value="#{PivotTableBean.dataValue}"
    autoSubmit="true" />
    The setDataValue() method in the backing bean will get a handle to AM and will execute the "filterVO" method in that, which takes the NumberRange as the input parameter.
    public void setDataValue(boolean value) {
    DataValue = value;
    BindingContainer bindings = getBindings();
    OperationBinding operationBinding = (OperationBinding)bindings.getOperationBinding("filterVO");
    Object result = operationBinding.execute();
    The filterVO method in the AMImpl.java will get the true or false and set the where Clause for the VO query to show values.
    public void filterVO(boolean value) {
    if (value != null) {
    ViewObjectImpl ibVO = getVO1();
    ibVO.setWhereClause("PRODUCT_TOTAL_REVENUE(+) where rownum < 10");
    ibVO.executeQuery();
    }

    Did you define a filterVO action in your pagedef.xml file?
    You might want to read on how to access service method from a JSF Web Application in the ADF Developer Guide for 10.1.3 chapter 8.5

  • How to manipulate a javascript object in java?

    Hi, I am fiddling with the java scripting interface. As I understand the rhino engine is packaged with the jdk but what I don't understand is how does one reconcile the objects one gets from their engine (e.g. sun.org.mozilla.javascript.internal.ScriptableObject) versus the ones in the rhino api (e.g. org.mozilla.javascript.ScriptableObject)?
    Is the one in the jdk heavily modified or wrappered up to suit their javax.scripting interface?
    More specifically, how do I manipulate javascript objects from java?
    e.g. suppose I have this java code:
    ScriptEngineManager mgr = new ScriptEngineManager();
    ScriptEngine js = mgr.getEngineByName("js");
    jsEngine.eval("var foo = { x : 1, y : 'hello', z : false };");
    Object o = jsEngine.get("foo");Now o is instanceof sun.org.mozilla.javascript.internal.NativeObject, which is a subclass of a bunch of other classes in the s.o.m.j.i namespace. Being internal I can't use these directly.
    Looking at the Rhino API obviously you normally get a org.mozilla.javascript.ScriptableObject and can call the .get() .getIds() methods. But I don't know how to translate the objects I am getting in my actual java code which uses the jdk engine into org.mozilla.javascript objects.
    Is this even possible? Am I misunderstanding something completely? Should I just be using the rhino js jar and not the javax.scripting interface? If so, for what reason is the javax.scripting interface implemented?

    Assuming that you DO want a deep copy, begin with a constructor that takes another hand.
    public Hand( Hand h ) { ...Then for each instance variable, within that constructor:
    this.instVar0 = h.instVar0;
    this.instVar1 = h.instVar1;
    . . .And last, for every reference, make sure there is a constructor (or copy method for arrays) that itself makes a deep copy:
    this.ref0 = new Ref0Type( h.ref0 );

  • How to update a ScriptUIGraphics object?

    Hello,
    I've been able to use ScriptUIGraphics, but as far as I've seen there's no way to update / change any object, nor it seems possible to call the onDraw() handler but once if it contains either fillPath() or strokePath() - which usually does.
    For instance, the following test script pops up a panel with a red square in it. Fine. When you click the "Try" button, the onDraw() is fired again and should draw a smaller square, but stops with a very informative "cannot execute" error at some point within the onDraw():
    // ScriptUI graphics update issue
    // resource string
    var winRes = "dialog {  \
        text: 'ScriptUI Graphics test',  \
        margins: 15, \
        alignChildren: 'row', \
        canvas: Panel {  \
            preferredSize: [200, 200], \
            properties: {borderStyle: 'black'} , \
        buttonsGroup: Group{ \
            cancelButton: Button { text: 'Cancel', properties:{name:'cancel'} }, \
            tryButton: Button { text: 'Try', properties:{name:'try'},size: [40,24], alignment:['right', 'center'] }, \
    // Window
    var win = new Window(winRes);
    // define the graphic property
    canvasGraphics = win.canvas.graphics
    // do the drawing
    win.canvas.onDraw = function() {
              // creates a red filled square
              canvasGraphics.newPath()
              canvasGraphics.rectPath(10, 10, 200, 200)
              canvasGraphics.fillPath(canvasGraphics.newBrush(canvasGraphics.BrushType.SOLID_COLOR, [1,0,0,1], 1)) // HERE
    win.buttonsGroup.tryButton.onClick = function() {
              win.canvas.onDraw.call()
    win.show()
    When you run it, it works as expected; if you click the Try button, an error is fired when the script gets to the line ("HERE" in the code), that is: when it comes to fill the path.
    Strangely enough! Because it doesn't seem to be a problem with the onDraw second call (apparently the second square path is constructed, but can't be filled).
    Am I doing something wrong here? Should I first delete the original square (how?!), or somehow initialize it again? Are ScriptUIGraphics immutable somehow?
    --- Update ---
    Further experiments led me to understand that onDraw() (so the whole drawing) seem to be called just once - when the Window is shown. I've tried to remove and rebuild the canvas Panel altogether, but its own new onDraw() is never called - nor an explicit call works. Apparently you can't invoke win.show() again, nor hide and show it. Ouch!
    Thanks in advance for any suggestion
    Davide

    Sorry, I do not understand what do you really want (because of my bad english)
    Try to change the bg color of the panel in the dialog box by clicking on button? Something like this?
    // ScriptUI graphics update issue
    // resource string
    var winRes = "dialog {  \
        text: 'ScriptUI Graphics test',  \
        margins: 15, \
        alignChildren: 'row', \
        canvas: Panel {  \
            preferredSize: [200, 200], \
            properties: {borderStyle: 'black'} , \
        buttonsGroup: Group{ \
            cancelButton: Button { text: 'Cancel', properties:{name:'cancel'} }, \
            tryButton: Button { text: 'Try', properties:{name:'try'},size: [40,24], alignment:['right', 'center'] }, \
    // Window
    var win = new Window(winRes);
    // define the graphic property
    win.canvas.graphics.backgroundColor = win.canvas.graphics.newBrush (win.canvas.graphics.BrushType.SOLID_COLOR, [1,0,0],1);
    win.buttonsGroup.tryButton.onClick = function() { // change the graphic background property by click on Button [try]
    win.canvas.graphics.backgroundColor = win.canvas.graphics.newBrush (win.canvas.graphics.BrushType.SOLID_COLOR, [0,0,1],1);
    win.show()

  • How to update and use the values of variables of another class

    I can we update or use the values of the variables of another class. For example, if we have class A
    public class A //(situated in package view)
    public s0,s1;
    public void runFunction()
    ...some coding and proceedings
    s0="Hi";s1"Hello";
    ......some coding
    RequestDispatcher dispatcher = request.getRequestDispatcher("/MainUser.jsp?alert=F");
    dispatcher.forward(request, response);
    ARunner.jsp
    <jsp:useBean id="a" class="view.A" scope="session"/>
    <%
    a.runFunction();
    %>
    MainUser.jsp
    <jsp:useBean id="a" class="view.A" scope="session"/>
    <%
    System.out.println("S0:"+a.s0+" S1:"+a.s1); //should print S0:Hi S1:Hello, but printing S0:null S1:null
    %>
    A.class has some procedures and String variables which can be updated and later can be used in JSP pages. The project starts with ARunner.jsp which uses the A.class and updates the values of string variables s0 and s1of A to hi and hello respectively.And then redirects the page to MainUser.jsp.
    Now what I want is ,when I call those string variables(s0 & s1 of A.class) in any another jsp likeMainUser.jsp it should give me the value of hi and hello respectively not null as it is giving right now. Could you refine the coding for this one?

    public class A //(situated in package view)
    public String s0,s1;
    public void runFunction()
    ...some coding and proceedings
    s0="Hi";s1"Hello";
    ......some coding
    RequestDispatcher dispatcher = request.getRequestDispatcher("/MainUser.jsp");
    dispatcher.forward(request, response);
    ARunner.jsp
    <jsp:useBean id="a" class="view.A" scope="session"/>
    <%
    a.runFunction();
    %>
    MainUser.jsp
    <jsp:useBean id="a" class="view.A" scope="session"/>
    <%
    System.out.println("S0:"+a.s0+" S1:"+a.s1); //should print S0:Hi S1:Hello, but printing S0:null S1:null
    %>
    giving code again to remove the typing errors. Please guide.

  • Difficulty in updating the list object values

    I have created a list with Objects(MyVertex). I am trying to update the list based on the condition . Instead it adds duplicate values. The simple logic is (if the object is already in the list )only update the values or add to the list (Object) Please help me how can I correct my code.
    public static void updateResult(MyVertex c)
              Iterator it2=result.iterator();
              while(it2.hasNext())
                   //System.out.println( "Result to be added : "+c.getName());
                   j=(MyVertex)it2.next();
                   if(j.getName().equals(c.getName()))
                        j.setWeight(c.getWeight());
                        break;
                   //System.out.println( "Result item name : "+j.getName());
              result.add(c);
         }Thanks a lot .

    Thank you all for your immediate reply. It has solved half of my problem.Now It is not adding all "c" ,but it still not updating the value if the matching found.
    public static void updateResult(MyVertex c)
              Iterator it2=result.iterator();
              while(it2.hasNext())
                   //System.out.println( "Result to be added : "+c.getName());
                   j=(MyVertex)it2.next();
                   if(j.getName().equals(c.getName()))
                        j.setWeight(c.getWeight());
                        flag=true;
                        return;
                   //System.out.println( "Result item name : "+j.getName());
              if(!flag)
              {result.add(c);}
         }

  • How to update a specific cell value in a CSV file.

    Hi
    I would like to know whether it is possible in openscript to update a cell value of the CSV file.
    For example if the test script requires to update the cell of 6th row and 8th column, then how to achieve through openscript API?
    Please kindly let me know.

    Hi,
    Hope this helps!
    Table table;
    String[] rowvalus;
    int targetRow=5,targetColumn=7;
    * Note: Rows and columns are 0-based index.
    table =utilities.loadCSV("C:\OracleATS\OFT\DataBank\Test.csv");
    rowvalus=table.getRows().get(targetRow).getAll();
    info("Before change :"+rowvalus[targetColumn]);
    rowvalus[targetColumn]="NewValue";
    utilities.saveCSV(table, "C:\OracleATS\OFT\DataBank\Test.csv", true);
    table =utilities.loadCSV("C:\OracleATS\OFT\DataBank\Test.csv");
    rowvalus=table.getRows().get(targetRow).getAll();
    info("After change :"+rowvalus[targetColumn]);
    Note:- Please first take the backup of your CSV file before using this code snippet
    Thanks
    -POPS

  • Update the authorization object value for more than 1000 role

    I need to remove one of the activity value (06) from authorization object S_SCD0.
    I do a search and found out that there are more than 1000 roles which having the activity value = 06 for authorization object S_SCD0.
    However, I don't think I can create a SCAT script to update all these 1000 roles and I believe its going to be a very tedious if I am going to manually change it one-by-one. Hence, I am wondering is there any standard program/function which I can use to automate the above changes for all these 1000 over roles.
    Kindly advise.
    Thanks

    Direct update the table is the easiest way, but should be discourage for the obvious reason.
    Should take a step back, take a long term view, when you need to update 1000 roles, maybe a role redesign might be needed. For example, if you can change the role model to derive role model, once update to the parent role will take care of all the child role.
    Thanks,
    Lye

  • How to update the absolute time value in waveform chart for labview 6i?

    Hey there,
    I'm developing a control system using labview 6i on win 2000 os.I'm receiving the sensor data every minute and i want to display the data on a waveform chart with absolute time scale on x-axes. I'm using the property nodes for the offset, multiplier and maximum values putting them outside the while loop and giving them input using get date/time in seconds function. the problem is that the time doesn't gets updated w/ refernce to the computer time and after a certain period the time shown on x-axes lags by several hours. any advise?

    Posting an example ussually help us nail these types of issues fast.
    I am therfore forced to guess.
    Do you have your code written such that the scale operations occur before the loop?
    The next thing I have to suspect (not being able to see your code) is if your dt is correct. If your dt is larger than what the chart is set for, then the time will fall behind.
    I have included an image showing how the chart can be used to show multiple sample rate plots such that the t0 of the readings are used to control how the readings are displayed. This example uses waveform data types (I believe they were available back in 6i). It should serve as a guide to do what you want.
    I suggest you start by recreating the demo and play with it until you have what
    you will need in your app.
    The beauty of this method is it lets you use the chart to plot signals acquired at different frequecies and plot them all together.
    reply to this answer if you have questions,
    Ben
    Ben Rayner
    Certified LabVIEW Developer
    www.DSAutomation.com
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction
    Attachments:
    Wform_demo.bmp ‏427 KB

  • How to update iterator with popup values

    Hello all,
    I've got a question regarding updating my iterator tableview (non-mvc bsp application).  I've used some javascripting to open a popup window and retrieve the selected value back into a hidden input field on my cart page.  Now, what I need to do is get the value into the appropriate field in the iterator tableview.  Any ideas?  (Right now, there is no event fired in the cart page after the popup is closed).
    Thanks in advance,
    Lisa

    Hi Lisa,
    You need to fire an event when the popup closes by placing the following in the the cart page:
    <bsp:htmlbEvent id   = "closing_event"
                    name = "closing_event"
                    p1   = "closing_event" />
    This event is fired when you close your popup by using the following JavaScript:
    window.opener.closing_event('POPUP');window.close( );
    Regards,
    Patrick.

  • How to update model only if value has changed?

    I would have expected that a model property is only updated if the value of the UIComponent has changed, but I am apparently wrong.
    Why is the setter-Method of a model always called, even if the old and new value are the same (or better: equal)?
    I have not found anything in the spec that defines the behaviour of an implementation in this regard.
    thanks in advance for any comments
    Daniel

    I think the value always gets set, why? Does it cause problems on your end?
    Though, it will be better if they don't update it when they are the same values.

  • How to add a javascript object to a library

    hi, the only way i manage is to create a subform, add the script object and adding this subform to a custom library. Then this can be used for other people by putting it in the master page and drag the script object to the variables. I wonder if there is another way to do it without using fragments because we use acrobat 7.0. Thanx in advance!

    Hello:
    You could do the following
    1)In the 'Option URL Redirect' section of the Edit Button page set 'Target is a ' to 'URL'
    2)For URL Target enter javascript:{if (confirm('Your Question here')) doSubmit('<button name>');}Varad
    Edited by: varad acharya on Jul 15, 2009 3:47 PM

  • How to pass the javascript variable value to a jsp

    Hi
    I am trying to set a javascript variable with onClick event of a radio button in jsp
    and I am assigning this variable to a hidden property in JSP whic has the corresponding getter an setter method in form.
    But I am not able to retrtieve the value assigned in either form/action .can any body help me in this:
    The code is
    <script language="javascript">
    var jais="";
         function setValue(val)
              jais=val;
         document.o.value=jais;
    </script>
         <html:hidden property="o" value=""/>
    <input type=radio name="1"
                                            value="xyz"
                                                                          onclick="setValue('XYZ')" >
                                            ABC                                        
    and in the correspoding form bean I have
    private String o_val =null;
    public String geto()
    return o_val;
    public void seto(String strs)
    o_val=strs;
    In the action I am trying to access
    by
    1)String j=((form name)form.geto();
    2)String j=request.getParameter("o")
    but with both of them I am getting the value null
    Thanks in Advance

    You need to set the value of the hidden field in your function.
    Setting an unrelated variable will not help.
    function setValue(val)
    document.forms[0].o.value = val;
    also your get/set methods should be getO() and setO().

  • How to update the Customer field value of PO Item under the Delivery Address Tab?

    Hi Friends,
         i tried to update the Customer field Using Bapi_PO_change.I passed the PO Order no,POADDRDELIVERY data with Item no,Adrees no,Customer no.But i am getting no data changed message from return table.I attached the screen shots.So please suggest me the helpful information for resoving this issue.
    Thanks,
    Dinesh

    Thank you friends,
                My Problem was resolved.In my case i have passed the customer value in BAPI_PO_CHANGE POITEM Table with updated customer value.
    Thanks,
    Dinesh

  • How to update old instances with values

    Hi,
    i am using albpm 5.7 version.
    i have a requirement i need to update the oldinstances with updated data.
    suppose i have added new external variable to process how it will update the old instances.
    plz suggest how to solve this problem.
    Regards,
    Srinivas.

    Hi,
    The standard behaviour is that new instances of the process will use the most recent version of the process that has been deployed to the database. This allows you to deploy new versions of the processes without impacting on processes which are already in progress.
    When the workflow engine determines what activity to run next in the process, the engine checks what the start date of the process instance was, so that it can check what version of the process was active at that time. If you update the start date for each running process, so that it reflects the date that you saved the most recent version of the flow, then the workflow engine will use the latest version instead of the version that it was running.
    This is not supported. I would never suggest that you do this in a production environment - it does not make sense to be making frequent changes to the process in a production environment, since there is no supported mechanism for forcing existing flows to use the new definition. The engine is designed specifically to run the same version of the process for the duration of the process instance - what you want to do is to blow this out of the water completely. If you do change this, then all timing that is recorded against the activities becomes useless, and the other impact on the workflow process us something that you would need to consider incredibly carefully before deciding whether you want to take the risk.
    HTH,
    Matt
    WorkflowFAQ.com - the ONLY independent resource for Oracle Workflow development
    Alpha review chapters from my book "Developing With Oracle Workflow" are available via my website http://www.workflowfaq.com
    Have you read the blog at http://thoughts.workflowfaq.com ?
    WorkflowFAQ support forum: http://forum.workflowfaq.com

Maybe you are looking for

  • Opening a text file in server from an applet running in the client

    Friends, I want to open a text file in the server(The server machine uses tomcat 4.1.12 server)from an applet running in the client machine; The applet invokes a servlet that opens the text file;this text file is opened in the server machine; but I w

  • Is it possible to get an apple ID without having to put a way of payment?

    Well not everyine has a visa card or any other kind of card and since there are free apps in the app store it seems natural that we get the ability to creat an apple ID and download free games without having to have a visa card (since it is useless f

  • New 80GB Video Problems-TV Shows

    My wife got me an 80GB Video Ipod for Christmas. I bought the entire season of the Office from Itunes. After I watch a specific episode, it seems to not be on the TV Show menu on my Ipod anymore. If I sync up to Itunes, it doesn't get replaced on my

  • MIGO - EXIT

    Dear Friends, My requirement is like. 1) while Creating purchase order I will give the item text manually in Me21n. 2) Then I will release the purchase order in ME29n. 3) Then while doing goods receipt of the purchase order in MIGO , the item text sh

  • IMac Freezes while using itunes

    Hi this is the second time my new iMac freezes when i'm browsing the iTunes store. all of the sudden the mac stops responding, what should I do to prevent this in the future?