Extending the Controller class OrderLinesTableRNCO

Hi,
My requirement is to enable 2 attribute columns on po lines summary table if a attribute1 on po header is Y else disable both of them.
I am writing trying to do this in the Controller class on the PO Lines summary table ( this is a advanced table). First i am just trying to get a handle on the messageinputlov column. IF this works then I will get a hangle to the po header column and will enable/disable based on its value.
My code is
package xxpb.oracle.apps.po.webui;
import oracle.apps.fnd.common.VersionInfo;
import oracle.apps.fnd.framework.webui.OAControllerImpl;
import oracle.apps.fnd.framework.webui.OAPageContext;
import oracle.apps.fnd.framework.webui.beans.OAWebBean;
import oracle.apps.fnd.framework.webui.beans.message.OAMessageLovInputBean;
import oracle.apps.fnd.framework.webui.beans.message.OAMessageTextInputBean;
import oracle.apps.fnd.framework.webui.beans.table.OAAdvancedTableBean;
import oracle.apps.fnd.framework.webui.beans.table.OAColumnBean;
import oracle.apps.fnd.framework.webui.beans.table.OASortableHeaderBean;
import oracle.apps.fnd.framework.webui.beans.table.OATableBean;
import oracle.apps.po.document.order.webui.OrderLinesTableRNCO;
public class XXPBOrderLinesTableRNCO extends OrderLinesTableRNCO
public void processRequest(OAPageContext pageContext, OAWebBean webBean)
super.processRequest(pageContext, webBean);
OAAdvancedTableBean tableBean =
(OAAdvancedTableBean)webBean.findIndexedChildRecursive("LinesTableRN");
OAMessageLovInputBean poLineLov =
(OAMessageLovInputBean)tableBean.findIndexedChildRecursive("XXPBSecondaryUOMLOV");
poLineLov.setDisabled(false);
I have changed the control class using personalization. When i test this it gives me a null pointer exception. Can you please help and look if my code is wrong.
java.lang.NullPointerException
     at xxpb.oracle.apps.po.webui.XXPBOrderLinesTableRNCO.processRequest(XXPBOrderLinesTableRNCO.java:23)

Hi,
General Practice is to check for not null when you try to use the handle.
Ex:
public class XXPBOrderLinesTableRNCO extends OrderLinesTableRNCO
public void processRequest(OAPageContext pageContext, OAWebBean webBean)
super.processRequest(pageContext, webBean);
OAAdvancedTableBean tableBean =
(OAAdvancedTableBean)webBean.findIndexedChildRecursive("LinesTableRN");
if (tableBean != null)
OAMessageLovInputBean poLineLov =
(OAMessageLovInputBean)tableBean.findIndexedChildRecursive("XXPBSecondaryUOMLOV");
if (poLineLov != null)
poLineLov.setDisabled(false);
Regards
Sudhakar Mani
http://oraclearea51.com/sudhakarmani

Similar Messages

  • Error while extending the Controller

    Hi,
    I have extended the CompetenciesCO.class to CompetenciesExtendCO.java using jdeveloper, after that i transfered this file to the same location where the CompetenciesCO.class
    is available.
    My extended class coding is :
    package oracle.apps.per.selfservice.appraisals.webui;
    import oracle.apps.fnd.framework.OAApplicationModule;
    import oracle.apps.fnd.framework.webui.OAPageContext;
    import oracle.apps.fnd.framework.webui.beans.OAWebBean;
    import oracle.apps.fnd.framework.webui.beans.message.OAMessageStyledTextBean;
    public class CompetenciesExtendCO extends CompetenciesCO {
    public CompetenciesExtendCO() {
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processFormRequest(pageContext, webBean);
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    String variable ="HI";
    if(pageContext.getParameter("xxCalcCompetenciesAvg")!=null){
    OAMessageStyledTextBean competenciesAvg = (OAMessageStyledTextBean)webBean.findChildRecursive("xxCompetenciesAvg");
    competenciesAvg.setValue(pageContext,variable);
    After that i changed the controller class for that region using personalization.
    but it is not working.
    What is the problem?
    Thanks in advance,
    SAN

    Gyan,
    Even after i placed the Extended Controller java file under the custom top $JAVA_TOP/xxhr.oracle.apps.per.selfservice.appraisals.webui.XxCompetenciesExtendCO
    it is not working.
    I also personalized the region for this controller but it throws error:
    Could not create Java class: (xxhr.oracle.apps.per.selfservice.appraisals.webui.XxCompetenciesExtendCO) associated with region: (CompetenciesRN). This is probably because the class name is wrong or not included in project.

  • EXTENDING the string class

    ok, i know extending the string class is illegal because it's final, but i want to make an advanced string class that basically "extends" the string class and i've seen online this can be done through wrapper classes and/or composition, but i'm lost
    here is my sample code that is coming up with numerous compile time errors due to the fact that when i declare a new AdvString object, it doesn't inherit the basic string features (note: Add is a method that can add a character to a specified location in a string)
    class AdvString
         private String s;
         public AdvString(String s)
              this.s = s;
         public void Add(int pos, char ch)
              int this_len = (this.length()) + 1;
              int i;
              for(i=0;i<(this_len);i++)
                   if(pos == i)
                        this = this + ch;
                   else if(pos < i)
                        this = this + this.charAt(i-1);
                   else
                        this = this + this.charAt(i);
         public static void main(String[] args)
              AdvString s1;
              s1 = new AdvString("hello");
              char c = 'x';
              int i = 3;
              s1.Add(i,c);
              //s2 = Add(s1,i,c);
              //String s2_reversed = Reverse(s2);     
              System.out.println("s1 is: " + s1);
    any tips?

    see REString at,
    http://www.geocities.com/rmlchan/mt.html
    you will have to replicate all the String methods you are interested in, and just forward it to the String instance stored in REString or the like. it is like a conduit class and just passes most processing to the 'real' string. maybe a facade pattern.

  • Confused about extending the Sprite class

    Howdy --
    I'm learning object oriented programming with ActionScript and am confused about the Sprite class and OO in general.
    My understanding is that the Sprite class allows you to group a set of objects together so that you can manipulate all of the objects simultaneously.
    I've been exploring the Open Flash Chart code and notice that the main class extends the Sprite class:
    public class Base extends Sprite {
    What does this enable you to do?
    Also, on a related note, how do I draw, say, a line once I've extended it?
    Without extending Sprite I could write:
    var graphContainer:Sprite = new Sprite();
    var newLine:Graphics = graphContainer.graphics;
    And it would work fine. Once I extend the Sprite class, I'm lost. How do I modify that code so that it still draws a line? I tried:
    var newLine:Graphics = this.graphics;
    My understanding is that since I'm extending the Sprite class, I should still be able to call its graphics method (or property? I have no idea). But, it yells at me, saying "1046: Type was not found or was not a compile-time constant: Graphics.

    Thanks -- that helped get rid of the error, I really appreciate it.
    Alas, I am still confused about the extended Sprite class.
    Here's my code so far. I want to draw an x-axis:
    package charts {
        import flash.display.Sprite;
        import flash.display.Graphics;
        public class Chart extends Sprite {
            // Attributes
            public var chartName:String;
            // Constructor
            public function Chart(width:Number, height:Number) {
                this.width = width;
                this.height = height;
            // Methods
            public function render() {
                drawAxis();
            public function drawAxis() {
                var newLine:Graphics = this.graphics;
                newLine.lineStyle(1, 0x000000);
                newLine.moveTo(0, 100);
                newLine.lineTo(100, 100);
    I instantiate Chart by saying var myChart:Chart = new Chart(); then I say myChart.render(); hoping that it will draw the axis, but nothing happens.
    I know I need the addChild method somewhere in here but I can't figure out where or what the parameter is, which goes back to my confusion regarding the extended Sprite class.
    I'll get this eventually =)

  • Can we extend the Throwable class instead of Exception Class??

    Hi all..
    Can we extend the Throwable class instead of Exception Class while creating our own custom Exception?If not Why?
    Please give your valuble advices..
    Ramesh.

    I don't want to hijack the thread here, but in a conversational tone...on a related note.. I've thought about this too a bit and wondered if there are some recommended practices about catching and handling Throwable in certain applications. Like the other day I was debugging a web application that was triggering a 500. The only way I could find the problem in an error stack was to write code to catch Throwable, log the stack, and then re-throw it. I considered it "debug" code, and once I solved the problem I took the code out because, my understanding is, we don't want to be handling runtime problems... or do we? Should I have a catch clause for Throwable in my servlet and then pass the message to ServletException?
    So along with the OP question, are there separate defined occasions when we should or should not handle Throwable? Or does it just all depend on circumstance?

  • How can I extend the Vector class?

    Hi All,
    I'm trying to extend the Vector class so I can get add a .remove(item:T) method to the class.  I've tried this:
    public class VectorCollection extends Vector.<T>
    That gives me the compile error "1017: The definition of base class Vector was not found"
    So then I tried:
    public class VectorCollection extends Vector
    Which gives me the compile error "1016: Base class is final."
    There must be some way to extend the Vector class, though, as on the Vector's official docs page it says:
    Note: To override this method in a subclass of Vector, use ...args for the parameters, as this example shows:
         public override function splice(...args) {
           // your statements here
    So there must be a way to extend the Vector class.  What am I doing wrong?

    No. AS3 doesn't currently have full support for generic types; Vector.<T> was added in an ad-hoc ("ad-hack"?) way. We are considering adding full support in a future version of ActionScript.
    Gordon Smith
    Adobe Flex SDK Team

  • Extending the Thread class

    i would like to do that
    1) One thread displays "ABC" every 2 second;
    2) The other thread displays DEF every 5 seconds;
    i need to create the threads by extending the Thread class ...
    thank you for your help ,
                public class Thread1 extends Thread {
              public Thread1(String s ) {
                   super (s);
              public void run() {
                   for ( int i=0; i<5; i++ ) {
                        System.out.println(getName());
                        try {
                           sleep ((long) 5000);
                        } catch (InterruptedException e ) {
                           /* do nothing */
              public static void main (String args[]) {
                   new Thread1 ("ABC").start();
                   new Thread1 ("DEF").start();
         }     

    I think he has been told to use the Thread class by the sounds of it.
    public class Thread1 extends Thread {
         public Thread1(String s ) {
              super (s);
         public void run() {
              for ( int i=0; i<5; i++ ) {
                   System.out.println(getName());
                   try {
                      sleep (getName().equals("ABC")? 5000 : 2000); //If you don't understand this then Google for "Java ternary operator"
                   } catch (InterruptedException e ) {
                      /* do nothing */
         public static void main (String args[]) {
              new Thread1 ("ABC").start();
              new Thread1 ("DEF").start();
    }

  • Explicitly extending the Object class

    Hi Everyone,
    I am aware that every object that is running inside a JVM inherits from class Object implicitly. Recently I have come across some code that explicitly extends the Object class, is there any advantage in doing this, please see the code snippet below:
    public class MyClass extends Object{}Thanks heaps for your assistance.
    Regards
    Davo

    I've even seen a
    method that was declared "throws NullPointerException"shouldn't it have been "throws java.lang.NullPointerException" ...
    - I almost cried. Yes, thats truly a terrible habit :(
    a distant cousin of that habit is one I have noticed where the developer
    is totally unable to name anything appropriately..
    to print some things to the screen: "loadData"
    to print things to screen again: "getInformation" *(note: did not 'return' anything).
    ... :(

  • Extending the Dialog Class

    Hey, I'm trying to extend the Dialog class into something called a DialogErrorBox, which is just what it sounds like: a dialog box specifically for telling the user about errors it encounters. Here's the code:
    import java.awt.*;
    import java.awt.event.*;
    class DialogErrorBox extends Dialog implements ActionListener {
         public DialogErrorBox (Frame parent) {
        ...//modified to give a vague error message
         }//end constructor
    public DialogErrorBox (Frame parent, String title, String message) {
        ...//worked as a function in my program
         }//end constructor
    public void actionPerformed (ActionEvent evt) {
              this.dispose();
    }The compiling error I recieve at both constructors is:
    ...cannot resolve symbol
    symbol  : constructor Dialog  ()
    location: class java.awt.Dialog
            public DialogErrorBox2 (Frame parent, String title, String message) {I can't figure out why this error would happen. I've made a class extending Frame(Frame and Dialog both extend Window) that looks almost exactly the same and it has no errors.
    Help would be much appreciated.

A: Extending the Dialog Class

This is a short and spotty explanation, to get the full skinny you might read pages 69 and 70 of The Java Programming Language 3rd Edition, Gosling, et. al.
If you don't use the superclass's constructor or one your own as the first executable statement , the superclass's no arg constructor gets called. This means that super() will get called automagically! I don't believe that Dialog has a no arg constructor, so you are forced to do something.
You could also do something like this:
public DialogErrorBox(Frame frame, String title) {
   this(frame, title, true);
}Now the two argument constructor invokes the three arument constructor with a default value of true.
Do you see why this must happen?

This is a short and spotty explanation, to get the full skinny you might read pages 69 and 70 of The Java Programming Language 3rd Edition, Gosling, et. al.
If you don't use the superclass's constructor or one your own as the first executable statement , the superclass's no arg constructor gets called. This means that super() will get called automagically! I don't believe that Dialog has a no arg constructor, so you are forced to do something.
You could also do something like this:
public DialogErrorBox(Frame frame, String title) {
   this(frame, title, true);
}Now the two argument constructor invokes the three arument constructor with a default value of true.
Do you see why this must happen?

  • Extend the String Class

    Is there a way to extend the string class? I know it's final, if i make my class final too would that work? I want to add some functionality to the string class, but I wanna be able to do concatination with the + operator and stuff like that. That's special to the String class.
    Any help would be great.
    Thanks.
    Joe

    Well, put your mind at easy with the fact that being
    able to use the '+' operator on Strings is a design
    flaw in Java. At least from a purist point of view...And from a pragmatist's point of view, it's a reasonable compromise, the benefit of which outweighs the downside. This is consistent with Java's goal as a good general-purpose language. It's not intended to be pure OO or pure anything else.

  • I need help extending the MovieClip class

    I want to add a property to the MovieClip class. I just have a bunch of MovieClips that are placed on the stage by reading an XML file and creating lots of clips according to the information in them. Now, I need to know which MovieClips were created below previous clips, and I figure that the easiest way to do so would be by extending the MovieClip class and add an order property.
    I have some problems though: I don't know how to set or get this order property within the main clip, I don't know how to place this clip within my movie, and I don't know how to create them dynamically (do I just do something like var myNewObjectOfExtendedClass : myExtendedClassName = new myExtendedClassName?)
    This is the code I have on my extended class, called Expando.as:
    class Expando extends MovieClip {
    private var _order:Number;
    public function get order():Number {
    return _order;
    public function set order(nOrder:Number):Void {
    _order = nOrder;

    You mean the Tree component?
    My concern with the Tree component (at least the AS2 version) is that I don't see a way to have each node in the Tree have different hit areas with different outcomes.
    The tree that I build must have up to 7 levels within each main branch, and not all of them behave the same way. In some branches, clicking the icon next to the label will have a completely different outcome than clicking on the label, which may or may not return a function. Each of those sublevels also need to support different icons, depending on what information is represented by it.
    Sample:
    • Reminders
    My Reminders
    Manual Reminders
    Escalated Reminders
    • Cases
    Name Actions < ---- this is where the problem begins. Clicking on the icon where the bullet should be should do something different than clicking on the name, which should do something different than clicking on the word ActionsThis is information about that referral that includes who referred them, the date of the referral, their full address. This information usually takes up 2 lines, sometimes 3
    Assignment   <------- you can only open see these leaves if you click on the bullet icon for the previous node; you can't open this by clicking on the text.
    Eligibility
    Etc., depending on what information has been appended
    • Suppliers
    Anyway, if the Tree Component can indeed support these features, I'd like to know where to find information about it please
    In my search for that information, I concluded that I'd probably be better served by building my own MovieClip that can handle these requirements. I did have a working Tree component pretty quickly as I started this project, but then I got more familiar with the app that I'm building the training for and noticed these requirements.
    Of course, maybe all these features are supported by the AS3 Tree component. The problem is that I'm a lot worse with AS3 than I am with AS2 heh.

  • TransactionContext not foundin class.Extending the controller

    Hi All,
    I am extending the LocationLovCO controller. I want to utilize the SSHRParams of LocationLovCO in my CO i.e. xxxLocationLovCO (basically to get assignment_id,effective_date, bgid).
    I have imported all the packages.
    When I tried to compile my Controller. it throws up the following error.
    TransactionContext not foundin class oracle.apps.per.selfservice.common.SSHRParamTable in class oracle.apps.per.selfservice.common.SSHRParams in class xxx.oracle.apps.per.selfservice.deployperson.webui.xxxLocationLovCO.
    Does anyone have any idea. Any help is appreciated.
    Thanks
    Rama

    Try the OA Framework forum

  • How to extend the controller

    Hello All,
    I want to extend the HellowWorldMainCO.java to my xxnspHellowWorldMainCO.Java.
    in HelloworldPG i have added one MessagetextInput, Now,how will i handle this (parameter) in xxnspHellowWorldMainCO.Java.
    Thanks,Siva Prasad

    Hi,
    Follow the below steps:
    1) Go to the page HelloWroldPG from front end, click on 'Personalize this page' link.
    2) Check that on which region HellowWorldMainCO is attached.
    3) For example, if it is attached on pageLayout region, click on Personalize pencil icon.
    4) on 'Controller Class' property, set the complete path of your custom controller in place of 'inherit' (at whatever level u want like site or resp)
    5) Click on apply.
    Now you can see your changes.
    --Sushant                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Error Extending the OAEntityImpl class when creating a BC4J  Entity Object

    I have created an EO based on an Oracle Apps table and extended the OAEntityDefImpl, OAEntityCache and OAEntityImpl classes as specified in the OA Framework Developers Guide when creating EO's via the BC4J wizard.
    When I build my Business Components package I recive an error stating that the Impl class should be declared abstract.
    Error(14,8): class oracle.apps.xxtpc.arinvoices.schema.TpcApInvoicesEO2Impl should be declared abstract; it does not define method setLastUpdateLogin(oracle.jbo.domain.Number) in class oracle.apps.fnd.framework.server.OAEntityImpl
    When I modify this class to declare it abstract and then try to test (via the AM test function) the VO that I created based on this EO - I receive an oracle.jbo.RowCreateException: JBO-25017.
    Do you think that this has anything to do with modifying the Impl class to make it abstract? I can create another VO against the same table by creating a SQL statement against it and not basing it off of the EO and this VO will run correctly via the AM tester.
    Thanks,
    Chris
    oracle.jbo.RowCreateException: JBO-25017: Error while creating a new entity row for TpcApInvoicesEO.
         at oracle.jbo.server.EntityDefImpl.createBlankInstance(EntityDefImpl.java:1054)
         at oracle.jbo.server.ViewRowImpl.createMissingEntities(ViewRowImpl.java:1532)
         at oracle.jbo.server.ViewRowImpl.init(ViewRowImpl.java:236)
         at oracle.jbo.server.ViewDefImpl.createBlankInstance(ViewDefImpl.java:1050)
         at oracle.jbo.server.ViewDefImpl.createInstanceFromResultSet(ViewDefImpl.java:1007)
         at oracle.jbo.server.ViewObjectImpl.createRowFromResultSet(ViewObjectImpl.java:2643)

    The problem was that there were no audit columns in the table that I was querying.

  • Extending the  JButton class

    Hello,
    I'm trying to create a new Java object that extends JButton , and I want it to look like a regular rectangle , be able to change color, and have an action listener . This new Object is supposed to be used in tables so that any elemnt of that table may be clicked on in order to make certain onformation appear in an Applet....
    I'd just like to know if that's possible and a little bit how I could do it if it is ...Thanks..
    Cri

    everything you describe is certainly possible. You ought to be able to do the things you described without actually overridign the JButton class itself (perhaps consider implementing a factory instead). In any case, you'll want to be sure to look at the JTable tutorial for help with getting Buttons to work correctly in a JTable. Everything you need should be in there.

  • Maybe you are looking for

    • How do I block and e-mail address?

      How do I block a specific e-mail address? I'm using the standard e-mail that came with my iMac.

    • Best way to output a movie to dvd

      Hello, I have created a full 1-hour lasting movie past months. Now I want to export this movie to a final .avi and also to a dvd. I have worked with DVD menu's before (using TMPGEnc) but I'm not sure how to maintain the best quality in Premiere while

    • About sort Date in TreeMap

      import java.util.*; public class testTreeMap{ public static void main(String[] args){ TreeMap tree=new TreeMap(); Calendar date=Calendar.getInstance(); date.set(2004,9,7); tree.put(date,"a"); date.set(2003,9,7); tree.put(date,"b"); date.set(2002,9,7)

    • I cannot make the "Tones" tab appear into my iTunes even if I go to Preferences and click the "Tones" button. What do I do?

      I just recently bought the iPhone 5 and updated to the newest version of iTunes and I cannot make the ring"tones" tab appear. I even went to preferences and clicked on the "tones" button so that the "tones" tab would appear, and it won't appear. I re

    • How to install jdk 1.5 in Sun Solaris 8

      Hi All, I have sun solaris 8 server UNIX platform.i already have JDK 1.3.3 in my server.i want to clean that and to install jdk 1.5 in my server.does any body knows how to setup JDK 1.5 in sun solaris 8 UNIX Platform and where to set JAVA_HOME Enviro