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

Tags: Java

Similar Questions

  • 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');

  • 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('<p>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.

  • 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...

  • 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

  • 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?

  • 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

  • How to pass the parameters in the http post method?

    Hello

    I want to download the mp3 file on server and I need to pass two parameters with the post method.

    Here is my code for this.

                          String userid="id_user=8379";
                  String filename="trackName=sample.mp3";
                  String params=userid+"&"+filename;            
    
                            httpcon=(HttpConnection)Connector.open("http://api.upload.com/gStorage/uploadSong?output=json",Connector.READ_WRITE);
                httpcon.setRequestMethod(HttpConnection.POST);
                httpcon.setRequestProperty("Content-type","application/x-www-form-urlencoded");
                httpcon.setRequestProperty("Content-type","audio/mpeg3");
                os=httpcon.openOutputStream();
                os.write(params.getBytes("UTF-8"));
                fc=(FileConnection)Connector.open("file:///E:/sample.mp3",Connector.READ_WRITE);
                fileis=fc.openInputStream();
                bos=new ByteArrayOutputStream();
                byte[] data=new byte[50000];
                int ch;
                while ((ch=fileis.read(data,0,data.length))!=-1) {
                    bos.write(data,0,ch);
                }
                os.write(bos.toByteArray());
                os.close();
                System.out.println("Response code From server"+httpcon.getResponseCode());
                if(httpcon.getResponseCode()!=HttpConnection.HTTP_OK)
                {
                    System.out.println("Failed to upload bytes");
                }
                else
                {
                    //is=httpcon.openInputStream();
                    DataInputStream dis=httpcon.openDataInputStream();
                    int ch1;
                    StringBuffer buffer1=new StringBuffer();
                    while ((ch1=dis.read())!=-1) {
                        buffer1.append((char)ch1);
                    }
                    System.out.println("Response From Server"+buffer1.toString());
                }
            } i am getting response code ok but fail to upload file.
    

    may I passing the parameter in the wrong way?

    thankx.

    Hello

    Nitin I currently do a midlet project.

    So I used multipart post method.

    I just read this article. http://MindTouch.firmstep.com/AchieveForms/Design_Guide/Integration_Actions/types/HTTP_POST#top

    package com.http.main;
    
    import java.io.ByteArrayOutputStream;
    import java.io.InputStream;
    import java.io.OutputStream;
    import java.util.Enumeration;
    import java.util.Hashtable;
    
    import javax.microedition.io.Connector;
    import javax.microedition.io.HttpConnection;
    
    import com.sun.midp.io.BufferedConnectionAdapter;
    
    public class HttpMultipartRequest
    {
        static final String BOUNDARY = "----------V2ymHFg03ehbqgZCaKO6jy";
    
        byte[] postBytes = null;
        String url = null;
    
        public HttpMultipartRequest(String url, Hashtable params, String fileField, String fileName, String fileType, byte[] fileBytes) throws Exception
        {
            this.url = url;
    
            String boundary = getBoundaryString();
    
            String boundaryMessage = getBoundaryMessage(boundary, params, fileField, fileName, fileType);
    
            String endBoundary = "\r\n--" + boundary + "--\r\n";
    
            ByteArrayOutputStream bos = new ByteArrayOutputStream();
    
            bos.write(boundaryMessage.getBytes());
    
            bos.write(fileBytes);
    
            bos.write(endBoundary.getBytes());
    
            this.postBytes = bos.toByteArray();
    
            bos.close();
        }
    
        String getBoundaryString()
        {
            return BOUNDARY;
        }
    
        String getBoundaryMessage(String boundary, Hashtable params, String fileField, String fileName, String fileType)
        {
            StringBuffer res = new StringBuffer("--").append(boundary).append("\r\n");
    
            Enumeration keys = params.keys();
    
            while(keys.hasMoreElements())
            {
                String key = (String)keys.nextElement();
                String value = (String)params.get(key);
    
                res.append("Content-Disposition: form-data; name=\"").append(key).append("\"\r\n")
                    .append("\r\n").append(value).append("\r\n")
                    .append("--").append(boundary).append("\r\n");
                System.out.println("****In while Loop:-****"+res);
            }
            res.append("Content-Disposition: form-data; name=\"").append(fileField).append("\"; filename=\"").append(fileName).append("\"\r\n")
                .append("Content-Type: ").append(fileType).append("\r\n\r\n");
            return res.toString();
        }
    
        public byte[] send() throws Exception
        {
            HttpConnection hc = null;
    
            InputStream is = null;
    
            ByteArrayOutputStream bos = new ByteArrayOutputStream();
    
            byte[] res = null;
    
            try
            {
                hc = (HttpConnection) Connector.open(url);
    
                hc.setRequestProperty("Content-Type", "multipart/form-data; boundary=" + getBoundaryString());
                hc.setRequestProperty("Content-Length",postBytes+"");
    
                hc.setRequestMethod(HttpConnection.POST);
    
                OutputStream dout = hc.openOutputStream();
    
                dout.write(postBytes);
                dout.close();
    
                int ch;
    
                is = hc.openInputStream();
                StringBuffer buffer=new StringBuffer();
    
                while ((ch = is.read()) != -1)
                {
                    bos.write(ch);
                    buffer.append((char)ch);
                }
                res = bos.toByteArray();
                System.out.println(buffer.toString());
            }
            catch(Exception e)
            {
                e.printStackTrace();
            }
            finally
            {
                try
                {
                    if(bos != null)
                        bos.close();
    
                    if(is != null)
                        is.close();
    
                    if(hc != null)
                        hc.close();
                }
                catch(Exception e2)
                {
                    e2.printStackTrace();
                }
            }
            return res;
        }
    }
    

    and use it in this way

    public void getBytes()
        {
            ByteArrayOutputStream bos=null;
            try
            {
                bos=new ByteArrayOutputStream();
                InputStream fis=getClass().getResourceAsStream("/super.mp3");
                int ch;
                byte[] data=new byte[120];
                while((ch=fis.read(data,0,data.length))!=-1)
                {
                    bos.write(data,0,data.length);
                }
                Hashtable params=new Hashtable();
                //params.put("id_user","8474");
                params.put("id_user","8379");
                params.put("file1","audio.mp3");
                HttpMultipartRequest httpreq=new HttpMultipartRequest("http://api.upload.com/gStorage/uploadSong?", params,"file1","xpressMusic.mp3","audio/mpeg",bos.toByteArray());
                httpreq.send();
                bos.close();
                fis.close();
            }
            catch (Exception e) {
                System.out.println("Exception"+e);
            }
    

    Here, the key is contenttype, contentLength.you can get the info on it from the link above.

    thankx.

  • 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

  • Passing parameters to the query to extract in a stored procedure

    How pass us in a parameter of a query retrieves in a stored procedure?

    Because for example I: -.

    FOR SheikYerbouti in company

    LOOP

    SELECT extract (response,'/ list/hwid [@name = "Tom"] / descendant::node () / address) employee where id = 9506;

    END OF LOOP

    Instead of TOM, I want to pass a variable because I use the stored procedure. The variable is emp_rec.name

    SELECT extract (response,'/ list/hwid [@name = emp_rec.name]/descendant::node()/address) employee where id = 9506; does not work?

    The XPath expression is of type string, concatenate the value:

    extract (answer, "/ List/hwid[@name="' |) emp_rec. Name | ([""] descendant::node () ')

    However, depending on your version of the database, there may be better alternatives, so if you can give us a little more explanation on your requirement, we would be able to offer other options.

  • 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 in the order by clause of the cursor

    Hi friends,
    I am facing a strange problem

    I have a cursor with an order by clause.

    OPEN FOR Cursor_nomrpt
    SELECT DISTINCT
    CAST (plano.desc3 AS VARCHAR2 (50)) category
    plano.name plan_name
    , chip nvl (CAST (plano.desc6 AS VARCHAR2 (50)), 'not applicable')
    , nvl (trunc(plano.value18,2), 0) nominal_slm
    , nvl (trunc(plano.value19,2), 0) blm
    plano.dbdateeffectivefrom date_live
    ,
    Plano.DBKEY pog_id
    , case when plano.value47 < 0 THEN 0 when plano.value47 IS NULL THEN 0 ELSE plano.value47 END as parent_id
    Of
    Plano dplapro1.ix_spc_planogram
    INNER JOIN dplapro1.ix_spc_performance ON plano.dbkey = perf.dbparentplanogramkey perf
    Produces INNER JOIN dplapro1.ix_spc_product ON perf.dbparentproductkey = product.dbkey
    INNER JOIN dplapro1.ix_spc_product_key ON product.dbkey2 = prodkey.dbkey prodkey
    AND prodkey.keylevel = 2
    WHERE
    Plano.value50 = 0
    AND plano.dbkey4 = p_subcatkey
    ORDER BY ltrim (rtrim (p_orderby)) CSA;

    p_orderby is the parameter that is passed. But the result is not sorted. But when I run the cursor to hardcode the value of parameter, that it works fine...

    Need your help on this

    Hello

    When you use a local variable in a cursor, it's as if you had hard-coded literal in its place, you cannot use a variable to a column name.

    If you know all the possible values for p_orderby, you can do something like this:

    ...
    ORDER BY  TRIM ( CASE  p_orderby
                   WHEN  'DESC'     THEN  plano.desc
                   WHEN  'VALUE'     THEN  plano.value
                   ...
               END
                ) ASC;
    

    If you don't know not all possible values, you can use dynamic SQL statements.

    By the way

    TRIM (x)
    

    Returns the same results as

    LTRIM ( RTRIM (x))
    
  • How pass parameters in the hyperlink in bi publisher 11g using rtf

    Hi all

    Is there a document guide to pass the parameter in a hyperlink in 11g in rtf? I tried the following and it does not work for 11g. Is there a different method by passing the parameters in 11g.


    Variable definition: <? variable: Drill_Rgn. string ("http://localhost:9704/path_to_BIP_report')? >
    Hyperlink to call the report, by the way the REGION field in the parameter RGN: {$Drill_Rgn}? RGN = {REGION}
    Yet once I tried {$Drill_Rgn} & RGN = {REGION}

    Thank you

    Virat

    Instead of making that take the url CURRENT_SERVER_URL (pre-definde BI variable Publsiher) by declaring as below

    Then later add the extra patameters for example. region as below
    {$CURRENT_SERVER_URL} Data / Country.xdo & p_region = {REGION}<- get="" this="" region="" value="" from="">

    See you soon,.
    ND
    Use the buttons "useful" or "correct" to award points to the answers.

  • How to pass parameters to the OAProcessingPage

    Hello, I followed the examples of Devguide to create a page of treatment, and it works fine. Of the LICS of the calling page:

    OAProcessingPage page =
    new OAProcessingPage ("NameofProcessingCO");
    page.setConciseMessage ("message");
    page.setDetailedMessage ("some details");
    page.setProcessName ("process name");
    pageContext.forwardToProcessingPage (page);

    In the Construction of the processing page, I call a method in AM then return to the calling page. No problems.

    But I want to pass a parameter of the calling page to the processing page, so I can use it in the call to the method of the AM. How can I do?


    Concerning
    SG

    Hello

    You can set session parameters by calling the PFR page and page processing you can access this setting.

    To set

    pageContext.putSessionValue)

    To get

    pageContext.getSessionValue)

    Thank you
    Gerard

Maybe you are looking for