HELP NEEDED ON BUILDING HTMLDB APP

Hello,
I am very new to HTMLDB and building an application. I have the HTML already developed using Macromedia and I have some styles and Javascripts, I would like to use this piece of HTML and HTMLDB's functionality,
The first thing I wanna do is I want to create a login for users of my site, I have many questions here, would appreciate if someone can answer me,
1. I would prefer using the login process from the sample application, but at the same time, my application would require concepts like users mapped to groups, that I create and only people in certain groups should be able to see certain pages or links, is it better to use HTMLDB's admin or should I create a custom process? would appreciate if someone can point me on a doc or help to implement the login process with custom html page.
2. Where will I input all my CSS, UI images, and what would the src to the files be in html if I upload the same using HTMLDB, I know its done some where but not able to figure out,
3. Would really be great, if someone can first get me started with rendering an HTML page with above criterias and it would be awsome if I can have a login page working. Thanks

Hello,
Take a look at the howtos section
http://www.oracle.com/technology/products/database/application_express/howtos/index.html
or the studio
http://htmldb.oracle.com/pls/otn/f?p=18326:1
or the wiki
http://wiki.shellprompt.net/bin/view/Apex/
or the Oracle By Example
http://www.oracle.com/technology/obe/obe10gdb/develop/htmldb/htmldb.htm
There's quite a bit of info out there that should help get you going in the right direction.
For your second question it how you link in your files depends if you have access to the filesystem or not. If you have access to the filesystem it's usally somethign like #IMAGE_PREFIX#, if you've uploaded through the UI it's either #WORKSPACE_IMAGES# or #APP_IMAGES# followed by the image name.
Carl

Similar Messages

  • Help needed with building Flex App without FlexBuilder

    Hi Guys,
    I was building my application on Struts framework with JSPs
    as the front end. I just got a new requirement to try and build my
    application's GUI with Flex (completely replacing JSPs). I cannot
    use FlexBuilder as my company won't buy it. I've been trying to dig
    through all articles and documentation to find out how to write
    MXML files and compile them without a FlexBuilder. I have learnt
    that I can write MXML files using plain notepad, but I am totally
    lost when it comes to understanding how to compile my MXML files
    with FlexBuilder. I know about the ant compiler and web compiler
    but How do I use them? I want to use the web compiler but how can I
    configure the Web Compiler to compile my MXML files when I run my
    app? Can someone kindly help me out.
    Thank You,
    TNJ

    You can use mxmlc to compile your mxml files into swfs.
    Google for mxmlc and there should be plenty information.

  • HT201209 Help needed to Redeem an app

    Hi, I'm brand new to Apple iPad. I was given three iPad cards worth $10.00 each. Someone helped me redeem a couple apps but I cannot remember how to do it. I'm showing $17.04 credit under my Apple ID. When I select the app that I want,"in this case Numbers", I scroll to the bottom of (Featured) and click Redeem, I'm prompted to enter the code.
    I know I'm doing something stupid. I clicked buy on a couple apps and it was charged to my credit card. I can't afford that especially when this is work related. Can you please help me with this?
    Thank You,
    Mike Morris
    <Personal Information Edited by Host>

    You only use the "Redeem" if you've been given the gift of that specific app and have a code to redeem. If you wish to buy an app using your credit balance, going through the normal "buy" process usually works. Assuming you were not buying a gift for someone else - gifts cannot be purchased using a credit balance - another user in the forums posted the information I quote below as the reply from the iTunes Store when this issue was brought up. Perhaps it will help you. If problems persist, contact the iTunes Store:
    http://www.apple.com/emea/support/itunes/contact.html
    Regards. 
    I'm sorry you weren't able to make a purchase using your store credit. To purchase items on the iTunes Store with your store credit, your account information in your user profile needs to be corrected. I'll walk you through this process to get you back up and running in no time. 
    1) Visit the My Apple ID website at:  http://appleid.apple.com 
    2) If the site is not displayed in your preferred language, click the Change Language link in the upper-right corner, type the name of your language in the field that appears, then click the Save button. 
    3) Click the "Manage your account" link. 
    4) Type your iTunes Store account name (which is your Apple ID) in the Apple ID field, type your password in the password field, then click the Sign In button. 
    5) Click "Addresses" in the column on the left. If you have multiple shipping addresses, remove any out-of-date or duplicate addresses by clicking Delete. Also, make sure the state or province field is filled out correctly for each address. To edit an address, click Edit. Edit all of your shipping addresses and make sure the appropriate state is selected in the State drop-down menus. 
    6) Now click "Phone Numbers" on the left. The area codes should be in the area code fields and the phone numbers should be in the phone number fields. If an area code is missing, or if it is in a phone number field, your account information may not save properly. 
    7) Make any other necessary corrections, then click the Save Changes button. 
    8) Click Log out in the upper-right corner.  When you make your next purchase on the iTunes Store, you will be asked to review your billing information. At this point, you can change your information or simply click Done at the bottom of the screen to proceed. Once you click Done, you should be able to purchase on the iTunes Store using your store credit. 

  • Help needed to build delete statement

    i need to keep last 10 days data+ last day of everymonth data in my table.
    this table will grow on daily basis.
    ex:
    data_date no.of records
    2006/02/28 10000
    2006/03/31 11000
    2006/04/30 12000
    2006/05/31 13000
    2006/06/09     13100
    2006/06/10 13200
    2006/06/11 13300
    2006/06/12 13400
    2006/06/13     13500
    2006/06/14     13600
    2006/06/15 13700
    2006/06/16 13800
    2006/06/17     13900
    2006/06/18     14000
    means last 10 days + last day of evermonth data need to store and remaining all
    records i need to delete from this table.
    could you help me to build this delete statement in single statement.

    select * from mytbl;
    DD                 NR
    28-02-2006      12000
    31-03-2006      10000
    30-04-2006      12050
    31-05-2006       9500
    06-06-2006      13100
    07-06-2006      13200
    08-06-2006      13300
    09-06-2006      13400
    10-06-2006      13500
    11-06-2006      13600
    12-06-2006      13700
    13-06-2006      13800
    14-06-2006      13900
    15-06-2006      14000
    16-06-2006      14100
    17-06-2006      14200
    18-06-2006      14300
    17 rows selected.
    delete from mytbl
    where not
    ( dd = last_day( dd ) -- Keep last days of months
       or  dd >= trunc(sysdate) - 10 -- Keep last 10 days
    3 rows deleted.
    select * from mytbl;
    DD                 NR
    28-02-2006      12000
    31-03-2006      10000
    30-04-2006      12050
    31-05-2006       9500
    09-06-2006      13400
    10-06-2006      13500
    11-06-2006      13600
    12-06-2006      13700
    13-06-2006      13800
    14-06-2006      13900
    15-06-2006      14000
    16-06-2006      14100
    17-06-2006      14200
    18-06-2006      14300To me...it looks like it does work!

  • Help needed abou SNAPit SEEit app

    Dear all
    I have Lenovo s 580,I need to install SNAPit app for camera as the stock can app sucks, so any help please

    Hi Moustafa
    Did you contact Lenovo dedicated support as I previously recommended?
    Regards.
    Did someone help you today? Press the star on the left to thank them with a Kudo!
    If you find a post helpful and it answers your question, please mark it as ''ACCEPT AS SOLUTION"! 
    Unsolicited PM's will not be answered! ....Please post your question/s in the appropriate forum board.
    English Community   Deutsche Community   Comunidad en Español   Русскоязычное Сообщество

  • Help needed in building query

    Tab1
    Parent       Child       sa l
    P1     A1       4000
    A1     A       1000
    A1     B       4000
    A     X       1000
    A     Y         2000
    B     X1        1000           
    B     X2       3000I need to build a query that will retrieve the value for each child as the sum of the salaries of all its child in a single query.
    That is
    For Sal P1 = Sal A1 + all child of A1 and its child
         For A1 = Sal A1 + all child of A1 and its child ( A+B+X+Y+X1+X2)
    Like it should sho all the records with the count .. please help

    This is not so simple since it is not really clear in your data set whether the sal belongs to the parent or to the child. I assume it's the salary of the child, in which case the salary of P1 is missing. The best option is to fix the data model and have two tables: one containing the element and sal, and another table containing just the relationships. To fix this issue I introduced a dummy record for P1 and salary 0.
    SQL> with t2 as
      2  ( select connect_by_root(child) cbr
      3         , sal
      4      from (select * from t union all select null,'P1',0 from dual)
      5   connect by parent = prior child
      6  )
      7  select cbr child
      8       , sum(sal)
      9    from t2
    10   group by cbr
    11  /
    CHILD    SUM(SAL)
    X1           1000
    A1          16000
    X2           3000
    P1          16000
    Y            2000
    X            1000
    A            4000
    B            8000
    8 rows selected.Regards,
    Rob.

  • Help needed to build simple BRF

    Hi,
    I am new to BRF and wanted some help from you building a simple BRF, say a look up from the database table.

    Hi,
    I guess you are trying to use BRF function from custom application and not talking about Process-Controlled Workflow.
    Yes. You can use BRF from custom application. BRF is just one of functions delivered in NetWeaver level.
    http://help.sap.com/saphelp_scm70/helpdata/EN/9a/6b67ce7c26446483af079719edf679/frameset.htm
    http://help.sap.com/saphelp_scm70/helpdata/EN/d6/38bb4006d9cc38e10000000a155106/frameset.htm
    Regards,
    Masa

  • Help needed in building a demo mobile app for DRM support using Content server 4

    Hi all,
    I am building an application for the blackberry to support reading of pdf and ebuf content similar to Adobe Digital Editions with DRM support . I came to know about the Adobe RMSDK .
    Following is my understanding regarding my implementation , please correct me if i am wrong:
    The DRM implementation on a mobile device for Adobe should satisfy the following criteria:
    1. The mobile device should have a application which uses the Adobe RMSDK.
    2. The publisher or the server app should install and run the content server 4
    3. An acsm file which contains the rights data should be saved stored at the adobe server and should be downloaded by the mobile client.
    4. The urls in the acsm xml file will be used to fetch the content for the ebook.
    I have the following querries:
    1. Is there an implementation of the RMSDK for java to run on blackberry.
    2. Is Adobe content server 4 free to install, if not do we have a test server for this purpose.
    Thanks in advance for the help.

    Hi Jim,
    Thanks for your kind reply. I have some more querries
    Suppose if we have a client implementation of the Adove RMSDK in java,  please help answer these querries:
    1. How do we connect to the cs4 server (what will be the flow of data, is there a documentaion regarding the protocol to be used between the mobile client and the cs4 server in order to communicate and fetch Rights protected ebuf and pdf data.
    2. The link http://www.adobe.com/products/digitaleditions/library does not give me information of how to use this library to store by ebook data and fetch  drm data from the mobile client and the protocol/communication followed.
    3. How do i go forward in evaluating acs4( getting a test version of cs4 and using it ). We want to build a demo app in blackberry.
    thanks
    Amit

  • Help needed in building a tree without duplicatin​g the nodes

    Iam trying to construct a tree, ID name as the parent node and channel name & channel values as its corresponding child nodes.
    I had constructed the tree, but the problem i have is with interfacing that with in my  main program. In the main program say suppose I have 5 Id's, each Id has some X number of channel's. And each channel has a value.
    Each Id is indexed and passed to the for loop. And since this for loop is inside the while loop each ID will be executed for every 5 iterations.
    Id, channel names will be constant each time it gets executed, but the channel value's will be updated during run time.
    If I directly feed the Id, channel names and values, replacing the constants in the vi, the tree is duplicating the messages, each time a ID is received inside the for loop, it is creating a new parent and child nodes.
    Please help me in fixing this issue, and constructing the tree, where the ID and channel names are not not duplicated.For better understanding Iam attaching a snapshot shot, which tells at what point the ID, channel name array and value is received.
    Attachments:
    channel_info.vi ‏31 KB
    channel.png ‏60 KB

    Caleb Harris, the arbitration ID is not the same each time. Cluster has several different id's, this can be seen in the attached screen shot. Attached sreen shot shows the cluster information,  a sample ID unbundled from the array and the list of channels in that Arbitration ID. I got an idea how to construct the tree but for that,
    1)Need to store all this arbitartion Id's,channel's , and values in 3- different arrays (Channel array and the values array must have the same size).
    2)Channel array must be in synchronus with the Value array say like the first index value of the value_array  should represent the value of the first element of the channel    
       array, similarly the second index value of the value_array  should represent the value of the second element of the channel array and so on.
    3) When ever the channel value gets updated, that particular element of the value array should be updated.
    If I can do this 3- steps I think I can succesfully build a tree. Can you please take a look at the snapshot and help me out in doing this.
    Attachments:
    Cluster Image.PNG ‏67 KB

  • Urgent help needed in building an expression

    hi,
    I am using expression editor to build the following simple expression.
    "if inputvalue = 0 then 10 else 20"
    so Far I have used various forms of "IF" and "CASE" statements but could not successfully create the expression.Could not find anything useful in the help docs as well.
    any help asap would be highly appreciated..highly disappointed with OWB which does not allow to build such a simple expression and the user docs as well are very poor.

    Hi,
    There is something you need to know up front on expressions and transformations. Expressions are SQL expressions, whereas transformations are pl/sql.
    Looking at your pseudo code, you are trying to do a procedural thing. So there are 2 ways of doing this. One is correctly the case statement. For an example on how to do this go to the OWB sample code page on OTN (http://otn.oracle.com/sample_code/products/warehouse/content.html) where an explanation is given on how to do this. It includes an example metadata file for you to evaluate.
    The other way of doing this is in PL/SQL, in which case you would create a small function accepting in parameter and then doing the procedural language on that. To create this use the create functions activity in OWB. Here you will get a nice code editor (similar to the expression builder) to guide you in the creation of this function.
    Hope this helps,
    Jean-Pierre

  • Help Needed in Building JTree

    HI,
    I've a doubt in Building a JTree.It wud be helpful if some one helps me with a better logic for building this Tree..
    I have a tree like this:
    root
    |
    A--B--C--D
    A--B--C--D
    A--B--C
    A--B--C--E--F
    I have the tree nodes like this . i need to merge the nodes like this
    root
    |
    A
    |
    -- B
    |
    --C
    |
    --D
    --E
    |
    --F
    I've tried it in few ways. It doesn't seems to be working.. Can some one help me in giving me a better logic in doing this

    Hello,
    When updating the tree, do not access the tree nodes directly. Update the tree via its (TreeModel).
    to get the model of your JTree use
    DefaultTreeModel treeModel = (DefaultTreeModel)myTree.getModel();to add nodes use the method
    treeModel.insertNodeInto(newChild,parent,offset);and remove nodes using
    treeModel.removeFromParent(nodeToRemove);--
    Regards,
    Ahmed Saad

  • Code troubleshooting help needed - buttons spawning 2 apps

    Hi,
    I'm trying to do a question out of my Java text book and I'm a little confused why its not working correctly. There's 2 buttons on a frame that when clicked start the app behind them... one is a basic calculator, the other is a little applet to compute a mortgage. The second button is not reacting like the first does AND the Mortgage applet behind that button does not start-up properly... the box opens but nothing in the frame is visible.
    The first thing I need to be explained is that in the Mortgage section why I can't change it into an application from an applet without receiving an error. On my separate Mortgage applet (standalone) I switched it from applet to application by adding the following:
      public static void main(String[] args) {
         //create a frame
         JFrame frame = new JFrame (
              "Running a program as applet and frame");
         //create an instance of MortgageApplet
         MortgageApplet applet = new MortgageApplet();
         //add the applet instance to the frame
         frame.getContentPane().add(applet, BorderLayout.CENTER);
         //invoke init and start
         applet.init();
         applet.start();
         //display the frame
         frame.setSize(300, 300);     
         frame.setVisible(true);
         }But when I add that code to this exercise with the 2 buttons kicking the 2 sub apps off I get the following error...
    Exercise12_17.java:130: cannot resolve symbol
    symbol  : method start ()
    location: class MortgageApplet
            applet.start();So because of that I have that section of the code commented out below.... I copied that straight from my book and[b] it works when its standalone but not within this bigger app I'll paste below.
    The second thing I need explained is why does the second button not behave like the first button...
    If you click the first button it starts the calculator and then shows a "hide calculator" button to hide the calculator application. And if you click that hide button you return to the original menu with the 2 buttons (Calc & Mortgage) to choose from. But if you click the Mortgage button it brings up the Mortgage app (which currently is not working correctly in here) BUT does not show me the "Hide Mortgage" button... it jumps to the "Simple Calculator" button.
    My assumption is it has something to do with the If-Else if actionPerformed argument I have in the code below but I'm not entirely sure.
    Does anyone have answers to me 2 questions??...
    (1) do I need to change the mortgage applet to application & why am I getting that error when trying to do so? ...... and ......
    (2) why does my 2nd button on the main menu not get the "hide mortgage" button after starting the mortgage app & how would I correct it? (I assume that if I solve problem #1 it'll spawn the app correctly in part 2 when it starts).
    Any help would be greatly appreciated... thank you. :-)
    Rob
    -------------------------entire app below--------------------
    // Exercise12_17.java: Create multiple windows - Simple Calc & MortgageApplet
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.border.TitledBorder;
    public class Exercise12_17 extends JFrame implements ActionListener {
      // Declare and create a frame: an instance of MenuDemo
      MenuDemo calcFrame = new MenuDemo();
      // Declare and create a frame: an instance of MortgageApplet
      MortgageApplet mortgageAppletFrame = new MortgageApplet();
      // Declare two buttons for displaying frames
      private JButton jbtCalc;
      private JButton jbtMortgage;
      public static void main(String[] args) {
        Exercise12_17 frame = new Exercise12_17();
        frame.pack();
        frame.setTitle("Exercise 12.17: Multiple Windows Demo");
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.setVisible(true);
      public Exercise12_17() {
        // Add buttons to the main frame
        getContentPane().setLayout(new FlowLayout());
        getContentPane().add(jbtCalc = new JButton("Simple Calculator"));
        getContentPane().add(jbtMortgage = new JButton("Mortgage"));
        // Register the main frame as listener for the buttons
        jbtCalc.addActionListener(this);
        jbtMortgage.addActionListener(this);
      public void actionPerformed(ActionEvent e) {
        String arg = e.getActionCommand();
        if (e.getSource() instanceof JButton)
          if ("Simple Calculator".equals(arg)) {
            //show the MenuDemo frame
            jbtCalc.setText("Hide Simple Calculator");
            calcFrame.pack();
            calcFrame.setVisible(true);
          else if ("Hide Simple Calculator".equals(arg)) {
            calcFrame.setVisible(false);
            jbtCalc.setText("Simple Calculator");
          else if ("Mortgage".equals(arg)) {
            //show the Mortgage frame
            mortgageAppletFrame.pack();
            jbtMortgage.setText("Hide Mortgage");
            mortgageAppletFrame.setVisible(true);
          else if ("Mortgage".equals(arg)) {
            mortgageAppletFrame.setVisible(false);
            jbtMortgage.setText("Mortgage");
      class MortgageApplet extends JFrame implements ActionListener {
      // Declare and create text fields for interest rate
      // year, loan amount, monthly payment, and total payment
      private JTextField jtfAnnualInterestRate = new JTextField();
      private JTextField jtfNumOfYears = new JTextField();
      private JTextField jtfLoanAmount = new JTextField();
      private JTextField jtfMonthlyPayment = new JTextField();
      private JTextField jtfTotalPayment = new JTextField();
      // Declare and create a Compute Mortgage button
      private JButton jbtComputeMortgage = new JButton("Compute Mortgage");
      /** Initialize user interface */
      public void init() {
        // Set properties on the text fields
        jtfMonthlyPayment.setEditable(false);
        jtfTotalPayment.setEditable(false);
        // Right align text fields
        jtfAnnualInterestRate.setHorizontalAlignment(JTextField.RIGHT);
        jtfNumOfYears.setHorizontalAlignment(JTextField.RIGHT);
        jtfLoanAmount.setHorizontalAlignment(JTextField.RIGHT);
        jtfMonthlyPayment.setHorizontalAlignment(JTextField.RIGHT);
        jtfTotalPayment.setHorizontalAlignment(JTextField.RIGHT);
        // Panel p1 to hold labels and text fields
        JPanel p1 = new JPanel();
        p1.setLayout(new GridLayout(5, 2));
        p1.add(new Label("Annual Interest Rate"));
        p1.add(jtfAnnualInterestRate);
        p1.add(new Label("Number of Years"));
        p1.add(jtfNumOfYears);
        p1.add(new Label("Loan Amount"));
        p1.add(jtfLoanAmount);
        p1.add(new Label("Monthly Payment"));
        p1.add(jtfMonthlyPayment);
        p1.add(new Label("Total Payment"));
        p1.add(jtfTotalPayment);
        p1.setBorder(new TitledBorder("Enter interest rate, year and loan amount"));
        // Panel p2 to hold the button
        JPanel p2 = new JPanel();
        p2.setLayout(new FlowLayout(FlowLayout.RIGHT));
        p2.add(jbtComputeMortgage);
        // Add the components to the applet
        getContentPane().add(p1, BorderLayout.CENTER);
        getContentPane().add(p2, BorderLayout.SOUTH);
        // Register listener
        jbtComputeMortgage.addActionListener(this);
      //*********ADDED THIS SECTION below TO MAKE APPLET AN APPLICATION***********
    //  public static void main(String[] args) {
         //create a frame
    //     JFrame frame = new JFrame (
    //          "Running a program as applet and frame");
         //create an instance of MortgageApplet
    //     MortgageApplet applet = new MortgageApplet();
         //add the applet instance to the frame
    //     frame.getContentPane().add(applet, BorderLayout.CENTER);
         //invoke init and start
    //     applet.init();
    //     applet.start();
         //display the frame
    //     frame.setSize(300, 300);     
    //     frame.setVisible(true);
      //*********ADDED THIS SECTION above TO MAKE APPLET AN APPLICATION***********
      /** Handle the "Compute Mortgage" button */
      public void actionPerformed(ActionEvent e) {
        if (e.getSource() == jbtComputeMortgage) {
          // Get values from text fields
          double interest = (Double.valueOf(
            jtfAnnualInterestRate.getText())).doubleValue();
          int year =
            (Integer.valueOf(jtfNumOfYears.getText())).intValue();
          double loan =
            (Double.valueOf(jtfLoanAmount.getText())).doubleValue();
          // Create a mortgage object
          Mortgage m = new Mortgage(interest, year, loan);
          // Display monthly payment and total payment
          jtfMonthlyPayment.setText(String.valueOf(m.monthlyPayment()));
          jtfTotalPayment.setText(String.valueOf(m.totalPayment()));
    class MenuDemo extends JFrame implements ActionListener {
      // Text fields for Number 1, Number 2, and Result
      private JTextField jtfNum1, jtfNum2, jtfResult;
      // Buttons "Add", "Subtract", "Multiply" and "Divide"
      private JButton jbtAdd, jbtSub, jbtMul, jbtDiv;
      // Menu items "Add", "Subtract", "Multiply","Divide" and "Close"
      private JMenuItem jmiAdd, jmiSub, jmiMul, jmiDiv, jmiClose;
      /** Main method */
      public void main(String[] args) {  //Change-was public static void main(String[] args)
        MenuDemo frame = new MenuDemo();
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.pack();
        frame.setVisible(true);
      /** Default constructor */
      public MenuDemo() {
        setTitle("Menu Demo");
        // Create menu bar
        JMenuBar jmb = new JMenuBar();
        // Set menu bar to the frame
        setJMenuBar(jmb);
        // Add menu "Operation" to menu bar
        JMenu operationMenu = new JMenu("Operation");
        operationMenu.setMnemonic('O');
        jmb.add(operationMenu);
        // Add menu "Exit" in menu bar
        JMenu exitMenu = new JMenu("Exit");
        exitMenu.setMnemonic('E');
        jmb.add(exitMenu);
        // Add menu items with mnemonics to menu "Operation"
        operationMenu.add(jmiAdd= new JMenuItem("Add", 'A'));
        operationMenu.add(jmiSub = new JMenuItem("Subtract", 'S'));
        operationMenu.add(jmiMul = new JMenuItem("Multiply", 'M'));
        operationMenu.add(jmiDiv = new JMenuItem("Divide", 'D'));
        exitMenu.add(jmiClose = new JMenuItem("Close", 'C'));
        // Set keyboard accelerators
        jmiAdd.setAccelerator(
          KeyStroke.getKeyStroke(KeyEvent.VK_A, ActionEvent.CTRL_MASK));
        jmiSub.setAccelerator(
          KeyStroke.getKeyStroke(KeyEvent.VK_S, ActionEvent.CTRL_MASK));
        jmiMul.setAccelerator(
          KeyStroke.getKeyStroke(KeyEvent.VK_M, ActionEvent.CTRL_MASK));
        jmiDiv.setAccelerator(
          KeyStroke.getKeyStroke(KeyEvent.VK_D, ActionEvent.CTRL_MASK));
        // Panel p1 to hold text fields and labels
        JPanel p1 = new JPanel();
        p1.setLayout(new FlowLayout());
        p1.add(new JLabel("Number 1"));
        p1.add(jtfNum1 = new JTextField(3));
        p1.add(new JLabel("Number 2"));
        p1.add(jtfNum2 = new JTextField(3));
        p1.add(new JLabel("Result"));
        p1.add(jtfResult = new JTextField(4));
        jtfResult.setEditable(false);
        // Panel p2 to hold buttons
        JPanel p2 = new JPanel();
        p2.setLayout(new FlowLayout());
        p2.add(jbtAdd = new JButton("Add"));
        p2.add(jbtSub = new JButton("Subtract"));
        p2.add(jbtMul = new JButton("Multiply"));
        p2.add(jbtDiv = new JButton("Divide"));
        // Add panels to the frame
        getContentPane().setLayout(new BorderLayout());
        getContentPane().add(p1, BorderLayout.CENTER);
        getContentPane().add(p2, BorderLayout.SOUTH);
        // Register listeners
        jbtAdd.addActionListener(this);
        jbtSub.addActionListener(this);
        jbtMul.addActionListener(this);
        jbtDiv.addActionListener(this);
        jmiAdd.addActionListener(this);
        jmiSub.addActionListener(this);
        jmiMul.addActionListener(this);
        jmiDiv.addActionListener(this);
        jmiClose.addActionListener(this);
      /** Handle ActionEvent from buttons and menu items */
      public void actionPerformed(ActionEvent e) {
        String actionCommand = e.getActionCommand();
        // Handle button events
        if (e.getSource() instanceof JButton) {
          if ("Add".equals(actionCommand))
            calculate('+');
          else if ("Subtract".equals(actionCommand))
            calculate('-');
          else if ("Multiply".equals(actionCommand))
            calculate('*');
          else if ("Divide".equals(actionCommand))
            calculate('/');
        else if (e.getSource() instanceof JMenuItem) {
          // Handle menu item events
          if ("Add".equals(actionCommand))
            calculate('+');
          else if ("Subtract".equals(actionCommand))
            calculate('-');
          else if ("Multiply".equals(actionCommand))
            calculate('*');
          else if ("Divide".equals(actionCommand))
            calculate('/');
          else if ("Close".equals(actionCommand))
            System.exit(0);
      /** Calculate and show the result in jtfResult */
      private void calculate(char operator) {
        // Obtain Number 1 and Number 2
        int num1 = (Integer.parseInt(jtfNum1.getText().trim()));
        int num2 = (Integer.parseInt(jtfNum2.getText().trim()));
        int result = 0;
        // Perform selected operation
        switch (operator) {
          case '+': result = num1 + num2;
                    break;
          case '-': result = num1 - num2;
                    break;
          case '*': result = num1 * num2;
                    break;
          case '/': result = num1 / num2;
        // Set result in jtfResult
        jtfResult.setText(String.valueOf(result));
    }

    Okay here is the fixed code... I commented the changes...
    basically I changed public void init() to public MortgageApplet() so that the section is a contructor not a method. ( since this class no longer extends Applet, public void init() becomes a method called "init" which has no relation to Applets' init method...)
    Then I move most of the variable declarations in the contructor ( formally the init() method ) and declared them as class variables... then initialized them in the construtor "MortgageApplet()"
    And now the second button works and you can see the MortgageApplet with textfields and buttons...
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.border.TitledBorder;
    class MortgageApplet extends JFrame implements ActionListener {
       // Made all these class variable, originally they were under public void init()
       private JTextField jtfAnnualInterestRate;
       private JTextField jtfNumOfYears;
       private JTextField jtfLoanAmount;
       private JTextField jtfMonthlyPayment;
       private JTextField jtfTotalPayment;
       private JButton jbtComputeMortgage;
       JPanel p1,p2;
       // end variable declaration
       public MortgageApplet() {    // originally was public void init() so it thought is was a method
                                    // now it is a contructor...
          jtfAnnualInterestRate = new JTextField();
          jtfNumOfYears = new JTextField();
          jtfLoanAmount = new JTextField();
          jtfMonthlyPayment = new JTextField();
          jtfTotalPayment = new JTextField();
          jbtComputeMortgage = new JButton("Compute Mortgage");
          jtfMonthlyPayment.setEditable(false);
          jtfTotalPayment.setEditable(false);
          jtfAnnualInterestRate.setHorizontalAlignment(JTextField.RIGHT);
          jtfNumOfYears.setHorizontalAlignment(JTextField.RIGHT);
          jtfLoanAmount.setHorizontalAlignment(JTextField.RIGHT);
          jtfMonthlyPayment.setHorizontalAlignment(JTextField.RIGHT);
          jtfTotalPayment.setHorizontalAlignment(JTextField.RIGHT);
          // JPanel p1 and p2 declared as class variables
          p1 = new JPanel();
          p1.setLayout(new GridLayout(5, 2));
          p1.add(new Label("Annual Interest Rate"));
          p1.add(jtfAnnualInterestRate);
          p1.add(new Label("Number of Years"));
          p1.add(jtfNumOfYears);
          p1.add(new Label("Loan Amount"));
          p1.add(jtfLoanAmount);
          p1.add(new Label("Monthly Payment"));
          p1.add(jtfMonthlyPayment);
          p1.add(new Label("Total Payment"));
          p1.add(jtfTotalPayment);
          p1.setBorder(new TitledBorder("Enter interest rate, year and loan amount"));
          p2 = new JPanel();
          p2.setLayout(new FlowLayout(FlowLayout.RIGHT));
          p2.add(jbtComputeMortgage);
          getContentPane().add(p1, BorderLayout.CENTER);
          getContentPane().add(p2, BorderLayout.SOUTH);
          setVisible(true);  // added this also...
          /* the rest is the same - MaxxDmg...*/
          // Register listener
       jbtComputeMortgage.addActionListener(this);  }
       /** Handle the "Compute Mortgage" button */
       public void actionPerformed(ActionEvent e) {
          if (e.getSource() == jbtComputeMortgage) {
             // Get values from text fields
             double interest = (Double.valueOf(
             jtfAnnualInterestRate.getText())).doubleValue();
             int year =(Integer.valueOf(jtfNumOfYears.getText())).intValue();
             double loan =(Double.valueOf(jtfLoanAmount.getText())).doubleValue();
             // Create a mortgage object
             Mortgage m = new Mortgage(interest, year, loan);
             // Display monthly payment and total payment
             jtfMonthlyPayment.setText(String.valueOf(m.monthlyPayment()));
             jtfTotalPayment.setText(String.valueOf(m.totalPayment()));
    }Have fun...
    - MaxxDmg...
    - ' No Side '

  • Help needed for building report with execution method Java Concurrent prog

    Hi,
    I have saw a report like this:
    The report has executable "XML Publisher Data Template Executable", short name as "XDODTEXE", application "XML Publisher",execution method "Java Concurrent program". Also the report has a XML publisher Data Template and Data definition and in the data definition a .xml file is attached.
    I could not understand what is the data source?
    Could anyone help me on how to build or update this type of report?
    Is there any link or help docs which has proper step by step procedure to build this type of xml publisher report?
    Please help.
    Thanks.

    The xml file which is attached to the data definition is the data source and it has sql queries and structure of xml file.
    Check this out for step-by-step guidance.
    http://www.oracle.com/technetwork/middleware/bi-publisher/overview/xmlebsrep-132947.pdf
    http://apps2fusion.com/at/ps/51-prabhakar/262-xml-publisher-and-data-template-sql-query-to-develop-bi-publisher-reports
    For more on data templates refer user guide
    http://download.oracle.com/docs/cd/E10415_01/doc/bi.1013/e12187/T421739T434255.htm

  • Help needed in building a  sql query

    Hello,
    I am using Oracle 10g db.
    I have 3 tables table1 and table2 and table3
    I am writing one sql query which is like
    select table1.a a1,(select distinct b from table2,table3 where table2.id=table3.id and table1.id=table2.id) b1
    from table1
    Now the b1 value may give more then 1 values so when i am trying to execute the query its giving me error.
    What i would like to have is if it gives returns more then 1 value then add that value as a new column means if b1 gives like abc and def as values.
    Then i want the sql to return like
    acolvalue abc def as a single row.
    Is this possible to do?
    Thanks

    Hello,
    The approach which i took is i wrote a function which gives me the b values , sseparated.
    Then i am building a outer query considering the max of b so i just found there are max 10 values which one row is showing.
    select b11,b12,b13,,,b10
    from (
    select table1.a a1,func(select distinct b from table2,table3 where table2.id=table3.id and table1.id=table2.id) b1
    from table1)
    but now i am facing problem like the value of b1 is a,b,c
    i want to use the substr and instr function to get
    a as b11
    b as b12
    c as b13
    can anyone pls help me out to write a query? i am getting b11 but other values are somehow not coming.
    for b11
    i used
    substr(b1,1,instr(b1,',',1,1)-1)
    Thanks

  • Help Needed...Oracle Apps Inventory

    Hi,
    I am new to this forum. My email id is [email protected]
    I need some help in inventory module
    1)Mult-org
    2)Item Setup
    3)All inventory Setups.
    Can you guide be so that I could be knowledgable in this module.
    Thanks in advance,
    sandra

    Inventory is an item referential and it also allows stock replenishment.
    There is no ‘standard’ flow for using Inventory.
    You will find all setup instructions in document that Vinod Subramanian sent to you. I mean : Organization definition, Item definition, Subinventory definition, Stock definition …
    Basic steps for item creation :
    -     check the pre-requisites (organization must be defined …). You must have at least one master organization (it is your item referential). Item type must exist. You have to define at which level (Master or Organization ) item attributes are defined …
    -     Then you create your item in the Master organization.
    -     After that, you can assign item to one or several organization
    Then, Inventory management depends on the business of your company : do you manage stored items or not; if yes, how do you manage replenishment ? ….
    If you need more help, please ask precise questions and you will get all information you need.

Maybe you are looking for