PPR event in poplist

Hi,
My requirement is like this,
From dropdown list, the approvers will be able to select “Vehicle Specific” or “Other”.
1.     If the approver selects “Vehicle Specific” then they will be required to enter VIN and Customer #. Work Order number entry will be optional.
2.     If the approver selects “Other” then they will able to, but not required to, enter VIN, Customer # and Work Order number.
To implement this I have created two regions 1) VehicleSpecificRN and 2)OtherRN
1.     If the approver selects “Vehicle Specific” then VehicleSpecificRN will display
2.     If the approver selects “Other” then OtherRN will display.
I am getting nullpointerexception while selecting the values in the dropdownlist. 1st time selection is working but 2nd time its giving error.
The CO and AM code is given below,
In CO
========
public void processRequest(OAPageContext pageContext, OAWebBean webBean) {
super.processRequest(pageContext, webBean);
// Initialize the application properties VO for PPR.
OAApplicationModule am = pageContext.getApplicationModule(webBean);
am.invokeMethod("init");
public void processFormRequest(OAPageContext pageContext,
OAWebBean webBean) {
super.processFormRequest(pageContext, webBean);
OAApplicationModule am = pageContext.getApplicationModule(webBean);
if ("selectInfo".equals(pageContext.getParameter(OAWebBeanConstants.EVENT_PARAM))) {
// The Position poplist PPR change event has fired.
String info = pageContext.getParameter("Info");
System.out.println("info in CO before : " + info);
Serializable[] params = { info };
am.invokeMethod("handleSelectInfoEvent", params);
System.out.println("info in called after: " + info);
In AM,
========
public void init()
OAViewObject appPropsVO = (OAViewObject)findViewObject("VehiclePVO1");
OARow row = (OARow)appPropsVO.first();
if (appPropsVO != null)
if (appPropsVO.getFetchedRowCount() == 0)
// Setting the match fetch si
appPropsVO.setMaxFetchSize(0);
appPropsVO.executeQuery();
appPropsVO.insertRow(appPropsVO.createRow());
row = (OARow)appPropsVO.first();
row.setAttribute("RowKey", new Number(1));
} // end init()
public void handleSelectInfoEvent(String info )
OAViewObject reportPVO = (OAViewObject)findViewObject("VehiclePVO1");
OARow row = null;
if (reportPVO != null) {
if (reportPVO.getFetchedRowCount() == 0) {
reportPVO.setMaxFetchSize(0);
reportPVO.executeQuery();
reportPVO.insertRow(reportPVO.createRow());
row = (OARow)reportPVO.first();
row.setAttribute("RowKey", new Number(1));
System.out.println("info in AM: "+info);
if ("Vehicle Specific".equals(info)) {
System.out.println("111111111111111111111111");
row.setAttribute("VehicleSpecific", Boolean.TRUE);
row.setAttribute("others", Boolean.FALSE);
System.out.println("22222222222222222222");
} else if ("Other".equals(info)){
System.out.println("33333333333333333");
row.setAttribute("others", Boolean.TRUE);
row.setAttribute("VehicleSpecific", Boolean.FALSE);
System.out.println("44444444444444444444444");
I couldn't able to figure out what is the exact problem and why I m getting NullPointerException.
Please help me out in this.
Thanks & Regards,
Sunita

will u plz message me ur error stack message. So that i figure out.... ur error..
I have gone through your code... I think there is error with ur PFR.. while collecting Poplist value..
String info = pageContext.getParameter("Info");
System.out.println("info in CO before : " + info);
what u can do i get the current value of the info poplist by using.. ur
Row row = vo.getCurrentRow(); // this vo will be your View Instance Name attached with your poplist
row.getAttribute("AttributeName");//BC4J view Attribute Name attached with your poplist
I think this will help u out... if not then send me ur Error stack List.

Similar Messages

  • Cursor focus during a PPR event

    Hi,
    I have two messageTextInput columns (lets say text1 and text2) inside a table region. When a user enters a value in text1 and do a tab out, I fire a PPR event and set some attributes in my VO. The problem is: after it is done, the cursor focus does not move to text2, even though the user did a tab out after entering a value in text1. Cursor focus returns again to text1.
    Also, I do not want to do a page forward, so that processRequest is called again. That would be a costly operation for us. Please let me know if there is a way to regain cursor focus to the right textInput bean.
    Note: This is IE 7.
    Thanks. Much appreciate your inputs.
    Raja

    Raja see this thread, i have replied this some time back:
    Re: How to set focus on a textinput/poplist using PPR
    --Mukul                                                                                                                                                                                                                                                                                                       

  • How to call  a javascript method after the PPR event has finished  ?

    Hi!
    How can we make a javascript method get called after the processing of ADF PPR event?
    My specific use case is,
    I want to call a javascript function after the data in the table is loaded...
    In 10g, that is not a problem, as the data used to get loaded directly during onLoad, and so i would call my js function on load;
    but in 11g , the table data is being loaded through PPR which is initiated onload, and so i needed to call my function after the PPR Response processing has been done; for which I need the name of the event triggered at that instance.
    Is it possible to do this?
    Regards,
    Samba

    Hey, I got it.
    I handled the ADF Controller's PREPARE_RENDER_ID phase of the lifecycle, and then called the
    script to get Executed.
    The code :
        public void afterPhase(PagePhaseEvent pagePhaseEvent) {
            FacesPageLifecycleContext ctx = (FacesPageLifecycleContext)pagePhaseEvent.getLifecycleContext();
                 if (pagePhaseEvent.getPhaseId() == Lifecycle.PREPARE_RENDER_ID) {
                    if(AdfFacesContext.getCurrentInstance().isPostback() )
                        afterRender();
        }is written in lifecycle listener , and my backing bean extended this listener ,
    and in the afterRender() method I did this :
       public void  afterRender(){
                System.out.println("AFTER RENDER CALLED");
               FacesContext context = FacesContext.getCurrentInstance();
               ExtendedRenderKitService service = (ExtendedRenderKitService)Service.getRenderKitService(context, ExtendedRenderKitService.class);
               service.addScript(context, "translate();");
           }That's it.
    It did work, magnificently.
    Thanks for the idea.
    Regards,
    Samba

  • PPR event getting previous value

    Hi
    There is a PPR event on a standard text box. I am handling PPR event in my custom CO. Whenever I change the value abd tab out of the text box I get the previous value not the current(changed) value.
    ExpenseReportLinesVORowImpl expensereportlinesvorowimpl = (ExpenseReportLinesVORowImpl)expensereportlinesvoimpl.getCurrentRow();
    please help
    Thanks

    Hi,
    Here are three different ideas:
    (1) Copy the current row into a local RECORD variable inside the loop.
    (2) Do a self-join in the query, so that the cursor itself has the previous and current rows. (If necessary, use the analytic ROW_NUMBER function to number the rows so you can do the self-join correctly.)
    (3) Use the analytic LAG function to copy the necesssary columns from the previous row in the query.

  • PPR event hides button click :(

    Hi,
    I have a problem with the PPR event.
    I have a PPR on a field. If I change this field without tabbing out from it, and I press a button, the code in the button is not performed. I read the OAF DEV Guide, and I put in the processRequest the code:
    << OAWebBean body = pageContext.getRootWebBean();
    if (body instanceof OABodyBean)
    body.setAttributeValue(OAWebBeanConstants.FIRST_CLICK_PASSED_ATTR, Boolean.TRUE);
    >>
    but it does not work.
    Could you kindly help me?
    Thanks a lot,
    Rosanna.

    Sorry for the delay Rosanna.
    How are you capturing the event's such as when save button is pressed/ppr action fired. I assume you differentiate the save button's event by setting an attribute name something similar to "saveEvent" and the field's ppr event attribute as "varianceEvent" or something. Then on the controller code you could do pageContext.getParameter("event") and compare it with saveEvent and varianceEvent to differentiate what hte user has clicked on.
    You can also club the processing that you do for PPR enabled fields with the save part of the code. Then remove the PPR on the fields. You will have the fireaction/firepartialaction only on the save button in the page. Could you check if this approach works for you.
    Thank you,
    Arun

  • Enabling PPR Event across the regions

    Hi All
    I dearly need all your thoughts on the following requirement.
    I have 2 items in 2 different regions referring to different CO's. For instance, first region is having a text item and the second region is having a MessageChoice item. Now if i change the value of the first item eventually the value in the second region's messageChoice item should be populated. How can i enable PPR event across 2 items referring to different COntroller files. Any input on this will help me a lot for proceeding further.
    Thanks
    Praveen

    You can use the pageContext.putSessionValue and getSessionValue to get the value.
    Yes you can change the parameter pass to a pass. In the Controller you can call the page with the help of pageContext.setForwardUrl.
    You can just check the condition like on the basic of some condition like If A then code will execute [[With 1 parameter]] else another code will execute [[with 2 parameter]]
    Thanks
    --Anil                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • PPR event for messageLovInput

    I have a lov item - which 4 different values. When the value of the lov is changed, it fires a PPR event (LOV automatically fires a predefined
    PPR client action) and the below code is executed but if the user enters the value manually without clicking the LOV to select a value if (pageContext.isLovEvent()) never gets fired.
    I would like to fire the PPR event when the user tabs out from the LOV field without the user implicitly clicking the LOV field to select a value from the list. Is there any way to accomplish this?
    This fires only if you click the LOv item to change the value.
    if (pageContext.isLovEvent()) {
    String lovInputSourceId = pageContext.getLovInputSourceId();
    if ("SalesContact_qry".equals(lovInputSourceId))
    OAMessageLovInputBean mBean=(OAMessageLovInputBean)webBean.findChildRecursive("SalesContact_qry");
    String s = (String)mBean.getValue(pageContext);
    /** get AM details **/
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    Boolean executeQuery = BooleanUtils.getBoolean(false);
    String v_SalesContact = pageContext.getParameter("SalesContact_qry");
    Serializable[] parameters = {v_SalesContact,executeQuery };
    Class[] paramTypes = { String.class, Boolean.class };
    am.invokeMethod("HandleSalesContact",parameters, paramTypes);
    }

    I am experiencing a similar problem as the original post with one difference. Validation on the field is triggering a lovValidation PPR event when the user tabs off the field. I can then catch that event in my processFormRequest and respond accordingly.
    However, when the user doesn't tab off but instead clicks on a submit button or another field's LOV flashlight icon, the processFormRequest never receives the LOV PPR event. It instead receives the event that is triggered from the submit button or the other field's LOV flashlight icon.
    Has anyone else run into this issue? I would imagine the MyOAF will run into this problem as well.

  • Issue in PPR event calling as it submits the page validation

    Hi,
    i need to display the field based on the check box value.
    I used PPR event on clicking chekbox bean. event: update
    i set SPEL to the display fields.
    but when ever i select the value in checkbox , the page is submitting and pop up (checking all mandatory fields or not)
    It shows form validation failiures:
    Enter the mandatory fields/........
    how to handle this.
    please help in this .
    Thank you

    Please make sure, when you trigger your PPR event, you have some values given to the field which has REQUIRED = YES.
    Setting REQUIRED=YES makes that field a mandatory field, and you cannot submit the form to the server without giving value to that field.
    Thanks
    Saurabh

  • Change Prompt of messageTextInput based on PPR Event

    Hello:
    I want to dynamically change the prompt based on a PPR event, I thought of using SPEL for this but looks like Prompt cannot be changed based on SPEL.
    Can you please suggest a way to achieve this?

    Hi:
    Thanks for the response....I was thinking of the same, but redirecting to the same page will have a cost implication right? as it has to render the same page again?
    Also, when I am trying this in ProcessFormRequest where I handle the PPR event, I am getting Developer Mode error...so seems like I can change the prompt only at ProcessRequest....let me know if my understanding is correct.
    Regards

  • Invoking a seeded PPR event

    Hi All,
    I have a seeded calculate salary page. In this page on raise of one PPR event the Salary gets recalculated. Now I have to extend the CO of this page and default one column in "Process Request" and then raise the event so that the salary gets recalculated.
    Now how can I raise a PPR event explicitly , which is tied to a seeded component.
    Thanks & Regards,
    Srikanth

    hi
    u dont need the raise that ppr explicitely,in your extended controller ,it will get fired automatically ,in your extended CO u can capture that PPR using the method
    pageContext.getParameter("event");,u need to find the name of that ppr event that u can find in the PG.xml easily.or u can throw a exception in processFormRequest of ur extended controller which will give u that ppr event name, in this way
    throw new OAException("PPR event Name--->"+pageContext.getParameter("event"),OAException.confirmation);
    once u will get the PPR name ,u can compare the PPR event ,if PPR is fired u can do ur action ,let say it is "update" then
    if("update".equalsIgnoreCase(pageContext.getParameter("event")){
    // set your default value here
    thanx
    Pratap

  • NullPointerExecption when PPR event fires

    Hi All,
    I am facing a problem. It is giving nullpointerexeption when PPR even fires. Please provide the solution.
    My requirement is, there are three message choice items say mcA,mcB,McC. In mcA there are two values say A1,A2. When i am going to select a value(A1) from mcA then mcB should disabled. And also when i am going to select a value(A2) then mcC should disabled.
    I am getting nullpointerexception while selecting the values in the dropdownlist.
    In AM
    * public void init()
    OAViewObject propsVO = (OAViewObject)findViewObject("XXTNEmpPVO");
    if(propsVO != null)
    if(propsVO.getFetchedRowCount() == 0)
    propsVO.setMaxFetchSize(0);
    propsVO.executeQuery();
    propsVO.insertRow(propsVO.createRow());
    OARow row = (OARow)propsVO.first();
    row.setAttribute("RowKey", new Number(1));
    handleChangeEvent();
    public void handleChangeEvent()
    OAViewObject vo = (OAViewObject)findViewObject("XXTNEmpPVO");
    OARow row = (OARow)vo.first();
    OAViewObject vo1 = (OAViewObject)findViewObject("XXTNnonfinrolesVO");
    OARow empRow = (OARow)vo1.getCurrentRow();
    String position = (String)empRow.getAttribute("LookupCode");// Giving error here
    if((position == null) || ("AP Inquirer".equals(position)))
    row.setAttribute("EmpFinanceRender",Boolean.FALSE);
    i couldn't able to figure out what is the exact problem and why I m getting NullPointerException.
    Please help me out in this.
    Thanks & Regards,
    MK

    MK,
    OAViewObject vo1 = (OAViewObject)findViewObject("XXTNnonfinrolesVO");
    OARow empRow = (OARow)vo1.getCurrentRow();XXTNnonfinrolesVO is the name of the View Definition or View Instance. Usually View Instance z like XXTNnonfinrolesVO1.
    Regards,
    Gyan

  • Command Link in ADF table is not working/ PPR event not getting fired

    Hi All,
    I am having ADF Table, in that one column is with command link if click on command link, it is not navigating to corresponding page or method of a bean. If i give same command link out of the table it working fine, this issue i am facing is in IE9.
    if i use IE in compatibility mode the links works fine, even in IE8 version also.
    Browser: IE 9
    Jdev version: 11.1.1.5.0
    I tried all possible things, but nothing workout for me.
    showPopupBehavior not working in IE9 for af:table buttons (jdev11.1.1.5.0)
    Partial page rendering not working in ie9
    Command Link in ADF table is not working
    Thnks

    Hi,
    please file a bug if you have a customer support contract and provide a testcase
    Frank

  • Porblem with MessageRadioButton when using PPR Event on it.

    Hi,
    I have a Requirement where there are two MessageRadioButton
    when the 1st MessageRadioButton is selected One item should be Mandatory and
    when the 2nd MessageRadioButton is selected another item should be Mandatory.
    The Problem I am facing is when I select the 2nd item and going back to select the 1st item the selection is not getting changed.
    Can anybody help me how can I resolve this issue
    Krishna

    Krishna
    Please put the value for checked and unchecked for both radio buttons.What i mean to say if there are two radio button say male or female.So put M for male as checked value and F for female as checked value.
    This should resolve your issue!!
    Thanks
    --Anil                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How to set focus on a textinput/poplist using PPR

    HI,
    Is it possible to use PPR to set focus on a Text input or Poplist.
    if Yes, which attribute in the UI Item we need to use?
    will the attribute 'Access Key' work for the same?
    If PPR is not an option then getting a java bean for the UI Item is the only option?
    Thanks,
    Gowtam.

    Gowtam,
    No, the two basic differences between PPR and fire action!
    1)Fire action submit the entire OA Page Form elements, while PPR only refreshes the form components of that particular region.
    2)When PPR event is done, framework neglects any other action done on the page.
    Now, like your basic question, why should u use PPR event ?Instead y not firaction always?
    The reason is the very first defination of PPR.If i have n number of items on my page, if I define every action as fire action after each event page will refresh, so even for a small update like vanishing a field, i have to refresh the entire page which will be unusual for the user because it will take some time to load if page has some heavy components like hgrids , tables etc. Thats y we prefer PPR event over fire action in case of individual events, which is much fast, refreshing only particular form items.
    In standard j2ee web applications, the same is done using DHTML and javascript.
    I hope i am clear.
    --Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Event handling on Poplist - ON-RENDER

    Hi,
    Can I have an "ON-RENDER" event on poplist?
    The Poplist has 2 values and poplist will not be shown when the page renders.
    1) Cricket 2)Soccer
    This poplist will be displayed as a result of the event in some other UI eleemt on the page.
    My question is
    When the Poplist is rendered(through PVO attribute),
    if the Value is Cricket ----> render Cricket(link) and Cricket image
    if the Value is Soccer ----> render Soccer(link) and soccer image.
    For the same i need to catch the "ON-RENDER" event on poplist...
    How can I do it?
    I have founf only "ON-CHANGE" ebent o Ppplist
    Thanks,
    Gowtam.

    This poplist will be displayed as a result of the event in some other UI eleemt on the page.
    When you do this action, why dont you determine the value that the poplist will have when it is rendered, and alongwith rendering the poplist, render the image as well.Thanks
    Tapash

Maybe you are looking for

  • Classic starts up, apps won't...

    I used the Classic environment successfully fairly recently, and I don't recall any major changes to my system. But just yesterday my wife told me she couldn't get Word to start up. So I tried myself and nothing worked in either of our accounts. I th

  • Embedding Microsoft Word in Java

    Hi, i want to embed Microsoft word in my java application. Can anyone one tell me how to embed word in java. By embedding, I don't mean to invoke word from java. I want to use word as an editor in java. Thanks, Ashu

  • How To create a new DAG across a WAN connection?

    In preparation to moving our mailbox/hub transport server from our local office to a data center, we would like to create a DAG, putting the second mailbox server into the data center What is the best way to start a DAG when the servers are across a

  • JTree Repaint Problem .

    I'm creating a dynamic JTree by querying th DB. The JTree has to reflect the changes if any. But the problem is that although I'm getting all the correct nodes in the JTree, the tree display is not repainted if the window is maximized or focussed and

  • Is it possible to perform doDML functionality in ViewObject

    Hello, In Oracle Forms to ADF conversion, different forms is sharing same entity object. As a result, different pre-Insert, Pre-update, etc. is requied. Is is possible to perform doDML() functionality in ViewObject instead of the Entity Object? Thank