Bc4j:setAttribute

Hello to all of u,
I face a strange problem and I would appreciated it if anyone could help.
I am building a UIX XML application. I have changed the update_<view>.uix file to display to the user only the updatable columns. However when I try to change the Apply event I get a syntax error that the setAttribute element is not completed. Below you can see my code in the event handler:
<event name="apply" >
<bc4j:findRootAppModule name="DepartmentsViewAppModule">
<bc4j:findViewObject name="DepartmentsView">
<bc4j:findRow name="UpdateDepartmentsView">
<bc4j:setAttribute name="DeptCode"/>
<!-- commit the transaction -->
<bc4j:commit/>
<ctrl:go name="DepartmentsView_View" redirect="true" />
</bc4j:findRow>
</bc4j:findViewObject>
</bc4j:findRootAppModule>
</event>
I cannot see any errors, and all the documentation I found on setAttribute state the same thing (I tried copy&paste too).
I am not sure what version of UIX I am using, but I am using JDeveloper 9.0.2.822
Thank u in advance
Ioanna

try setting paramName on <bc4j:setAttribute>. I'm guessing you might have an older version of UIX where this isn't getting defaulted.

Similar Messages

  • bc4j:setAttribute and validater

    Hi, the parser bug reported in this thread, has it been solved or is there any work around for it?
    UIX/XML: <bc4j:setAttribute> and <validater>
    Basically I want serverside BC4J field validation, there might be another way to get it done?
    Thanks, Jan

    Jan,
    Sorry, the bug fix has not been released externally. Registering the below UIExtension should work, though.
    Hope this helps,
    Ryan Pollock
    UIX Team
    import oracle.cabo.share.xml.ParserManager;
    import oracle.cabo.ui.UIConstants;
    import oracle.cabo.ui.UIExtension;
    import oracle.cabo.ui.laf.LookAndFeel;
    import oracle.cabo.ui.validate.ServerValidater;
    import oracle.cabo.ui.xml.parse.ClientValidaterFactory;
    public class FixValidate implements UIExtension
    public void registerSelf(ParserManager manager)
    // Work around UIX bug with ServerValidater parsing
    manager.register(ServerValidater.class,
    UIConstants.MARLIN_NAMESPACE,
    ClientValidaterFactory.sharedInstance());
    public void registerSelf(LookAndFeel laf)
    }

  • UIX Bug - bc4j:setAttribute

    The context:
    We have a UIX form used to edit a view row. The 'save' event is executing a chain of bc4j:setAttribute events.
    The bug:
    The row contains an attribute having a null value. The corresponding text field into the form remains unchanged (empty). This means that on submit, the browser sends to the server a 'null' value. Unexpectedly, the setAttribute method for this attribute is invoked for the current ViewRowImpl. Since the value of the attribute is not changed, I am expecting a different behavior i.e. not invoking this method.
    thanks

    Hi,
    This is a bug, which has been filed.
    Thanks,
    Gabrielle

  • BC4J FindByKey problem

    I have a uiXML page where the user is entering data into a form, based on a entity object. A new row is created and the row key is set as a paeg property. In my java class (called from an event handler) I am trying to locate the newly created (and committed) row based on that key. The error I am receiving is :
    oracle.jbo.DMLException: JBO-26080: Error while selecting entity for Screening
    java.sql.SQLException: ORA-01410: invalid ROWID
    The handler on my uiXML page looks like this
    <event name="apply" >
    <bc4j:chaining>
    <bc4j:findRootAppModule name="ScreeningView1AppModule" >
        <bc4j:findViewObject name="ScreeningView1" >
            <bc4j:findRow name="CreateScreeningView1"  >
              <bc4j:setPageProperty name="key" >
                <bc4j:stringKey/>
              </bc4j:setPageProperty>
              <bc4j:setPageProperty name="screeningSite">
                <bc4j:parameter name="Site"/>
              </bc4j:setPageProperty>
              <bc4j:setAttribute name="Site"/>
              <bc4j:setAttribute name="Dob"/>
              <bc4j:setAttribute name="SjPositive"/>
              <bc4j:setAttribute name="SjSurvey"/>
              <bc4j:setAttribute name="Sj3Criteria"/>       
              <bc4j:setAttribute name="ConsentForm"/>       
              <bc4j:setAttribute name="ExcludedDiseases"/>               
              <bc4j:setAttribute name="ExcludedDisorders"/>               
              <bc4j:setAttribute name="SerumCreatinine"/>                       
              <bc4j:setAttribute name="HadCancer"/>                       
              <bc4j:setAttribute name="BirthControlOk"/>                       
              <bc4j:setAttribute name="OtherTrials"/>                       
              <bc4j:insertRow/>
              <bc4j:commit/>   
            </bc4j:findRow>
        </bc4j:findViewObject>
      </bc4j:findRootAppModule>
      <method class="jivrDemoPackage.Screening" method="createTxn"/>
      </bc4j:chaining>
    </event>and my java code in Screening.createTxn is
        ViewObject vo = ServletBindingUtils.getViewObject(context); 
        String pageKey = page.getProperty("key");
        Msg.println("Key page property " + pageKey);
        Key key = new Key(pageKey, vo.getAttributeDefs());  
        Row[] viewRows = vo.findByKey(key,1);
        Row viewRow = viewRows[0];The value printed out for pageKey looks like this "0001000000063837353830380000000A000000F6D14CE6B9
    " but straight after this, the error message given at the top of this posting is displayed. Any idea what I'm doing wrong ?
    Thanks,
    Brent

    I have also tried using "usesCurrency=true" in the bc4j registry def and then using ViewObject.getCurrentRow() in my Java and was not working. I realised then that my method call was outisde the view object scope so once I moved it back in (just before the </bc4j:findViewObject> tag) it worked !. However I could still not get the findByKey to work - the same error message was displayed ??
    Thanks
    Brent

  • UIX/XML BC4J - Controlling page flow in event handlers

    We have an event handler that executes some data processing using bc4j tags, and need to redirect the flow to another page, based on the value of some parameters. For example, we have a checkbox Prepare for another insert, and we want to check for its state in the event handler to determine which page to display.
    We tried the following code
    UIX page event handler:
    <event name="saveEvent" >
         <bc4j:findRootAppModule name="TipoPunteggioViewAppModule" >
              <bc4j:findViewObject name="TipoPunteggioView" >
                   <bc4j:findRow name="CreateTipoPunteggioView" >
                        <bc4j:setPageProperty name="keyTipoPunteggio" >
                             <bc4j:stringKey />
                        </bc4j:setPageProperty>
                        <bc4j:setAttribute name="FlgObsoleto" />
                        <bc4j:setAttribute name="Firma" />
                        <bc4j:setAttribute name="TitTipoPunteggio" />
                        <bc4j:insertRow/>
                        <bc4j:commit/>
                        <bc4j:executeQuery/>
                        <ctrl:method class="com.websiteitalia.valutazioni.handlers.Handlers"
                             method="anotherInsertEventHandler" />
                   </bc4j:findRow>
              </bc4j:findViewObject>
         </bc4j:findRootAppModule>
    </event>
    Java method event handler:
    public static EventResult anotherInsertEventHandler(BajaContext bCtx,
                                       Page page,
                                       PageEvent event) {
         // AnotherInsert is the name of the checkbox on the page
    if ("on".equals(event.getParameter("AnotherInsert"))) {
              return new EventResult(page);
         } else {
              return new EventResult(new Page("ListPage"));
    When we return the same page, things work fine, but when we return another page we get an ArrayIndexOutOfBoundException. We have also noticed that if we return a simple page, without data scopes and bc4j tags, we get the correct result. We are probably wrong in the manner we do the redirect inside of a java event handler, because seems that the page we return is not completely processed.
    Can anyone explain the available techniques to control the page flow, using UIX XML tags or Java APIs alone or both of these together? For example, how can be replicated the <ctrl:go> behavior using Java APIs?

    The UIX page works correctly if loaded directly, the error takes place only when we redirect in this manner from a page that has a different application module / view object scopes. In fact, when we redirect to a page that have the same scopes of the first (or when the second page has not scopes at all the simple page) the error doesnt occur. Thats why we suppose that some step of the page rendering process arent executed correctly, it seems that the new page still finds some of the old page (the scopes)..
    To redirect to a page from a java event handler we have returned an event result with the next page (see above post for a code snippet), is this the correct way? Can we simulate the ctrl:go tag from the java code (with the redirect=true option)? There are any other?

  • UIX XML - BC4J +

    We are implementing a functionality to insert new elements using BC4J components and UIX XML.
    We have carefully followed istruction from the UIX developer's guide (Business Components for Java Integration) but we notice some problems
    that we suppose are due to RowDefs with autocreate=true and the KEY attribute management flow.
    The components implemented have:
    1) A create method implemented for setting entity primary key using a DB sequence and other default values:
         protected void create(AttributeList attributeList) {
              super.create(attributeList);
              SequenceImpl seq = new SequenceImpl("VA_TIPO_PUNTEGGIO_SEQ", getDBTransaction());
              setAttribute("IdTipoPunteggio", seq.getSequenceNumber());
              setDataAgg(new Date( new Timestamp(System.currentTimeMillis())));
    2) A validation rule that checks for duplicate description using a ListCompare:
    <ListValidationBean
    OnAttribute="TitTipoPunteggio"
    OperandType="SQL"
    Inverse="true"
    ListValue="select tit_tipo_punteggio from va_tipo_punteggio where id_tipo_punteggio &#60;&#62; %IdTipoPunteggio%" >
    </ListValidationBean>
    Our problems are:
    1) The ID taken from a DB Sequence are increased by 2 (this doesn't occur using test on application module), and we suppose that it happens because row isn't
    found using the correct KEY property.
    2) When the validation's rule is triggered, row data aren't reloaded
    UIX code for apply event is:
    <event name="saveEvent" >
         <bc4j:findRootAppModule name="TipoPunteggioViewAppModule" >
              <bc4j:findViewObject name="TipoPunteggioView" >
                   <bc4j:findRow name="newRow">
                        <bc4j:setPageProperty name="key" >
                             <bc4j:stringKey />
                        </bc4j:setPageProperty>
                        <bc4j:setAttribute name="IdTipoPunteggio" />
                        <bc4j:setAttribute name="TitTipoPunteggio" />
                        <bc4j:setAttribute name="FlgObsoleto" />
                        <bc4j:insertRow/>
                        <bc4j:commit/>
                        <bc4j:executeQuery/>
                        <ctrl:go redirect="true" name="Anagrafiche_TipiPunteggio"/>
                   </bc4j:findRow>
              </bc4j:findViewObject>
         </bc4j:findRootAppModule>
    </event>
    However we have doubts on the code flow because we suppose the following istruction are missing before the findRow tag:
    <bc4j:setPageProperty name="keyTipoPunteggio" >
         <bc4j:parameter name="keyTipoPunteggio"/>
    </bc4j:setPageProperty>
    otherwise what is the reason of the keyStamp tag declared on the region?
    Moreover we don't understand the purpose of these instructions:
    <bc4j:setPageProperty name="keyTipoPunteggio" >
         <bc4j:stringKey />
    </bc4j:setPageProperty>
    because when validation on the row occurs, data of the rejected row are not reloaded.
    Perhaps would be useful an HowTo or a detailed explanation of interaction between registryDefs and event handler tags.
    TIA

    Our problems are:
    1) The ID taken from a DB Sequence are increased by 2 (this doesn't occur using test on application module), and we suppose that it happens because row isn't found using the correct KEY property.This is correct.
    2) When the validation's rule is triggered, row data aren't reloaded
    UIX code for apply event is: <snip>
    Replace it with this:
    <event name="saveEvent" >
    <bc4j:findRootAppModule name="TipoPunteggioViewAppModule" >
    <bc4j:findViewObject name="TipoPunteggioView" >
    <bc4j:setPageProperty name="key" >
    <bc4j:parameter name="key" />
    </bc4j:setPageProperty>
    <bc4j:findRow name="newRow">
    <bc4j:setAttribute name="IdTipoPunteggio" />
    <bc4j:setAttribute name="TitTipoPunteggio" />
    <bc4j:setAttribute name="FlgObsoleto" />
    <bc4j:insertRow/>
    <bc4j:setPageProperty name="key" >
    <bc4j:stringKey />
    </bc4j:setPageProperty>
    <bc4j:commit/>
    <bc4j:executeQuery/>
    <ctrl:go redirect="true" name="Anagrafiche_TipiPunteggio"/>
    </bc4j:findRow>
    </bc4j:findViewObject>
    </bc4j:findRootAppModule>
    </event>
    The main issue is that the string representation of the key changes when the row is inserted into the view object. It is a "short" key before insert and a "long" key after insert. Also, "short" keys cannot be found by ViewObject APIs to locate rows when the key is still "short".
    Here is the flow:
    1. Create page is rendered, auto-creating a new row with "short" key.
    2. In apply event handler, we must set the page property based on the submitted key
    to find the same row. Unfortunately, the "short" key does not find the old row, so
    we end up creating a new one for this request (incrementing the sequence).
    3. We may get as far as inserting the new row, upgrading to a "long" key.
    4. So we update the page property after a successful insert to the new "long" key.
    5. We rerender the page and use the page property to find the row, most likely the "long" key.
    [Note: if an exception occurred during set attribute, before insert row, the key will still
              be "short"]
    6. Once we get as far as attempting insertRow, the key will become "long" and locatable by
    ViewObject APIs.
    You don't encounter this problem in the tester because it can keep an in-memory handle to the row it
    is trying to insert for the duration of the insert attempt.
    The web-based UI relies on key-based references instead, which have the issue outlined above.
    We will follow up on this to see if "short" keys can be located by ViewObject APIs in future, allowing
    the same reference to be found across requests.
    Regards,
    John Fallows.

  • Detail-Disclosure problem with Master- Detail VO

    Hi,
    I have UIX pages based on Master - Detail VO, detail data being shown when you press Detail button on the left, detail data display in the BC4J Table correctly, but I am able to update only the last record of the rowset. when I click on the first master detail and press update button i get Null Pointer Exeception error and other problem is that my detail data has sorted headers, when i click on the sorted column header, it close the Detail portion on the Table.
    Here is UIX page listing, please any one review the code and let me what is wrong
    Thanks
    View Page
    <?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"
    xmlns:html="http://www.w3.org/TR/REC-html40"
    xmlns:viewpage="http://www.example.org/siriusbilling/templates">
    <ctrl:head xmlns="http://www.w3.org/TR/REC-html40">
    <title>View Properties</title>
    </ctrl:head>
    <templates xmlns="http://xmlns.oracle.com/uix/ui">
    <templateImport source="templates/SiriusBilling.uit"/>
    </templates>
    <bc4j:registryDef>
    <bc4j:rootAppModuleDef name="PropertiesForeignKeyLink1AppModule"
    definition="siriusbilling.SiriusBCModule"
    releaseMode="stateful" >
    <bc4j:viewObjectDef name="PropertyTypesMasterView"
    rangeSize="2" />
    <bc4j:viewObjectDef name="PropertiesDetailView"
    rangeSize="5" />
    </bc4j:rootAppModuleDef>
    </bc4j:registryDef>
    <ctrl:content xmlns="http://xmlns.oracle.com/uix/ui"
    xmlns:data="http://xmlns.oracle.com/uix/ui">
    <viewpage:siriusPageLayout>
    <pageHeader>
    <globalHeader selectedIndex="0">
    <contents>
    <link text="View Properties" />
    </contents>
    </globalHeader >
    </pageHeader>
    <contents>
    <try xmlns="http://xmlns.oracle.com/uix/ui"
    xmlns:data="http://xmlns.oracle.com/uix/ui" >
    <catch>
    <displayException />
    </catch>
    <contents>
    <!-- this will contain any validation errors after form
    submission -->
    <messageBox automatic="true" />
    <bc4j:rootAppModuleScope name="PropertiesForeignKeyLink1AppModule" >
    <contents>
    <header text="Properties Search" >
    <contents>
    <form name="search" method="POST" >
    <contents>
    <inlineMessage prompt="Search by:" vAlign="middle" >
    <contents>
    <bc4j:viewObjectScope name="PropertiesDetailView" >
    <contents>
    <flowLayout>
    <contents>
    <choice name="attrName"
    data:selectedValue="attrName@ctrl:page"
    shortDesc="Search Column">
    <contents>
    <option text="Property Id" value="PropertyId" />
    <option text="Property Name" value="PropertyName" />
    <option text="Property Description" value="PropertyDescription" />
    <option text="Unit Of Measure" value="UnitOfMeasure" />
    </contents>
    </choice>
    <textInput prompt="Criteria" name="attrValue" columns="20"
    data:text="attrValue@ctrl:page"
    shortDesc="Search Criteria for Propeties"/>
    </contents>
    </flowLayout>
    </contents>
    </bc4j:viewObjectScope>
    </contents>
    <end>
    <submitButton text="Go" ctrl:event="search" />
    </end>
    </inlineMessage>
    </contents>
    </form>
    </contents>
    </header>
    <spacer width="10"/>
    <separator />
    <header text="Property Types" >
    <contents>
    <form name="viewForm" method="POST" >
    <contents>
    <bc4j:viewObjectScope name="PropertyTypesMasterView" >
    <contents>
    <bc4j:table name="viewPropertyTypeTable" automatic="false"
    width="100%" alternateText="No rows found"
    formSubmitted="true"
    partialRenderMode="self"
    data:detailDisclosure="tableDetails@ctrl:eventResult">
    <!-- the key identifying the current row in the table -->
    <bc4j:keyStamp>
    <bc4j:rowKey name="key" />
    </bc4j:keyStamp>
    <contents>
    <!-- placing the region in automatic mode will cause the key
    named child to be rendered, followed by each attribute
    in the ViewObject using the attrStamp named child. -->
    <!-- A bc4j:column element is added for each attribute
    in the ViewObject. -->
    <bc4j:column attrName="PropertyType">
    <columnHeader>
    <bc4j:sortableHeader text="Property Type"/>
    </columnHeader>
    <contents>
    <bc4j:input readOnly="true"/>
    </contents>
    </bc4j:column>
    <bc4j:column attrName="TableName">
    <columnHeader>
    <bc4j:sortableHeader text="Table Name"/>
    </columnHeader>
    <contents>
    <bc4j:input readOnly="true"/>
    </contents>
    </bc4j:column>
    <bc4j:column attrName="Comments" >
    <columnHeader>
    Comments
    </columnHeader>
    <contents>
    <bc4j:input readOnly="true"/>
    </contents>
    </bc4j:column>
    </contents>
    <detail>
    <flowLayout>
    <contents>
    <header text="Properties Detail">
    <contents>
    <spacer width="10"/>
    <bc4j:viewObjectScope name="PropertiesDetailView" >
    <contents>
    <!-- placing the table in automatic mode will cause the table
    to contain the keyStamp named child followed by the
    columnStamp named child for each attribute in the
    ViewObject. -->
    <bc4j:table name="viewTable" automatic="false"
    width="100%" alternateText="No rows found"
    formSubmitted="true"
    partialRenderMode="self">
    <tableSelection>
    <!-- single selection for each row in the table -->
    <singleSelection selectedIndex="0" text="Select Row and ...">
    <contents>
    <submitButton text="Create" ctrl:event="create" />
    <!-- the update button causes the currently selected
    row to be sent to the update page -->
    <submitButton text="Update"
    ctrl:event="update" />
    <!-- the delete button causes the currently selected
    row to be removed -->
    <submitButton text="Delete"
    ctrl:event="delete" />
    </contents>
    </singleSelection>
    </tableSelection>
    <!-- the key identifying the current row in the table -->
    <bc4j:keyStamp>
    <bc4j:rowKey name="key" />
    </bc4j:keyStamp>
    <contents>
    <!-- A bc4j:column element is added for each attribute
    in the ViewObject. -->
    <bc4j:column attrName="PropertyId">
    <columnHeader>
    <bc4j:sortableHeader text="Property Id"/>
    </columnHeader>
    <contents>
    <bc4j:input readOnly="true"/>
    </contents>
    </bc4j:column>
    <bc4j:column attrName="PropertyName">
    <columnHeader>
    <bc4j:sortableHeader text="Property Name"/>
    </columnHeader>
    <contents>
    <bc4j:input readOnly="true"/>
    </contents>
    </bc4j:column>
    <bc4j:column attrName="PropertyDescription">
    <columnHeader>
    <bc4j:sortableHeader text="Property Description"/>
    </columnHeader>
    <contents>
    <bc4j:input readOnly="true"/>
    </contents>
    </bc4j:column>
    <bc4j:column attrName="UnitOfMeasure">
    <columnHeader>
    <bc4j:sortableHeader text="Unit of Measure"/>
    </columnHeader>
    <contents>
    <bc4j:input readOnly="true"/>
    </contents>
    </bc4j:column>
    </contents>
    </bc4j:table>
    </contents>
    </bc4j:viewObjectScope>
    <formValue name="disclosed" value="true" />
    </contents>
    </header>
    </contents>
    </flowLayout>
    </detail>
    </bc4j:table>
    </contents>
    </bc4j:viewObjectScope>
    </contents>
    </form>
    </contents>
    </header>
    </contents>
    </bc4j:rootAppModuleScope>
    </contents>
    </try>
    </contents>
    </viewpage:siriusPageLayout>
    </ctrl:content>
    <handlers>
    <event name="search" >
    <!-- using the ApplicationModule causes it to be checked out from the
    ApplicationPool. It is released using stateful mode. -->
    <bc4j:findRootAppModule name="PropertiesForeignKeyLink1AppModule" >
    <!-- establish the ViewObject scope -->
    <bc4j:findViewObject name="PropertiesDetailView" >
    <!-- search for the view criteria -->
    <bc4j:findByExample>
    <bc4j:exampleRow ignoreCase="true" >
    <bc4j:exampleAttribute>
    <bc4j:nameBinding><bc4j:parameter name="attrName" /></bc4j:nameBinding>
    <bc4j:valueBinding><bc4j:parameter name="attrValue" /></bc4j:valueBinding>
    </bc4j:exampleAttribute>
    </bc4j:exampleRow>
    </bc4j:findByExample>
    <bc4j:executeQuery/>
    <!-- store the current search criteria as page properties -->
    <bc4j:setPageProperty name="attrName" >
    <bc4j:parameter name="attrName" />
    </bc4j:setPageProperty>
    <bc4j:setPageProperty name="attrValue" >
    <bc4j:parameter name="attrValue" />
    </bc4j:setPageProperty>
    </bc4j:findViewObject>
    </bc4j:findRootAppModule>
    </event>
    <event name="first" >
    <!-- using the ApplicationModule causes it to be checked out from the
    ApplicationPool. It is released using stateful mode. -->
    <bc4j:findRootAppModule name="PropertiesForeignKeyLink1AppModule" >
    <!-- establish the ViewObject scope -->
    <bc4j:findViewObject name="PropertyTypesMasterView" >
    <!-- navigate to the first department -->
    <bc4j:first/>
    </bc4j:findViewObject>
    </bc4j:findRootAppModule>
    </event>
    <event name="previous" >
    <!-- using the ApplicationModule causes it to be checked out from the
    ApplicationPool. It is released using stateful mode. -->
    <bc4j:findRootAppModule name="PropertiesForeignKeyLink1AppModule" >
    <!-- establish the ViewObject scope -->
    <bc4j:findViewObject name="PropertyTypesMasterView" >
    <!-- navigate to the previous department -->
    <bc4j:previous/>
    </bc4j:findViewObject>
    </bc4j:findRootAppModule>
    </event>
    <event name="next" >
    <!-- using the ApplicationModule causes it to be checked out from the
    ApplicationPool. It is released using stateful mode. -->
    <bc4j:findRootAppModule name="PropertiesForeignKeyLink1AppModule" >
    <!-- establish the ViewObject scope -->
    <bc4j:findViewObject name="PropertyTypesMasterView" >
    <!-- navigate to the next department -->
    <bc4j:next/>
    </bc4j:findViewObject>
    </bc4j:findRootAppModule>
    </event>
    <event name="last" >
    <!-- using the ApplicationModule causes it to be checked out from the
    ApplicationPool. It is released using stateful mode. -->
    <bc4j:findRootAppModule name="PropertiesForeignKeyLink1AppModule" >
    <!-- establish the ViewObject scope -->
    <bc4j:findViewObject name="PropertyTypesMasterView" >
    <!-- navigate to the last department -->
    <bc4j:last/>
    </bc4j:findViewObject>
    </bc4j:findRootAppModule>
    </event>
    <event name="sort" source="viewTable" >
    <!-- using the ApplicationModule causes it to be checked out from the
    ApplicationPool. It is released using stateful mode. -->
    <bc4j:findRootAppModule name="PropertiesForeignKeyLink1AppModule" >
    <!-- establish the ViewObject scope -->
    <bc4j:findViewObject name="PropertiesDetailView" >
    <!-- sort by the submitted attribute name -->
    <bc4j:sort/>
    </bc4j:findViewObject>
    </bc4j:findRootAppModule>
    </event>
    <event name="sort" source="viewPropertyTypeTable" >
    <!-- using the ApplicationModule causes it to be checked out from the
    ApplicationPool. It is released using stateful mode. -->
    <bc4j:findRootAppModule name="PropertiesForeignKeyLink1AppModule" >
    <!-- establish the ViewObject scope -->
    <bc4j:findViewObject name="PropertyTypesMasterView" >
    <!-- sort by the submitted attribute name -->
    <bc4j:sort/>
    </bc4j:findViewObject>
    </bc4j:findRootAppModule>
    </event>
    <event name="goto" source="viewPropertyTypeTable" >
    <!-- using the ApplicationModule causes it to be checked out from the
    ApplicationPool. It is released using stateful mode. -->
    <bc4j:findRootAppModule name="PropertiesForeignKeyLink1AppModule" >
    <!-- establish the ViewObject scope -->
    <bc4j:findViewObject name="PropertyTypesMasterView" >
    <!-- navigate to the submitted range -->
    <bc4j:goto/>
    </bc4j:findViewObject>
    </bc4j:findRootAppModule>
    </event>
    <event name="goto" source="viewTable" >
    <!-- using the ApplicationModule causes it to be checked out from the
    ApplicationPool. It is released using stateful mode. -->
    <bc4j:findRootAppModule name="PropertiesForeignKeyLink1AppModule" >
    <!-- establish the ViewObject scope -->
    <bc4j:findViewObject name="PropertiesDetailView" >
    <!-- navigate to the submitted range -->
    <bc4j:goto/>
    </bc4j:findViewObject>
    </bc4j:findRootAppModule>
    </event>
    <event name="create" >
    <!-- forward to the create page -->
    <ctrl:go name="InsertProperties" redirect="true" />
    </event>
    <event name="update" >
    <!-- forward to the update page, passing the selected key
    as a page property -->
    <ctrl:go name="UpdateProperties" redirect="true" >
    <ctrl:property name="key" >
    <ctrl:selection name="viewTable" key="key" />
    </ctrl:property>
    </ctrl:go>
    </event>
    <event name="delete" >
    <!-- using the ApplicationModule causes it to be checked out from the
    ApplicationPool. It is released using stateful mode. -->
    <bc4j:findRootAppModule name="PropertiesForeignKeyLink1AppModule" >
    <!-- establish the ViewObject scope -->
    <bc4j:findViewObject name="PropertiesDetailView" >
    <!-- find the selected Row -->
    <bc4j:findRowByKey>
    <bc4j:keyBinding>
    <bc4j:selectionKey name="viewTable" key="key" />
    </bc4j:keyBinding>
    <bc4j:handlers>
    <!-- remove the selected ViewObject row -->
    <bc4j:removeRow />
    <!-- execute the query to eliminate dead row access -->
    <bc4j:executeQuery/>
    </bc4j:handlers>
    </bc4j:findRowByKey>
    </bc4j:findViewObject>
    <!-- commit the transaction, forwards to self automatically -->
    <bc4j:commit/>
    </bc4j:findRootAppModule>
    </event>
    <event name="show">
    <method class="servlet.showDetails" method="doHideShowEvent" />
    </event>
    <event name="hide">
    <method class="servlet.showDetails" method="doHideShowEvent" />
    </event>
    </handlers>
    </page>
    Update View
    <?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"
    xmlns:html="http://www.w3.org/TR/REC-html40"
    xmlns:updatepage="http://www.example.org/siriusbilling/templates">
    <ctrl:head xmlns="http://www.w3.org/TR/REC-html40">
    <title>Update Properties</title>
    </ctrl:head>
    <templates xmlns="http://xmlns.oracle.com/uix/ui">
    <templateImport source="templates/SiriusBilling.uit"/>
    </templates>
    <bc4j:registryDef>
    <bc4j:rootAppModuleDef name="PropertiesForeignKeyLink1AppModule"
    definition="siriusbilling.SiriusBCModule"
    releaseMode="stateful" >
    <bc4j:viewObjectDef name="PropertiesDetailView" >
    <bc4j:rowDef name="UpdatePropertiesDetailView" autoCreate="false" usesCurrency="true">
    <bc4j:propertyKey name="key" />
    </bc4j:rowDef>
    </bc4j:viewObjectDef>
    <!-- Display only 20 rows -->
    <bc4j:viewObjectDef name="PropertyTypesView" rangeSize="20" >
    <bc4j:rowDef name="UpdatePropertyTypesView" autoCreate="false">
    <bc4j:propertyKey name="key" />
    </bc4j:rowDef>
    </bc4j:viewObjectDef>
    </bc4j:rootAppModuleDef>
    </bc4j:registryDef>
    <ctrl:content xmlns="http://xmlns.oracle.com/uix/ui"
    xmlns:data="http://xmlns.oracle.com/uix/ui">
    <updatepage:siriusPageLayout>
    <pageHeader>
    <globalHeader selectedIndex="0">
    <contents>
    <link text="Update Property" />
    </contents>
    </globalHeader >
    </pageHeader>
    <contents>
    <try xmlns="http://xmlns.oracle.com/uix/ui"
    xmlns:data="http://xmlns.oracle.com/uix/ui" >
    <catch>
    <displayException />
    </catch>
    <contents>
    <switcher childName="default">
    <boundAttribute name="childName">
    <if>
    <comparison type="equals">
    <dataObject select="key" source="ctrl:page"/>
    <dataObject source="ui:null"/>
    </comparison>
    <fixed text="error"/>
    </if>
    </boundAttribute>
    <case name="error">
    <header text="Required page property 'Property Type' missing. Cannot display page."/>
    </case>
    <case name="default">
    <flowLayout>
    <contents>
    <!-- this will contain any validation errors after form
    submission -->
    <messageBox automatic="true" />
    <script>
    <contents>
    function UOMLovCallBack(lovwin, event)
    var value = lovwin.returnUOMValue;
    if (value!=(void 0))
    document.updateForm.UnitOfMeasure.value = lovwin.returnUOMValue;
    </contents>
    </script>
    <form name="updateForm" method="POST" >
    <contents>
    <!-- we cannot implicitly determine that events
    will be triggered because submit buttons are
    outside the form scope, so add the placeholder
    explicitly -->
    <formParameter name="event" />
    <!-- layout the fields in two columns -->
    <spacer width="10"/>
    <tableLayout width="80%"
    cellPadding="2"
    hAlign="center">
    <contents>
    <bc4j:rootAppModuleScope name="PropertiesForeignKeyLink1AppModule" >
    <contents>
    <bc4j:viewObjectScope name="PropertiesDetailView" >
    <contents>
    <bc4j:rowScope name="UpdatePropertiesDetailView" >
    <contents>
    <bc4j:messageChoice prompt="Property Type" attrName="PropertyType" name="PropertyType">
    <contents>
    <bc4j:optionList voName="PropertyTypesView" attrName="PropertyType" textAttributeName="PropertyType" size="30"/>
    </contents>
    </bc4j:messageChoice>
    <bc4j:messageInput prompt="Property Id" vAlign="left" attrName="PropertyId" size="30"/>
    <bc4j:messageInput prompt="Property Name" attrName="PropertyName" size="30"/>
    <bc4j:messageInput prompt="Property Description" attrName="PropertyDescription" size="30" />
    <bc4j:messageLovField prompt="Unit Of Measure"
    attrName="UnitOfMeasure"
    name="UnitOfMeasure"
    onClick="openWindow(window,
    'UOMLov.uix',
    'lovwin',
    {width:480, height:300},
    true,
    'dialog',
    UOMLovCallBack);
    return false;" />
    </contents>
    </bc4j:rowScope>
    </contents>
    </bc4j:viewObjectScope>
    </contents>
    </bc4j:rootAppModuleScope>
    </contents>
    </tableLayout>
    </contents>
    </form>
    </contents>
    <contents>
    <contentFooter>
    <contents>
    <html:center>
    <!-- place a row of buttons below the content -->
    <pageButtonBar>
    <contents>
    <!-- the cancel button performs a transaction rollback -->
    <button text="Cancel" ctrl:event="cancel" />
    <!-- the update button submits the user-entered
    form data -->
    <submitButton text="Update" formName="updateForm"
    ctrl:event="apply" />
    </contents>
    </pageButtonBar>
    </html:center>
    </contents>
    </contentFooter>
    </contents>
    </flowLayout>
    </case>
    </switcher>
    </contents>
    </try>
    </contents>
    </updatepage:siriusPageLayout>
    </ctrl:content>
    <handlers>
    <event name="cancel" >
    <!-- using the ApplicationModule causes it to be checked out from the
    ApplicationPool. It is released using stateful mode. -->
    <bc4j:findRootAppModule name="PropertiesForeignKeyLink1AppModule" >
    <!-- rollback the current transaction -->
    <bc4j:rollback/>
    <!-- forward to the summary page -->
    <ctrl:go name="ViewProperties" redirect="true" />
    </bc4j:findRootAppModule>
    </event>
    <event name="apply" >
    <!-- using the ApplicationModule causes it to be checked out from the
    ApplicationPool. It is released using stateful mode. -->
    <bc4j:findRootAppModule name="PropertiesForeignKeyLink1AppModule" >
    <!-- establish the ViewObject scope -->
    <bc4j:findViewObject name="PropertiesDetailView" >
    <!-- find the row by key, falling back on a new default
    row if the key is not found -->
    <bc4j:findRow name="UpdatePropertiesDetailView" >
    <!-- set each attribute explicitly -->
    <bc4j:setAttribute name="PropertyId" />
    <bc4j:setAttribute name="PropertyType" />
    <bc4j:setAttribute name="PropertyName" />
    <bc4j:setAttribute name="PropertyDescription" />
    <bc4j:setAttribute name="UnitOfMeasure" />
    <!-- commit the transaction -->
    <bc4j:commit/>
    <bc4j:executeQuery/>
    <!-- forward to the summary page -->
    <ctrl:go name="ViewProperties" redirect="true" />
    </bc4j:findRow>
    </bc4j:findViewObject>
    </bc4j:findRootAppModule>
    </event>
    </handlers>
    </page>

    I think the detailDisclosure state needs to be saved and retrieved from the session.
    I'm not sure using a table with singleSelection inside a detail disclosure is supported. Are you doing master-detail inside of detail disclosure? Detail disclosure is not really meant for that. In jdev 10g preview we make hooking up a master-detail easy. Here's a link to some doc about it.
    http://otn.oracle.com/products/jdev/collateral/tutorials/9050/adfuix_tut.html#Create%20a%20Master-Detail%20page

  • LOV problem : here is my code

    Hello all,
    I've been trawling through the forums trying to find a solution to this problem but with no success.
    I am trying to create an LOV for my application, the Activity_Plan_ObjectView1_Update page accesses the LOV (via LocationLOV.uix) which is meant to then update this page.
    Here is my code, the first page has the BC4J tag which opens the LocationLOV.uix page, I think the problem lies with how I'm trying to pass the parameter back to the Activity_Plan_ObjectView1_Update page :
    Activity_Plan_ObjectView1_Update :
    <?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="Activity_Plan_ObjectView1AppModule"
    definition="uiXML.BC4J_PackageModule"
    releaseMode="stateful" >
    <bc4j:viewObjectDef name="Activity_Plan_ObjectView1" >
    <bc4j:rowDef name="UpdateActivity_Plan_ObjectView1" autoCreate="false" >
    <bc4j:propertyKey name="key" />
    </bc4j:rowDef>
    </bc4j:viewObjectDef>
    </bc4j:rootAppModuleDef>
    </bc4j:registryDef>
    <content>
    <try xmlns="http://xmlns.oracle.com/uix/ui"
    xmlns:data="http://xmlns.oracle.com/uix/ui" >
    <catch>
    <displayException />
    </catch>
    <contents>
    <switcher childName="default">
    <boundAttribute name="childName">
    <if>
    <comparison type="equals">
    <dataObject select="key" source="ctrl:page"/>
    <dataObject source="ui:null"/>
    </comparison>
    <fixed text="error"/>
    </if>
    </boundAttribute>
    <case name="error">
    <header text="Required page property 'key' missing. Cannot display page."/>
    </case>
    <case name="default">
    <pageLayout title="Activity Plan - Update" >
    <!-- Start of common pageLayout section. If you plan to expand this
    example application, consider using a UIT template to specify the common
    portions of your pageLayout -->
    <productBranding>
    <image source="tools_collage.gif" shortDesc="JDeveloper Product Logo"/>
    </productBranding>
    <corporateBranding>
    <image source="oraclelogo.gif" shortDesc="Oracle Logo"/>
    </corporateBranding>
    <globalButtons>
    <globalButtonBar>
    <contents>
    <globalButton source="www_home.gif"
    text="Home"
    destination="Main.uix" />
    <globalButton source="www_contact.gif"
    text="Contact Us"
    destination="http://www.oracle.com" />
    <globalButton source="www_help.gif"
    text="Help"
    destination="http://otn.oracle.com/products/jdev/content.html" />
    </contents>
    </globalButtonBar>
    </globalButtons>
    <copyright>Copyright 2002 Oracle Corporation. All Rights Reserved.</copyright>
    <privacy>
    <link text="Privacy Statement" destination="http://www.oracle.com"/>
    </privacy>
    <!-- End of common pageLayout section -->
    <contents>
    <!-- this will contain any validation errors after form
    submission -->
    <messageBox automatic="true" />
    <form name="updateForm" method="POST" >
    <contents>
    <!-- we cannot implicitly determine that events
    will be triggered because submit buttons are
    outside the form scope, so add the placeholder
    explicitly -->
    <formParameter name="event" />
    <!-- layout the fields in two columns -->
    <tableLayout>
    <contents>
    <bc4j:rootAppModuleScope name="Activity_Plan_ObjectView1AppModule" >
    <contents>
    <bc4j:viewObjectScope name="Activity_Plan_ObjectView1" >
    <contents>
    <bc4j:rowScope name="UpdateActivity_Plan_ObjectView1" >
    <contents>
    <bc4j:messageInput attrName="PlanId" prompt="Plan ID" />
    <bc4j:messageInput attrName="PlanType" prompt="Plan Type"/>
    <bc4j:messageInput attrName="PlanTypeCode" />
    <bc4j:messageInput attrName="PlanDesc" />
    <bc4j:messageInput attrName="PlanStart" />
    <bc4j:messageInput attrName="PlanFinish" />
    <bc4j:messageInput attrName="ActivityApproved" />
    <bc4j:messageInput attrName="CreatedBy" />
    <bc4j:messageLovField attrName="DeployToLocation"
    onClick="openWindow(top,
    'LocationLOV.uix',
    'lovWindow',
    {width:400, height:450},
    true,
    'dialog')" />
    </contents>
    </bc4j:rowScope>
    </contents>
    </bc4j:viewObjectScope>
    </contents>
    </bc4j:rootAppModuleScope>
    </contents>
    </tableLayout>
    </contents>
    </form>
    </contents>
    <contentFooter>
    <!-- place a row of buttons below the content -->
    <pageButtonBar>
    <contents>
    <!-- the cancel button performs a transaction rollback -->
    <button text="Cancel" ctrl:event="cancel" />
    <!-- the update button submits the user-entered
    form data -->
    <submitButton text="Update" formName="updateForm"
    ctrl:event="apply" />
    </contents>
    </pageButtonBar>
    </contentFooter>
    </pageLayout>
    </case>
    </switcher>
    </contents>
    </try>
    </content>
    <handlers>
    <event name="cancel" >
    <!-- using the ApplicationModule causes it to be checked out from the
    ApplicationPool. It is released using stateful mode. -->
    <bc4j:findRootAppModule name="Activity_Plan_ObjectView1AppModule" >
    <!-- rollback the current transaction -->
    <bc4j:rollback/>
    <!-- forward to the summary page -->
    <ctrl:go name="Activity_Plan_ObjectView1_View" redirect="true" />
    </bc4j:findRootAppModule>
    </event>
    <event name="apply" >
    <!-- using the ApplicationModule causes it to be checked out from the
    ApplicationPool. It is released using stateful mode. -->
    <bc4j:findRootAppModule name="Activity_Plan_ObjectView1AppModule" >
    <!-- establish the ViewObject scope -->
    <bc4j:findViewObject name="Activity_Plan_ObjectView1" >
    <!-- find the row by key, falling back on a new default
    row if the key is not found -->
    <bc4j:findRow name="UpdateActivity_Plan_ObjectView1" >
    <!-- set each attribute explicitly -->
    <bc4j:setAttribute name="PlanId" />
    <bc4j:setAttribute name="PlanType" />
    <bc4j:setAttribute name="PlanTypeCode" />
    <bc4j:setAttribute name="PlanDesc" />
    <bc4j:setAttribute name="PlanStart" />
    <bc4j:setAttribute name="PlanFinish" />
    <bc4j:setAttribute name="ActivityApproved" />
    <bc4j:setAttribute name="CreatedBy" />
    <bc4j:setAttribute name="DeployToLocation" />
    <!-- commit the transaction -->
    <bc4j:commit/>
    <bc4j:executeQuery/>
    <!-- forward to the summary page -->
    <ctrl:go name="Activity_Plan_ObjectView1_View" redirect="true" />
    </bc4j:findRow>
    </bc4j:findViewObject>
    </bc4j:findRootAppModule>
    </event>
    </handlers>
    </page>
    LocationLOV.uix :
    <?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="LocationView1AppModule"
    definition="uiXML.BC4J_PackageModule"
    releaseMode="stateful" >
    <bc4j:viewObjectDef name="LocationView1"
    rangeSize="5" />
    </bc4j:rootAppModuleDef>
    </bc4j:registryDef>
    <content>
    <try xmlns="http://xmlns.oracle.com/uix/ui"
    xmlns:data="http://xmlns.oracle.com/uix/ui" >
    <catch>
    <displayException />
    </catch>
    <contents>
    <pageLayout xmlns="http://xmlns.oracle.com/uix/ui"
    xmlns:data="http://xmlns.oracle.com/uix/ui"
    title="Location LOV" >
    <!-- Start of common pageLayout section. If you plan to expand this
    example application, consider using a UIT template to specify the common
    portions of your pageLayout -->
    <!-- End of common pageLayout section -->
    <contents>
    <!-- this will contain any validation errors after form
    submission -->
    <messageBox automatic="true" />
    <bc4j:rootAppModuleScope name="LocationView1AppModule" >
    <contents>
    <header text="Search" >
    <contents>
    <form name="search" method="POST" >
    <contents>
    <inlineMessage prompt="Search" vAlign="middle" >
    <contents>
    <flowLayout>
    <contents>
    <choice name="attrName"
    data:selectedValue="attrName@ctrl:page"
    shortDesc="Search Column">
    <contents>
    <option text="LoCode" value="LoCode" />
    </contents>
    </choice>
    <textInput name="attrValue" columns="20"
    data:text="attrValue@ctrl:page"
    shortDesc="Search"/>
    </contents>
    </flowLayout>
    </contents>
    <end>
    <submitButton text="Go" ctrl:event="search" />
    </end>
    </inlineMessage>
    </contents>
    </form>
    </contents>
    </header>
    <header text="Results" >
    <contents>
    <form name="viewForm" method="POST" >
    <contents>
    <tableLayout>
    <contents>
    <bc4j:viewObjectScope name="LocationView1" >
    <contents>
    <bc4j:table name="viewTable" width="20%"
    alternateText="No rows found">
    <tableSelection>
    <!-- single selection for each row in the table -->
    <singleSelection selectedIndex="0" shortDesc="Select Row">
    <contents>
    <!-- the update button causes the currently selected
    row to be sent to the update page -->
    <!-- the delete button causes the currently selected
    row to be removed -->
    </contents>
    </singleSelection>
    </tableSelection>
    <!-- the key identifying the current row in the table -->
    <bc4j:keyStamp>
    <bc4j:rowKey name="key" />
    </bc4j:keyStamp>
    <contents>
    <!-- A bc4j:column element is added for each attribute
    in the ViewObject. -->
    <bc4j:column attrName="LoCode">
    <columnHeader>
    <bc4j:sortableHeader sortable="no" text="Location Code" />
    </columnHeader>
    <contents>
    <bc4j:input readOnly="true"/>
    </contents>
    </bc4j:column>
    </contents>
    </bc4j:table>
    </contents>
    </bc4j:viewObjectScope>
    </contents>
    </tableLayout>
    </contents>
    </form>
    </contents>
    </header>
    </contents>
    </bc4j:rootAppModuleScope>
    </contents>
    <contentFooter>
    <!-- the create button redirects to the create page -->
    <button text="Select" ctrl:event="select" />
    </contentFooter>
    </pageLayout>
    </contents>
    </try>
    </content>
    <handlers>
    <event name="search" >
    <!-- using the ApplicationModule causes it to be checked out from the
    ApplicationPool. It is released using stateful mode. -->
    <bc4j:findRootAppModule name="LocationView1AppModule" >
    <!-- establish the ViewObject scope -->
    <bc4j:findViewObject name="LocationView1" >
    <!-- search for the view criteria -->
    <bc4j:findByExample>
    <bc4j:exampleRow ignoreCase="true" >
    <bc4j:exampleAttribute>
    <bc4j:nameBinding><bc4j:parameter name="attrName" /></bc4j:nameBinding>
    <bc4j:valueBinding><bc4j:parameter name="attrValue" /></bc4j:valueBinding>
    </bc4j:exampleAttribute>
    </bc4j:exampleRow>
    </bc4j:findByExample>
    <bc4j:executeQuery/>
    <!-- store the current search criteria as page properties -->
    <bc4j:setPageProperty name="attrName" >
    <bc4j:parameter name="attrName" />
    </bc4j:setPageProperty>
    <bc4j:setPageProperty name="attrValue" >
    <bc4j:parameter name="attrValue" />
    </bc4j:setPageProperty>
    </bc4j:findViewObject>
    </bc4j:findRootAppModule>
    </event>
    <event name="sort" source="viewTable" >
    <!-- using the ApplicationModule causes it to be checked out from the
    ApplicationPool. It is released using stateful mode. -->
    <bc4j:findRootAppModule name="LocationView1AppModule" >
    <!-- establish the ViewObject scope -->
    <bc4j:findViewObject name="LocationView1" >
    <!-- sort by the submitted attribute name -->
    <bc4j:sort/>
    </bc4j:findViewObject>
    </bc4j:findRootAppModule>
    </event>
    <event name="goto" source="viewTable" >
    <!-- using the ApplicationModule causes it to be checked out from the
    ApplicationPool. It is released using stateful mode. -->
    <bc4j:findRootAppModule name="LocationView1AppModule" >
    <!-- establish the ViewObject scope -->
    <bc4j:findViewObject name="LocationView1" >
    <!-- navigate to the submitted range -->
    <bc4j:goto/>
    </bc4j:findViewObject>
    </bc4j:findRootAppModule>
    </event>
    <event name="select" >
    <ctrl:go name="Activity_Plan_ObjectView1_Update" redirect="false" >
    <ctrl:property name="key">
    <ctrl:selection name="viewTable" key="key" />
    </ctrl:property>
    </ctrl:go>
    </event>
    </handlers>
    </page>
    My apologies for such a huge post, hopefully any solutions will serve as some sort of tutorial for others stuck with this problem.
    I thank the kind souls in advance for any solutions they offer.
    Greg

    That's a bit too much code to look into, I'm afraid.
    Perhaps you could enable UIX debug mode (see the UIX
    Configuration chapter) and see the servlet log to
    find out what parameters are being sent back to
    the server.

  • Posting a readonly field

    Hello,
    I generated a create uix file based on a bc4j view object. Then I databinded a value to the field GeaendertVon.
    This value must not be changed by the user, but setting it to readonly="true" or rendered="false" (the preferred solution) gives the following error if I press create:
    JBO-26041: Failed to post data to database during "Insert": SQL Statement "BEGIN INSERT INTO MASKEN(,STUFE,GEAENDERT_VON,GEAENDERT_AM) VALUES (:1,:2,:3,:4) RETURNING ID INTO :5; END;".
    NAME
    this the uix fragment:
    <contents>
    <bc4j:viewObjectScope name="MaskenVOInst">
    <contents>
    <bc4j:rowScope name="CreateMaskenVOInst">
    <contents>
    <bc4j:messageInput attrName="Id"/>
    <bc4j:messageInput attrName="Name"/>
    <bc4j:messageInput attrName="Stufe"/>
    <bc4j:messageInput attrName="GeaendertVon" data:text="username@loginData" readOnly="true"/>
    <bc4j:messageInput attrName="GeaendertAm" />
    </contents>
    </bc4j:rowScope>
    </contents>
    </bc4j:viewObjectScope>
    </contents>

    hello, this is my create handler (as been generated by JDeveloper):
    <event name="apply">
    <bc4j:findRootAppModule name="MaskenVOInstAppModule">
    <bc4j:findViewObject name="MaskenVOInst">
    <bc4j:findRow name="CreateMaskenVOInst">
    <bc4j:setPageProperty name="key">
    <bc4j:stringKey/>
    </bc4j:setPageProperty>
    <!-- set each attribute explicitly -->
    <bc4j:setAttribute name="Id"/>
    <bc4j:setAttribute name="Name"/>
    <bc4j:setAttribute name="Stufe"/>
    <bc4j:setAttribute name="GeaendertVon"/>
    <bc4j:setAttribute name="GeaendertAm"/>
    <bc4j:insertRow/>
    <bc4j:commit/>
    <bc4j:executeQuery/>
    <ctrl:go name="masken_v" redirect="true"/>
    </bc4j:findRow>
    </bc4j:findViewObject>
    </bc4j:findRootAppModule>
    </event>

  • Persistant setWhereClause

    I am using a global button defined in a template to fire an event in the target page that inserts a where clause to control data displayed by the page.
    This works great.
    However, if I choose to update the data, which is done by selecting an update button, then I go to another page. When I return, all data is now displayed, not just the data selected by the where clause above.
    How can I make the where clause persistant or at least make the page run through the same event process described above.
    My code for the update button which calls the update page follows:
    <submitButton text="Update" ctrl:event="update" />
    <event name="update" >
    <!-- forward to the update page, passing the selected key as a page property -->
    <ctrl:go name="UsersMyProfile_Update" redirect="true" >
    <ctrl:property name="key" >
    <ctrl:selection name="viewTable" key="key" />
    </ctrl:property>
    </ctrl:go>
    </event>
    Then my return code from the update page. The tag <ctrl:go returns the user to the previous page where now all data is displayed.
    <event name="apply" >
    <!-- using the ApplicationModule causes it to be checked out from the ApplicationPool. It is released using stateful mode. -->
    <bc4j:findRootAppModule name="EroUsersMyProfileEditAppModule" >
    <!-- establish the ViewObject scope -->
    <bc4j:findViewObject name="EroUsersMyProfileEdit" >
    <!-- find the row by key, falling back on a new default row if the key is not found -->
    <bc4j:findRow name="UpdateEroUsersMyProfileEdit" >
    <!-- set each attribute explicitly -->
    <!-- <bc4j:setAttribute name="UserName" /> -->
    <bc4j:setAttribute name="PasswordName" />
    <bc4j:setAttribute name="FirstName" />
    <bc4j:setAttribute name="LastName" />
    <bc4j:setAttribute name="Title" />
    <bc4j:setAttribute name="CompanyName" />
    <bc4j:setAttribute name="DepartmentName" />
    <bc4j:setAttribute name="Addr3" />
    <bc4j:setAttribute name="Addr1" />
    <bc4j:setAttribute name="Addr2" />
    <bc4j:setAttribute name="CityName" />
    <bc4j:setAttribute name="StateCode" />
    <bc4j:setAttribute name="PostalCode" />
    <bc4j:setAttribute name="CountryCode" />
    <bc4j:setAttribute name="EmailAddr" />
    <bc4j:setAttribute name="PhoneNo" />
    <bc4j:setAttribute name="PhoneExtNo" />
    <bc4j:setAttribute name="FaxNo" />
    <bc4j:setAttribute name="MobilePhoneNo" />
    <bc4j:setAttribute name="PasswordHintText" />
    <bc4j:setAttribute name="AdministratorFlag" />
    <bc4j:setAttribute name="StatusCode" />
    <!-- commit the transaction -->
    <bc4j:commit/>
    <bc4j:executeQuery/>
    <!-- forward to the summary page -->
    <ctrl:go name="UsersMyProfile_View" redirect="true" />
    </bc4j:findRow>
    </bc4j:findViewObject>
    </bc4j:findRootAppModule>
    </event>
    Thanks, Steve

    It's as efficient as not wrapping it, from a SQL optimizer perspective. It's just like using a view. The optimizer still picks the best plan to get the answer.
    Have you found a counter example in your experience with the product?

  • Retrieve ViewObject inside an UIX EventHandler

    Hi !
    I'm creating a simple uix page which updates a row in the database, I am using BC4J to access database.
    The JDeveloper UIX wizard creates an update page like below
    <event name="apply" >
    <bc4j:findRootAppModule name="ProductVO1AppModule" >
    <bc4j:findViewObject name="ProductVO1" >
    <bc4j:findRow name="UpdateProductVO1" >
    <bc4j:setAttribute name="Id" />
    <bc4j:setAttribute name="ProductName" />
    <bc4j:setAttribute name="StatusId" />
    <bc4j:setAttribute name="HistoryId" />
    <bc4j:setAttribute name="CheckoutPerson" />
    <bc4j:commit/>
    <bc4j:executeQuery/>
    <ctrl:go name="ProductVO1_View" redirect="true" />
    </bc4j:findRow>
    </bc4j:findViewObject>
    </bc4j:findRootAppModule>
    </event>
    Instead I would like to pass request and complete the update and commit it in the event handler like below
    [My uix page]
    <event name="apply" >
    <method class="mypackage21.web.MyApply" method="execute"/>
    </event>
    [My event handler]
    public class MyApply
    public static EventResult execute(BajaContext context,
    Page page,
    PageEvent event) throws Throwable
         //want to retrieve the ViewObject, Row and do the update
    How can I retrieve the Row to update in my Event Handler.
    Thanks in advance.

    Thanks for your advise Guo ! it works fine.
    Forgive me bothering you again, could you give me another advise...
    Is it possible to retirve the user-entered form data inside the Event Handler.
    Below is a sniplet from the Wizard-created-uix-update page.
    Contains an update form and an update button to submit the user-entered form data.
    In my application I will forward the client request to an Event Handler when submit button is pressed.
    I have tried
         Row row=ServletBindingUtils.getRow(context);
    but this seems to get the before user-entered data.
    Thanks in advance.
    &lt;form name="updateForm" method="POST" &gt;
    &lt;contents&gt;
    &lt;formParameter name="event" /&gt;
    &lt;!-- layout the fields in two columns --&gt;
    &lt;tableLayout&gt;
    &lt;contents&gt;
    &lt;bc4j:rootAppModuleScope name="ProductVO1AppModule" &gt;
    &lt;contents&gt;
    &lt;bc4j:viewObjectScope name="ProductVO1" &gt;
    &lt;contents&gt;
    &lt;bc4j:rowScope name="UpdateProductVO1" &gt;
    &lt;contents&gt;
    &lt;bc4j:messageInput attrName="Id" /&gt;
    &lt;bc4j:messageInput attrName="ProductId" /&gt;
    &lt;bc4j:messageInput attrName="History1" /&gt;
    &lt;bc4j:messageInput attrName="CheckoutPerson" /&gt;
    &lt;/contents&gt;
    &lt;/bc4j:rowScope&gt;
    &lt;/contents&gt;
    &lt;/bc4j:viewObjectScope&gt;
    &lt;/contents&gt;
    &lt;/bc4j:rootAppModuleScope&gt;
    &lt;/contents&gt;
    &lt;/tableLayout&gt;
    &lt;/contents&gt;
    &lt;/form&gt;
    &lt;pageButtonBar&gt;
    &lt;contents&gt;
    &lt;submitButton text="update" formName="updateForm"
    ctrl:event="apply" /&gt;
    &lt;/contents&gt;
    &lt;/pageButtonBar&gt;
    &lt;bc4j:findRootAppModule name="ProductVO1AppModule" &gt;
    &lt;bc4j:findViewObject name="ProductVO1" &gt;
    &lt;bc4j:findRow name="UpdateProductVO1" &gt;
    &lt;method class="mypackage2.web.MyApply" method="execute"/&gt;
    &lt;/bc4j:findRow&gt;
    &lt;/bc4j:findViewObject&gt;
    &lt;/bc4j:findRootAppModule&gt;

  • Does this solve 'no row available for editting' problem ?

    It's from the HELP of Jdeveloper 9i DS release 2 .....
    The submit JSP page contains:
    1.BC4J data tags that specify the same application module connection and view object datasource as the insert JSP page.
    2.A BC4J ApplicationModule data tag with the releasemode attribute set to stateless to release the state of the application module once the data is committed.
    3.If you decide to create the row before the user submits the data, then your page contains a BC4J Row data tag with the Update action. This action allows the Row data tag to match the datasource row and attributes to update with the HTTP request parameters submitted by the insert JSP page.
    OR
    If you decide to create the row after the user submits the data, then your page contains a BC4J Row data tag with the Create action. This action merely creates a new row in the datasource. You then need to add a BC4J SetAttribute data tag to match the datasource row and attributes to update with the HTTP request parameters posted by the insert JSP page.
    Assuming that we use the 2ND METHOD of #3, then will we able to get rid of the problem of 'now row available for editting' since the row is created after the user submits the data??

    Thank
    Joan Soon Koh
    We have try according to your method.
    Unformately, we failed.
    Firstly, in a JSP file the same application module only be defined once.
    Secondly, by HTTP request parameters we should make two jsp files,
    insert.jsp and edit.jsp transact two requestment respectively and can not use DataTable tag. and we are not sure whether it work well.
    Thirdly, because submit.jsp get parameter from submitting.jsp, so when we
    run submit.jsp(browse.jsp) firstly, NullPointException Error occurs because submit.jsp can not get Parameter.
    If possible please try it, and we greatly appreciate your timely help.

  • BC4J/Jedeveloper 3.2 BUG with SetAttribute on LONG RAW

    Hi,
    I'm using Jdeveloper 3.2, a BC4J/JSP application and a Oracle Thin connection to Oracle 8.0.4.
    I think I found a bug in BC4J:
    I have a table with a LONG RAW column that is also used by other (non BC4J)
    applications to store binary data (including, but not limited to JPG's)
    I'm able to retrieve data of any size using GetAttribute().
    When I use the following code from a WebBean, it fails on commit
    when the file is bigger than 4K.
    The error is:
    Error Message: JBO-26041: Failed to post data to database during "Update":
    SQL Statement " UPDATE BDATA Bdata SET LRDATA=:1 WHERE ID_CARD=:2 AND CODE_REGISTRATION=:3".
    Error Message: ORA-01461: can bind a LONG value only for insert into a LONG column
    public void setData(java.io.File f) throws Exception
    long len = f.length();
    InputStream in = new FileInputStream(f);
    Row myRow = qView.getCurrentRow();
    byte[] buffer = new byte[(int)len];
    in.read(buffer, 0, (int) len);
    in.close();
    Raw myval = new Raw(buffer);
    myRow.setAttribute("Lrdata", myval);
    Please help, I need this to work !
    null

    Raw domain is limited to the oracle-JDBC limitations of 4K length for such-streaming data types unless a Stream is used to update the data. We plan to support such streaming for Raw domain in the next major-release.
    However, you should be able to work with Raw domain and if your data size is bigger than 4K, override the doDML() method in EntityImpl (that contains the Raw attribute) and perform a custom update for the Raw data. Basically the logic will be something like:
    doDML()
    1. save the raw attribute value
    2. Populate 'null' or a single byte-bytearray for raw attribute value so that super.doDML() won't fail.
    3. prepare an update statement with just the raw column and where clause for this entity's primary key.
    4. fill in the raw data using an in-memory stream over the bytes from the Raw domain instance held in step 1. Use Statement.setBinaryStream() method.
    5. execute the statement (to post the stream).
    6. re-populate the entity data-structure with the valid Raw domain instance.
    null

  • BC4J jbo:SetAttribute tag and NULL

    Is there a really good reason that jbo:SetAttribute takes input fields and does a case-insensitive comparison with the word NULL and clears the attribute?
    I found the code in HtmlServices.java (oracle.jbo.html).
    I can see why someone may want it, but in our case, we actually have a person who has the last name, you guessed it, NULL. There may be many data entry fields which have this. It's simple enough to work around in code, but I have to sprinkle it across many fields on many pages.
    I guess I could hack HtmlServices.java and eliminate this but:
    a) I believe this file is included in the bc4j libraries on 9ias and can not be easily over-ridden
    b) mucking with vendor supplied source code has definitely bitten in the past and new versions, etc, will be a pain.
    Is this really necessary to handle the word NULL?
    Thanks,
    Jeff

    The formatting routine are currently not available without a Row.
    I filed a bug to have that fixed by next release (9.0.3).
    Note that the routine will have to check for a formatted value first and set the non-formatted result to the ViewCriteria. But it will also need to work when non-formatted values are entered.
    Charles.

  • Bc4j view definition not found

    Within the doDML method in my PatientImpl class, I have implemented this snippet of code to insert a record into the TransactionLog entity after an insert into the Patient entity.
    DBTransaction trans = getDBTransaction();
    TransactionLogViewImpl txnLogView =
    (TransactionLogViewImpl)trans.createViewObject(
    " hmdclinical.customactiondemo.model.bc4j.TransactionLogView ");
    TransactionLogViewRowImpl row =
    (TransactionLogViewRowImpl) txnLogView.createRow();
    row.setAction('TEST');
    txnLogView.insertRow(row);
    txnLogView.remove();However, the error returned is "JBO-25002: Definition hmdclinical.customactiondemo.model.bc4j.TransactionLogView of type View Definition not found".
    What am I doing wrong ? My View object is called TransactionLogView and my business components package is hmdclinical.customactiondemo.model.bc4j ??
    Help ?
    Also - is it possible to perform the insert and then requery the same row to check for data in other columns on the table had that been populated by a trigger as the result on the insert performed by my business rule code ?? If i make the attribute refresh after update can I do a
    row.setAttribute
    view.insertRow(row)
    row.getAttribute ??
    How else would I get the values back from the row just inserted ??
    Thanks,
    Brent

    Please ignore the first part of my question - stupid typo that i always make !
    But the second part....
    Also - is it possible to perform the insert and then requery the same row to check for data in other columns on the table had that been populated by a trigger as the result on the insert performed by my business rule code ?? If i make the attribute refresh after update can I do a
    row.setAttribute
    view.insertRow(row)
    row.getAttribute ??
    How else would I get the values back from the row just inserted ??
    Can someone help me with this ?
    Thanks,
    Brent

Maybe you are looking for

  • How can I create an HTML Mail signature?

    I've spent the evening searching for a way to create an HTML Mail signature with no luck.  My problem is that when I create a new signature in Mail and close mail I try the following: 1.  Create an HTML signature in Dreamweaver CS6 2.  Open it in Saf

  • Offline approval - weird characters in Outlook

    Hi all, We're on SRM 5.0, Server 550, SP12. Scenario: offline approval of Shopping Carts After running report RBBP_NOTIFICATION_OFFAPP, approver is getting an e-mail in Outlook 2003 with some weird characters: **START**      The following require

  • Is there a way to change caption info from my iPad in Lightroom Mobile?

    I want my client to be able to caption photos as I do the processing from my laptop.  I want him to work from my iPad. Can this be done? I have the two devices synced. It seems to be working correctly. I just cant find the button to let me do the cap

  • New harddrive, I no longer have garageband and other software.

    So I upgraded my harddrive and no longer have several programs that I want, GarageBand and iMovie among them. I have my Max OS X Install DVD in my Macbook right now, but found nothing under Optional Installs. Is there a way that I can get GarageBand,

  • Managing video storage with iOS8 - video usage not showing

    I've typically deleted video (iTunes tv shows) using manage storage/usage from General settings.  For some reason video data usage is not showing and I'm not aware of any other means of freeing up space. I'm not able to delete directly from video its