Demo application with code: please

Hi all
does anyone have demo application with code in JSF, please.

Hi,
You'll find it in ..jsf-1_1\samples.
The guess number application is simple and may help you.
Regards.
Cedric

Similar Messages

  • Combo box and Check box..help with code please?

    Here is my problem...i have a list of check boxes and according to which one is checked, i need combo boxes to populate different choices.
    as an easy example im only using 2 check boxes and two combo boxes.
    the check boxes are named Choice 1or2 with export values of 1 and 2
    the Combo Boxes are named List A and List B..
    both containing options that say you checked box 1 and you checked box 2
    any help would be greatly appreciated

    Implode wrote:
    "Help with code please."
    In the future, please use a meaningful subject. Given that you're posting here, it's kind of a given that you're looking for help with the code. The whole point of the subject is to give people a high level idea of what KIND of help with what KIND of code you need, so they can decide if they're interested and qualified to help.
    Exception in thread "main" java.lang.NumberFormatException: For input string: "fgg"
         at java.lang.NumberFormatException.forInputString(Unknown Source)
         at java.lang.Integer.parseInt(Unknown Source)
         at java.lang.Integer.parseInt(Unknown Source)
         at assignment1.Game.Start(Game.java:120)
         at assignment1.RunGame.main(RunGame.java:18)This error message is telling you exactly what's wrong. At line 120 of Game.java, in the Start method (which should start with lowercase "s" to follow conventions, by the way), you're calling Integer.parseInt, but "fgg" is not a valid int.

  • Demo applications with BC4J and JClient

    Are there any demo applications with BC4J and JClient, which go beyond the one frame samples, tutorials and how to's?
    This would deliver a better insight to develop a complete application.
    Bye
    Holger

    Thanks,
    the Virtual Shopping Mall sample is quite not I have searched for, because it is primarily an Web application and I am searching for an JClient application without Application Server, but it is a beginning.
    Bye
    Holger

  • Where to get demo applications source code

    Hi,
    where can I get the source code of these applications:
    SAPUI5 SDK - Demo Kit
    I know somewhere is possible to download whole SDK (I really need SAPUI5 1.20 version, not 1.16.3, or openUI) but I really can find it...
    Many thanks Jiri

    PLease check here to download SAP UI5 1.20 version
    OpenUI5 - Download
    OpenUI5 Blog - New OpenUI5 version 1.20 released!

  • Borderless Window help with code please!

    I am using Dreamweaver MX 2004.
    I just cannot get my head round this Java code and would really appreciate some help or direction!
    I want to make a nice little window to show a few lines of text, with a close button or X in the corner (not fussed). I have looked at lots of tutorials and produced numerous codes to use.
    OK, fine I get that bit. My problem comes with placing the codes in the right places. I paste the HEAD portion in the head of the doc. The BODY in the body. BUT is this the doc I am going to call up with my few lines of text in, or the doc I am going to call from? Get what I mean? Also I want to call from a link and haven't had much luck with the line of code I put in the link box. I have tried lots ways and have just managed to confuse myself.
    I am not asking for someone to do it for me and believe me I have tried to work this out for myself but it's not happening for me. Please can someone explain this to me in very plain English as I am obviously some sort of delinquent!
    Thank you

    Yes I am using HTML and Javascript. So Java and Javascript are not the same thing? Right ,OK ,well that has taught me something. Don't suppose you can help me with script on this forum then. Sorry!

  • Some Help with Code please?

    Hi, Basicly i hope someone can help me with a small issue. Im
    new to flash.
    I found code which uses a switchboard to switch between a
    broadcast to the swf player or client side.
    I want to to have a single connection button(at broadcaster
    side) that will cut the switcher and enable the broadcaster to
    connect directly to the client.
    Im not sure what exactly to change or add inthe current mains
    code.
    Please help. Thanks.
    (the switcher has only one button[cut_btn] that switches a
    stream in embedded video [prev_video] which is activated when a
    broadcaster USERID is selected from a datagrid[broadcasterList_dg])
    I want a single connect button in the broadcaster which will
    do what the switch button does but cut out the clicking of a
    datagrid and previewing basicly cut off the switcher
    altogether.

    Doesnt matter ive figured it out.

  • Problem with code-Please Help!!!

    Hey guys i have some problems with the following code:
    1. I have to do a stutter and reverse of an array [ 2 4 ] and it should return [ 4 4 2 2 ]. I wrote the code and i get [ 2 2 4 4]. How can this be fixed?
    public class Part1
         public static void main(String[] args)
              int[] values = {2, 4};     
              stutterAndReverse(values);
         public static int[] stutterAndReverse(int[] values)
              //Stutter
              System.out.print("[ ");
              for (int i = 0; i < values.length; i++)
                   for(int j = values.length-1; j >=0; j--)
                        System.out.print(values[i] + " ");
              System.out.print("] ");
              return values;
    2. This one takes the array and returns the even numbers to the left and odds to the right. It works with the code i have so far but the odds on the right should be in order. For example an array of 6 gives the output [2, 4, 6, 5, 3, 1]. Mine gives [2, 4, 6, 1, 5, 3]. How can i fix this???
    public class Part2
         public static void main(String[] args)
              int[] arr = new int[6];
              for(int i = 0; i < arr.length; i++)
              arr[i] = i + 1 ;
              printArray(arr);
              arr = evensToLeft(arr);
              //arr = oddsToRight(arr);
              System.out.println("Evens to the Left");
              printArray(arr);               
         public static void printArray(int[] arr)
              System.out.print("[");
              for(int i = 0; i < arr.length; i++)
                   System.out.print(arr);
                   if(i < arr.length-1)
                   System.out.print(", ");
                   System.out.println("]");
         public static int[] makeArray(int n)
              int[] arr = new int[6];
              return arr;          
         public static int[] evensToLeft(int[] arr)
              int split = 0;
              for(int i = 0; i < arr.length; i++)
                   if(arr[i]%2==0) //even
                        swap(arr,i,split);
                        split++;
                   return arr;
         public static void swap(int[] arr, int n1, int n2)
              int temp = arr[n1];
              arr[n1] = arr[n2];
              arr[n2] = temp;
    Thank you for your time i really appreciate it.

    now i'm more confused than ever...:(This'll probably make it worse :)
    class Testing
      public Testing()
        String[] values1 = {"2","4"};
        System.out.println(java.util.Arrays.asList(values1));
        System.out.println(java.util.Arrays.asList(stutterAndReverse(values1)));
        String[] values2 = {"1","2","3","4","5","6","7","9","11"};
        System.out.println(java.util.Arrays.asList(values2));
        System.out.println(java.util.Arrays.asList(evensOdds(values2)));
      public String[] stutterAndReverse(String[] arr)
        String[] temp = new String[arr.length * 2];
        for(int x = 0; x < temp.length; x++)
          temp[temp.length - 1 -x] = arr[x/2];
        return temp;
      public String[] evensOdds(String[] arr)
        StringBuffer evens = new StringBuffer();
        StringBuffer odds = new StringBuffer();
        for(int x = 0; x < arr.length; x++)
          if(Integer.parseInt(arr[x]) % 2 == 0) evens.append(","+arr[x]);
          else odds.insert(0,","+arr[x]);
        return (evens.toString().substring(1)+odds.toString()).split(",");
      public static void main(String[] args){new Testing();}
    }

  • Newbie - HELP WITH CODE PLEASE!

    Hi guys,
    I have recently started using flash as some of the guys i work with suggested that it would be useful...
    I am currently designing a basic site in AS3 and am stuck with a bit of coding. I keep getting the error message:
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
        at new_web_v1_fla::MainTimeline/frame141()
    and having searched the net i cant find a solution. Here's my code:
    stop();
    function gohome(e:MouseEvent):void {
        gotoAndStop("home");
    back_btn1.addEventListener(MouseEvent.CLICK, gohome);
    function goit(e:MouseEvent):void {
        gotoAndStop("it");
    it_btn.addEventListener(MouseEvent.CLICK, goit);
    next_btn1.addEventListener(MouseEvent.CLICK, goit);
    back_btn2.addEventListener(MouseEvent.CLICK, goit);
    function goom(e:MouseEvent):void {
        gotoAndStop("om");
    om_btn.addEventListener(MouseEvent.CLICK, goom);
    next_btn2.addEventListener(MouseEvent.CLICK, goom);
    back_btn3.addEventListener(MouseEvent.CLICK, goom);
    function gogd(e:MouseEvent):void {
        gotoAndStop("gd");
    gd_btn.addEventListener(MouseEvent.CLICK, gogd);
    next_btn3.addEventListener(MouseEvent.CLICK, gogd);
    back_btn4.addEventListener(MouseEvent.CLICK, gogd);
    function gocu(e:MouseEvent):void {
        gotoAndStop("cu");
    cu_btn.addEventListener(MouseEvent.CLICK, gocu);
    next_btn4.addEventListener(MouseEvent.CLICK, gocu);
    I hope someone can help me out!
    Thanks
    Jon

    Thanks again for the advice, following your instructions i did use the // infornt of various bits of script.
    My AS now looks like this and the buttons that have the as left in the script without // before them work fine, no errors:
    stop();
    function gohome(e:MouseEvent):void {
        gotoAndStop("home");
    //back_btn1.addEventListener(MouseEvent.CLICK, gohome);
    function goit(e:MouseEvent):void {
        gotoAndStop("it");
    it_btn.addEventListener(MouseEvent.CLICK, goit);
    next_btn1.addEventListener(MouseEvent.CLICK, goit);
    //back_btn2.addEventListener(MouseEvent.CLICK, goit);
    function goom(e:MouseEvent):void {
        gotoAndStop("om");
    om_btn.addEventListener(MouseEvent.CLICK, goom);
    //next_btn2.addEventListener(MouseEvent.CLICK, goom);
    //back_btn3.addEventListener(MouseEvent.CLICK, goom);
    function gogd(e:MouseEvent):void {
        gotoAndStop("gd");
    gd_btn.addEventListener(MouseEvent.CLICK, gogd);
    //next_btn3.addEventListener(MouseEvent.CLICK, gogd);
    //back_btn4.addEventListener(MouseEvent.CLICK, gogd);
    function gocu(e:MouseEvent):void {
        gotoAndStop("cu");
    cu_btn.addEventListener(MouseEvent.CLICK, gocu);
    //next_btn4.addEventListener(MouseEvent.CLICK, gocu);
    the question now is how do i get my other buttons back into the script and get the bloody thing to work?
    ARRRGGGHHH! i am beginning to wish that i had never started! lol
    Thanks
    Jon

  • Help with code please

    Hi, I am new to Java and am trying to write a program for a class, but I can't seem to get it to work correctly.
    The program is supposed to ask you to enter "A,B,C, or Q" and be case sensitive. If you enter A,B,C you get a message, if you enter Q it quits the program and if you enter anything else you are supposed to get an error message. It is supposed to keep looping the program until the user enters Q. We are supposed to use Do--While and If-Else loops.
    Thanks in advance
    Code Below that I am using (it at least compiles :) )
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class abcprogram
    public static void main(String[] args)
    String grade;
    grade = JOptionPane.showInputDialog("Please enter A, B, C, or Q. Program is case sensitive");
    do
    if (grade.equals("A"))
    JOptionPane.showInputDialog("Good Work");
    else if (grade.equals("B"))
    JOptionPane.showInputDialog("Try Harder");
    else if (grade.equals("C"))
    JOptionPane.showInputDialog("Did you study?");
    else if (grade.equals("Q"))
    System.exit(0);
    else
    JOptionPane.showInputDialog("You entered a wrong letter!");
    }while (grade != "Q");
    }

    One other thing: the while condidtion should read
    while (!grade.equals("Q"))
    Try it like this;-import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class abc {
    public static void main(String[] args){
    String grade, enter;
    grade = JOptionPane.showInputDialog
    ("Please enter A, B, C, or Q. The program
    he program is case sensitive");
    do {     
    if (grade.equals("A")) grade =
    )) grade = JOptionPane.showInputDialog
    ("Good Work.
    ("Good Work. (Enter Q to
    ("Good Work. (Enter Q to quit)");
    else if (grade.equals("B")) grade =
    )) grade = JOptionPane.showInputDialog
    ("Try
    ("Try Harder.
    ("Try Harder. (enter Q to
    ("Try Harder. (enter Q to quit)");
    else if (grade.equals("C")) grade =
    )) grade = JOptionPane.showInputDialog
    ("Did
    ("Did you
    ("Did you study? (Enter
    ("Did you study? (Enter Q to quit)");
    else if (grade.equals("Q"))
    uals("Q")) System.exit(0);
    else JOptionPane.showInputDialog("You
    ialog("You entered a wrong letter!");
    while (grade != "Q");}

  • Help with code please, it wont run

    Hi all can anyone tell me why this wont run please, thanks
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    class SwingApplication extends JFrame
    public SwingApplication()
    setDefaultCloseOperation(EXIT_ON_CLOSE);
    setLocation(300,200);
    setSize(700,600);
    JButton answerButton = new JButton("Answer");
    JButton submit = new JButton("Submit");
    JButton button = new JButton("Next Question");
    JButton NextRecord = new JButton("Next Record");
    JTextField answerText = new JTextField("");
    JTextArea QuestionArea = new JTextArea("QuestionArea");
    JPanel pane = new JPanel();
    JLabel label1 = new JLabel ("Answer the following question");
    JLabel mouseLabel = new JLabel();
    JLabel lblpic1 = new JLabel();
         lblpic1.setIcon(new ImageIcon("couple.jpg") );
    submit.setToolTipText("Click to get solution");
    pane.add(label1);
    pane.add(button);
    pane.add(answerText);
    pane.add(answerButton);
    pane.add(submit);
    pane.add(NextRecord);
    getContentPane().add(pane,BorderLayout.SOUTH);
    getContentPane().add(label1,BorderLayout.NORTH);
    getContentPane().add(lblpic1,BorderLayout.CENTER);
    getContentPane().add(QuestionArea, BorderLayout.WEST);
    public void mouseMoved(MouseEvent e)
    mouseLabel.add("x = " + e.getX() + ", y = " + e.getY());
    public static void main(String[] args)
         new SwingApplication().setVisible(true);
    }

    this compiles, anyway:
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class SwingApplication extends JFrame
       JButton answerButton = new JButton("Answer");
       JButton submit = new JButton("Submit");
       JButton button = new JButton("Next Question");
       JButton NextRecord = new JButton("Next Record");
       JTextField answerText = new JTextField("");
       JTextArea QuestionArea = new JTextArea("QuestionArea");
       JPanel pane = new JPanel();
       JLabel label1 = new JLabel ("Answer the following question");
       JLabel mouseLabel = new JLabel();
       JLabel lblpic1 = new JLabel();
       public SwingApplication()
          setDefaultCloseOperation(EXIT_ON_CLOSE);
          setLocation(300,200);
          setSize(700,600);
          lblpic1.setIcon(new ImageIcon("couple.jpg") );
          submit.setToolTipText("Click to get solution");
          pane.add(label1);
          pane.add(button);
          pane.add(answerText);
          pane.add(answerButton);
          pane.add(submit);
          pane.add(NextRecord);
          getContentPane().add(pane,BorderLayout.SOUTH);
          getContentPane().add(label1,BorderLayout.NORTH);
          getContentPane().add(lblpic1,BorderLayout.CENTER);
          getContentPane().add(QuestionArea, BorderLayout.WEST);
       public void mouseMoved(MouseEvent e)
          mouseLabel.setText("x = " + e.getX() + ", y = " + e.getY());
       public static void main(String[] args)
          new SwingApplication().setVisible(true);
    }Learn about coding standards and styles. Yours is awful.
    %

  • File upload demo application in 2.0

    Hi!
    I implemented the file upload application from the demo applications with the standard table HTMLDB_APPLICATION_FILES. It works very fine. Thanks for sharing this code.
    BUT I was unable to implement a custom table, because I could not locate the insert-function (as described in the tutorial). It is no known process on any of my pages.
    Could you help me finding it?
    (And is a file always stored as blob, or could it be a clob as well?)
    My main motive for this question is to gain inside knowledge in building some crude filerepository. We receive plain-ascii-data files via ftp and I have to import their data into a table.
    I do not want to go through all this 'reading OS-directory with java, opening files as external tables, moving them with utl_file', if I simply could
    a) receive the file directly as a clob in my table
    b) get the necessary data with sql
    c) handle all archiving, file renaming directly by updating a table
    Beside application express's file upload (speaking only http), the is a XML repository which 'speaks' ftp and http.
    Does someone have experience with uploading non-xml files and storing them as clobs?
    Thanks,
    Michael

    Hello Michael,
    I believe the reference in the demo tutorial is to Insert process (not function). This is probably the process defined on page 8-6, step 4a of the "Create a process to insert information" section.
    Basically you can upload and store files in CLOB. For my self, I only did it with XML files, but I don't see any reason not to do it with other types of files.
    I think that in order to work with non-structured files (like ASCII) you should learn more about Oracle Text. Apex is also using this product. Search this forum for "oracle text" and continue from there.
    Hope this helps,
    Arie.

  • Interfacing SingleFrame Application with eventListener Thread

    How do I make a TextFrame created with the NetBeans GUI, respond to an event that takes place on another thread. Is there some way for that other thread to "push" an event onto the TextArea? Suppose I have serveral text areas and I want them to all update each time new data comes in over the port? How do I send an "Serial port has new data" message to them?
    Here is what I have done so far.
    I used netBeans to create a standard desktop application Single Frame application. I made a single frame with a textArea in it. I can make that the text in that area change in response to events on the GUI event queue corresponding to events that occur IN THAT FRAME.
    I can also use something like SimpleRead demo application (see code below) to make a SerialPortEvent LIstner thread that responds to events (such as data received) on a serial port by printing to the system out.
    I can even create a button on that frame that will poll the SerialPortEvent Listener thread, to see if there is data, and if so, put it in the textArea when the user clicks the button.
    But I can't get the display to update automatically when data is recieved.
    My first thought was to create a method in the NetBean autogenerated MyAppView class object which could be called from the SerialPortEventListener Thread.
      public void displaySerialData (String data) {
          jTextArea1.append(data);
      }And then from the event listener thread I would have something like
        public void serialEvent(SerialPortEvent event) {
         switch (event.getEventType()) {
         case SerialPortEvent.DATA_AVAILABLE:
             byte[] readBuffer = new byte[506];
             try {
              while (inputStream.available() > 0) {
                        int numBytes = inputStream.read(readBuffer,1,502);
                        displaySerialData(new String(readBuffer,0,1));           //  ERROR calling non-static method...
               } catch (IOException e) {}
      }But that doesn't work because displaySerialData is not static and I will get a compiler error about calling a non-static method from a static context. I do not understand why SerialEvent is considered to be a "static context". It is certainly not a static method (is it?).
    In any case, it seems like the problem would be similar if I had to frames open. Suppose doing something on one frame causes the other frame to need an update. How do I send that "general update" event?
    IMPORTANT: I can solve this problem easily enough just by making the myAppView class into the SerialPortEvent listener, and then including all the necessary code to initialize the port into that class. But that violates the "one task one class" princple of modular programming. And it doesn't solve the general problem of how to pass asynchronous data/events from one thread to another.
    Edited by: piMeson on Jan 14, 2010 3:47 PM
    Edited by: piMeson on Jan 14, 2010 5:37 PM

    You shouldn't read or write a JComponent property from a thread other than the EDT.Proviso: unless the API specifies the method as thread-safe.
    JTextArea#append, replaceRange and JTextComponent#replaceSelection, setText are some of those methods.Oh... thanks for pointing out that mistake. I didn't know that.
    Indeed I was already planning to laugh it up on platinium-star Darryl along the lines of "I can find it stipulated in the API nor in the Tutorial :o)". But I checked my JDK6 API Javadoc before posting, and I did find the explicit provision that the methods listed above are indeed thread-safe...
    This raises a few questions though... I'll open a [dedicated thread|http://forums.sun.com/thread.jspa?threadID=5424219] for that.
    Edited by: jduprez on Jan 17, 2010 9:57 PM

  • How to create applications with forms61?

    I am using forms6i. i want to know how to create a standalone
    application with this. please give me what are the components
    required to create an application with forms6i. can i use
    crystal reports to generate reports instead of oracle reports
    with the combination of forms?

    Well to create a stand alone application all you need is the
    executable (FMX) and the runtime - thats it!
    As for using Crystal Reports - yes you could use ORA_FFI to
    integrate.
    Regards
    Grant Ronald
    Forms Product Management

  • Sample source code for demo application

    Can you please kindly provide me source code of the demo application, i need both oracle form which is converted in to adf and also converted adf code it using Forms2adf, it will be a great help to making a decison for oracle form migration
    Thank you

    Hi,
    I think this thread accurately lists the available options for evaluation of the forms 2 adf migration.
    How can i test forms2adf generator?
    Regards,
    Ruud

  • Problem signing code for application with embedded runtime

    Hi,
    I have an Adobe Air application which I am publishing with the runtime embedded.  There are lots of reasons for publishing this way.
    I have already seen an unknown publisher message after signing on Windows 8 and a tester reported the same thing on Windows 7.  According to the cert issuer (DigiCert) I need to have an Extended Validation (EV) certificate to get by the Windows 8 issue, but there was no explanation on the Windows 7 issue. 
    As the windows file is essentially a folder wiith ".app" appended to it's name, I'm not sure how signing (which I am doing with the Signature tab on the Flash GUI) ensures that the executable contained in that file is signed.
    Can anyone tell me anything about code signing when publishing an AIR application with embedded runtime?
    Best,
    Chris McLaughlin

    Not that I can think of.  What OS are they running?  Do they have the shared runtime also installed?

Maybe you are looking for

  • Master table, detail table, detail table not getting refreshed selection

    i have a page where i am displaying data as master table and detail table. both table VOs are based on SQL queries which use bind variables. i have a view link between vos of type 1:M i created master table detail table page by dropping detail iterat

  • Can't create a profile or find newtwork

    I have a WRT300N and a WMP300N card with 3 computers in my house. My bro's computer is wired. My sisters has one WMP300N card and works fine. My Computer was working fine I used it this morning then I lost my connection and my linksys wireless networ

  • On my windows xp i cannot open my itunes at all

    So I just recently bought a Windows XP computer.  I've heard that they don't quite sync with everything now, but I thought I'd be able to still use my itunes.  I had it working before and I was in the middle of downloading music from my iPhone to my

  • How can Maximum Display Time in Chart Recorder be increased to hours/days?

    Error message displayed when Recorder Display Time (X-Axis) is increased beyond ~0.25 hours, saying maximum display time has been reached.  MUST be able to display time in range of days - although since data display rate (not Dasylab sampling rate, d

  • HP Director software needed for new computer with windows 8

    I have a Deskjet 5510 and went from Windows XP to a new computer with Windows 8 (64 bit).  The driver installed when I plugged the printer in, but I haven't been able to find HP Director to install.   I tried to do an install from the website, but it