apex_web_service.make_rest_request: passing parameters and the type of content

Don't know if I'm missing something, but should this API show the content type (application/x-www-url-formencoded) when there are values for the p_parm_name and p_parm_value parameters.

The example in the docs is a Yahoo API. I'm not sure that an individual (see: http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21676/apex_web_service.htm#BABEDJHJ), and I think that it requires an appid (yahoo account), so I went with the example here:

http://developer.Yahoo.com/YQL/guide/YQL-code-examples.html#yql_php

If I run the following from a file html on my desktop, it works:
<form method="POST" action="http://query.yahooapis.com/v1/public/yql">

<input type="hidden" name="q" value="select * from upcoming.events where location='San Francisco' and search_text='dance'"></input>
<input type="hidden" name="format" value="json"></input>
<input type="submit"></input>

</form>
In other words, it returns a JSON result.

The raw data of HTTP are as follows:
POST http://query.yahooapis.com/v1/public/yql HTTP/1.1
Host: query.yahooapis.com
Connection: keep-alive
Content-Length: 110
Cache-Control: max - age = 0
Origin: null
User-Agent: Mozilla/5.0 (X 11; Linux x86_64) AppleWebKit/536.11 (KHTML, like Gecko) Ubuntu/12.04 Chromium/20.0.1132.47 Chrome/20.0.1132.47 Safari/536.11
Content-Type: application/x-www-formulaires-urlencoded
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding: gzip, deflate, sdch
Accept-Language: en-, FR; q = 0.8, fr; q = 0.6
Accept-Charset: ISO-8859-1, utf-8; q = 0.7, *; q = 0.3

q = select +upcoming.events+where+location%3D%27San+Francisco%27+and+search_text%3D%27dance%27 & format = json >

However, running the following returns nothing: (nothing, nothing of which depends on the parameters passed in)
set serveroutput on

declare

l_c CLOB;

begin


  l_c := apex_web_service.make_rest_request(
    p_url => 'http://query.yahooapis.com/v1/public/yql',
    p_http_method => 'POST',
    p_parm_name => apex_util.string_to_table('q:format'),
    p_parm_value => apex_util.string_to_table('select * from upcoming.events where location=''San Francisco'' and search_text=''dance'':json'),
    p_proxy_override => 'http://192.168.1.3:8888');

  dbms_output.put_line(substr(l_c, 1, 4000));

end;
Raw data from HTTP:
POST http://query.yahooapis.com/v1/public/yql HTTP/1.1
Host: query.yahooapis.com
Connection: Keep-Alive
Content-Length: 106
Connection: close

q = 2 Select + % + of + coming % 2Eevents + where + % 3D 'San + Francisco' + and + % 3D search_text 'dance' & format = json >

I note that one key difference is that content type is not defined in the web service API.

It was just to test a public service. I note that the foregoing has slighty different encoding request (percentage of tanks). However, I experienced the same behavior on a procedure that I wrote (I can also give this example of test cases if you wish), which is where I first noticed the issue.

Using utl_http and affecting the type of application/x-www-url-formencoded content, does not solve the problem. However, just thought I'd see the possibility of using the service API Web that is made available.

The example is in the valid docs, or am I missing something obvious?

It's Dev days on ApEx 4.1 on the virtual machine in the RTO.

Thoughts?

I had a similar problem:
apex_web_service.make_rest_request packaging missing header parms

I endedup an SR for Oracle to open. I discovered that the headers (content-type) are defined in global variables before calling apex_web_service.make_rest_request.

See http://docs.oracle.com/cd/E17556_01/doc/apirefs.40/e15519/apex_web_service.htm#autoId4 for a description of headers and cookies.

I endedup have to add the following to my code before apex_web_service.make_rest_request:

apex_web_service.g_request_headers (1) .name: = "Content-Type";
apex_web_service.g_request_headers (1) .value: = ' application/xml ';

Once I did, my service works. Odd. Not sure why they did it this way because their internal packages use parameters of the header, but the wrappers do this way, I guess.

I hope this works for you!

Jennifer

Tags: Database

Similar Questions

  • How to run and pass parameters to the exe file in the txt file.

    Hello

    I am facing problem with passing parameters in the .exe file, which is run by labview.firstly that I have script .txt with the settings that I have to go to the .exe file. This .exe file is also a software, and this script is written for her. And now I have to create program in labview which should satisfy the following points.

    1. I have to use a button named "Run script". If I pressed the button, it should open the browser where I can choose the script .txt file.

    2 .exe application is expected open(Path already chossen).

    3. After passing the .exe application settings should be closed.

    4 and labview should now update its parameter

    I just open using Exce.vi .exe file, but I didn't get any idea to do more than this.can someone please help me?

    Thanks norbert. CAN I love it? What should I change now? VI attached below...

  • Pass parameters to the box of the HTML form to a stored procedure

    I'm always looking for a solution to my problem of forms. For the record, I don't use Express applications to create my application - I use PL/SQL right. I need to know how to pass parameters from the box to my Web form. I welcome people select one or more checkboxes in a form that calls a remove function to delete the selected records. What I read in Oracle of the "Guide to the developer of database applications - Fundamentals" is not useful to me. If someone could tell me some examples, maybe I could see what I'm doing wrong. Here is what I wrote in "the developer of database applications - fundamentals Guide ':

    All the boxes with the same NAME attribute are a group of checkbox. If none of the boxes in a group is selected, the stored procedure receives a null value for the corresponding parameter.

    If a check box in a group is selected, the stored procedure receives a single parameter of VARCHAR2.

    If more than one check box in a group is enabled, the stored procedure receives a parameter with the type of PL/SQL TABLE OF VARCHAR2. You must declare a type like this, or use a pre-defined as OWA_UTIL. IDENT_ARR. To retrieve the values, use a loop:
    CREATE OR REPLACE PROCEDURE handle_checkboxes ( checkboxes owa_util.ident_arr )
    AS
    BEGIN
    ...
    FOR i IN 1..checkboxes.count
    LOOP
    htp.print('&lt;p&gt;Checkbox value: ' || checkboxes(i));
    END LOOP;
    ...
    END;
    /
    SHOW ERRORS;

    I'm not sure that understand what your question is.

    If your web form has the following defined all with the same name:

    one
    two
    three
    

    You create and save a procedure to manage the sending of a form that contains a parameter with the name of attrib type owa_util.ident_arr for example:

    create or replace procedure handle_form(attrib owa_util.ident_arr) as
      iter number;
    begin
      for iter in attrib.first .. attrib.last loop
        -- do something with attrib(iter)
      end loop;
    end;
    /
    

    Now, the only problem with this Manager (or any other), is that if the user selects any of the boxes, or no value for the parameters expected, the Manager called with parameters missing or with on all of the passed parameters, as well as the call will error.

    To move, you need to provide default values for all parameters passed to your handler such as the settings of ident_arr, but with ident_arr settings, it's hard to do with autonomous procedures. If you place your procedure in a package you can define variables of package-level of the appropriate types that can be used as default values:

    create or replace package my_web as
      empty_arr owa_util.ident_arr;
    
      procedure handle_form(attrib owa_util.ident_arr := empty_arr);
    end my_web;
    /
    create or replace package body my_web as
      procedure handle_form(attrib owa_util.ident_arr := empty_arr) as
        iter number;
      begin
        for iter in attrib.first .. attrib.last loop
          -- do something with attrib(iter)
        end loop;
      end;
    end my_web;
    /
    

    now, when you hit in the situation where the user does not select the checkboxes, the call to handle_form will be no reviewable error on due to missing parameters, and the empty_arr will not have all the elements to iterate over so the loop in the body of the procedure will be fine and you will be able to retrieve each value of the checkbox selected attrib table when you iterate on it.

  • Passing parameters to the URL - availability in the new process of request

    Hello

    I am able to pass parameters in the URL of the APEX that defined the points of the application as below

    : http://application-tier server: port/pls/apexdev/f? p = 1001:1:APP_CLIENT_NUMBER, APPLICATION_NUMBER:0001285, 0000051:

    I would like to get and set other items based on elements of application passed as parameters. I would like to only enter once application.

    I found the best place for this action in a process of application with Point on new Instance of Process.

    The problem seems to be that the value of point of application has not been set at this point, and therefore the values are null.

    If I change the application process process Point to something that runs to each page as On Load: after the header, then the values are available. It is not suitable as only wish to run once at startup of the application.

    I can't find discussion of this documentation.

    1. I would be able to access URL parameters in the application process with Point on a new Instance of the process?

    2. are there any other equivalent task for access to URL parameters at the start of the application?

    Thank you

    Hello

    APEX runs only on the new process Instance when a new session has been set up. As you discovered, URL items are not yet saved in session at this point State. You can use a level app process before header instead, with a condition that makes that make it run when certain elements that you want to initialize are null.

    Kind regards

    Christian

  • Passing parameters to the named method built-ins

    Hello

    Can I pass parameters with the "named" built-ins in forms 6i or another method?

    I tried this

    OPEN_FORM (FORM_NAME = > ' C:\Users\Roma\Desktop\NATIONAL TECH.) FMX');

    but failed ' wrong number or types of arguments error.»

    The name of the parameter is FORMMODULE_NAME in this version of the signature of OPEN_FORM.

    (Do not know why the parameter has different names in different versions of signature)

    Try

    OPEN_FORM (FORMMODULE_NAME => ' C:\Users\Roma\Desktop\NATIONAL TECH.) FMX');

  • need help to pass parameters to the Flash

    Hello

    I'm pretty new to Flash and tried to solve this problem in the past few hours.

    What I want to do is to pass parameters from the browser to Flash.  I googled and it seems that the best way is FlashVars.

    However, I tried different codes and can not get Flash to detect settings.

    I decided to follow the example here and just copy and paste everything (just change the "main.swf" in my swf name):

    http://www.Kirupa.com/Forum/showthread.php?t=334923

    Flash loads, but it shows that ' param: "without anything else.

    I gathered that it is probably a foundamental problem more.  (for example how I am debugging, or some settings, etc..)  Clues?

    (I use CS4 trial AS3 version).

    Thank you!

    If you use the standard flash integration, you must list your flashvars in 3 locations in your html file.  you do this?

  • Why, when I sent my registration pass University and the photo of my identity card together with Adobe, have they canceled my account as they have said that I did not send enough ID

    Why, when I sent my registration pass University and the photo of my identity card together with Adobe, have they canceled my account as they have said that I did not send enough ID

    Since this is an open forum, not Adobe support... you must contact Adobe personnel to help

    Chat/phone: Mon - Fri 05:00-19:00 (US Pacific Time)<=== note="" days="" and="">

    Don't forget to stay signed with your Adobe ID before accessing the link below

    Creative cloud support (all creative cloud customer service problems)

    http://helpx.Adobe.com/x-productkb/global/service-CCM.html

  • downloError code is 417 and the type of error is - 60

    I'm trying to download the creative cloud for a long time and I get error 205.

    Read the file DLM.txt in %temp%\AdobeDownload\ I have the following error details:

    23/05/15 17:16:04:406 | [ERROR] |  |  |  |  |  |  | 4352 | Is the windows error code - 12002

    23/05/15 17:16:04:406 | [ERROR] |  |  |  |  |  |  | 4352 | Error 12002 in WinHttpQueryDataAvailable.

    23/05/15 17:16:11:649 | [ERROR] |  |  |  |  |  |  | 3832. Download job: could not validate segment (2)

    23/05/15 17:16:11:649 | [ERROR] |  |  |  |  |  |  | 3832. (2) download task failed to run. The State of the work is STOPPED_STATE

    23/05/15 17:16:11:906 | [INFO] |  |  |  |  |  |  | 6204 | an intermittent error. Try again now. Error code is 417 and the type of error is - 60

    23/05/15 17:16:31:745 | [ERROR] |  |  |  |  |  |  | 7144. Download job: could not validate segment (0)

    23/05/15 17:16:31:745 | [ERROR] |  |  |  |  |  |  | 7144. the download work (0) could not run. The State of the work is STOPPED_STATE

    23/05/15 17:16:31:903 | [INFO] |  |  |  |  |  |  | 2284 | an intermittent error. Try again now. Error code is 417 and the type of error is - 60

    23/05/15 17:16:33:579 | [INFO] |  |  |  |  |  |  | 2284 | decrement the number of threads. the number of active threads is now 1

    23/05/15 17:16:37:741 | [INFO] |  |  |  |  |  |  | 6204 | the thread incrementing. the number of active threads is now 2

    23/05/15 17:16:46:943 | [ERROR] |  |  |  |  |  |  | 3832. Download job: could not validate segment (2)

    23/05/15 17:16:46:943 | [ERROR] |  |  |  |  |  |  | 3832. (2) download task failed to run. The State of the work is STOPPED_STATE

    23/05/15 17:16:46:990 | [INFO] |  |  |  |  |  |  | 6204 | an intermittent error. Try again now. Error code is 417 and the type of error is - 60

    23/05/15 17:17:10:211 | [ERROR] |  |  |  |  |  |  | 7144. Download job: could not validate segment (0)

    23/05/15 17:17:10:211 | [ERROR] |  |  |  |  |  |  | 7144. the download work (0) could not run. The State of the work is STOPPED_STATE

    23/05/15 17:17:10:273 | [INFO] |  |  |  |  |  |  | 2284 | an intermittent error. Try again now. Error code is 417 and the type of error is - 60

    23/05/15 17:17:32:978 | [ERROR] |  |  |  |  |  |  | 3832. Download job: could not validate segment (2)

    23/05/15 17:17:32:978 | [ERROR] |  |  |  |  |  |  | 3832. (2) download task failed to run. The State of the work is STOPPED_STATE

    23/05/15 17:17:33:677 | [INFO] |  |  |  |  |  |  | 6204 | an intermittent error. Try again now. Error code is 417 and the type of error is - 60

    23/05/15 17:17:33:677 | [INFO] |  |  |  |  |  |  | 6204 | decrement the number of threads. the number of active threads is now 1

    23/05/15 17:17:35:988 | [INFO] |  |  |  |  |  |  | 2284 | the thread incrementing. the number of active threads is now 2

    23/05/15 17:17:48:657 | [ERROR] |  |  |  |  |  |  | 7144. Download job: could not validate segment (0)

    23/05/15 17:17:48:657 | [ERROR] |  |  |  |  |  |  | 7144. the download work (0) could not run. The State of the work is STOPPED_STATE

    23/05/15 17:17:49:207 | [INFO] |  |  |  |  |  |  | 2284 | an intermittent error. Try again now. Error code is 417 and the type of error is - 60

    23/05/15 17:18:01:272 | [INFO] |  |  |  |  |  |  | 6204 | the thread incrementing. the number of active threads is now 2

    23/05/15 17:18:09:338 | [INFO] |  |  |  |  |  |  | 6204 | decrement the number of threads. the number of active threads is now 1

    23/05/15 17:18:14:549 | [ERROR] |  |  |  |  |  |  | 3832. Download job: could not validate segment (2)

    23/05/15 17:18:14:549 | [ERROR] |  |  |  |  |  |  | 3832. (2) download task failed to run. The State of the work is STOPPED_STATE

    23/05/15 17:18:14:608 | [INFO] |  |  |  |  |  |  | 6204 | an intermittent error. Try again now. Error code is 417 and the type of error is - 60

    23/05/15 17:18:18:400 | [INFO] |  |  |  |  |  |  | 2284 | decrement the number of threads. the number of active threads is now 1

    23/05/15 17:18:29:306 | [ERROR] |  |  |  |  |  |  | 7144. Download job: could not validate segment (0)

    23/05/15 17:18:29:306 | [ERROR] |  |  |  |  |  |  | 7144. the download work (0) could not run. The State of the work is STOPPED_STATE

    23/05/15 17:18:29:838 | [INFO] |  |  |  |  |  |  | 2284 | New attempt to overrun of the count of ERROR_SEGMENT_VALIDATION_FAILURE - 11

    23/05/15 17:18:30:557 | [INFO] |  |  |  |  |  |  | 7144. the download job (0) is cancelled

    23/05/15 17:18:38:820 | [ERROR] |  |  |  |  |  |  | 3832. Download job: could not validate segment (2)

    23/05/15 17:18:38:820 | [ERROR] |  |  |  |  |  |  | 3832. (2) download task failed to run. The State of the work is STOPPED_STATE

    23/05/15 17:18:39:539 | [INFO] |  |  |  |  |  |  | 6204 | an intermittent error. Try again now. Error code is 417 and the type of error is - 60

    23/05/15 17:19:47:136 | [INFO] |  |  |  |  |  |  | 6204 | * Download the file acheves.* *.

    My OS is Windows 8.1

    Thank you

    Error 205 is a validation for the Segment failure while downloading the file from the Adobe server.

    See link above and try with recommendations:

    -Disable anti-virus and firewall temporarily and try to download.

    -Check the Hosts file and see if there are all the entries in Adobe, if so remove.

    -If you use a connection without wire/Wifi, try with wired Ethernet, wireless connections are nonlinear and often the question failed Validation of Segment, due to the decline of network signals.

    -C' is maybe not the possible solution: If you already use Ethernet connection cables try different Internet connection with the ISP company.

    -If you are connected to the corporate network or behind proxy, make sure that Adobe ports are on a white list or allowed on the network firewall.

    If all are agreed:

    You can check the link below:

    Whenever I try to download the creative cloud, I get an error with error205.

  • What is the right way to compare, synonym, trigger and the Type using DBMS_METADATA_DIFF?

    I use this "Select dbms_metadata_diff.compare_alter('TABLE','COMP1','COMP2') from double;" compare two tables and see the result as below, but when I use "Select dbms_metadata_diff.compare_alter ('VIEW ',' VIEW_NAME1, 'VIEW_NAME2',"USER1","User2") double" to compare my opinion I do not see the result as below? But the query runs without error...! I want to compare, synonym, trigger and the Type. Thank you!

    Result:

    ALTER TABLE "USER1". "" ADD TBL_A "("FIELD_A6"NUMBER (2.0) NOT NULL ACTIVATE)

    ALTER TABLE "USER1". "" TBL_A "DROP ("FIELD_A3")

    ALTER TABLE "USER1". "" CHANGE TBL_A ' ("FIELD_A2' VARCHAR2 (20))

    ALTER TABLE "USER1". "" CHANGE TBL_A "("FIELD_A4"NUMBER (5.2))

    ALTER TABLE "USER1". "" CHANGE TBL_A ' ('FIELD_A4' ACTIVATE NOT NULL)

    ALTER TABLE "USER1". "" CHANGE TBL_A ' ('FIELD_A5' NULL)

    USER1:

    create table TBL_A (FIELD_A1 number not null,

    FIELD_A2 varchar2 (50).

    Date of FIELD_A3,

    FIELD_A4 number (5.2) default 0,

    FIELD_A5 varchar2 (10) not null

    );

    CREATE VIEW view_TBL_A AS

    SELECT FIELD_A1, FIELD_A2

    OF TBL_A

    WHERE FIELD_A1 = 114

    USER 2:

    create table TBL_A (FIELD_A1 number not null,

    FIELD_A2 varchar2 (20).

    FIELD_A4 number (5.2) not null,

    FIELD_A5 varchar2 (10),

    FIELD_A6 number (2) not null

    );

    CREATE VIEW view_TBL_A AS

    SELECT FIELD_A1, FIELD_A2

    OF TBL_A

    WHERE FIELD_A1 = 111;

    When I use "select dbms_metadata_diff.compare_alter ('VIEW ',' VIEW_NAME1, 'VIEW_NAME2',"USER1","User2") of the double ' compare my opinion I do not see the result as below?

    Isn't that strange? Even abroad-, we see NO results at all. Maybe because you don't post it to watch us.

    For an example of how to use the DBMS_METADATA_DIFF package to compare objects, see database utilities

    http://docs.Oracle.com/CD/E11882_01/server.112/e22490/metadata_api.htm#BABIDHGE

  • How to pass parameters to the answering machine functions?

    Hi guys,.


    IM using AMFPHP and I would like to spend a few paramteres to answering function, how can I do this?

    new answering machine ('success', 'fault'); I would like to pass a few simple parameters to function of success.

    Saludos

    Marcin

    try now, you can provide the type of event argument in function (event)

    new Responder (function (event): void {actualFunction (evnet, yourParam)}; 'fault');

  • passing parameters to the select query in DB link to call him...

    I have a DB link that executes the select query based on user specified parameter.

    Now, I created an invoke activity and specified input [which must be passed to the query] and output parameters [it is the result of the query]. That invoke link activity DB calls in which a parameter was created to be used in the select query. So my question is, DB link partner take the input parameter of call activity automatically or do we need to specify a mapping for this?

    When you create a partnerlink db the setting that you create for your chosen matches the entry and when you create the variable entry in the invoke for this partnerlink is created with the type of the parameter.

    Create an assignment before your invoke and assign a value to the input variable that you created in the invoke. This value will be passed and used as a parameter in the selection.

    Heidi.

  • pass parameters to the pop-up window using skillbuilder

    All,

    I have a request of dynamic content on page 1 and for some lines ive the pop-up link another page and pass the EMPID clicked on page popupped. Ive created the link and its popping up the second page correctly, but how I have the pass of the EMPID per second / page popup?
    part of query in page1 like this,
    htp.p('<td><a href="#" class="show-summary" onclick="return false;">'||cursor-id.EMPID||'< . . . . . 
    Thank you.

    Gor_Mahia wrote:
    Jorge,

    IAM but perhaps not very clear what you did ive tried it before, but it losses the modal pop-up window and navigate to this page, I really try to have my modal popup window. Look at my request below,

    You just described a completely different problem from that of passing parameters modal page.
    Just add a more real Action "Cancel the event" after the action of modal Page.
    What that will do is replace the click of the anchor who want to access the link HREF.

    Thank you
    -Jorge

  • Faced with HTML5 - only may not even pass parameters to the script .jsx

    I am really struggling to get acquainted with HTML5 and the conversion of my existing extension.  A general request first - what are the best resources to help a general grounding in HTML5?

    Now a specific question.  In the default example functions in the .jsx are all processed in $._ext_.  What is the purpose of this?  How do you pass a parameter in a function that is defined like this.  Now, I'm trying just to pop up an alert with a parameter passed.  I tried many things, but here I am:

    In my index.html file, I have a button:

    < li > < button class = "default" id = "btn_LoadPresets3" onClick = "wizClickButton('10')" > myFunction < / button > < /li >

    In the ext.js script, I have a function which gets this:

    function wizClickButton (inParam) {}

    Alert ("press me" + inParam);

    var csInterface = new CSInterface();

    csInterface.evalScript ('myFunction2()');

    }

    In my script .jsx, I have the following function:

    function myFunction2()

    {

    Alert ("Yo");

    };

    Now - when I run this and press the button, the first alert box shows and shows me my parameter ("press me 10" in this case).  But that's all - so the function in my script .jsx never gets called.  I don't know why.  So - I look at the example functions and they are all preceded with the $._ext - I change the function in my script .jsx for:

    $._ext_myFunction2 =

    {run: function() {}}

    Alert ("Yo");

    }

    };

    and modify the ext.js call to call the same

    function wizClickButton (inParam) {}

    Alert ("press me" + inParam);

    var csInterface = new CSInterface();

    csInterface.evalScript (' $. _ext_myFunction2.run () ');

    }

    So now, when I run it I get the second alert box.  Everything is good.  Only how I pass my parameter down in the script .jsx?  Where the parameter is both the definition of the function and the call to the function?  That brings the ._ext_ $ to the party?  Why not my definition of the standard function without the ._ext_ $?

    Many thanks in advance,

    Richard

    Hi Richard,

    I first suggest you use reusable code David Deraedt (and not Extension Builder, which treats the $. useless _ tips): davidderaedt/CC-EXT-SDK · GitHub. I don't know why you get the error: I don't use $._ext_ me so it shouldn't be a requirement.

    You can find a few first aid signs in my HTML signs quick tips. You will also find the way to pass parameters of JS-> JSX (as simple or complex objects parameters) and vice versa, JSX-> JS

    HTML: personally I found useful tutorials on www.tutsplus.com (HTML, JS, etc) but I guess there are a lot of free resources out there (the one that comes to mind is a A Practical Guide to HTML & CSS - learn how to build Web sites, Apple made one too Safari Web content Guide: HTML Basics).

    Concerning

    Davide Barranca

    ---

    www.davidebarranca.com

    www.cs-extensions.com

  • Passing parameters to the method call in expressions of value

    JDeveloper 11.1.2.1.0 does support the feature of passing parameters to method calls in expressions of value in JSF pages? AFAIK this is JSF 2 version it and it should support this feature. Unfortunately when I put in a JSF page the following tag
    < h:commandLink value = "#{row.employeeId}" action = "#{empBean.showDetails (row)}" / > "
    The page does not work. Any ideas on this point?

    Thank you to everyone.

    Hello

    The functionality you need is defined in JSR 245.
    If you need to wait for it to become part of the standard, it will be included in JEE6
    I don't know if 11.1.2.1.0 uses JEE6 standard...
    You can try this other thing,
    http://www.coderanch.com/t/213290/JSF/Java/why-JSF-calls-method-parameter

  • Passing parameters to the EL Expression method

    Hello
    With the help of jdev 11g R1.

    Is it possible to pass parameters to a method in an expression EL located in a property of UIComponent?
    something like: af:inputText label = 'asdf' id = "id1" disabled = "#{bean.check ['value']}" / >

    You can do this by using SecurityContext userInRole (#{securityContext.userInRole ['admin']}, but I need to do in my own managed bean.) When I try to follow the same approach as securityContext (i.e. #{mybean.check ['value']}) and having a check (String) method in mybean, it gives me an error saying that there is no such thing as checking property.

    I followed the post http://technology.amis.nl/blog/622/how-to-call-methods-from-el-expressions-pre-jsp-20-trick-for-jsps-with-jstl that shows something to do (the bean implements interface card), it works.
    The question is if this will also work in future releases of the ADF.

    Thank you
    Roger

    Hello

    You are hard to figure out how to work the EL:

    ValueExpression: solve the last part of the phrase as a property of the object resolved the previous expression. [So if you #{securityContext.userInRole\['admin'\}] or #{securityContext.userInRole.admin}, it really means "find the admin of the object property #{securityContext.userInRole}", now #{securityContext.userInRole} is acard. Until getting the 'admin' of a card property means getting the value of the key "admin". Now, if #{securityContext.userInRole} is a custom made map which replace the get method to implement logic, it can look like it is a method call with the expression from the point of view of EL, but it isn't really happening.

    MethodExpression: solve the last part of the phrase as a method with a specific context signature of the object resolved the previous expression. Now the specific context depends on the attribute being used, actionListener will seek public Sub method (ActionEvent) and nothing else. So, if you want to pass a parameter by using the same strategy, you do not disrupt the party, but you can influence the previous part, which is a ValueExpression. So, let's say you have actionListener = "#{foo.bar.method}" and must pass the parameter to the method, you can use instead of #{foo.bar\[parameter\].method}, where #{foo.bar\[parameter\}] resolve to an object with a public method (ActionEvent) Sub, but instantiated during the resolution of parameter passing the said parameter to the constructor of the object. " This way is quite complicated, however, and we never had to use it in the projects I've done (and some of them were / are very complex). I suggest to the contrary push settings in the object before calling the method. Let the example of listener to action:

    public class MyController
    {
        private MyAction action;
    
        public ActionListener getAction()
        {
            if (action == null)
            {
                action = new MyAction();
            }
    
            return action;
        }
    
        private static class MyAction implements ActionListener
        {
            private Object parameter;
    
            public void processAction(ActionEvent ev)
            {
                // do something
            }
    
            public String getParameter()
            {
                return parameter;
            }
    
            public void setParameter(String parameter)
            {
                this.parameter = parameter;
            }
        }
    }
    

    Then in the page:

    
      
      
    
    

    Kind regards

    ~ Simon

    Published by: Simon Lessard on December 11, 2009 10:57

Maybe you are looking for

  • iMac 5K is unable to see the video after standby or sleep screen

    Hello whenever I leave my computer and get back to work on it, the screen goes black and won't turn on again. Thank God I have a macbook pro and you can access the iMac via desktop remotely to continue my job or restart it. but its getting very borin

  • Restrict access to files

    Hi all I need to create 50 records and 50 users, where each user can see and have access to only a corresponding folder. The version of Windows would be XP, 7, 8, or 10. What is the best way to achieve this? Thank you

  • NTFS bad block errors in Event Viewer

    I have a Dell 510 m with XP and a Toshiba HD. There are a few bad blocks that I see with the Diagnostic CD. They have not worsened in recent years. Recently, I saw a few 'Bad Block' errors in the event viewer. Diianostic CD shows me a bad block as be

  • KB980373 KB982133, KB982134, Kb976881 updates fail

    Original title: "Update failed" Windows XP Media Center Edition - Version 2002 - Service Pack 3 Repeatly failed KB980373 KB982133, KB982134 Kb976881 updated. Anyone has solutions.  Lasts forever.

  • Lexar JumpDrive TwistTurn 16GB USB Flash Drive Media

    I have a digital camera and bought a Lexar Jumpdrive Twist 4 GB USB Hi-speed turn. How to use in order to take photos and store? Help, please. Thank you.