Need a Small & Simple example to demo Contextual Event Framework

Hi,
As I'm tired of trying to understand Contextual Event Framework from Dev Guide & various sites in NET.
So finally came here to find an answer from a good developer.
My goal is to know Contextual Event Framework, with a very simple (or Simplest) example possible.
Scenario# I have a Producer.jsff page that has an InputTextBox.
I want to give an input into this Box say "Welcome To CEF" & using CEF I want to Display this value in consumer.jsff page.
Both producer.jsff & consumer.jsff are in one CEFDemoTF.xml
And this TaskFlow is in CEFDemoPage.jspx.
Now I want to know where should I create Event Map.. and Publish & consume event to display the text "Welcome To CEF" in consumer.jsff page.
Thanks in Advance.

Oracle Magazine had an article about this: http://www.oracle.com/technetwork/issue-archive/2011/11-may/o31adf-352561.html
Timo

Similar Messages

  • Contextual Event Framework

    i want to know how to use contextual Event Framework For Region Communication.
    i referred 1 r 2 links .i couldnt understand anything...
    is there is any link to refer for a simple Contextual Event Program for region Communication????
    Thanks In Advance
    VL Naidu

    Well, perhaps if you told us which 2 links you tried and failed to understand, we might be able to help. As it is, I'm going to give you [url http://lucbors.blogspot.com/2010/03/adf-11g-contextual-event-framework.html]this link as a good, simple example.
    If that's one that you don't understand - why not ask a question to help clarify what you don't understand, and that way help to build your understanding.
    John

  • I need for a simple example of  reading a xml file using jdom

    Hello
    I have been looking for a simple example that uses Jdom to read am xml file and use the information for anything( ), and I just can't find one.since I'm just beggining to understand how things work, I need a good example.thanks
    here is just a simple cod for example:
    <xmlMy>
         <table>
              <item name="first" value="123" createdDate="1/1/90"/>
              <item name="second" value="456" createdDate="1/4/96"/>
         </table>
         <server>
              <property name="port" value="12345"/>
              <property name="maxClients" value="3"/>
         </server>
    </xmlMy>Dave

    Hi,
            FileInputStream fileInputStream = null;
            try {
                fileInputStream = new FileInputStream("my_xml_file.xml");
            } catch (FileNotFoundException e) {
                e.printStackTrace();
            } finally{
                if (fileInputStream == null) return;
            SAXBuilder saxBuilder = new SAXBuilder();
            saxBuilder.setEntityResolver(new EntityResolver() {
                public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException {
                    return new InputSource(new StringReader(""));
            Document document = null;
            try {
                document = saxBuilder.build(fileInputStream);
            } catch (JDOMException e) {
                e.printStackTrace();
            } catch (IOException e) {
                e.printStackTrace();
            } finally {
                if (document == null) return;
            Element element = document.getRootElement();
            System.out.println(element.getName());
            System.out.println(element.getChild("table").getName());

  • I need simple example for alv grid

    hi
    i need code for simple example for alv grid.
    thanks.

    hi bharat,
                  this is report with most of the functionality.
    report zus_alv_demo_grid .
    tables:     ekko.
    type-pools: slis.
    types: begin of t_ekko,
    ebeln type ekpo-ebeln,
    ebelp type ekpo-ebelp,
    statu type ekpo-statu,
    aedat type ekpo-aedat,
    matnr type ekpo-matnr,
    menge type ekpo-menge,
    meins type ekpo-meins,
    netpr type ekpo-netpr,
    peinh type ekpo-peinh,
    line_color(4) type c, "Used to store row color
    end of t_ekko.
    data: it_ekko type standard table of t_ekko initial size 0,
           wa_ekko type t_ekko.
    *ALV data declarations
    data: fieldcatalog type slis_t_fieldcat_alv with header line,
          gd_tab_group type slis_t_sp_group_alv,
          gd_layout    type slis_layout_alv,
          gd_repid     like sy-repid.
    Data declaration for EVENT and PRINT PARAMETER.
    data: gt_events type slis_t_event,
           gd_prntparams type slis_print_alv.
    data declaration for sorting.
    data : it_sortcat   type slis_sortinfo_alv occurs 1,
           wa_sort like line of it_sortcat.
    data :  i_list_comments type slis_t_listheader.
    start-of-selection.
      perform data_retrieval.
    perform user_command.
      perform build_fieldcatalog.
      perform build_layout.
      perform build_events.
      perform build_print_params.
      perform build_sortcat.
      perform display_alv_report.
    end-of-selection.
    *TOP-OF-PAGE.
    PERFORM top-of-page.
    end-of-page.
    *&      Form  build_fieldcatalog
          text
    -->  p1        text
    <--  p2        text
    form build_fieldcatalog.
      fieldcatalog-fieldname   = 'EBELN'.
      fieldcatalog-seltext_m   = 'Purchase Order'.
      fieldcatalog-col_pos     = 0.
      fieldcatalog-outputlen   = 10.
      fieldcatalog-emphasize   = 'X'.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'EBELP'.
      fieldcatalog-seltext_m   = 'PO Item'.
      fieldcatalog-col_pos     = 1.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'STATU'.
      fieldcatalog-seltext_m   = 'Status'.
      fieldcatalog-col_pos     = 2.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'AEDAT'.
      fieldcatalog-seltext_m   = 'Item change date'.
      fieldcatalog-col_pos     = 3.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MATNR'.
      fieldcatalog-seltext_m   = 'Material Number'.
      fieldcatalog-col_pos     = 4.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MENGE'.
      fieldcatalog-seltext_m   = 'PO quantity'.
      fieldcatalog-col_pos     = 5.
      fieldcatalog-do_sum = 'X'.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MEINS'.
      fieldcatalog-seltext_m   = 'Order Unit'.
      fieldcatalog-col_pos     = 6.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'NETPR'.
      fieldcatalog-seltext_m   = 'Net Price'.
      fieldcatalog-col_pos     = 7.
      fieldcatalog-outputlen   = 15.
      fieldcatalog-datatype     = 'CURR'.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'PEINH'.
      fieldcatalog-seltext_m   = 'Price Unit'.
      fieldcatalog-col_pos     = 8.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
    endform.                    " build_fieldcatalog
    *&      Form  build_layout
          text
    -->  p1        text
    <--  p2        text
    form build_layout.
      gd_layout-no_input          = 'X'.
      gd_layout-colwidth_optimize = 'X'.
      gd_layout-totals_text       = 'Totals'(201).
    Set layout field for row attributes(i.e. color)
      gd_layout-info_fieldname =      'LINE_COLOR'.
    gd_layout-totals_only        = 'X'.
    gd_layout-f2code            = 'DISP'.  "Sets fcode for
    *when double
                                            "click(press f2)*
    gd_layout-group_change_edit = 'X'.
    gd_layout-header_text       = 'helllllo'.
    endform.                    " build_layout
    *&      Form  data_retrieval
          text
    -->  p1        text
    <--  p2        text
    form data_retrieval.
      data: ld_color(1) type c.
      select ebeln ebelp statu aedat matnr menge meins netpr
    peinh from ekpo  into table it_ekko.
    *Populate field with color attributes
      loop at it_ekko into wa_ekko.
    Populate color variable with colour properties
    Char 1 = C (This is a color property)
    Char 2 = 3 (Color codes: 1 - 7)
    Char 3 = Intensified on/off ( 1 or 0 )
    Char 4 = Inverse display on/off ( 1 or 0 )
              i.e. wa_ekko-line_color = 'C410'
        ld_color = ld_color + 1.
    Only 7 colours so need to reset color value
        if ld_color = 8.
          ld_color = 1.
        endif.
        concatenate 'C' ld_color '10' into wa_ekko-line_color.
    wa_ekko-line_color = 'C410'.
        modify it_ekko from wa_ekko.
      endloop.
    endform.                    " data_retrieval
    *&      Form  display_alv_report
          text
    -->  p1        text
    <--  p2        text
    form display_alv_report.
      gd_repid = sy-repid.
      call function 'REUSE_ALV_GRID_DISPLAY'
           exporting
                i_callback_program       = gd_repid
                is_layout                = gd_layout
                i_callback_top_of_page   = 'TOP-OF-PAGE'
                i_callback_user_command  = 'USER_COMMAND'
                i_callback_pf_status_set = 'SET_PF_STATUS'
                it_event                 = gt_events
                is_print                 = gd_prntparams
                it_fieldcat              = fieldcatalog[]
                it_sort                 = it_sortcat
                i_save                   = 'X'
           tables
                t_outtab                 = it_ekko
           exceptions
                program_error            = 1
                others                   = 2.
      if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      endif.
    endform.              " DISPLAY_ALV_REPORT
    *&      Form  user_command
          text
    -->  p1        text
    <--  p2        text
    *&      Form  top-of-page
          text
    -->  p1        text
    <--  p2        text
    form top-of-page.
    *ALV Header declarations
      data: t_header type slis_t_listheader,
            wa_header type slis_listheader,
            t_line like wa_header-info,
            ld_lines type i,
            ld_linesc(10) type c.
    Title
      wa_header-typ  = 'H'.
      wa_header-info = 'EKKO Table Report'.
      append wa_header to t_header.
      clear wa_header.
    Date
      wa_header-typ  = 'S'.
      wa_header-key = 'Date: '.
      concatenate  sy-datum+6(2) '.'
                   sy-datum+4(2) '.'
       sy-datum(4) into wa_header-info."todays date
      append wa_header to t_header.
      clear: wa_header.
    Total No. of Records Selected
      describe table it_ekko lines ld_lines.
      ld_linesc = ld_lines.
      concatenate 'Total No. of Records Selected: ' ld_linesc
         into t_line separated by space.
      wa_header-typ  = 'A'.
      wa_header-info = t_line.
      append wa_header to t_header.
      clear: wa_header, t_line.
      call function 'REUSE_ALV_COMMENTARY_WRITE'
           exporting
           it_list_commentary = t_header
           i_logo             = 'GANESH_LOGO'.
    endform.                    " top-of-page
          FORM user_command                                             *
    -->  R_UCOMM                                                       *
    -->  RS_SELFIELD                                                   *
    form user_command using r_ucomm like sy-ucomm
    rs_selfield type slis_selfield.
      case r_ucomm.
        when '&IC1'.
          if rs_selfield-fieldname = 'EBELN'.
            read table it_ekko into wa_ekko index rs_selfield-tabindex.
            set parameter id 'BES' field wa_ekko-ebeln.
            call transaction 'ME23N' and skip first screen.
          endif.
        when 'ULHAS'.
          if rs_selfield-fieldname = 'EBELN'.
            read table it_ekko into wa_ekko index rs_selfield-tabindex.
            set parameter id 'BES' field wa_ekko-ebeln.
            call transaction 'ME23N' and skip first screen.
          endif.
      endcase.
    endform.
          FORM set_pf_status                                            *
    -->  RT_EXTAB                                                      *
    form set_pf_status using rt_extab type slis_t_extab.
      set pf-status 'ZNEWSTATUS'.
    endform.
    *&      Form  build_events
          text
    -->  p1        text
    <--  p2        text
    form build_events.
      data: ls_event type slis_alv_event.
      call function 'REUSE_ALV_EVENTS_GET'
       exporting
         i_list_type           = 0
       importing
         et_events             = gt_events[]
    EXCEPTIONS
      LIST_TYPE_WRONG       = 1
      OTHERS                = 2
      if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      endif.
      read table gt_events with key name =  slis_ev_end_of_page
                  into ls_event.
      if sy-subrc = 0.
        move 'END_OF_PAGE' to ls_event-form.
        append ls_event to gt_events.
      endif.
      read table gt_events with key name =  slis_ev_end_of_list
                  into ls_event.
      if sy-subrc = 0.
        move 'END_OF_LIST' to ls_event-form.
        append ls_event to gt_events.
      endif.
    endform.                    " build_events
    *&      Form  build_print_params
          text
    -->  p1        text
    <--  p2        text
    form build_print_params.
      gd_prntparams-reserve_lines = '3'.   "Lines reserved for footer
      gd_prntparams-no_coverpage = 'X'.
    endform.                    " build_print_params
          FORM END_OF_PAGE                                              *
    form end_of_page.
      data: listwidth type i,
      ld_pagepos(10) type c,
      ld_page(10)    type c.
      write: sy-uline(50).
      skip.  write:/40 'Page:', sy-pagno .
    endform.
          FORM END_OF_LIST                                              *
    form end_of_list.
      data: listwidth type i,
      ld_pagepos(10) type c,
      ld_page(10)    type c.
      skip.  write:/40 'Page:', sy-pagno .
    endform.
    *&      Form  build_sortcat
          text
    -->  p1        text
    <--  p2        text
    form build_sortcat.
    wa_sort-spos      = 1.
    wa_sort-fieldname = 'EBELN'.
    append wa_sort to it_sortcat.
    wa_sort-spos      = 2.
    wa_sort-fieldname = 'EBELP'.
    append wa_sort to it_sortcat.
    endform.                    " build_sortcat
    Rewards if helpfull
    regards
    vijay dwivedi

  • A simple example of JList

    Dear All
    please send a simple example of JList using Event Handling.
    Thanks in advance.

    Rajsarawat wrote:
    Dear All ...
    Thanks in advance.I love how Rajsarawat conscientiously always comes back to his threads to personally thank folks who contribute. That will surely motivate me to help him as much as possible in the future. Good job, Rajsarawat!

  • Contextual Event question (Currency Change Event)

    Hello,
    I have published a contextual event on my table (Currency Change Event)
    I also have a SelectionListener on the same table.
    Will I have to manually/programmatically publish the event within the selection listener code? (and if so, how?)
    The reason I ask is that I practiced with a small app containing a region from an ADF library that handled currency change event from the referenced task flow and everything was great, but now I am trying to apply the same principles to my "proper" application and there is no currency change event being received in the parent application.
    I had a look at Andrejus example (http://andrejusb.blogspot.co.uk/2010/10/contextual-events-framework-and-adf-11g.html) but he has hand crafted the events on the page binding will I have to do that too? Is it not enough that I have the currency change event declared?
    Any help appreciated, thanks
    JDeveloper 11.1.2.2

    I've applied the same processing to another table that uses the standard collectionModel.makeCurrent selection listener and it's firing the contextual event handler in the parent application, so that almost confirms that it's the bespoke selection listener that needs code adding to it to invoke the currency change event
    edit :
    I added this code to invoke the makeCurrent and everything is ok again, thanks for listening
    FacesContext fc = FacesContext.getCurrentInstance();
    ELContext elContext = fc.getELContext();
    ExpressionFactory ef =
    fc.getApplication().getExpressionFactory();
    MethodExpression meth = ef.createMethodExpression(elContext, "#{bindings.partnersVO1.collectionModel.makeCurrent}", Object.class, new Class[]{SelectionEvent.class});
    meth.invoke(elContext, new Object[]{selectionEvent});

  • How to create contextual event with custom payload?

    I use the following code to invoke contextual event from my region via the "action-listener" of a command-link:
    <af:commandLink text="#{row[def.name]}" id="cl1"
    styleClass="tableLinkActive"
    actionListener="#{backingBeanScope.PanelToConveroFormManager.handleSelectedRow}">
    The following "action-listener" is designed to pass the current selected record key to the "consumer" of the contextual event:
    public void handleSelectedRow(ActionEvent actionEvent) {
    String currentRecordKey = getCurrentRecordKey();
    JUEventBinding eventBinding = (JUEventBinding)BeanUtils.getBindings().get("RefreshParentEvent");
    if (eventBinding != null) {
    ActionListener actionListener = (ActionListener)eventBinding.getListener();
    actionListener.processAction(actionEvent);
    How do I pass the "currentRecordKey" value as a custom "payload" via the event-binding "RefreshParentEvent" in the above code?
    Is there any code example on using contextual event with custom payload?

    Hi,
    the custom payload is referenced when you set up the event itself. You use EL in the custom payload definition to point to a managed bean method that when called accesses the current rowKey. The Java code you show just passes the ActionEvent of the ADF Faces command button and invokes the event. It does not manipulate the event definition.
    <eventBinding id="eventBinding"
                      Listener="javax.faces.event.ActionListener">
          <events xmlns="http://xmlns.oracle.com/adfm/contextualEvent">
            <event name="testEvent"
                   customPayLoad="#{mymanagedBean.rowKey}"/>
          </events>
        </eventBinding>Frank

  • Need simple example of flex2 to webservice

    Hello,
    I understand that so long as you don't use remote objects,
    you don't have to buy the FDS! So how do I bypass using FDS and
    just use HTTPS or webservices?
    Can someone point me in the right direction with a
    good/simple example of using flex 2.0 with https and/or
    webservices?
    Thanks,
    K.

    OK - I finally get this.  I guess that SAP Business One is the entry level, least expensive license.  If my company buys SAP Business One, will that provide the R/3 system and BAPIs to build some demos?  And can I hook up SAP Business One to the Sneak Preview SAP NewWeaver 6.40 in order to invoke the BAPIs using Java?
    And I guess that if we buy SAP Busienss One, then I don't need 6.40 ABAP stack to invoke the BAPIS - or do I?
    Thanks for your help.

  • Need Suggestion to build a simple web service demo

    I'm planning to build a demo using java packages JAX* for my team using my workstation and another standalone box.
    I got a Sun One Web Services Platform DVD from JavaOne, but it only support Win200 or XP, too bad our company still using Win NT SP6.
    I only need a very simple web service that will bring data from server DB. I knew I can download the JWSDP1.2, but there is no tutorial right now. And I have tried JWSDP1.1 but not really understand what it is doing(because only Hello world service is working). I need to do some modification to change the default server port from 80 to 81, and I need to modified localhost to [my-machine-name] so that the other machine can talk to the JWSDP server.
    My question is how can I build up a web service demo really easy and quick and what tool should I used, any suggestion will be appreciated! Thanks in advance!
    Henry

    1. Use XML Spy Enterprise edition editor.
    2. Goto www.xmethods.com, select service you want to create demo of.
    3. Get its WSDL url.
    4. In XML Spy SOAP menu there is a command 'create new soap request'. Press that, enter the WSDL url. You will get a SOAP request.
    5. Edit SOAP request parameters. Type parameters of your choice.
    6. Press 'send request to server'. You will get SOAP response. It will contain result from the requested method.
    7. Paste that response inside a JSP.
    8. Write a local method which will return same response (remote method's return value) that came from remote web service.
    9. Paste that method inside abovementioned JSP. Replace static response in that JSP with the response generated by local method. The method parameters will come from client's SOAP request. Parse SOAP request to get request parameters. (As it's your demo, you know the data types of the parameters).
    10. Host that JSP on any Servlet/JSP engine.
    That makes your Web Service.
    You can use any package like Aapche SOAP, AXIS or JAX-RPC to generate a SOAP client. Use the URL of JSP(step 10) as "endpoint".
    Note: Indside JSP make sure that there in no endline and carriage return character. Otherwise it won't be a valid SOAP response.
    Good luck.

  • I need some simple examples to start with for Oracle ESB

    Hi All,
    Please share some simple examples to startwith for Oracle ESB.
    I need to understand, what are the files are created, once created an ESB project.
    What is the use of the files how to edit them with out using JDeveloper.
    Iam trying to create a simple example.
    I would like to create a file which has only "HELLO" in that file, simple text file inside a folder "INPUT" in my c:\ drive.
    I wanted to create a ESB service which picks up the file and add a string to it like "HELLO" + "ESB" and drop this file into "OUTPUT" folder in c:\ drive.
    How do i do that. I tried to do it when i deploy the integration server connection is gettting hit badly. I dont see that connection any more and i dont see that connection in my JDeveloper.
    I dont want to start with existing code.
    Please help
    Regards,
    Vijay.B
    Message was edited by:
    Vijay.B
    Message was edited by:
    Vijay.B

    Hi,
    If you want to do it from scratch you can basically do the following:
    Make sure you have created an application server and integration server connection in JDeveloper.
    1) Create a new JDeveloper project of type ESB project.
    2) Possibly add a ESB System/Group (open the esb file and click "Create System/Group") to group ESB projects.
    3) Create an XML schema describing your input XML file. Probably one element of type xsd:string.
    4) Create an example XML file which is well-formed and valid according to the XSD from step 3.
    5) Create a new File adapter (inbound/read). A routing service is automatically created.
    6) Create a new File adapter (outbound/write).
    7) Create a routing rule in the routing service in which you invoke the write method of the outbound file adapter. Possibly add a transformation using the XSL mapper.
    8) Deploy the ESB project to the server.
    9) Drop your XML file (from step 4) in the directory in which the inbound file adapter is polling.
    10) If it is ok, the file should be picked up, transformed and dropped in the outbound directory. A new ESB instance should be visible in the ESB console.
    See what files are generated on the filesystem in each of the above steps.
    Regards, Ronald

  • Need help with a very simple example.  Trying to reference a value

    Im very new to Sql Load and have created this very simple example of what I need to do.
    I just want to reference the ID column from one table to be inserted into another table as DEV_ID.
    Below are my: 1) Control File, 2) Datafile, 3) Table Description, 4) Table Description
    1) CONTROL FILE:
    LOAD DATA
    INFILE 'test.dat'
    APPEND
    INTO TABLE p_ports
    FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
    DEV_id REF(CONSTANT 'P_DEVICES',NAME),
    NAME FILLER ,
    PORT_NO
    2) DATAFILE:
    COMM881-0326ES09,6
    3) TABLE DESCRIPTION:
    SQL> describe p_ports
    Name Null? Type
    ID NOT NULL NUMBER(10)
    DEV_ID NOT NULL NUMBER(10)
    PORT_NO     NUMBER(3)

    hi,
    i managed to do this for my app. (think i referred to viewTransitions sample code and modified quite a bit)
    i can't remember this well cos i did this quite a while back, but i will try to help as much as possible
    1) from the appdelegate i initialize a root controller (view controller class)
    2) this root controller actually contains two other view controllers, let's call it viewAController and viewBController, for the screens which u are going to toggle in between. and there's also a function, let's call it toggleMenu, which will set the menus to and fro. i copied this whole chunk from the sample code. it actually defines the code on what to do, i.e. if current view is A switch to B and vice versa.
    3) inside the controller files, you need to implement the toggleMenu function too, which basically calls the rootController's toggleMenu
    4) we also need viewA and viewB files(view class)
    5) need to add the .xib files for the respective views and link them up to the controller class. i did not use the .xib files for ui layout though, because of my app's needs. however, it will not work properly without the .xib files.
    5) inside the view class of both views, i.e. viewA.m and viewB.m, you need to create a button, that will call the toggleMenu function inside the respective controller class.
    it will look something like this:
    [Button addTarget:ViewAController action:@selector(toggleMenu:) forControlEvents:UIControlEventTouchUpInside];
    so the flow is really button (in view)-> toggleMenu(viewController) -> toggleMenu(rootController)
    i'm sorry it sounds pretty hazy, i did this part weeks before and can't really remember. i hope it helps.

  • Need Simple Example of Notifier and Occurance

    hi friends
    i need to know the exact funtion of notifiers and occurances. So can you send me the simple example for both..
    Thanks in advance... 

    Open your example finder (help..find examples...") and search for these two terms.
    I recommend looking at "General Notifier example.vi" and "Generate Occurrences.vi".
    Is there anything in the online help that is not clear? What are you trying to do?
    Message Edited by altenbach on 09-26-2008 11:22 PM
    LabVIEW Champion . Do more with less code and in less time .

  • Trying to create a simple example. Need Help!

    I'm trying to create a very simlpe examlpe using Swing components to illustrate a MVC architecture.
    I have a JFrame containing a JTree and a JButton.
    What I'd like to happen is when I click the JButton the JTree model is changed in some fashion and the the view is refreshed due to the models change.
    If anyone out there has a simple example of any MVC architecture involving Swing components I'd love to see it.
    Thx

    Sure, look at any of the Sun tutorials. For example, look in your API documentation for JTree; it has a link to a tutorial about how to use JTree.

  • I need an simple example on java-Oracle8i entreprise

    Hi,
    Could anyone give me an simple example of a Java method which will be loaded into Oracle.
    Let say, the method will read the email address based on employee_ID from a table called Employee. Thank you very much for all your help.
    Hellenie
    PS: I would like to see java code and to see how it could call a table without having to deal with connection object ,statement,etc...
    null

    This is the example from the Oracle's 8.1.6 Documentation - Java Stored pocedures Developer's guide -
    step 1 :
    import java.sql.*;
    import java.io.*;
    import oracle.jdbc.driver.*;
    public class RowCounter {
    public static int rowCount (String tabName) throws SQLException {
    Connection conn = new OracleDriver().defaultConnection();
    // here is the connection made
    String sql = "SELECT COUNT(*) FROM " + tabName;
    int rows = 0;
    try {
    Statement stmt = conn.createStatement();
    ResultSet rset = stmt.executeQuery(sql);
    // same old createStatement, executeQuery ...
    while (rset.next()) {rows = rset.getInt(1);}
    rset.close();
    stmt.close();
    } catch (SQLException e) {System.err.println(e.getMessage());}
    return rows;
    Step 2:
    use loadjava command line utility and
    specify the class name, username/password to
    load the code into the database.
    step 3:
    On sql prompt, the class and method name are
    mapped to stored procedure
    CREATE FUNCTION row_count (tab_name VARCHAR2) RETURN NUMBER
    AS LANGUAGE JAVA
    NAME 'RowCounter.rowCount(java.lang.String) return int';
    You can invoke the procedure using CALL method from SQL prompt.
    Cheers,
    Adithya
    null

  • I need  a simple example of shopping cart(newbie)

    Has any one come across a simple example of shopping cart and the process
    behind it i.e. from jsp to ejb. So far I have looked at the buybeans example
    and it still is not clear the approach that was used.
    I would be greatful for any assistance thank you
    Kenneth A-Adjei

    Take a look at:
    http://java.sun.com/docs/books/tutorial/servlets/overview/example.html
    "Ken Adjei" <[email protected]> wrote in message
    news:3960a901$[email protected]..
    Has any one come across a simple example of shopping cart and the process
    behind it i.e. from jsp to ejb. So far I have looked at the buybeansexample
    and it still is not clear the approach that was used.
    I would be greatful for any assistance thank you
    Kenneth A-Adjei

Maybe you are looking for

  • Regarding Error in Migo

    Dear All, Through transaction code called Migo we are creating the return delivery for a stock transport purchase order by giving the inputs as the material document we have flagged the item as okay and also checked the box which indicates via delive

  • Can't save to server

    In my work environment we save and keep all files on our servers (windows). When i try to save a PS file on the server, I get a promt telling me " Could not save because the file name was not valid". The file name is test.jpg - no strange characters

  • Jsp locale issues

    Hi All, We have a web applicatoin where are using struts framework, recently we migrated from weblogic 8 to weblogic 10. Application is develped for only english applicatoin. But for some users the dates are getting displayed in different langauage.

  • Elite and Gamers Club Unlocked Membership question

    Hello, We recently became Elite members though wasn't looking to join. We were Gamers Club Unlocked Members from darn near day one, but now we cannot see the status of the Gamers Club Unlocked. Did the Elite replace my Gamers Club Unlocked? I have 5

  • HTTP Get & Post

    Hello All, I am looking for a way to get a URL specified by an applet property value, then HTTP Post to a hard coded URL. Has any one seen a simple way to do this? I havn't figured out an easy way, as this must run in Internet Explorer on the client'