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.

Similar Messages

  • 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 ...

  • 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

  • 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.

  • 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

  • UIX/BC4J: Update/Caching problem?

    Dear all,
    we are using UIX with BC4J to build a web application that models sort of a workflow. We factored the application into multiple application modules nested in one root module. We have two VOs (VO1 and VO2) that are both based on the same EO. Both VOs live in different application modules (AM1 and AM2). One UIX page adds rows to the EO through VO1 (using Java to handle the UIX event), another UIX page displays the new rows through VO2 (using bc4j:table).
    Now during testing I encounter the following problem: After I add rows in VO1 and do AM1.getTransaction().commit(), I don't see any changes in VO2. As a workaround, I do VO2.executeQuery() immediately after the commit, but shouldn't the changes be automatically propagated if the VOs are based on the same EO?
    Is there a way to notify changes across user/session borders, e.g. if user A updates VO1, user B immediately sees the changes in VO2?
    Many thanks for any help!
    Markus.

    I think the behaviour you describe is normal and there are reasons for it: see a section entitled "How Does the Business Logic Tier Cache Data?" in the help. (In particular, the "Multiple view object instances and update, delete and insert behaviour" near the bottom.)
    Basically, because BC4J doesn't have an arbitrary-SQL evaluator it can't generally tell whether an entity belongs in a different view or not.
    I recall having read in these forums before (Sung Im, I think) that you're allowed to add a row to more than one view (and that only one entity will be created) but I think the views have to be of exactly the same format.
    HTH
    Mike.

  • UIX BC4J Problem with primary key

    Hello
    I use Business Components (Entity and Views) and the backend is a postgresql; it works with BC4J-JSP perfectly;
    i switched to use uix; but have strange problem:
    I have defined in the entity a create-Method to set the primary key of the current row to a defined value. If i test
    it in the component browser it works all; but when i switch to my application, i receive allways a "1" in the rendered field which should have the current primary key.
    Just to see if it works with Oracle right i tested also against Oracle 8.1.7! It works as it should.
    Has anybody an idea how i can solve the problem.

    Marcel,
    I cannot reproduce this in version 10.1.2.2. We did not "fix" this, although changes in the runtime might have fixed this "silently". I suggest you upgrade to 10.1.2.2 and see whether you still get the error.
    Steven Davelaar,
    JHeadstart Team.

  • UIX/BC4J:  messageCheckBox - Unparseable number: "On"

    I use a messageCheckBox to set values that will be posted to a database field of type Number(1). I expect it to post a 1 if the checkbox is selected. Here is the UIX tag:
    <bc4j:messageCheckBox id="idKUTD" name="Kutd" attrName="Kutd" prompt="KUTD" selectedValue="1" value="1"/>
    I have tried a number of combinations of setting parameters without success.
    However, when I select the checkbox and attempt to post it I get the error - Unparseable number: "On"
    Any help will be appreciated.

    Here is my latest effort:
    <bc4j:messageCheckBox id="idRPACCESS" name="Rpaccess" attrName="Rpaccess" prompt="BPN ETIP Access" selectValue="T" value="T">
    <boundAttribute name="text">
    <bc4j:attrValue name="Rpaccess"/>
    </boundAttribute>
    </bc4j:messageCheckBox>
    I changed the RPACCESS database field to be VARCHAR2(10) to see what would be written to the database.
    UIX writes the word "on" to the database when the checkbox is checked.
    The documentation says that the value of the parameter "value" should be written to the database.
    If I manually set the database field RPACCESS to "T" then selectedValue causes the checkbox to be checked.
    When I deselect the checkbox the value is set to null in the database.
    If I reselect the checkbox the word "on" gets sent to the database.
    This, of course, hoses everything up.
    Is this a bug or am I missing something.

  • UIX/BC4J: messageTextInput nulls out data.

    I switched a page from the use of messageInput to messageTextInput. This was so I would be able to control the attributes of the field better. However, now when I select Update instead of saving the new data it deletes it from the database. messageInput works messageTextInput nulls the data in the database.
    I tried setting the id value according to the note "UIX XML-BC4J: Bug on messageTextInput" but this did not solve my problem.
    Here is an example of one of the fields I changed:
    <!-- <bc4j:messageInput attrName="NOTES_GEN" /> -->
    <bc4j:messageTextInput id="genNotes"
    attrName="NOTES_GEN"
    prompt="Notes"
    columns="75"
    rows="4"
    maximumLength="1000"
    wrap="hard"/>
    Any ideas?

    We aren't properly defaulting the "name" attribute
    of <bc4j:messageTextInput> in the same way that we
    default it for <bc4j:messageInput>.
    So, set the "name" to match "attrName":
    <bc4j:messageTextInput id="genNotes"
    attrName="NOTES_GEN"
    name="NOTES_GEN"
    etc...
    />
    This has been fixed since 9.0.3 (the "name" problem,
    but unfortunately not the "id" problem).

  • UIX+BC4J : How to display "14000" to "14,000.00"?

    I want to display my data in column of a bc4j:table according to special formating,such as "14000" to "14,000.00".
    I have set the Attibute's Format in it's control hints setting.
    But it does not work.
    pleases help me .
    Thanks a lot.

    OK.
    <text>
      <boundAttribute name="text">
        <dataObject select="GrossTotalValue">
          <dataObject select="#.00">
            <dataObject select="formatNumber"/>
          </dataObject>
        </dataObject>                                     
      </boundAttribute>
    </text>With this code I use the Databing of UIX, with interface DataObject
    For each tag < dataobject > corresponds a class java which implements the DataObject interface
    The first DataObject called by UIX is
            <dataObject select="formatNumber"/>And this Dataobject return another DataObject class which it is called by
          <dataObject select="0.00">
          </dataObject>So on
    You must creates three Java class which is overlapping one in the other.
    I was bound to make like that, because one can pass one parameter in DataObject. And in my case I for of need three.
    Code In Java
    First class
      public Object selectValue(RenderingContext context, Object key)
        // Make sure that the key is non-null
        if (key != null)
          try
            // Treat the key as an attribute name
            return _row.getAttribute(key.toString());
          catch (NoDefException nde)
            // Do nothing.  It's legal to pass an invald key to DataObjects.
            //May be is a utils command
            String s = key.toString();
            else if (JBORowUtils.FORMAT_NUMBER.equals(key))
              return new JBORowUtils(_row,JBORowUtils.FORMAT_NUMBER);
        return null;
      }2e class
    public class JBORowUtils implements DataObject
      private final Row _row;
      private final String _test;
      public static final String FORMAT_NUMBER = "formatNumber";
      public JBORowUtils(Row row,String test)
        _row = row;
        _test = test;
      public Object selectValue(RenderingContext context, Object key)
        // Make sure that the key is non-null
        if (key != null)
          try
            if (_test.equals(FORMAT_NUMBER))
              return new JBODecimalFormat(_row,key.toString());
          catch (NoDefException nde)
            // Do nothing.  It's legal to pass an invald key to DataObjects.
        return null;
    }And third
    public class JBODecimalFormat implements DataObject
      private final Row _row;
      private final String _formatting;
      public JBODecimalFormat(Row row,String formatting)
        _formatting = formatting;
        _row = row;
      public Object selectValue(RenderingContext context, Object key)
        // Make sure that the key is non-null
        if (key != null)
          try
            // Treat the key as an attribute name
            Object _obj =_row.getAttribute(key.toString());
            if (_obj != null)
              try
                NumberFormat formatter = new DecimalFormat(_formatting);
                return formatter.format(Double.valueOf(_obj.toString())); 
              catch (Exception e)
              { //Formatting error return only the key.
                return _obj;
          catch (NoDefException e)
            // Do nothing.  It's legal to pass an invald key to DataObjects.
        return null;
    }

  • UIX BC4J Sample Demo

    Hi all,
    I have downloaded and installed UIX 2.1.7. When I tried running the BC4J Employee Demo, it gives me error :
    JBO-27122: SQL error during statement preparation. Statement: SELECT Dept.DEPTNO, Dept.DNAME, Dept.LOC FROM DEPT Dept
    I connect the demo to an Oracle 9i Database which has HR schema. I don't think this is the schema which BC4J demo refers to, cause this 9i HR schema does not have DEPT table, but it does have DEPARTMENTS table.
    Can anyone tell me where I can get the script for generating HR schema which the BC4J demo refers to ? Thanks.
    - Alfian -

    Hi all,
    Please ignore my previous thread. Silly me, it belongs to scott/tiger.
    - Alfian -

  • Uix & bc4j web.xml documentation

    Is there a document somewhere that describes all of the various parameters available for the web.xml files used by uix and bc4j?
    Thanks, Steve

    Repost.
    Hopefully there is something like this.
    Thanks, Steve

  • UIX/BC4J puzzle to render and unknown number of data tables.

    Hello, I have the next puzzle I haven't solved:
    The requirements for a page are that it has to render Contract numbers as table titles and Bills dued to each contract as table content, something like this:
    Contract No. 4353
    Bill No. Date Amount
    8799 25/04/2006 $800.00
    3690 25/04/2006 $1,000.00
    and then more tables like that as contract rows are found in a view object.
    I have two linked view objects: the contractView and the billsView.
    Besides, the contractView has attributes which should be rendered as the bills table footer (amount total for example).
    I found a way to iterate over the contractView and then the billsView, with something like this:
    <tableLayout>
        <contents childData="${bindings.contractViewIterator.allRowsInRange}">
             <rowLayout>
                  <contents>
                    <header text="${uix.current.contractNumber}"/>
                    <table tableData="${uix.current.attributeValues[15].allRowsInRange}"/>
                    <!-- the 15th attribute is the link accessor, so I'm getting the billsView here -->
                         <!-- and here would go more code to render the table contents -->
                    </table>
                  </contents>
              </rowLayout>
           </contents>
    </tableLayout>This works fine for tables with no footer data, but I need to display the footer section of the table, the problem is that the footer section data is in the parent view (contracts) and I cannot reference it inside the <table> because there the "uix.current" object represents a row in the billView.
    If someone has another idea of achieving this, I'd really appreciate it if you post it here, or a way to reference the parent uix.current object.
    Thank you.

    The only solution I came up with was to use the link accessor in the opposite direction, so I can get the contractView and display the totals on each column.
    So, the next code does it:
    <footer>
         <formattedText text="${uix.current.contracts.totalAmount}"/>
    </footer>Where contracts is the backwards accessor to the parent view object and totalAmount the attribute name to display in the column footer. I had to generate the row implementation for both view objects to access attributes by name to make it easier.
    I post the solution in case someone runs into the same problem.
    Thank you.

Maybe you are looking for