How to access a request scope value in groovy expression of bind variable?

I need to filter the VO query based on the username.Following is what I am doing:
<af:commandButton text="#{translationviewBundle['LoginPage.LOGIN']}"
id="cbLogin" partialSubmit="true"
action="validate">
<af:setPropertyListener to="#{requestScope.userName}"
type="action"
from="#{backingBeanScope.LoginUserBb._username}"/>
</af:commandButton>
In the bind variable(pUserName) I set the value as : adf.context.current.requestScope.get('userName')
and the VO query :
SELECT DISTINCT
LANGUAGES.NAME,
LANGUAGES.ISO_CODE LANGUAGE_CODE
FROM
LANGUAGES LANGUAGES, USER_LANGUAGES USER_LANGUAGES
WHERE LANGUAGES.NAME <> 'English'
AND LANGUAGES.LANGUAGE_CODE = USER_LANGUAGES.LANGUAGE_CODE
AND USER_LANGUAGES.USER_ID = :pUserName
ORDER BY NAME
I get the following error: "Missing IN and OUT parameter at the index 1" and the query returns nothing.
Any suggestions pls?
Thanks,
Swathi Patnam

Your ADF BC layer shouldn't depend on a specific view layer, the best practice in such a case is to have an AM service method exposed to the client and have it accept a parameter.
Something like this:
http://blogs.oracle.com/shay/2010/07/am_service_method_-simpledem.html

Similar Messages

  • How to get the request scope values?

    Hi,
    I have one question about Struts validate framework question is How can i get the request scope values when the validate method throws an exception?
    My scenario is I have some values in the request scope in one page. After submitting the page the validate method throws an exception, then the errors were displayed in the page and it ask for provide correct information. However, at this time the values in the first request will become null. How can I get those request values?
    Request.setAttribute(�con�, conn);Link after click this link user will display with user reg. form with user details input fields. After submitting he user details form if user provide some invalid information then validate method in Action form will throw errors and displayed the User details form with errors. However, the request attribute �con� will become null at this point of time. How can I get the user request attribute in user details form?
    Assume request have more than 100 values.
    Waiting for answer...
    Regards,
    Bhaskar Reddy

    Your code is probably fine, and you are probably running into http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6497210
    See also http://forum.java.sun.com/thread.jspa?messageID=9419890
    SUN needs to fix a few bugs for this to work...

  • ADF BC how to access session backing bean value in servlet

    Hi everyone,
    How do I access session backing bean value in a servlet?

    Frank, thanks for your reply.
    I'm not sure how I can incorporate this example into my situation. Let me explain more detail about my problem.
    "servlet" in my post here actually means a custom servlet I wrote for rendering an image that is stored in db as ordimage. In this servlet, I get hold of my appmodule by using Configuation.createRootApplicationModule(). By doing so (If I'm not wrong) a new database session/connection is created. What I'm going to achieve is set application context for this new session/connection in db with the data stored in a session backing bean in the view layer.
    I can pass the required data to the servlet thru url parameter, but I don't want to do it this way for the reason that the data may contains sensitive information.
    I hope I have explained myself well.
    Message was edited by:
    bsmt

  • How To Pass the Request Scope To Another Class

    In my ListThread class, I first retrieve some of the text fields; i.e., request.getParameter( ... );
    Thereafter, I want to pass the request scope together with some parameters to another class; SiteUtil.java., for some further processing. This is what I do:
    public final class ListThread extends HttpServlet
          public doPost( HttpServeltRequest request, HttpServlerResponse response)
                      throws ServletException, IOException
          String offset = request.getParameter( "offset" );
          String size = request.getParameter( "size" );
          SiteUtil.prepareNavigate( request, offset, size,
               MessageInboxConfig.ROWS_IN_THREADS );
    }This is my SiteUtil.java:
    import javax.servlet.http.HttpServletRequest;
    public class SiteUtil
       public static void prepareNavigate  
         (HttpServletRequest request, int offset, int   
                         collectionSize, int totalRows)
          int startOffset = offset + 1;
          int lastOffset = offset + collectionSize;
          request.setAttribute("StartOffset", new Integer(startOffset));
          request.setAttribute("LastOffset", new Integer(lastOffset));
    }Can I pass the request scope and save attributes in the scope this way?

    You can pass the request to that method as a parameter, yes, and you can even modify the request there. The request is just an ordinary Java object, so ordinary Java rules apply. Your code looks fine to me too.
    However don't try to store the request for future use, since after the response is sent back to the client, the request object is never used again. A new one is created for the next request.

  • How to get the VO attribute value by groovy?

    Hi everyone,
    I have a ItemsVO (with an entity behind it), a CompaniesVO and BusinessVO. CompaniesVO is filtered by a ExecuteWithParams, and has a type attribute, with this attribute I can filter BusinessVO used as LOV in ItemsVO. How can I pass the value using a groovy expression in the view accesor? Can I do this?
    Thanks in advance.

    Hi
    If there is a master child relation between CompaniesVO and BusinessVo, then define a viewLink and create view accessors and you can access the another view object attributes from groovy like 'view accessor name.attribute name'.
    Make sure you set the bind var value type as expression. And for example please refer to the below link by andrejus b.
    http://andrejusb.blogspot.com/2010/06/lov-description-text-with-groovy.html
    N.

  • How to access a field of an data source w/o binding a form field to it

    Hi
      This is a query regarding ADOBE print form.
      How to access a record field (of an data source.... typical multi row records) where the record is bound to a subform.
    Data is something like
    (I have used abap parlance for understanding)
    data : begin of data_tab occurs 0,
      field1 type .....,
    field2 type .....,
    fieldm type .....,
    fieldn type .....,
    end of data_tab.
    Subform is bound to
    $.DATA_TAB.DATA[*]
    How to access field1, field2,...... etc without creating subform fields and binding them to field1, field2, .... fieldn.
    I know normal approach is to define subform fields and then bind it to $.field1, $.field2 etc
    In the calculate event of a field bound to $.fieldm I have tried the following expressions to get the value of column fieldn of the same record but none of them worked.... Note that if I bind the field using $.fieldn data is displayed properly in the print form.
    $record.data_tab.fieldn.value
    $record.data_tab.data[*].fieldn.value
    $record.data_tab.data.fieldn.value
    $record.data_tab.fieldn.value
    Otherwise I would have to define hidden fields just to use these column values in the event script even though these value are not to be displayed in the ADOBE print form.
    Regards
    Abapper

    I can't remember the exact sentence, but do a little search, as that is a common question in this forum....
    How about:
    $record.data_tab.data[1].fieldn.value
    $record.data_tab.data[2].fieldn.value
    $record.data_tab.data[2].fieldn.value
    $record.data_tab.data[N].fieldn.value
    Cheers.

  • How to bind a user selected value to a view object bind variable?

    Hi
    I have two pages in ADF BC application. In the first page ,i will give a drop down menu to user which displays all the table names in my databse.
    when the user selects a table and goes to the second page..he should be given a menu or a check list of all the columns in the user selected table....
    to display the columns i have used the query
    Select COLUMN_NAME from user_tab_columns where table_name = : table_name in the view object.
    now how to bind the user selected table value in the first page to the table_name bind variable in view object ?
    thanks
    swathi.

    Hi,
    depends on how the select box is implemented. With ADF and ADF Faces, the default value selection is the list index. In a value change listener you could look up the selected value from the underlying iterator. Store this value e.g. in a session attribute and point the NDValue of the ExecuteWithParams operation to #{sessionScope.your_attribute}
    Frank

  • Passing value from MD form to bind variable in report

    I have an MD form, after I insert I want to redirect to a form and pass a value out of the detail section to the form to use as the value of it's bind variable. This works well on normal forms, but I cant seem to get it to work on the MD form. Below is an easy example and this doesnt work for me.
    MD form master dept/detail emp, code under the save button:
    doSave;
    declare
    l_empno integer;
    l_url varchar2(2000);
    begin
    l_empno := p_session.get_value_as_NUMBER(
    p_block_name => 'DETAIL_BLOCK',
    p_attribute_name => 'A_EMPNO',
    p_index => 1);
    l_url := 'SCOTT.EMP_RPT.show?'&#0124; &#0124;
    'p_arg_names=empno&p_arg_values='
    &#0124; &#0124;l_empno;
    portal30.wwa_app_module.set_target(l_url,'CALL');
    end;
    The form displays the empolyee information based on the value of empno from the MD form. The url looks like this http://hostname/pls/portal30/scott.emp_rpt.show?l_arg_names=empno&l_arg_values=
    so no rows get returned because there is no value, if i fill it in with a empno it works, so i know the report works, it just isnt the get_value isnt grabbing the empno from the MD form.
    null

    I figured it out, the save button on a MD form, the doSave; clears out the form fields so do a get_value_as will not work b/c there is nothing there, you need to get the value before the doSave; the below code will work.
    declare
    l_empno number;
    l_url varchar(2000);
    begin
    l_empno := p_session.get_value_as_NUMBER(
    p_block_name => 'DETAIL_BLOCK',
    p_attribute_name => 'A_EMPNO',
    p_index => 1);
    doSave;
    l_url := 'scott.EMP_RPT.show?'&#0124; &#0124;
    'p_arg_names=empno&p_arg_values='
    &#0124; &#0124; l_empno;
    portal30.wwa_app_module.set_target(l_url, 'CALL');
    end;

  • How to execute a function and return the result into a bind variable

    Hi,
    I am trying to calculate the sum of salaries of all persons with a particular JOB_ID using a function TOTAL_INCOME(v_job_id).
    create or replace function total_income
    +(v_job_id IN varchar2)+
    RETURN number IS
    v_total number(6);
    cursor get_sal is
    select salary from employees
    where job_id = v_job_id;
    BEGIN
    v_total := 0;
    for emp in get_sal
    loop
    v_total := v_total emp.salary;+
    end loop;
    dbms_output.put_line('Total salary of '||v_job_id||' is: '|| v_total);
    return v_total;
    END;
    Now I woud like to execute this function and assign the returned value into a bind variable test_sal
    variable test_sal number(6)
    SELECT total_income('AD_VP') into :test_sal FROM DUAL;
    dbms_output.put_line('Total Sal:'||:test_sal);
    This is returning the below errors:
    SELECT total_income('AD_VP') into :test_sal FROM DUAL
    *+
    Error at line 0
    ORA-01036: illegal variable name/number
    dbms_output.put_line('Total Sal:'||:test_sal);
    Error at line 3
    ORA-00900: invalid SQL statement
    Could someone help me what could be the problem?? Thanks for your time...

    Dear,
    If everything you will do will be done inside PL/SQL (stored procedure or stored function) then you don't have to care about bind variable.
    When using PL/SQL (static SQL) you will never encounter issues related to bind variables. PL/SQL itself takes care of your code and uses bind variables behind the scene.
    The only situation where you have to look carefully to the use of bind variables within PL/SQL is when you use Dynamic sql into stored procedures or functions.
    So, see in the light of the above comment, if you have to care about returning your function into a bind variable?
    Best regards
    Mohamed Houri

  • How to access a Matrix cell value outside the matrix in textbox?

    Hi
    I have created a matrix in SSRS. Columns are grouped by Channel Type. I want to access indicated cells value outside the matrix. 
    After Running the report the report shows
    How can I access cell values outside the matrix? Please help

    Hi Aladin92,
    According to your description, there is a matrix in the report, you want to reference the first value of total outside the matrix, right?
    In fact, Report item expressions can only refer to other report items within the same grouping scope or a containing grouping scope. Are the both textboxes in the same group. To workaround the issue, please refer to the following steps:
      1. Click and select the matrix, copy it and paste it in the report above the original matrix.
      2. Right-click handle of the first row in the upper matrix, click Insert Rows, then click Inside Group-Above.
      3. Right-click second cell of the first row, then click Expression.
      4. In the Expression text box, type the expression like below:
    ="A total of "& ReportItems!Textbox5.Value & "out of 258 BC CCRs have been evaluated"
      5. Set the text boxes and rows visibility to be hidden except for the text box with expression.
    The following screenshots are for your reference:
    If you have any more questions, please feel free to ask.
    Thanks,
    Wendy Fu
    Wendy Fu
    TechNet Community Support

  • How to increase the request timeout value in Oracle 10g web container

    Hi,
    Iam using Oracle10g Application server .
    For long running backend process my JSP page is getting re-submitted after 3 mins.
    How do i avoid this ?
    Is there a way to increase the http request timeout interval.
    If so where do i change the timeout interval.
    In IIS web server I can change the timeout interval.
    Thanks
    Sridhar.

    Hi,
    If you mean to increase the request timeout i.e the time when a request is submitted to the server and the response is sent by the server it can be done in httpd.conf file located in $OracleHome/Apache/Apache/conf directory.
    The attribute to be used for setting timeout is "Timeout". By default teh value is 600 seconds i.e 5 minutes.
    After making these changes , run command dcmctl updateConfig -ct OHS and restart the HTTP Server. Please note these commands need to be run only if the httpd.conf changes are done through text editor.
    Hope this helps.
    Smita

  • How to access certain line's values from former list in a dynpro?

    hi,
    i generate a list after a select screen whose results look like the following list:
    userA - number1 - 5points
    userA - number2 - 3points
    userA - number3 - 2points
         userA: 10points total
    userB - number1 - 3points
    userB - number2 - 4points
    userB - number3 - 4points
        userB: 11points total
    Now what i want to do is to let the user click on one line of the list and just simply output that line on a dynpro again.
    my code looks like that (where the problem is,at least i think, that the lineselection is after all the lines are output):
      LOOP AT puge INTO puge_wa.
        LOOP AT pu INTO pu_wa.
          IF pu_wa-tipper = puge_wa-tipper.
            WRITE: /005 'Tipper:', pu_wa-tipper, 'Spieltag:', pu_wa-tagid, ' Punkte:', pu_wa-punkte.
          ENDIF.
        ENDLOOP.
        WRITE: /015 'Gesamtpunkte von Tipper:', puge_wa-tipper, ' Punkte:', puge_wa-punkte.
      ENDLOOP.
       AT LINE-SELECTION.
       call screen 0050.
    so when i access pu_wa-tipper on the dynpro obviously it accesses the very last userB number3 4points row and outputs that...
    sorry for giving just a very beginners question but i am thinking about the problem for not only some hours...

    on your write statements make use of the HOTSPOT option.
    WRITE:/ xxx hotspot,
                 yyy hotspot,
    After the write statement use the HIDE verb.
    WRITE:/ xxx hotspot,
                 yyy hotspot,
    HIDE: xxx, yyy.
    Handle the click in the in the AT LINE-SELECTION section.
    This is an example
    *---------------------------------------------------- Count Drill Down
    AT LINE-SELECTION.
      GET CURSOR FIELD f
                 VALUE val.
    *              OFFSET off
    *              LINE lin
    *              LENGTH len.
      IF NOT val CO '- 0123456789'.
        CLEAR: lidet1, bidet1, rudet1, ucdet1.
        EXIT.
      ENDIF.
      IF val EQ 0 AND f IS INITIAL.
        CLEAR: lidet1, bidet1, rudet1, ucdet1.
        EXIT.
      ENDIF.
      IF NOT lidet1 IS INITIAL.
        MOVE-CORRESPONDING lidet1 TO key_rec.
      ELSEIF NOT bidet1 IS INITIAL.
        MOVE-CORRESPONDING bidet1 TO key_rec.
      ELSEIF NOT rudet1 IS INITIAL.
        MOVE-CORRESPONDING rudet1 TO key_rec.
      ELSEIF NOT ucdet1 IS INITIAL.
        MOVE-CORRESPONDING ucdet1 TO key_rec.
      ENDIF.
      fld_def = f.
      IF key_rec-rgtext = rpt_total.
        CLEAR key_rec-rgtext.
      ENDIF.
      IF key_rec-dvtext = rpt_total.
        CLEAR key_rec-dvtext.
      ENDIF.
      IF key_rec-dttext = rpt_total.
        CLEAR key_rec-dttext.
      ENDIF.
      IF key_rec-brtextextd = rpt_total.
        CLEAR key_rec-brtextextd.
      ENDIF.
      CLEAR: r_region,     r_region[],
             r_division,   r_division[],
             r_district,   r_district[],
             r_brtextextd, r_brtextextd[].
      IF NOT key_rec-rgtext IS INITIAL.
        r_region = 'IEQ'.
        r_region-low = key_rec-rgtext.
        APPEND r_region.
      ENDIF.
      IF NOT key_rec-dvtext IS INITIAL.
        r_division = 'IEQ'.
        r_division-low = key_rec-dvtext.
        APPEND r_division.
      ENDIF.
      IF NOT key_rec-dttext IS INITIAL.
        r_district = 'IEQ'.
        r_district-low = key_rec-dttext.
        APPEND r_district.
      ENDIF.
      IF NOT key_rec-brtextextd IS INITIAL.
        r_brtextextd = 'IEQ'.
        r_brtextextd-low = key_rec-brtextextd.
        APPEND r_brtextextd.
      ENDIF.
      PERFORM build_drill_down.

  • WebLogic 12.1.1 :: How to access SOAP Request message

    I see examples of processing the SOAP Message with either a SOAPHander or a LogicalHandler (body only) but is there a way I can get access to the SOAP body from the server side endpoint (the processing operation).
    I have a large schema being passed as WSDL, and would like to have access to the XML doc and the JAXB classes.
    Any ideas?
    Thanks

    The problem is that your DocumentBuilderFactory is not set to be namespace aware. If add a call to factory.setNamespaceAware(true) that should fix your problem.

  • ID JS (any version): How to access "Author Title" field value through scripting.

    Good Morning:
    In the file information dialog box, there is a field for "Author Title".
    Is it possible to reference this field via scripting?
    I've tried many different field name options for it (i.e. "authorTitle", "titleAuthor", etc...), but no luck so far.
    Thanks!
    Theresa

    Interesting one.
    For some reason it's in the Photoshop namespace:
    <rdf:Description rdf:about=""
      xmlns:photoshop="http://ns.adobe.com/photoshop/1.0/">
      <photoshop:AuthorsPosition>That's me!</photoshop:AuthorsPosition>
    </rdf:Description>
    You're going to need getProperty() and setProperty() for that:
    doc.metadataPreferences.getProperty("http://ns.adobe.com/photoshop/1.0/","AuthorsPosition");
    and
    doc.metadataPreferences.setProperty("http://ns.adobe.com/photoshop/1.0/","AuthorsPosition","All About Me!");
    Harbs

  • How to access field in structure where fieldname is inside of a variable?

    Hi,
    Through searching number of old threads here on forums i learnt that i can get dynamic field names from a table with "assign component" syntax.
    So i have my fieldname inside a field symbol <fs_fieldname>. I want to use this fieldname to access a field in another structure ls_structure.
    My syntax that is not working that i need help with is:
    ls_structure-<fs_fieldname> = 'HELLO'.
    How can I refer to ls_structure's field where the fieldname is in the field symbol <fs_fieldname>.
    thank you

    Check this
          field type string,
         end of ls_structure.
    data:lv_field type string.
    field-symbols:<fs> type string.
    lv_field = 'FIELD'.
    ls_structure-field = 'Hello'.
    assign lv_field to <fs>.
    if sy-subrc = 0.
      concatenate 'LS_STRUCTURE-' <fs> into lv_field.
      unassign <fs>.
      assign (lv_field) to <fs>.
      if sy-subrc = 0.
        write <fs>.
        <fs> = 'Changed data'.
        skip 1.
        write ls_structure-field.
      endif.
    endif.

Maybe you are looking for

  • PDF viewer can't open fillable pdf.

    Hi, I was working on a fillable pdf yesterday and it was fine. When I want to open it now, file will not open and I get a message that I need to upgrade to latest version, which I have done already. As a reference I am working with a Mac. Any idea wh

  • Use issue in Currency Exchanges in report

    Hello Gurus, Please any one help me on this issues..User is facing some problem with exchange values in reports...please find the issue below and do the needfull. > Our sales are based on EURO and CL is also applied with EURO. Customer: Turk Prysmian

  • Desktop Manager Software Help Doesn't Work

    I have the latest version of the Blackberry Desktop Manager and the Help Link doesn't open.  I know others have had this issue as well.  Does anyone know why?

  • Problem in attaching XLS file to decision step

    Hi All, I have a requirement where i have to add a attachment to workflow while triggering the workflow itself and attach that to user decisition step, i have searched the forum for the same and i got some piece of code which i mention here. include

  • Types declaration

    Hi, I need to declare a variable in OO envinroment what is a same type like MD5_FIELDS-HASH_RAW8 (RAW 8). I cannot use "like" reserved word in OO. Can anybody advice a right type declaration ? Thanks. Marian