Subclasses in Forms

Hi,
Anybody really uses SubClasses in Forms?
Which one is useful among Object Libraries, Subclasses and Templates?
Thanks,
DDRam.

Hi,
Anybody really uses SubClasses in Forms?
Which one is useful among Object Libraries, Subclasses and Templates?
Thanks,
DDRam.

Similar Messages

  • Crystal Report Windows Forms Viewer - No Error Popup

    Similar to this post:  Error message that says "No Error" from CR Viewer, I have just upgraded by Application to .net 4.0 and Crystal Reports 2010. The report viewer works fine the first time a report is loaded, but when I change the parameters on the report, and put the updated report back into the report viewer, I get the message shown above.  The report does not change its parameters and the updated report is not displayed.  The code in question is setting the date parameters for the report.  The user can select new date parameters from the form that encloses the report viewer.  The code subclasses the Report Object code to add additional functions through interfaces.  The IDateRange interface provides a starting and ending date range for the report using a property on the report class as follows:
        Public Property EndingDate() As Date Implements IDateRange.EndingDate
            Get
                Return _endingDate
            End Get
            Set(ByVal value As Date)
                _endingDate = value
                Me.SetParameterValue("EndingDate", value)
            End Set
        End Property
    In addition, the immediate Window shows the following message:
    A first chance exception of type 'System.Runtime.InteropServices.COMException' occurred in CrystalDecisions.CrystalReports.Engine.dll
    The code in the Report Viewer looks like this, see line marked in blue for when pop-up appears:
    ''' <summary>
    ''' Sets the report period and displays it.
    ''' </summary>
    ''' <param name="Report">The Report.</param>
    ''' <param name="Refresh">if set to <c>true</c> force a refresh.</param>
    Private Function PFSetReportPeriod(ByVal Report As Object, Optional ByVal Refresh As Boolean = True) As Boolean
        Dim fld As FormulaFieldDefinition
        Dim bRefresh As Boolean = False
        Dim rpt As ReportClass = CType(Report, ReportClass)
        Try
            If CRV.ReportSource IsNot Nothing Then
                rpt = CType(CRV.ReportSource, ReportClass)
            End If
    If TypeOf rpt Is IDateRange Then
        With DirectCast(rpt, IDateRange)
    .        StartingDate = dtpFromDate.Value
    .        EndingDate = dtpToDate.Value
        End With
        SetTitleLine2(DirectCast(Report, ReportClass), bRefresh)
        bRefresh = True
    Else
        If TypeOf rpt Is ReportClass Then
           fld = rpt.DataDefinition.FormulaFields("FromDate")
           If Not fld Is Nothing Then
                fld.Text = "Date(" & dtpFromDate.Value.Year & "," & dtpFromDate.Value.Month & "," & dtpFromDate.Value.Day & ")"
                bRefresh = True
            End If
            fld = rpt.DataDefinition.FormulaFields("ToDate")
            If Not fld Is Nothing Then
                fld.Text = "Date(" & dtpToDate.Value.Year & "," & dtpToDate.Value.Month & "," & dtpToDate.Value.Day & ")"
                bRefresh = True
            End If
            SetTitleLine2(rpt, bRefresh)
        End If
    End If
        If Refresh And bRefresh Then
            If dtpToDate.Value <> CDate(dtpToDate.Tag) OrElse _
               dtpFromDate.Value <> CDate(dtpFromDate.Tag) Then
                    System.Windows.Forms.Application.DoEvents()
                If CRV.Visible Then CRV.ReportSource = rpt ' The popup appears when this statement is executed.
                If CRV.Visible = True Then CRV.Refresh()
                dtpToDate.Tag = dtpToDate.Value
                dtpFromDate.Tag = dtpFromDate.Value
               Return True
            End If
        End If
    Catch ex As Exception
        DisplayException(ex)
    End Try
    Return False
    End Function

    Problem has been resolved.  I downloaded Support Pack 8 (v.13.0.8.1216) from this location.  I then applied the fix from the entry above:
    With CRV ' Report Viewer Control
        If .Visible Then
            If .ParameterFieldInfo IsNot Nothing Then .ParameterFieldInfo.Clear()
            .ReportSource = rpt
            .Refresh()
        End If
    End With
    And no more annoying "No Error" messages.

  • Oracle.forms.webutil.file Transfer.File Transfer bean not found

    I've followed tons of instructions for 2 days to install and configure webutil and I finally have success with the demo. However, when I add this to my own form and use the CLIENT_IMAGE.READ_FILE_IMAGE
    I end up with error oracle.forms.webutil.file Transfer.File Transfer bean not found WEBUTIL_FILE_TRANSFER.getMaxTransfer will not work.
    What am I missing? Thanks for any help.

    Make sure your form subclasses object group webutil.olb, and that webutil.pll is also attached. Make sure that your forms folder contains webutil.plx (a compiled version of webutil.pll). Unless the default config (in formsweb.cfg) includes the entries required for webutil support, you must specify a config that does have these entries. 10g, which comes configured for webutil, provides a config called webutil for this. An example URL might look like:
    http://myappserver/forms/frmservlet?form=myform.fmx&config=webutil
    There could be other problems, but since you're able to run the demo forms, I'm guessing that what I've mentioned are the first things for you to check.
    Hope this helps,
    Eric Adamson
    Lansing, Michigan

  • Item Background Color changes when placed in production (Forms 10g)

    Hello All,
    I have searched the forum on this topic, but have not been successful in finding a topic/solution for multi-line items that need to render a different color than the rest.
    I have used set_item_instance_property (and set_item_property) as well as using a VA to resolve this issue to no avail.
    When I view the form in the browser - initially in query-mode, I see the color that I have set for the item. Once the query is fetched and I am in non-query mode (display), the items background color is replaced to the standard color (off yellow) for non-editable fields.
    I have taken all of the subclasses off, used the item property from the pallette as well as manually programmed within a trigger and cannot get this item to stay the color that I have set.
    Can anyone help me get this working?

    Are you using the 0 to 100 rgb color assignments you see in the Forms Builder color palette? If so, that is your problem. At run time, you have to convert the color numbers to 0 to 255 numbers. Just multiply each of the three parts by 2.55
    Or maybe there is come code running elsewhere in your form that is setting the color after your code is run.
    Search your form for background_color.

  • Regarding Text Box in a Form

    I know that TextBox and Form are subclasses of the Screen class.
    Is there a way to append a TextBox to a Form??

    Hi,
    You can't append TextBoxes to a Form.
    You can just append to a Form classes that are subclasses of Item class.
    Ricardo

  • Form Builder 6.0 object library

    Hello,
    I created an object library in Form Builder 6.0, which I have
    used to develop two forms.
    The other member of my team wishes to use the same object
    library. When she loads it from my directory, it loads OK, but
    when she subclasses any of her objects nothing happens. I can
    see the red arrow on the object indicating that it was
    subclassed but the changes are not registered on the layout
    editor nor the form when it runs.
    Can anyone help?
    null

    double click the read arrow and it should turn black. A black
    arrow is a sub-classed item with the sub-class applied, red
    indicates sub-classed item with the sub-class not applied.
    Rasheed Ghany (guest) wrote:
    : Hello,
    : I created an object library in Form Builder 6.0, which I have
    : used to develop two forms.
    : The other member of my team wishes to use the same object
    : library. When she loads it from my directory, it loads OK, but
    : when she subclasses any of her objects nothing happens. I can
    : see the red arrow on the object indicating that it was
    : subclassed but the changes are not registered on the layout
    : editor nor the form when it runs.
    : Can anyone help?
    null

  • Know Java classes & subclasses

    I´m wirking with Forms & Report 10GR2.
    I´m working with Forms & Report from year 1.997. Normallly I rotate between 8 or 9 diferents application. My applications now appear a little old fashioned. Looking for to resolve this I find a article from Grant Ronald, I think well know in this forum, He have resolved me some question that I post here. In this article Grant say this :
    Extending the Forms UI
    So how can you achieve the balance of giving your
    Forms application the makeover to bring it into the 21st
    century without having to embark on a massive program
    of redevelopment or user retraining?
    The answer lies in the architecture of Oracle Forms.
    For a Forms application running through a browser, the
    user interface is rendered as a Java applet. This Java applet
    includes a number of Java classes responsible for
    rendering each of the Forms’ UI components. The magic
    lies in the fact that since each UI component is, in effect,
    a Java class, it can be subclassed. This means you can
    create your own component that does everything the
    base component does, but with your own added code to alter
    the functionality or look and feel.
    Really a piece of gold, in this, he give you the key to can change the forms look & feel.
    But, now come the questions, how I can do this? how I know what classes use forms for display a buttom for example, what I must do for subclasses it?
    is there any example or documentation that can help me? if yes ¿where? Can any of the gurus give me some links to explore this?
    Thanks & regards everybody.

    Look at this.
    http://fdtool.free.fr/LAF/doc/Oracle_Forms_Look_and_Feel_project.htm
    It is not supported by Oracle, but is widely used. All support for its use will come from its web page.

  • Static block in superclass to initialize static members in subclasses

    I am trying to create several classes that are all very similar and should derive from a super class because they all have common members and are all initialized the same way. I would prefer every member of my subclasses to be static and final as they will be initialized once and only once. I can not figure out the best way to make this work. Here is an example (using code that does not work, but you can see what I am trying to do):
    class Super
        protected static final String initializedInEachSubclass;
        protected static final String alsoInitializedInEachSubclass;
        // these need to be accessed from anywhere
        public static final String initializedInSuperclass;
        public static final String alsoInitializedInSuperclass;
        // this static initialization block is exactly the same for every instance
        static
            // initialize these based on what the subclasses initialized
            initializedInSuperclass = initializedInEachSubclass + alsoInitializedInEachSubclass;
        private Super () {} // never instantiated
        public static final String getMoreInfo ()
            // the same for each instance
            return Integer.toString (initializedInEachSubclass.length ());
    class Sub1 extends Super
        static
            initializedInEachSubclass = "My String for Sub1";
            alsoInitializedInEachSubclass = "My Other String for Sub1";
        private Sub1 () {} // never instantiated
    }The problem with the above code is that the static block in Super uses static final variables that have not been initialized yet. I can't make Super abstract. If I initialize the final variables in Super, then I can not reinitialize them in Sub1. But if they are not final, then they could be changed after being initialized (which I would rather not allow). I could make everything protected and not final and then make public get... () methods, but I like accessing them as attributes. It seems like this should be possible, but everything I have tried has led me to a catch-22.
    Any ideas on how I can put all my redundant initialization code in one place but still allow the subclasses to initialize the static members that make each of them unique? I will be happy to clarify my examples if you need more information.
    Edited by: sawatdee on Jan 3, 2008 9:04 AM

    sawatdee wrote:
    I am basically trying to avoid having redundant code in several classes when the code will be exactly the same in all of them.That's the wrong reason to subclass. You subclass to express type specialization. That is, a Dog IS-A Mammal, but it's a special type of Mammal that implements certain common mammal behaviors in a dog-specific way. A LinkedList IS-A List, but in implements common list operations in linked-list-specific ways.
    I don't really need to have the static final members in a superclass (and I don't even need a superclass at all), but I don't know how else to execute a big static initialization block in several classes when that code is exactly the same in all of them. Without knowing more details about what you're trying to do, this sounds like a case for composition rather than inheritance. What's now your superclass would be a separate class that all your "sublasses" have a reference to. If they each need their own values for its attributes, they'd each have their own instances, and the stuff that's static in the current superclass would be non-static in the "subs". If the values for the common attributes are class-wide across the "subs", the contained former super can be static.
    public class CommonAttrs {
      private final String attr1;
      private final int attr2;
      public CommonAttrs(String attr1, int attr2) {
        this.attr1 = attr1;
        this.attr2 = attr2;
    public class FormerSub1 {
      private static final CommonAttrs = new CommonAttrs("abc", 123);
    ... etc. ..

  • Search for coding possible thru Toad, but not thru Forms Builder

    Hi all,
    I am searching for a particular word 'instalment' which is used in forms. when I search using 'Find and Replace PL/SQL' there are no matches. But in Toad, when i search in 'Find in Files', its displaying the code containing the above word in a particular .fmb file. why this is happening?? I am in urgent need of that code.
    Pls help me.. its urgent!!
    Edited by: user13106173 on Dec 6, 2010 3:05 AM

    When I open that file in Quick view from ToadWhich file are you referring too when you say "that file"? I assume you mean the Forms Module (.fmb), but I hate to assume things so could you please confirm this for me? ;-)
    How can we see attached library details?There is no way to view the PL/SQL code of an attached library except by opening the library in the Forms Builder. If your form has an attached library, the Object List Report will indicate there are attached libraries in the "Attached PL/SQL Libraries" section of the report.
    * Attached PL/SQL Libraries                        
       * Name                                            MY_LIB_NAME
       - Comments                                       
       * PL/SQL Library Location                         MY_LIB_NAME
       * Name                                            RP2RRO
       - Comments                                       
       * PL/SQL Library Location                         rp2rro
    But through forms builder, I cant see the below details. Don't quote me on this, but believe TOAD's quick view displays all of the code in the .fmb, even the code of an attached library, whereas Forms Builder will allow you to see the signature of the program units in the attached library, but not the code.
    Also the ct_message display item used here is not created in this particular form. It is in some other form. How this happens?Is the CT_MESSAGE display item a Subclassed item? Meaning, it was included in your form file through an Object Library or by copying the item to the form and choosing to subclass (create a reference to) the item rather than copy of the item in your form. Oracle Forms implements inheritence through the use of subclasses. By subclassing an item (be it a Visual widget [like a button] or a Program Unit) Forms stores a refernce to the object rather than the actual object. This allows you to share and reuse code and objects.
    Check the Object List Report of your form and see if there are any attached libraries. If there are attached libraries, open these libraries in Forms Builder to find your code. It is also also possible to subclass objects in your form file through the use of Object Libraries. Check your Object List Report to see if there is an Object Groups sections:
    * Object Groups                                    
       * Name                                            CALENDAR
       - Subclass Information                           
       - Comments                                       
       * Object Group Children                          
         * Name                                          WHEN-NEW-FORM-INSTANCE
         - Subclass Information                         
         * Real Object Pointed to by the Object Group Child
         * Name                                          WHEN-WINDOW-ACTIVATED
         - Subclass Information                         
         * Real Object Pointed to by the Object Group Child
    .....If the CT_MESSAGE item was added to your form thorugh an object library, it will be listed in this section of the object list report.
    Hope this helps,
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.

  • Classes and subclasses given as String input - question

    Hello, I am new in Java so please don't laugh at my question!!
    I have a method as the following and I am trying to store objects of the type Turtle in a vector. However the objects can also be of Turtle subclasses: ContinuousTurtle, WrappingTurtle and ReflectingTurtle. The exact class is determined by the String cls which is input by the user.
    My question is, how can I use cls in a form that I don't have to use if-else statements for all 4 cases? (Imagine if I had 30 subclasses).
    I have tried these two and similar methods so far but they return an error and Eclipse is not of much help in this case.
    Simplified methods:
    //pre:  cls matches exactly the name of a valid Turtle class/subclass
    //post: returns vector with a new turtle of type cls added to the end
    private Vector<Turtle> newturtle(Vector<Turtle> storage, String cls){
         Turtle t = new cls(...);
         storage.add(t);
         etc.
    private Vector<Turtle> newturtle(Vector<Turtle> storage, String cls){
         Turtle t = new Turtle<cls>(...);
         storage.add(t);
         etc.
    }Thanks for your help.
    p.s.: I didn't know whether to post this question here or under Generics.

    a Factory is atually very simple (100x simpler than reflection).
    example:
    class TurtleFactory
      public Turtle makeTurtle(String typeOfTurtle)
        if (typeOfTurtle.equals("lazy") { return new LazyTurtle(); }
        else if (typeOfTurtle.equals("fast") { return new FastTurtle(); }
        <etc>
    }While at first this doesn't look any better than your original problem, what we've done is made a class that is responsible for all the types of turtles. This will also benefit in case some turtles need initialization or need something passed to their constructor. You encapsulate all that knowledge in one place so you rcode doesn't become littered with it else ladders.

  • Refrence forms in application

    Hi All,
    Is there any way to know a particular Refrence form is subclasses in these many forms ?
    we are having some refrence forms, which are subclassed in main application
    forms.
    These refrence forms are used to keep common functionality in one form and then we refrence this common functionality in various forms by subclassing these refrence forms.
    Whenever we make any change with Refrence Form we need to Recompile the forms which have subclassed it, so that the new changes from Refrece Forms should be subclassed in application form.
    But as one refrence form is subclassed in many forms it get's dificicult to locate only those form and then recompiling.
    And to compile all the forms is also not a feasible solution.
    so is there any way to know a particular refrence form is subclassed in these many forms.
    Thanks
    Ashish

    hi there
    Yes, if you're using form 9i/10g you can find out subclassing information of any forms object by making use of JDAPI.
    Below is a quick sample that displays a form, block and block item that has been subclass as well as what the parent is. you'll be able to run it for a single form of for a group of forms in a directory. It does not suite exactly what you want as it is but I'm sure you'll be able to modify it to perform what you want.
    Cheers
    Q
    package mypackage1;
    import java.io.*;
    import oracle.forms.jdapi.*;
    import java.io.File;
    public class parentchecker
    private int printCounter = 0;
    private FormModule fmb;
    private static String fileName;
    private String auditDir = "C:\\DEV\\beantimer\\";
    public parentchecker(String fileName)
    try{
    fmb = FormModule.open(fileName);
    this.fileName = fileName.substring(fileName.lastIndexOf("\\"),fileName.indexOf("."));
    catch
    (JdapiIllegalStateException ex)
    printCounter = 1;
    ex.printStackTrace();
    catch (JdapiStatusException ex)
    printCounter = 1;
    ex.printStackTrace();
    catch(JdapiUnsupportedOperationException ex)
    printCounter = 1;
    ex.printStackTrace();
    catch (JdapiException ex)
    printCounter = 1;
    ex.printStackTrace();
    public static void main (String[] args)
    File dir = new File("C:\\DEV\\beantimer\\FIELDTESTER.fmb");
    if (dir.isDirectory())
    File[] files = dir.listFiles();
    for (int x=0;x<files.length;x++)
    if (files[x].isFile() && files[x].getAbsolutePath().toLowerCase().endsWith(".fmb"))
    System.gc();
    System.out.println(files[x].getAbsolutePath());
    FormsChecker myprops = new FormsChecker(files[x].getAbsolutePath());
    myprops.checksubclassing();
    myprops.endJdapi("N");
    else if (dir.isFile())
    System.out.println(dir.getAbsolutePath());
    parentchecker myprops = new parentchecker(dir.getAbsolutePath());
    myprops.checksubclassing();
    myprops.endJdapi("N");
    public void endJdapi(String commit)
    if (commit.equals("Y"))
    fmb.save(fmb.getAbsolutePath());
    fmb = null;
    Jdapi.shutdown();
    public void checksubclassing()
    if (!fmb.getParentModule().equals(""))
    System.out.println(" FMB "+ fmb.getName()+" : parent name "+ fmb.getParentModule()+" "+fmb.getParentName());
    JdapiIterator blocks = fmb.getBlocks();
    while (blocks.hasNext())
    Block block = (Block)blocks.next();
    if (!block.getParentModule().equals(""))
    System.out.println(" BLOCK "+ block.getName()+" : parent name "+ block.getParentModule()+" "+block.getParentName());
    JdapiIterator items = block.getItems();
    while (items.hasNext())
    Item item = (Item)items.next();
    if (!item.getParentModule().equals(""))
    System.out.println(" ITEM "+item.getName()+" : parent name "+ item.getParentModule()+" "+item.getParentName());
    }

  • Calling a method of all subclasses.

    I have a very complicated problem:
    I need a series of classes that have almost everything in common. They differ only in two things: variable static String ID, which identifies this class, and a method modify() which is implemented by each class differently. Other than that, there are many other fields and methods that are needed for each class, but each class would handle these methods and fields equally.
    So i declared an abstract class where I declared all thing subclasses have in common and each individual class is a subclass of this abstract class. The two thing mentioned before are declared as follows:
    protected static String ID;
    public abstract void modify();
    Now I need three things:
    1) I need a list of IDs of all subclasses for a combo box. So since ID is static and protected and set to value only in the subclass, it can be referenced. This is done by a static method getId(), also declared in the abstract class. Now I do not know whether this ID is thus shared by all subclasses or each class has this ID unique. I need the latter.
    2) I need to fetch a class by its ID to instantiate it.
    3) I need to declare that each subclass must have a one-parameter constructor with one int parameter, so when I get to instantiating by getContructor().newInstance(Object[]) , the params will be compatible every time a new instance occurs, whatever the ID.
    I need this to ease my work. If I accomplish this, every time I would add a new subclass (which could be tens, maybe hundreds of them int the end) I need only to set ID and implement modify() and the new class would automatically register in the combobox and can be instatiated by its ID.
    Thank you for your help.

    Shagrat wrote:
    1) I need a list of IDs of all subclasses for a combo box. So since ID is static and protected and set to value only in the subclass, it can be referenced. This is done by a static method getId(), also declared in the abstract class. Now I do not know whether this ID is thus shared by all subclasses or each class has this ID unique. I need the latter.You could perhaps try it? It will turn out it's the former. There is no way to programmatically produce a unique ID per class from a superclass.
    2) I need to fetch a class by its ID to instantiate it.If you must, a Map of String (ID) vs Class<?> might be a starting point.
    3) I need to declare that each subclass must have a one-parameter constructor with one int parameter, so when I get to instantiating by getContructor().newInstance(Object[]) , the params will be compatible every time a new instance occurs, whatever the ID. There is no way to enforce constructor signatures at compile time.

  • Error when starting Adobe Form

    I have an Adobe Form which works Ok in the development SAP Portal, but that, when I log in the production portal gives the following error:
    Error when reinitializing the form (I guess, it's Error al reinicializar el formulario, in Spanish)
    I think maybe there is something missing to transport, or some misconfiguration, but I haven't been able so far to find it...
    Can someone give me a hand?
    Thank you in advance,
    S.

    Hi,
    Can you tell me when does the error message comes? Does it comes when you are trying to open the Form or when you are trying to execute it.
    Please check if it is still working in the development box?
    Regards,
    Susanta

  • Data blocks in forms 6i, can not see the data

    i have built an application in forms with some data blocks. the blocks a connect to some tables in the db. i have built them connectd as "system". but when i run the applicatio as user x i can do select, insert, update, delete, but i can not se the records in the datablocks (they are empty), but i can do all transactios. why?

    First of all, developing from the System schema is not a good idea.
    Who owns the tables your form is connecting to? The table owner should create a public synonym for each table name, and also needs to grant user x access to the table.

  • SSO to Oracle Forms 6.0 and Oracle Reports 6.0

    Hi,
    Could somebody please explain how I should implement the SSO so that I can log on a forms application?
    Should I use external partner app. ??
    How can I parse the right parameters to the forms server ??
    thanks,
    Jerome

    Hi,
    Oracle Forms 6i does not support Advances Security for SQL*Net if this is what your question is. ASO is supported with Forms 9i and above
    Frank

Maybe you are looking for