UIX-BC4J Form Example

Could anybody post an example of a simple UIX-BC4J Form with Insert, Update and Delete event handlers but NOT in automatic mode?
TIA.
Francisco

I still consider myself a beginner in UIX/BC4J, but I presented a paper at June's ODTUG conference that included an example. Try www.odtug.com, look at the 2002 handouts, under JDeveloper. You should be able to download the Powerpoint. If you're interested, e-mail me and I'll send you the actual paper (as a Word document). Or just buy the conference proceedings from ODTUG. They papers should also be up soon in the "Members Only" section of the ODTUG site.
-- jim

Similar Messages

  • UIX Search Form "difficult" question

    OK,
    Say you dragged and dropped UIX search form onto the page. When you start the page it will render the result table without specific where criteria set, ie SELECT * FROM TABLE;
    Questions:
    1) How to add default WHERE clause for the first time when the page opens ie I want to have result page something like SELECT * FROM TABLE WHERE PARAM='bla';
    2) Similar question but this time how to pass PARAM from some previous page?
    Please help

    1. Try setting an initial where clause on the viewObject that you used to construct the search form. You can do this in the BC4J editor (wizard) for your viewObject.
    2. you would have to write an event handler and programmatically set the where clause on your viewObject.

  • UiXML using Legacy BC4J Form Components

    I have created a uiXML page. In this page I have four BC4J choice drop down boxes from the uiXML Legacy BC4J Form Components. These choice boxes are dependent upon each other. For example: I select an item from the first choice box. This item is then used to query the database and populate the result in the second choice box and so on. I have two questions:
    1) Why when I place the choice boxes on the designer page in JDeveloper10G they do not show up? I can find them in the XML Code, but not in the designer.
    2) How do I perform this querying of the database with the selection from the choice box. Are there certain components I should use? I know I need an appModuleScope and a viewObjectScope.
    Any suggestions would be greatly appreciated. Thanks for your time.

    I have created a uiXML page. In this page I have four BC4J choice drop down boxes from the uiXML Legacy BC4J Form Components. These choice boxes are dependent upon each other. For example: I select an item from the first choice box. This item is then used to query the database and populate the result in the second choice box and so on. I have two questions:
    1) Why when I place the choice boxes on the designer page in JDeveloper10G they do not show up? I can find them in the XML Code, but not in the designer.
    2) How do I perform this querying of the database with the selection from the choice box. Are there certain components I should use? I know I need an appModuleScope and a viewObjectScope.
    Any suggestions would be greatly appreciated. Thanks for your time.

  • UIX (BC4J)

    I try to indicate in a UIX (BC4J) site a selected line from a table. The key of this line is handed over thereby by the previous site. (this succeeds to me!) The details are to be indicated over a "ViewLink". Unfortunately the details are not correctly determined. In each case the first Row from the table is indicated. Can someone help me please?
    <?xml version="1.0" encoding="windows-1252" ?>
    <page xmlns="http://xmlns.oracle.com/uix/controller"
    xmlns:ctrl="http://xmlns.oracle.com/uix/controller"
    xmlns:ui="http://xmlns.oracle.com/uix/ui"
    xmlns:bc4j="http://xmlns.oracle.com/uix/bc4j" >
    <bc4j:registryDef>
    <bc4j:rootAppModuleDef name="AppointmentAppointmentReasonViewLinkAppModule"
    defFullName="com.hannover_re.vistra.bo.AppModule"
    configName="AppModuleLocal"
    releaseMode="stateful" >
    <bc4j:viewObjectDef name="AppointmentView" >
    <bc4j:rowDef name="UpdateAppointmentView" autoCreate="false" >
    <bc4j:propertyKey name="key" >
    </bc4j:propertyKey>
    </bc4j:rowDef>
    </bc4j:viewObjectDef>
    <bc4j:viewObjectDef name="AppointmentReasonViewLnk" rangeSize="3">
    </bc4j:viewObjectDef>
    </bc4j:rootAppModuleDef>
    </bc4j:registryDef>
    <content>
    <try xmlns="http://xmlns.oracle.com/uix/ui"
    xmlns:data="http://xmlns.oracle.com/uix/ui" >
    <catch>
    <header messageType="error">
    <boundAttribute name="text">
    <contextProperty select="ui:currentThrowable"/>
    </boundAttribute>
    </header>
    </catch>
    <contents>
    <pageLayout xmlns="http://xmlns.oracle.com/uix/ui"
    xmlns:data="http://xmlns.oracle.com/uix/ui"
    title="AppointmentAppointmentReasonViewLink View" >
    <contents>
    <messageBox automatic="true" />
    <bc4j:rootAppModuleScope name="AppointmentAppointmentReasonViewLinkAppModule" >
    <contents>
    <header text="Results" >
    <contents>
    <form name="viewForm" >
    <contents>
    <bc4j:viewObjectScope name="AppointmentView" >
    <contents>
    <bc4j:rowScope name="UpdateAppointmentView" >
    <contents>
    <tableLayout>
    <contents>
    <bc4j:region automatic="true" >
    <bc4j:attrStamp>
    <bc4j:messageInput readOnly="true" />
    </bc4j:attrStamp>
    </bc4j:region>
    <bc4j:viewObjectScope name="AppointmentReasonViewLnk" >
    <contents>
    <bc4j:table name="viewTable" automatic="true"
    width="80%" alternateText="No rows found">
    <bc4j:columnStamp>
    <bc4j:column>
    <contents>
    <bc4j:input readOnly="true"/>
    </contents>
    </bc4j:column>
    </bc4j:columnStamp>
    </bc4j:table>
    </contents>
    </bc4j:viewObjectScope>
    </contents>
    </tableLayout>
    </contents>
    </bc4j:rowScope>
    </contents>
    </bc4j:viewObjectScope>
    </contents>
    </form>
    </contents>
    </header>
    </contents>
    </bc4j:rootAppModuleScope>
    </contents>
    </pageLayout>
    </contents>
    </try>
    </content>
    </page>

    James is correct. You need to specify usesCurrency="true" in the <bc4j:rowDef> otherwise the current row for the master viewobject is not affected, so the viewlink is not triggered.
    John Fallows
    Oracle Corporation.

  • UIX/BC4J:  Page properties/Events/Methods

    The following is code for a UIX page event handler and a method that attempts to locate the data that is selected from a bc4j:table, use it, and then handle redirection to the next page.
    I had to comment out the setPageProperty block due to an error, oracle.jbo.Key, that keeps the method from running. This also means my page property is not available for use by the method.
    When the method runs I expected to be able to see the row that was selected in the table by virtue of the findRowByKey ... keyBinding ... selectionKey. Instead, the return value for the line: Row row = vo.getCurrentRow(); is always the last record in the view object.
    This led me to the alternative plan to create a page property for the selectedKey and use vo.getRow(key) to get the record. This won't work for me because I can't get the page property to work.
    Can you help me with my understanding/syntax please?
    **** UIX Event Handler ****
    <event name="getemployee">
    <bc4j:findRootAppModule name="AppModule">
    <bc4j:findViewObject name="VO">
    <bc4j:findRowByKey>
    <bc4j:keyBinding>
    <bc4j:selectionKey name="viewTable" key="key"/>
    </bc4j:keyBinding>
    <bc4j:handlers>
    <!-- Gives page error: oracle.jbo.Key -->
    <!--
    <bc4j:setPageProperty name="selectedKey">
    <bc4j:selectionKey name="viewTable" key="key"/>
    </bc4j:setPageProperty>
    -->
    <method class="PageController" method="getInfo" />
    </bc4j:handlers>
    </bc4j:findRowByKey>
    </bc4j:findViewObject>
    </bc4j:findRootAppModule>
    </event>
    **** Method that should use page property to display record from view object. ****
    public static synchronized EventResult getEmployeeInfo(BajaContext context,
    Page page,
    PageEvent event) {
    ViewObject vo = ServletBindingUtils.getViewObject(context);
    String selectedKey = page.getProperty("selectedKey");
    System.out.println("selectedKey: " + selectedKey); //null
    // I am hoping to get the property here.
    //Row row = vo.getRow(selectedKey);
    Row row = vo.getCurrentRow();
    System.out.println("Current Info- Item1:" + row.getAttribute("Item1") +
    ", Item2: " + row.getAttribute("Item2"));
    }

    Hello Vincent,
    I'm not sure why it does not work. Perhaps you haven't set the keystamp in your table?
    <bc4j:keyStamp>
    <bc4j:rowKey name="key"/>
    </bc4j:keyStamp>
    Besides your code tries to get the row in two times. Once in your event handler and ones in your method. That's not necessary, just do it once, either in your UIX page or in your Java method.
    If you do it in your UIX page, you can get the row directly in your method. Here is an example:
    UIX
    <bc4j:findRootAppModule name="appModule">
    <bc4j:findViewObject name="viewObject">
    <bc4j:findRowByKey>
    <bc4j:keyBinding>
    <bc4j:selectionKey name="viewTable" key="key"/>
    </bc4j:keyBinding>
    <bc4j:handlers>
    <method class="..." method="doSomething" />
    </bc4j:handlers>
    </bc4j:findRowByKey>
    <bc4j:executeQuery/>
    </bc4j:findViewObject>
    </bc4j:findRootAppModule>
    Then you can access row in your method
    Row row = (Row)bajaContext.getProperty("http://xmlns.oracle.com/uix/bc4j", "row");
    Regards,
    Christian

  • Error in Simple Input Form Example for CE 7.1?

    Hi @,
    I am trying to execute Simple Input form example in sdn for CE 7.1. But its not working as per the functionality.
    Can anyone suggest what is the issue ?
    Regards,

    hi,
    This particular example is given in the sdn and is for ce 7.1 but its not working .
    Regards

  • How to run the parameter form example report :pform_report.jsp

    how to run the parameter form example report : pform_report.jsp ?
    I got these error message:
    Reports Error Page
    Sat Oct 18 11:58:24 CST 2003
    javax.servlet.jsp.JspException: rwlib-1: REP-6106: (, 4 L, XML 1h��/�� ' PI with the name 'xml' can occur only in the beginning of the document.'.
    javax.servlet.jsp.JspException: rwlib-1: REP-6106: (, 4 L, XML 1h��/��
    PI with the name 'xml' can occur only in the beginning of the document.'.
         at oracle.reports.jsp.ObjectsTag.doEndTag(ObjectsTag.java:180)
         at examples.tools._pform__report._jspService(_pform__report.java:79)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:302)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:407)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:330)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:66)
         at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:283)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:539)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:285)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:771)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:152)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:72)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:796)
         at java.lang.Thread.run(Thread.java:484)

    repost !
    please help!

  • ADF UIX Search Form - Is this a bug?

    I created a JDev 9.0.5.2 ADF UIX Search form from the component palette. I ran the page without making any changes. I chose the Find button which displayed the search criteria. I selected the delete button and then the create button, which created 2 blank records (possible bug?) in the search criteria table at the top. I selected one of the blank records and entered search criteria. I chose the submit button which changed the data in the search criteria table as it is supposed to do. I selected the other blank record, entered search criteria and submitted it. Again the data in the search criteria table was changed appropriately. I selected the delete button and the wrong record was deleted (bug?).
    Are these bugs?

    Hello,
    a similar sort of situation is created if you have a Read-only table on a page which drills down to an edit/create input form page. If you enable a create functionality you need to enable some way for the user to back out of the created record and clean up the newly created row. On the detail page (JobsEdit.do) i created a link to a custom event on the master page action (JobsView.do) like this:
    <button text="Cancel" destination="JobsView.do?event=cancelinput"/> In the Data Action class for the JobsView page i have a method defined as follows:
    public void onCancelinput(DataActionContext ctx)
        Row row = ctx.getBindingContainer().getApplicationModule().findViewObject("JobsView1").getCurrentRow();
        row.refresh(row.REFRESH_REMOVE_NEW_ROWS );
    }as a workaround, it sounds like you may need put some manual controls in place to tightly control any newly created rows which have/will not been used. I don't know if this will resolve the deleting wrong record problem...
    regards,
    Brenden

  • Uix BC4J: create a link download to download my resultsets

    Greetings,
    The case:
    - i've created my flows using the amazing uix bc4j technology;
    - end users can manipulate their data (view and update)
    - Now i'd like to create a link which will point over the query result and download the data with csv or xls format.
    Could anyone help me on that issue ? 've checked in online doc, did not find a valuable info.
    Thks for your help
    Cheers
    lb

    Hm - good point, Riley. Hadn't tried Go to URL, though I realise now this is simply because I forgot to ignore the dire warnings about "not a FrameMaker file" :-}
    However, now I have made the experiment:
    * opening the .pdf directly in Acrobat and clicking on the link opens the .zip application immediately - still no "download/open" option
    * opening the .pdf through a browser puzzlingly netts me "The file ///C:/tempo/mup55lin.tgz cannot be found. Please check the location and try again." Needless to say, the file in question is right there where it should be ...

  • Multiple Developers UIX/BC4J

    Hi,
    Could you describe the best way for multiple developers to work a UIX/BC4J project?
    For the actual work we have tried slicing the project horizontally, where someone did the modelling and others would do the UIX pages but, because of time and other constraints we will probably divide the project up vertically where one person will work a set of entities, vo's etc. all the way up to the UIX pages.
    My question is more along the development infrastructure.
    Given this mix:
    - 4 to 6 member team
    - a single shared database/instance for development
    - access to a shared network drive (kinda slow)
    - access to a CVS repository
    Should we start by using a repository approach immediately?
    How do you guys do it?
    thanks

    I don't have any good handle for what the best way to set up such a project is. Do any other customers have some experience they can share here?
    -brian
    UIX Team

  • Oracle Strategy for the UIX & BC4J in the new JDeveloper version

    What is Oracle Strategy for the UIX & BC4J in the new JDeveloper version:
    - Like DataBinding
    - BC4J Integration
    - UIX controller
    - Internationalization
    - Supporting for Palm,phone and pager.

    Hi,
    Are these questions all BC4J specific?
    General databinding info is discussed here:
    What's the developement direction of UIX?
    For BC4J/UIX integration, in 9.0.5 we will continue to support our existing api's, but you can also use uix as the view and bc4j as the model in adf, which is described here:
    http://otn.oracle.com/products/jdev/htdocs/905/sod_otn.html#adf
    Aside from bug fixes, I don't think there are major changes in the controller/internationization. Did you have specific questions about the controller and internationalization?
    We are planning to support Palm web browser 2.0, but due to the timing of the release of a platform that supports it and our own schedules, I don't think it will be officially supported in the 9.0.5 release. We won't have phone or pager support in 9.0.5.

  • UIX BC4J Java

    How could I transfer the information from UIX site in my Java class and work it on.
    My Scenario:
    Each employee works in a departmebt.
    Now I want to change the department of a employee.
    I show all departments,that I have and I select the current one,
    I would like to select another department and display it by my employee.
    I call method of my class TestSel in UIX in handlers::
    <event name="find" >
    <bc4j:findRootAppModule name="ViewAppModule" >
    <bc4j:findViewObject name="View" >
    <ctrl:method class="bo.TestSel" method="doSel"/>
    </bc4j:findViewObject>
    </bc4j:findRootAppModule>
    </event>
    package bo;
    import...
    public class TestSel {   
    public static EventResult doSel(BajaContext bc, Page page, PageEvent event){   
    ViewObject res = (ViewObject)bc.getProperty("http://xmlns.oracle.com/uix/bc4j", "viewObject");
    Row cur=res.getCurrentRow();
    //Not the selected position, but the last of the site (in range)
    System.out.println("cur"+cur.getAttribute("Id1").toString()) ;
    System.out.println("cur"+cur.getAttribute("FmlyNam").toString()) ;
    if (res.getEstimatedRowCount() != 0)
    RowSetIterator secondRSI = res.createRowSetIterator("secondRSI");
    if (secondRSI.hasNext())
    Row firstRow = secondRSI.first(); //the first row
    System.out.println(firstRow.getAttribute("Id1").toString()) ;
    System.out.println(firstRow.getAttribute("FmlyNam").toString()) ;
    secondRSI.closeRowSetIterator();
    How could I get selected data record here?
    How could I change a value of attributes and apply it in UIX ?
    Help me please!!!
    Inna.

    Would it be easier to use a custom method on the bc4j Application module?
    Take this scenario...
    1. User opens UIX XML web page which opens a bc4j App Module..it has a VO based on all employees.
    2. User presses the add button and a new employee is created (using the bc4j App Module).
    (Notice: no commit yet!)
    3. User presses the submit button...fires event REVIEW_SALARY.
    4. This event is 'handled' in the event section of the UML XML...it calls:-
    public static EventResult handleREVIEW_SALARYEvent (BajaContext context, Page page, PageEvent event)...
    5. I now want to call a java class I wrote that computes an employees new salary and updates the employee record with this new salary. This update will fail unless it is part of the same transaction as the one used by the bc4j App Module (that inserted the new employee).
    How best to proceed from here?
    How about having a method on the bc4j App Mod's VO called 'reviewSalary'? Calling this would use the same transaction? I could then call my java class from within the VO's method? However do I still have the same problem in that my java class expects to be passed the connection object?
    The approach you suggested previously seems a touch dangerous....in that these are not 'publically exposed'...and a new release of JDev may break my code.
    Thanks,
    Paul.

  • How To Build a Simple UIX Search Form

    Hi
    I am starting with ADF BC
    "I tried to run "How To Build a Simple UIX Search Form" sample but the error
    "query not found on action:/dataPage1" Could any one tell me where the problem is?

    I got the error when I press Query submit button, the application is running from page.uix as the sample

  • Looking for documentation about filling Comboboxes in bc4j forms

    Im looking documentation about filling comboboxes in bc4j forms. My case is as follows:
    I have an edit form. This edit form needs two comboboxes. The values in the second combo box depends of the choice selected in the first combo box. Both combos are bounded to its respective tables.
    How can i do that?
    Thank u.

    Orlando
    JComboBox jComb1 = new JComboBox();
    // bind combo box to BC4J
    jComb1.addPropertyChangeListener(new PropertyChangeListener()
    public void propertyChange(PropertyChangeEvent e)
    String val = ((JComboBox) e.getSource()).getSelectedItem();
    // use value to change query for VO2 and combobox 2
    Frank

  • Shay Shmeltzer : How To Build a Simple UIX Search Form

    Shay, I need your help here. I need to filter MessageChoice entries by doing setWhereClauseParam on the appropriate VO (The one that acts as a source for the LOV mode for MessageChoice). Say, this VO is in the 'root' level of AM_A.
    Everything from here (all VOs) are in AM_B.
    Say I am on page1.uix which has a readonly table and submit button. Let's say one of the table COLUMNS contains strings that I need to pass to the AM custom method (The one that will set where clause).
    So user selects the ROW and clicks submit. Somehow (how exactly?) string gets passed to data action (that I guess uses custom method, like the one in your example in AM_B). The page forwards to ANOTHER page2.uix. This page is input form with one field as MessageChoice. Now this is IMPORTANT. This message choice has a source driven by the VO that I wanted to set WHERE clause.
    I have been trying to do this for a week, tried all kinds of stuff but am never getting it to work.
    Please help.
    Rade

    ok, a little sample with the HR Schema.
    You are going to display the departments in the first screen, select a department and then use the row that you selected to set the where clause for a new view item that is based on EMP.
    So create a new view (call it queryEmp) that looks like this:
    SELECT Employees.FIRST_NAME,
    Employees.EMPLOYEE_ID,
    Employees.LAST_NAME,
    Employees.DEPARTMENT_ID
    FROM EMPLOYEES Employees
    WHERE DEPARTMENT_ID=:1
    Then add a method to your applciation module as follow:
      public void setMyWhere()
        ViewObject vo = this.findViewObject("queryEmp1");
        ViewObject vo_master = this.findViewObject("DepartmentsView1");
        System.out.println("valus is "+vo_master.getCurrentRow().getAttribute("DepartmentId"));
        vo.setWhereClauseParam(0,vo_master.getCurrentRow().getAttribute("DepartmentId"));
        vo.executeQuery();
      }Then the struts flow is from the first page that just shows the Departments and allows you to choose one (the radio button in the multi-row table does this for you).
    Then add a button that sends you to a dataaction. on this dataaction drag and drop the method you have defined (and made it a client method - setMyWhere)
    Then this method goes to a second UIX that shows the information from the Empquery view.
    Works for me.

Maybe you are looking for