apex_util.prepare_url - by the way a comma between the item values

Hello

I created an application to illustrate a problem I'm having with the help of apex_util.prepare_url: http://apex.oracle.com/pls/otn/f?p=test_prep_url

' Tab ' without prep. url "displays a chart linking from this page (1) 2 using the usual f? syntax of p in the link, through two values, one for p2_schema_name and one for the p2_job_name values hidden on page 2. It works fine and the page 2 table displays data based on these past in values.
The link is set up as: ' f? p =' || : APP_ID | ':2:' || : APP_SESSION. ": NO:2:P2_schema_name, P2_JOB_NAME:' |" schema_name | ',' || JOB_NAME

' Tab ' with prep. url "displays a chart which links from this page (3) on page 4 use apex_util.prepare_url to prepare the connection, passing two values, one for p4_schema_name and one for the p4_job_name in the values hidden on page 4. However, the decimal point is rendered in the browser '% 252C' url and p4_schema_name has the value "SCHEMA_A % 2CJOB_3" and p4_job_name is null (instead of = "JOB_3"). Of course, no data is found.
The link is set up as: APEX_UTIL. PREPARE_URL ('f? p =' |: APP_ID |) ':4:' || : APP_SESSION. ": NO:4:P4_schema_name, P4_JOB_NAME:' |" schema_name | ',' || JOB_NAME)

So I say to myself that I send you the value of point across properly, but I don't know what I would do differently. I hope the demo app described my problem enough so that someone can point out my blunder.

The reason why I use APEX_UTIL. PREPARE_URL is that I would like to use session state protection and through the amount of control, but until I can get the sorted comma, I can't turn on session state protection.

Thank you for your help.

Alan

Update: it is not prepare_url that does. Prepare_url encodes the comma in the list of item as % 2 c values. Then when the table XML gets converted to a blob for output, the % sign is encoded again. We will have to figure out what to do about this. In the meantime, only one element value can appear in the f? p link in a flash (fixed SVG chart) chart.

Scott

Tags: Database

Similar Questions

  • apex_util.prepare_url with the translated applications

    I have two questions about the use of apex_util.prepare_url with the translated applications:

    1. Why is-checksum in a different translated application of checksum in the original application?
    2. Is there a way to control the apex_url.prepare_url checksum function calculates?

    I have no application in both languages English (en) and Slovenian (sl). Link with English checksum would work if I put the Application primary language to English and the link with the Slovenian checksum would work if I set the main language Application to Slovenian. Application language is derived from the main language Application.

    Sometimes, the real problem for me is I have 'English' version of checksum when apex_url.prepare_url is called from the "Slovene" to application version.  As I mentioned before 'English checksum' does not work if the Application language is set to Slovenian.

    I have reproduced this behavior (with the exception of the problem described in the previous paragraph) on http://apex.oracle.com/pls/apex/f?p=15120. An application illustrates an another unanswered question/bug related to translated app: https://forums.oracle.com/message/11229437#11229437

    Is this Bug to Oracle APEX? Can anyone provide any advice or workaround?

    Hello

    bookmarkable (amounts of application or user level control) control totals depend on a salt value that is stored in the application. If the salt is null, there is a fallback to the alias of the application. If you update the salt by clicking "Expire bookmarks" on request > security attributes and re - publish the application, salt must be synchronized between the applications. Control totals should be the same, then.

    Kind regards

    Christian

  • How to choose the item value list based on another value of list item

    Hello friends,
    I have two list items named xxx and yyy... OK, my problem is I want to choose a value of yyy list item based on the value of article xxx...

    Example: I select 'Computer' in xxx... Based on this I want to choose the item values in yyy as a monitor, keyboard, mouse, etc... This must be done at run time. How can I do this... Give me a few examples of code [pls tell me trigger appropriate to place this encodings]
    Thanks in advance,
    Battistelli

    Very simple to use the LOV and query of the lov which is attached to the YYY field, use the query as below...

    SELECT columns
    FROM table
    WHERE column_name = :XXX_FIELD
    

    Use the ENTER OF LIST Yes property for the YYY field.

    -Clément

  • apex_util.prepare_url outside the ApEx

    Hello

    I'm trying to create a weekly task that sends an HTML email with links to the user session state protection application. However when I try to generate the URL with apex_util.prepare_url the checksum is not added to the chain. wwv_flow_api.set_security_group_id seems to have no effect.

    Any ideas?

    Kind regards
    Dan

    http://danielmcghan.us
    http://sourceforge.NET/projects/tapigen

    Dan,

    Unfortunately, you have to jump through hoops to do it. I posted recently a method that defines a session programmatically context, that is, from outside the simple HTTP request for an application. What follows is an adaptation that allows prepare_url to do its thing. You can connect to SQL * more like your application schema and check it out:

    set serveroutput on
    
    DECLARE  l_cgivar_name owa.vc_arr;  l_cgivar_val owa.vc_arr;  --  l_workspace_id number;  l_application_id number := 132; /* change this to your application ID */  l_user varchar2(30) := 'USERUSER'; /* change this to the username to be associated with the session */BEGIN
    
         -- set up cgi environment  htp.init;  l_cgivar_name(1) := 'REQUEST_PROTOCOL';  l_cgivar_val(1) := 'HTTP';  owa.init_cgi_env(num_params => 1,param_name => l_cgivar_name,param_val  => l_cgivar_val);
    
      -- find workspace ID of application  for c1 in (select workspace_id from apex_applications where application_id = l_application_id) loop    l_workspace_id := c1.workspace_id;  end loop;
    
      -- set security group ID, session ID, app ID globals  wwv_flow_api.set_security_group_id(l_workspace_id);  apex_application.g_instance := wwv_flow_custom_auth.get_next_session_id;  apex_application.g_flow_id := l_application_id;
    
      -- create authenticated session for l_user  wwv_flow_custom_auth_std.post_login(    p_uname => l_user,    p_session_id => null,    p_flow_page => apex_application.g_flow_id||':'||1);
    
      dbms_output.put_line('workspace:'||v('WORKSPACE_ID')||', session:'||apex_application.g_instance||', user:'||apex_application.g_user);
    
      -- call wwv_flow.show so that the correct parsing schema and other globals are established for the application  wwv_flow.show (    p_flow_id => apex_application.g_flow_id,    p_instance => apex_application.g_instance,    p_request => 'FSP_SHOW_POPUPLOV'    );
    
      -- set array of protected page IDs for session state protection  wwv_flow.g_protected_page_ids(1) := '1';    -- this establishes page 1 as an SSP-protected page
    
      -- generate link with checksum using prepare_url  dbms_output.put_line(apex_util.prepare_url('f?p=' || v('APP_ID') || ':1::dummyrequest','utf-8','2')); -- the request references page 1, designated as a protected pageEND;/
    

    Note, the username parameter and the call to wwv_flow_custom_auth_std.post_login is necessary only if you want to generate a checksum of user (type '2') level. Links using this type of checksum may be used only by the same authenticated user which was set up during the generation of the checksum. For links that can be used by any authenticated user, a checksum of the application (type 1) level can be requested from prepare_url and for this, the user name parameter and the call to wwv_flow_custom_auth_std.post_login are useless.

    The second argument to prepare the url must match the implementation REQUEST_IANA_CHARSET of your DAD and the third argument is the type of checksum (3 = level of the session and is not appropriate here, 2 = user-level and requires you to make the configuration of the username first, 1 = application-level).

    Scott

  • By the way the item values without using the URL for it

    Hello

    I want the value of an element to another page.

    Is there a good tutorials on it? I don't want to use the URL for it, if you understand what I mean.

    Also I would like to learn more about session state in the apex and how it works and how I could display a value of an element stored in the session state. So if you have some good reads on that I would appreciate it.

    d6752e93-BC8D-48f1-b3ef-073ab316b748 wrote:

    Update your profile with a readable handle.

    Also, how do I acsess an element that was previously presented on a page.

    A value of element are accessible anywhere in the APEX using the syntax of reference described in the documentation appropriate session state. The required syntax depends on where the item is referenced. In general, use bind value [: MY_ITEM] syntax in queries SQL for APEX and PL/SQL expressions and blocks; the functions V and NV [V ('MY_ITEM')] in stored program units; and the substitutions of static text [& MY_ITEM.] in the properties of code, templates and HTML component. The actual value returned will depend on where the item is referenced in the APEX show/accept treatment.

    For example that I want to fill a text field empty with a value of an element that has been filled with front page.

    What do you mean by "an element that was filled in front page? Before what? By the presentation of previous page? On the same page layout or a different page?

    Please try to make your questions more clear: How to ask questions

  • Dynamically change the item values

    Hello

    I defined a form based on a table with the following values.

    consultant_name - popup LOV based on a sql query
    month popup LOV based on a sql query
    year popup LOV based on a sql query

    Bill rate - screen only
    our cost-screen only

    I want to display bill rates and our dynamilly cost whenever I change the values of the 3 LOVs.

    To do this, I defined a dynamic action
    When event: change
    elements: consultant_name, month, year
    no condition
    real action: run pl/sql

    DECLARE
    B_R NUMBER (4.2);
    O_C NUMBER (4.2);
    BEGIN
    SELECT BILL_RATE, OUR_COST IN B_R O_C OF STAFFING WHERE THE CONSULTANT_NAME = V('P3_CONSULTANT_NAME) AND
    YEAR = V('P3_YEAR') AND MONTH = V ('P3_MONTH');
    : P3_BILL_RATE: = B_R;
    : P3_OUR_COST: = O_C;
    END;

    But during execution, it does not all values of bill_rate and our_cost also do not show any error message as data not found.
    What mistake I made?

    Thank you
    Kouadio

    Published by: user10470431 on August 11, 2010 17:43

    Hi Steve,.

    have you written p3_year or P3_YEAR? Because it is case-sensitive. It is the same of the selected item.

    You use Firefox and you have installed the Firebug add-on? If so, you can take a look if it is in fact the AJAX call when you view the Console tab.

    Concerning
    Patrick
    -----------
    My Blog: http://www.inside-oracle-apex.com
    APEX 4.0 Plug-Ins: http://apex.oracle.com/plugins

  • Lov popup when select change the item values

    Hello

    I have a Lov Popup to select cities, once I've selected one city, he must find the departmental and national names to display on the fields "view only".

    I tried to create dynamic Action that fires on 'change' to my Popup Lov and run this code:
    DECLARE
      V_UF UF_ATM.SIGLA%TYPE;
      V_PAIS PAIS_ATM.DESCRICAO%TYPE;
      CURSOR C_CIDADE IS
        SELECT U.SIGLA UF_SIGLA,
               P.DESCRICAO PAIS_DESCRICAO
          FROM PAIS_ATM P,
            UF_ATM U,
            CIDADE_ATM C
         WHERE U.ID(+) = C.UF_ID
           AND P.ID(+) = U.PAIS_ID
           AND C.ID = :P9_CIDADE;  
    BEGIN
      OPEN C_CIDADE;
      FETCH C_CIDADE INTO V_UF, V_PAIS;
      APEX_UTIL.SET_SESSION_STATE(':P9_UF', V_UF); -- I already tried :P9_UF := V_UF
      APEX_UTIL.SET_SESSION_STATE(':P9_PAIS', V_PAIS);
      CLOSE C_CIDADE;
    END;
    Is there a "correct" way to do it? What Miss me?

    Thank you
    Alan.

    Hello

    OK - I added another page to my sample application: http://apex.oracle.com/pls/apex/f?p=56976:13

    Dynamic action would not work because the value that changes is in a hidden item - P13_EMPNO * _HIDDENVALUE * and you can not target it in Action.  I used jQuery to attach an onChange function instead.

    Andy

  • Value list is not to accept with the item values

    Hello

    I have a problem with a value list that really gets me excited.

    History: Re: selection for the week in the year and month numbers

    Here the LOV who works in PL/SQL dev. and APEX:
    Select to_char (dt + (7 * rn), 'IW') | » ('||
    TO_CHAR (DT + (decode (RN, 0, 0,(7*RN) + 1-offset))) | » -'||
    -case when dt + (7 *(rn+1)) - offset > last_day (dt) then
    LAST_DAY (DT) |') '
    on the other
    DT+ (7 *(RN+1)) - offset |') '
    end as show_value,
    TO_CHAR (DT + (7 * RN), 'IW') as return_value
    from (select to_date ('8,2008', 'Mr. YYYY') as double dt)
    , (select to_number (to_char (to_date ('8,2008', 'Mr. YYYY'), a ')) as double compensation)
    , (select rownum-1 rn of the double connection by rownum < = 5)
    When trunc (dt + (7 * rn), 'MM') = dt
    result:
    'SHOW_VALUE '; "' RETURN_VALUE '.
    "31" (01.08.08 - 03.08.08); "31"
    "32" (04.08.08 - 10.08.08); "32"
    "33" (11.08.08 - 17.08.08); "33"
    '34' (18.08.08 - 24.08.08); "34"
    '35' (25.08.08 - 31.08.08); "35"

    Apex I have two elements of value "08.2008" instead of the hard coded: P1_MONTH and: P1_YEAR. SQL looks like:
    select to_char (dt + (7 * rn), 'IW') | » ('||
    TO_CHAR (DT + (decode (RN, 0, 0,(7*RN) + 1-offset))) | » -'||
    -case when dt + (7 *(rn+1)) - offset > last_day (dt) then
    LAST_DAY (DT) |') '
    on the other
    DT+ (7 *(RN+1)) - offset |') '
    end as show_value,
    TO_CHAR (DT + (7 * RN), 'IW') as return_value
    from (select to_date(:P1_MONTH ||) '.' || ((: P1_YEAR, 'Mr. YYYY') as double dt)
    (select to_number (to_char (to_date(:P1_MONTH ||) '.' || ((((: P1_YEAR, 'Mr. YYYY'), a ')) as double compensation)
    , (select rownum-1 rn of the double connection by rownum < = 5)
    When trunc (dt + (7 * rn), 'MM') = dt
    I tried several ways, but it always seems to:
    LOV query is not valid, a display and a return value is needed, the column names must be different. If your query contains a query online, the first CLAUSE in the SQL statement must not belong to the query online.
    I HATE THIS MESSAGE!

    Other ways:
    (select to_date ((:P1_MONTH ||)) ' || (((: P1_YEAR), 'Mr. YYYY') as double dt)
    (select to_date (TO_CHAR(:P1_MONTH) |)) '.' || (TO_CHAR(:P1_YEAR), 'Mr. YYYY') as double dt)
    ...

    Is there someone who could help me with this specific issue of the APEX?

    Tobias

    Hello

    I don't know why, but if you remove the '.' in dates (IE, just having MMYYYY format), then this market - I just tested this on a model page. I don't have the data for selection lists, so have been using a normal text field, but it does not work: http://htmldb.oracle.com/pls/otn/f?p=45958:22

    Andy

  • Show and hide regions / buttons by changing the item values

    Hello

    is it possible to change a value of an element (LOV) that in the dependence of the selected a region of value / button see the STI or hide?

    I try this with the conditions of the region / button, but it does not work...

    Workspace: TEST_OA5
    Username: [email protected]

    password: Hund123

    Page: 2


    THX for the help,


    concerning

    René

    Hello

    I've added a new dynamic action called ANIMAL SELECT and changed the terms on your reports using P2_TIER_AUSWAHL

    Gus

  • Problem with comma when you pass values in the URL

    Hello

    I have two pages, the first page to the second page, I'm passing some values using the url parameter passing

    but certain values contains comma ex:-P1_NATION field contains INDIA, United States, United Kingdom

    but the apex treated that as these are distinct values and assign it to separate elements

    Suppose that my intention is like P2_NATION, P2_EMPLOYEE, P2_EMPID: USA, UK, INDIA, SAGAR, 123

    but the apex dealing with like P2_NATION = INDIA: P2_EMPLOYEE = USA: P2_EMPID = UK

    is there any solution for this

    Please help me about this

    I use apex4.1, db 11g, ie, chrome, ff

    Thank you

    SAGAR

    SAG says:

    I have two pages, the first page to the second page, I'm passing some values using the url parameter passing

    but certain values contains comma ex:-P1_NATION field contains INDIA, United States, United Kingdom

    but the apex treated that as these are distinct values and assign it to separate elements

    Suppose that my intention is like P2_NATION, P2_EMPLOYEE, P2_EMPID: USA, UK, INDIA, SAGAR, 123

    but the apex dealing with like P2_NATION = INDIA: P2_EMPLOYEE = USA: P2_EMPID = UK

    is there any solution for this

    The best practice is not to transfer the data in the URL, other than the minimum possible number of discrete ID. Values required in a target page can be recovered in the element source and properties by default, calculations or using these values of process ID, or by referencing the other page element values or application already in session state. Collections can be used to store multiple values in session state to use through one or more pages.

    In URL of the APEX, commas in the item values can be escaped by encapsulating values of the backslashes ('-'), while the settlers may not appear at all.

    P2_NATION,P2_EMPLOYEE,P2_EMPID :\INDIA,USA,UK\,SAGAR ,123 
    

    Also, do not use unescaped reserved characters in the URI.

  • Pass values of the item to the page with 'No URL Access'

    I have a request of "high security" where I try to limit the information passed around in the URL so I have several pages with branches of the 'branch to the page' where the target page access protection is set to "no access URL".

    However, I still need to set multiple values page element in the target page (the one I am connexiona step).

    Thinking about how to do what I thought of two ways to get this data to the target page.
    First way:
    (a) set up several calculations in the source page that calculates the values of the element in the target page and subordinate these calculations on a button application.
    (b) set up my 'on page' management on the source with the same request conditional button.

    Second way:
    (a) put in place target with a process of pl/sql page that defines the page elements
    APEX_UTIL. SET_SESSION_STATE('P31_SSN',:P40_SSN); -P31 is the target page
    do the same for all elements on the page. The process of subjecting to press the button.
    (b) implemented the same 'page' branch on the source with the same conditional key.

    Pro or con either of these approaches? Is there a different approach? I'm IMPOSSIBLE in any case implement a branch to URL with the item values in the URL as I don't want sensitive data columns in newspapers. I know that set_session_state can have interesting interactions with variable bind where they may not be, but I see no problem with my test pages...

    It doesn't matter what technique lets you define the session state - do what is easier. Call for apex_util.set_session_state is the same as make an assignment, for example,.

    APEX_UTIL. SET_SESSION_STATE('P31_SSN',:P40_SSN);

    .. .is equivalent to

    : P31_SSN: =: P40_SSN;

    Calculations are the same thing.

    Application parts are not broader than the elements on the page regarding the scope of application; any point in the session state can be referenced by any element of the request. Application parts are no rendering/display properties or association of specific page.

    Scott

  • Replace the comma between quotation MARK

    Hello

    Here, I want to replace the comma between CITATION to "#", but my boss does not work...

    could someone help me please?

    SELECT

    REGEXP_REPLACE ("Mike" JOHN, KELLY "Marc")

    "" [^,] * (EN) [^,] * "', ' #»(, 1, 1) AS A RESULT"

    DOUBLE;

    Maybe

    Select ' Mike, Michel 'JOHN, KELLY' Marc' orig.

    regexp_replace (' Mike, Michel 'JOHN KELLY' Marc', '"(\w+), (\w+)" ', '"\1#\2" ' ") new_val

    of the double

    ORIG NEW_VAL
    Mike, 'JOHN KELLY' of Michel Marc Mike, Michel 'JOHN #KELLY' Marc

    Concerning

    Etbin

  • No way to distinguish between failure and normal when to get the document of the UCM?

    Hello

    I use the service GET_FILE below to get the document from the Complutense University of MADRID

    request.putLocal (IdcService.NAME, IdcService.GET_FILE);
    request.putLocal (IdcDocumentAttribute.DOCUMENT_ID, dID);
    request.putLocal (IdcDocumentAttribute.NAME, dDocName);

    and then the output stream:
    ServiceResponse response = client.sendRequest (context, dataBinder);
    InputStream inputStream = response.getResponseStream ();

    they work most of the time very well.
    However, in this case, exception that I can't file, rather than receive exception, I always get a steady stream until I got out of the stream as a string, I realized that this is a format string HDA indicating failure.

    I wonder if there is no way to distinguish between failure and normal exit without open the output string stream?
    Thank you.

    We expect that the user can download the document so successfully in the form of output stream.

    It's probably a bad support, as you have already seen ;-)

    Is the output as string-HDA when the expected of the UCM rather than throwing exception failure?

    It should be pretty easy parse the real answer to retrieve the status code the system riser. You should not need to open the file to find the error.

    Something like

    response.getLocal("StatusCode")
    

    should tell you if the file has been found. A-16 status code means that the file could not be found. In the case of a successful GET_FILE, it does appear that a status code is still present, so test just for the mere presence of a status code should be sufficient.

  • Question of Apex_Util.Prepare_URL due to the Apex Util advise msg

    Hello

    I have the following code in a SQL statement in an IRR:

    APEX_UTIL. PREPARE_URL (p_url = > ' f? p =' | v ('APP_ID') |) ': 398 :'|| v ('APP_SESSION'): ':NO:398:P398_IDOBJ. VIMG_SEARCH. IDOBJ:', p_checksum_type = > 'SESSION') FullImg,.

    And it works as expected. However when I run the Util Apex advise I get the following:
    Region Source attribute (identifies the source of the region, region Type of reference Source)
    Check the V function used in SQL statements
    Performance category
    Message contains V/NV/DV function call in the SQL statement (can be a performance issue).

    Do I need to worry about this? or should I change the syntaxt in the APEX_UTIL. PREPARE_URL settings?

    Thank you
    Daniel

    In SQL (PL/SQL within the APEX blocks) the notation of the bind variable must be used:

    APEX_UTIL.PREPARE_URL( p_url => 'f?p=' || :APP_ID || ':398:'||:APP_SESSION||'::NO:398:P398_IDOBJ:||VIMG_SEARCH.IDOBJ:', p_checksum_type => 'SESSION') FullImg,
    

    V (...) notation is intended for program units PL/SQL database called from APEX.

  • Is there a way to differentiate between a conference and music?

    Is there a way to differentiate between a conference and music on my I Pod Touch?

    By the title/subject.

    In iTunes, you can change the media type between;

    -Music; goes in the music app

    -Podcast, go to podcast app

    -iTunes U

    -Audio book, and

    -Voice memo

Maybe you are looking for

  • my music apple keeps crashing

    everytime I open my apple music on my iphone 5s 9.3.2 ios when I press on play on a song it crashes if anyone can help please thank you.

  • In Thunderbird, how can I import more than one set of subfolders to my old e-mail program?

    I recently changed my Thunderbird in Microsoft Outlook Express (which I still installed), on which I had two separate 'identities', each with its own address book and all of the subfolders. The installation successfully put in place two new sets of f

  • Satellite A300-1 OC - problem installing Windows XP

    Hi all! Faced with the need to install * Windows XP * on my * Satellite A300-1OC. *. Here's the problem:the * pilot integrated distribution OS for the SATA downloaded from the Intel site.When you install XP no problem, but * when you drive where to i

  • TWO EXTENSIONS RUNNING OFF A ROUTER

    Hello. I have a N300 Extender on networks and just bought a Netgear EX2700 extension put in another location. Both successfully install via WPS and work well independently, BUT when both are on at the same time as an Extender will show on the network

  • Cannot download more than 30 photos of the windows for CVS Photo Gallery

    Original title: the windows photo gallery software I can't download my pictures in my windows for cvs photo gallery using the Gallery s way. If I download a pic. It works but it will not pass by CVS so I do 30 photos