Midlet Application : opening new form

Hello,
I want to create a midlet aplication. I am using Sun's wireless toolkit. in the application, the user is presented. with the uname and psswd textbox. on successful login, after displaying the alert, I want to show another form, where the user can input some data, and then saves the form. How can display some different form from this midlet app. suggest please. below is my code.
the function doLogin verifies the user authentication.
import javax.microedition.midlet.MIDlet;
import javax.microedition.lcdui.*;
public class UserLogin extends MIDlet implements CommandListener
     private Display display;
     private TextField userName,password;
     public Form form;
     private Command login,cancel;
     private Image img, imge, img2;
     public UserLogin() {
          form = new Form("Sign in");
          userName = new TextField("LoginID:", "", 30, TextField.ANY);
          password = new TextField("Password:", "", 30, TextField.PASSWORD);
          cancel = new Command("Cancel", Command.CANCEL, 2);
          login = new Command("Login", Command.OK, 2);
          try{
               img = Image.createImage("/logo.png");
               imge = Image.createImage("/front_left1_bad.png");
               img2 = Image.createImage("/Congratulations-1.png");
          }catch(Exception e){
               System.out.println(e.getMessage());
     public void startApp() {
          display = Display.getDisplay(this);
          try{form.append(img);}catch(Exception e){}
          form.append(userName);
          form.append(password);
          form.addCommand(cancel);
          form.addCommand(login);
          form.setCommandListener(this);
          display.setCurrent(form);
     public void pauseApp() {}
     public void destroyApp(boolean unconditional) {
          notifyDestroyed();
     public void validateUser(String name, String password)
          String result = DoLogin.doLogin(name,password);
          System.out.println("THE RESULT IS:"+result);
          if(result.equals("T"))
               showMsg();
          else if(result.equals("F"))
               tryAgain();
     public void showMsg() {
          Alert success = new Alert("Login Successfully", "Your Login Process is completed!", img2, AlertType.INFO);
          success.setImage(img2);
          userName.setString("");
          password.setString("");
          display.setCurrent(success, form);          
     public void tryAgain() {
          Alert error = new Alert("Login Incorrect", "Please try again", imge, AlertType.ERROR);
          error.setTimeout(900);
          error.setImage(imge);
          userName.setString("");
          password.setString("");
          display.setCurrent(error, form);
     public void commandAction(Command c, Displayable d) {
          String label = c.getLabel();
          if(label.equals("Cancel")) {
               destroyApp(true);
          } else if(label.equals("Login")) {
               validateUser(userName.getString(), password.getString());
}

Hello,
First of all thanks for the reply. Is there any IDE to write the midlet application which like highlights the keywords and shows format etc. I am using wordpad and Sun's WTK, as I am new to midlet development its a bit hard to find the mistakes using those.
Once again, If in a form I want to generate variable number of textboxes based on a database reply How should I do it, I did the following but it didnt work. It didn't also added the command buttons to the new screen. I bolded the part didnt work in my code.
public void showMsg() {
          Alert success = new Alert("Login Successfully", "Your Login Process is completed!", img2, AlertType.INFO);
          success.setImage(img2);
          addCform = new Form("Add Concern");
          userName.setString("");
          password.setString("");
          display.setCurrent(success,  addCform);
          title = new TextField("Title:", "", 10, TextField.ANY);
          desc = new TextField("Description:", "", 30, TextField.ANY);
          addCform.append(title);
          addCform.append(desc);
          *cancelC = new Command("Cancel", Command.CANCEL, 2);*
*          save = new Command("Save", Command.OK, 2);*
*          form.addCommand(cancelC);*
*          form.addCommand(save);*
          *for(int i=0;i<5;i++)*
*               txtbox= new TextField("Text","",10,TextField.ANY);*
*               addCform.append(txtbox[i]);*

Similar Messages

  • Tree Node - Open new FORM

    Dear all.
    How can i open new FORM, when i double click at (tree) node.
    Best Regards
    node
    |__node1
    |__node11 <-- double click and open new FORM
    |__node12
    |__node2
    |__node21
    Message was edited by:
    First_Step

    Whe-tree-node-activated trigger
    declare
         pl_id paramlist;
         value1 varchar2(100) ;
    begin
    -- Checks whether the trigger node is a leaf not or not if yes
    -- Call the Corresponding form else do nothing
    if (Ftree.Get_Tree_Node_Property('tree_block.tree1', :SYSTEM.TRIGGER_NODE, Ftree.NODE_STATE)= 0) THEN
    --CREATE PARAM LIST FOR CALL_FORM     
         pl_id:=get_parameter_list('userparam');
    if(id_null(pl_id)) then
         pl_id:=create_parameter_list('userparam');
    else
    destroy_parameter_list(pl_id);
         pl_id:=create_parameter_list('userparam');
    end if;
    --ADD NEEDED PARAMETERS
    add_parameter(pl_id,'user_name',text_parameter,:parameter.user_name);
    --HERE NODE VALUE IS FORM NAME
    value1:=Ftree.get_tree_node_property('tree_block.tree1',     :system.trigger_node,ftree.node_value);
    call_form(value1,hide,no_replace,no_query_only,pl_id);
    END IF;
    end;
    jeneesh

  • Error opening new form via Call_form

    I wrote a forms that captures error code from the calling forms and shows message_text, cause and action for that error.
    When calling form causes a ORA-00054 error (lock record), I cannot call the form that displays because focus is not passed to called form.
    What can I do? I need to call this form to show message_text, cause and action.

    Hi Archana,
    There are many ways to pass values between forms.
    1. You define a global variable before issuing a call/open/new form and use the value in the called/opened form.
    2. Create a database package spec and define variables there. Use them to set values and read from other forms.
    3. Create a parameter list and pass the list to the call/open/new form built-in and read from there.
    If you explain your usecase more, we can suggest you a good way to implement it.
    -Arun

  • Opening new form

    Hi,
    After opening new form in separete module,
    I want to pass the values of one form to another form , through a global variable.
    Help me.
    Archana V.
    Edited by: Archana V on Dec 28, 2009 10:11 AM

    Hi Archana,
    There are many ways to pass values between forms.
    1. You define a global variable before issuing a call/open/new form and use the value in the called/opened form.
    2. Create a database package spec and define variables there. Use them to set values and read from other forms.
    3. Create a parameter list and pass the list to the call/open/new form built-in and read from there.
    If you explain your usecase more, we can suggest you a good way to implement it.
    -Arun

  • How to open new form with set value

    I have two forms CLIENT and ORDERS who are connected by "client_id" in a one to many relationship [one client can have many orders]. What code to I put in the button so that that when I click on it from the CLIENT table, it goes to the ORDERS form with just the orders that match that "client_id"? The application is in oracle 9i developer using swing.
    Here's what I have so far, code to open the form without the binding
    //Open Order Form
    FormIcdClientApplicationView frameTarget = new FormOrderApplicationView(getPanelBinding());
    frameTarget.setVisible(true);
    // Close this window
    this.setVisible(false);

    Hello,
    This is the Forms forum. I am sure you will have more chance to get answer in the JDeveloper forum.
    FRancois

  • Clonned server did not open new form after login

    Hi experts,
    After login sucessfuly, when click any form, it did not open any new form and not return any form. Can you please
    help me in this case.
    Thanks

    Please check whether you have any errors in the database log file or not.
    I could not find any error regarding the issue. Please give me step by step if you can assist to sort out
    the issue. I have no much experience regarding such issue. So I need more clearance and step by step instructions.Please rename Apache log files, restart the services, then reproduce the issue and check the log files.
    Also, please check if you have any errors in Jinitiator/JRE console window.
    Thanks,
    Hussein

  • Getting FRM-40010 Error While opening new form  .fmx

    Hi,
    Oracle apps : 11.5.10.2
    Forms : Forms 6.0
    I'm creating a custom form by using one oracle apps table.I created a basic form by using template.fmb and then saved it to directory "/dir1" and run this form by connecting to oracle apps database.
    When I try to open .fmx from this directory ('/dir1') I'm getting FRM-40010 error.When I checked FORM60_PATH = It's showing /u01...../au/11.5.0/resource.I don't see "/dir1" in that path?
    Do I need to modify forms60_path ?
    Do I need to register this form before running as it's using table from Oracle apps schema?
    Thanks,
    Kiran

    When I try to open .fmx from this directory ('/dir1') I'm getting FRM-40010 error.When I checked FORM60_PATH = It's showing /u01...../au/11.5.0/resource.I don't see "/dir1" in that path?You need to set FORMS60_PATH and include /dir1 in this path.
    https://forums.oracle.com/forums/search.jspa?threadID=&q=FRM-40010+&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    Do I need to modify forms60_path ?Yes.
    $ export FORMS60_PATH=$FORMS60_PATH:/dir1
    Do I need to register this form before running as it's using table from Oracle apps schema?Yes.
    https://forums.oracle.com/forums/search.jspa?threadID=&q=Register+AND+Custom+AND+Form&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    https://forums.oracle.com/forums/search.jspa?threadID=&q=Custom+AND+Form&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    Thanks,
    Hussein

  • How to open new form and exit from the calling form on dual/multi language?

    using form 10g 10.1.2.0.2.
    i have dual language application 1 english & 1 arabic and i created forms identically each respectedly to call and switch every forms when user choose any language it uses.
    say im in currently in english. how we can call the arabic module and exit totally in english module , vice versa?
    also the form system messages. how we can switch it between two language?

    NEW_FORM() will totally replace the calling module.
    Francois

  • Opening new forms using jbutton

    Hi i'm new to java, and i am currentley building an interface which has three buttons(cars,vans,red car). I have managed to create a class that opens a new window when the car button is clicked. However i am unsure of how to create different windows for when the other buttons are clicked.
    Heres my code ive based it on an example i found on here.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.awt.*;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    import javax.swing.JTable;
    import java.awt.Dimension;
    import java.awt.GridLayout;
    public class Interface extends JPanel implements ActionListener {
    JDialog dialog;
    public Interface(JFrame f)
    dialog = new JDialog(f, "dialog");
    dialog.getContentPane().add(new JLabel("hello world", JLabel.CENTER));
    dialog.setSize(400,300);
    dialog.setLocation(425,200);
    public void actionPerformed(ActionEvent e)
    if(!dialog.isVisible())
    dialog.setVisible(true);
    else
    dialog.toFront();
    public JPanel getPanel()
    JPanel panel = new JPanel();
    JPanel selectPanel = new JPanel();
    JPanel ControlPanel = new JPanel();
    selectPanel.setBorder(BorderFactory.createCompoundBorder(
    BorderFactory.createTitledBorder("Select Piece Type:"),
    BorderFactory.createEmptyBorder(5,5,5,5)));
    JButton cars = new JButton("Cars");
    cars.addActionListener(this);
    JButton vans = new JButton("Vans");
    JButton redcar = new JButton("Red Car");
    selectPanel.add(cars);
    selectPanel.add(vans);
    selectPanel.add(redcar);
    panel.add(selectPanel);
    return panel;
    public static void main(String[] args)
    JFrame f = new JFrame();
    Interface ae = new Interface(f);
    f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    f.getContentPane().add(ae.getPanel(), "North");
    f.setSize(400,200);
    f.setLocation(200,200);
    f.setVisible(true);
    Thanks for any help

    Thanks for the reply, i am now having trouble adding buttons to the dialog box. This is the code i am using:
    dialog = new JDialog(f, "dialog");
            dialog.getContentPane().add(new JLabel("hello world", JLabel.CENTER));
            dialog.setSize(400,300);
            dialog.setLocation(425,200);
            JButton buttonQuestion = new JButton( "Question" );
            dialog.getContentPane().add(buttonQuestion);For some reasson this turns the whole dialog pane into a button. So all i get is a dialog box with question in the middle. What i need is the hello world label to be displayed, with the questin button underneath
    Thanks for any help

  • New form opens up in back of Menu Form in Web Deployed Form

    Hi,
    I am having trouble with my web-deployed form. I have one form that has toolbars and after selecting from the menu for another form to open up, the new form opens up in back of the previous form and I'd have to minimize the previous form in order for new form to be active. Is there any way that I can have the new form open up above the previous form? Also, do you know any good sites where I can get tips on web-deployed forms.
    Thanks,
    Kristine

    Kristine,
    what code are you using to open new forms (call_form, open_form, new_form).
    I have a similar application (custom login module and custom menu), and I run my modules from the menu using
    call_form(<module_name>,HIDE,DO_REPLACE);
    This hides the custom login module and displays the called module.
    Hope this helps
    Gerald Krieger

  • Opening a new form from a button places it behind the calling form.

    From the sales order form clicking a schedule button opens up a new non modal window . On this window I need to add a new button to open a new form(SOO.fmb) .
    I tried using the FND_FORM.EXECUTE function, the new form opens but it is positioned behind the sales order form. I tried using call_form , even this positions the new form behind the sales order form.
    How do I open the new form as the active form ?
    thanks
    satya

    Please clarify what you are talking about. Is this an Oracle Applications (i.e. E-Business) form or is this a form/application you created? What product versions are you using? Do not provide product names like 10g, 11g, etc. Please provide product versions.
    That said, if you are opening new form or browsers using WEB.SHOW_DOCUMENT, there is a known Sun bug which causes this problem when using the Sun JRE 1.6.0_xx. This issue can be worked around by disabling the JRE setting "Enable the next generation Java Plugin...". This setting is found on the Advanced tab of the JRE Control Panel under "Java Plugin". This bug is expected to be fixed in Sun 1.6.0_18. This version is not available to the public at this time.

  • Open a form from a 3rd party Java/Web based application

    Hi All,
    I am working for a client who has a 3rd party web application built in Java.
    For one of his requirements, he wants to open a form, an apps standard form on the click of a button/url in their application.
    This appears like a normal form opening from the single-signon screen where you have the self service single sign-on page, it opens the apps forms on click of the url. Can we use the same logic here? This being the case, just curious to know how is the url to open the form built? (I see that the function name, resp id etc are there in the url) So that, I can actually manipulate the url to open the forms from a url. Please see that the custom application also is included into our Oracle apps, so the user is already logged in. We just need to open the form from the click of a url/button.
    Thanks,
    Srini.
    Thanks,
    Srini.

    If the ICX_SESSION is already available then the form(I am assuming you are refering to a web based form here) should open directly if the function should be accessible to the user logged in. When you say your custom application is included in Oracle apps are you launching these pages from the Ebiz home page through menus and functions ?

  • After upgrading iPad 2 to iOS 7 , cannot open new tabs in safari . When pushing on " " , Safari close the application .

    After upgrading iPad 2 to iOS 7 , cannot open new tabs in safari . When pushing on " " , Safari close the application .

    Try a Restart. 
    Press and hold the Sleep/Wake button for a few seconds until the red "slide to power off" slider appears, and then slide the slider. Press and hold the Sleep/Wake button until the Apple logo appears.
     Resetting your settings
    You can also try resetting all settings. Settings>General>Reset>Reset All Settings. You will have to enter all of your device settings again.... All of the settings in the settings app will have to be re-entered. You won't lose any data, but it takes time to enter all of the settings again.
    Resetting your device
    Press and hold the Sleep/Wake button and the Home button together for at least ten seconds, until the Apple logo appears. Apple recommends this only if you are unable to restart it.
    Or if this doesn't work and nobody else on the blog doesn't have a better idea you can contact Apple. 
    Here is a link to their contacts with most of the information below. 
    http://www.apple.com/contact/

  • "This form cannot be opened in a web browser. to open this form use microsoft infopath" while adding a new Approval - Sharepoint 2010 and Publishing Approval workflow.

    I am trying to add a new workflow to a document library with the below mentioned settings and getting error saying "This form cannot be opened in a web browser. to open this form use microsoft infopath" while adding a new Approval - Sharepoint
    2010 and  Publishing Approval workflow" . For your information the I have checked the server default option to open in browser.
    Versioning Settings.
    Error
    This is quiet urgent issue . Any help would be really helpful.. Thanks.. 

    Hi Marlene,
    Thank you very much for your suggestions.
    But I am not creating a custom workflow in designer as Laura has mentioned. I am instead trying to create a new Out of the box Approval Workflow and I get the error mentioned above.
    As it works in other environment, I tried figuring out the possible differences which can lead to this error.
    Today I found one difference which is there are no form Templates within Infopath Configurations in Central Admin. Now I am trying to figure out what makes this form templates to be added to the template gallery.
    Regards,
    Vineeth

  • Opening a form in a new window issue

    Hi..
    I have this requirement where I have this page(say XYZPG.xml) which contains a table which is auto populated based on a particular setWhereClause and all this happens in the processRequest as the page loads.
    This page opens on clicking a button in a previous page from where all the parameters for the setWhereClause is sent using fireAction.
    Each Row in the results table in XYZPG has a "detail" button which opens another page in a new window using _blank in the Target Frame.
    The issue is that when Iam clicking the "detail" button,the new form opens in the new window and after closing the form that opened in the new window when I start to perform any action in XYZPG a null pointer is encountered in the processRequest while trying to fetch the setWhereClause parameters.
    Please help in this issue.Its urgent.
    Thanks

    That's because when you close the child window, control returns back to parent form's processRequest. Which version of EBS you are working on? OAF has in-built popup windows feature supported on latest EBS versions which is very useful on many occasions as it has good features like popup closing automatically when a submit button is clicked etc. Check JDev user guide and see if you can use popup windows for your project. If not, you have to capture the event in processRequest and perform required actions again.
    Thanks
    Shree

Maybe you are looking for

  • % of calculation in GRAND TOTAL in PIVOT TABLE

    Hi Gurus, I have a requirement to calculate the percentage based on the grand total in pivot table,but in row wise i am getting the percentage while in grand total level i am not getting correct values.I have tried with all the options like:average,S

  • Every time that I try to print a page from the internet, my Mac crashes and I get a "Crash Reporter" icon.  Any suggestions?

    Every time that I try to print a page from the internet, My Mac (Maverick 10.9.4) crashes and I see a "Crash Reporter" icon.  Any suggestions?

  • Crystal Report Embedded server 2008

    Hi SAP, I have reports created in Crystal reports 2008 sp1 designer. Reports are created using stored procedures.Reports are called through .net application and placed at Crystal Report Embedded server 2008.If Reports  are at local machine they work

  • Copy & Paste UML?

    Hi--I'm trying to Copy elements (lifelines, arrows, etc.) from one sequence diagram and Paste them to another. However, the Copy and Paste menu items are never enabled. Is it possible to Cut & Paste UML? If so, then please tell me how! Thanks in adva

  • Field level Authorization for IT0002

    Hi All, We have a requirement to control the authorization for the field NI Number/Social Security number from IT0002. This field is getting displayed in various standard reports which are in use by administrators/Managers etc.... We want to disable