Issue editing a new record in simple ADF form

I have a simple ADF entry form and table that saves to a database table. The database table has columns that cannot have null values.
I can create, edit, delete and save rows in the ADF form without problems.
The problem I have is when I edit a row that I just created and saved. I get an error message that says I cannot save null into the fields that cannot have null values in the database, even though my form shows that my newly created and saved is data there. I seem to have to edit those fields to get the model entity to recognize that there is some value in them.
So the sequence of events leading to the error is this:
I create a new record with ADF form using the 'Create' or 'CreateInsert' operation command button, I enter data into all the fields and hit commit.
I decide I want to make a change to one of the fields, I enter some text, click commit again and an error message pops up saying that I cannot enter null into a required field, but there is data in the field and I did not change anything in it.
The only way I can save without error now is either by running a rollback operation now or making a edit to all the required fields to get the linked entity to not send a null value to the database.
This error will still occur even if I navigate away from the newly created record to other records, if I ever navigate back to that record created in the current session, I will get that error message.
Anyone else experience a similar problem?
Are there any settings or properties I need to set in the entity that can avoid sending null values to the database when a value already exists?
I thought at first it was because I'm using the 'CreateInsert' operation to create a new record as opposed to the 'Create' operation, but the same problem exists with both operations.

I am using jDev version 11.1.2.1.0
In you sample, does your database have columns that require a not null value?
I think my problem lies in the entity or view somewhere, how it's sending null value for fields that don't need to be updated.
Here's the source for my entity and view.
Entity:
<?xml version="1.0" encoding="windows-1252" ?>
<!DOCTYPE Entity SYSTEM "jbo_03_01.dtd">
<!---->
<Entity
xmlns="http://xmlns.oracle.com/bc4j"
Name="Feedback"
Version="11.1.2.60.81"
DBObjectType="table"
DBObjectName="FEEDBACK"
AliasName="Feedback"
BindingStyle="OracleName"
UseGlueCode="false">
<Attribute
Name="FeedbackId"
Precision="10"
Scale="0"
ColumnName="FEEDBACK_ID"
SQLType="NUMERIC"
Type="oracle.jbo.domain.Number"
ColumnType="NUMBER"
TableName="FEEDBACK"
PrimaryKey="true">
<DesignTime>
<Attr Name="_DisplaySize" Value="22"/>
</DesignTime>
</Attribute>
<Attribute
Name="PageName"
IsNotNull="true"
Precision="200"
ColumnName="PAGE_NAME"
SQLType="VARCHAR"
Type="java.lang.String"
ColumnType="VARCHAR2"
TableName="FEEDBACK"
IsUpdateable="while_insert"
RetrievedOnInsert="true"
RetrievedOnUpdate="true">
<DesignTime>
<Attr Name="_DisplaySize" Value="200"/>
</DesignTime>
</Attribute>
<Attribute
Name="Severity"
Precision="30"
ColumnName="SEVERITY"
SQLType="VARCHAR"
Type="java.lang.String"
ColumnType="VARCHAR2"
TableName="FEEDBACK"
IsNotNull="true">
<DesignTime>
<Attr Name="_DisplaySize" Value="30"/>
</DesignTime>
</Attribute>
<Attribute
Name="InternalAction"
Precision="30"
ColumnName="INTERNAL_ACTION"
SQLType="VARCHAR"
Type="java.lang.String"
ColumnType="VARCHAR2"
TableName="FEEDBACK">
<DesignTime>
<Attr Name="_DisplaySize" Value="30"/>
</DesignTime>
</Attribute>
<Attribute
Name="FeedbackNote"
IsNotNull="true"
Precision="4000"
ColumnName="FEEDBACK_NOTE"
SQLType="VARCHAR"
Type="java.lang.String"
ColumnType="VARCHAR2"
TableName="FEEDBACK">
<DesignTime>
<Attr Name="_DisplaySize" Value="4000"/>
</DesignTime>
</Attribute>
<Attribute
Name="InternalNote"
Precision="4000"
ColumnName="INTERNAL_NOTE"
SQLType="VARCHAR"
Type="java.lang.String"
ColumnType="VARCHAR2"
TableName="FEEDBACK">
<DesignTime>
<Attr Name="_DisplaySize" Value="4000"/>
</DesignTime>
</Attribute>
<Attribute
Name="CreatedBy"
Precision="30"
ColumnName="CREATED_BY"
SQLType="VARCHAR"
Type="java.lang.String"
ColumnType="VARCHAR2"
TableName="FEEDBACK">
<DesignTime>
<Attr Name="_DisplaySize" Value="30"/>
</DesignTime>
</Attribute>
<Attribute
Name="CreationDate"
ColumnName="CREATION_DATE"
SQLType="TIMESTAMP"
Type="oracle.jbo.domain.Date"
ColumnType="DATE"
TableName="FEEDBACK">
<DesignTime>
<Attr Name="_DisplaySize" Value="7"/>
</DesignTime>
</Attribute>
<Attribute
Name="ActionDate"
ColumnName="ACTION_DATE"
SQLType="DATE"
Type="oracle.jbo.domain.Date"
ColumnType="DATE"
TableName="FEEDBACK"/>
<Attribute
Name="ReviewedBy"
Precision="30"
ColumnName="REVIEWED_BY"
SQLType="VARCHAR"
Type="java.lang.String"
ColumnType="VARCHAR2"
TableName="FEEDBACK">
<DesignTime>
<Attr Name="_DisplaySize" Value="30"/>
</DesignTime>
</Attribute>
<Attribute
Name="AssignedTo"
Precision="30"
ColumnName="ASSIGNED_TO"
SQLType="VARCHAR"
Type="java.lang.String"
ColumnType="VARCHAR2"
TableName="FEEDBACK">
<DesignTime>
<Attr Name="_DisplaySize" Value="30"/>
</DesignTime>
</Attribute>
<Key
Name="Xpkfeedback"
PrimaryKey="true">
<DesignTime>
<Attr Name="_DBObjectName" Value="XPKFEEDBACK"/>
</DesignTime>
<AttrArray Name="Attributes">
<Item Value="ichip.util.Feedback.FeedbackId"/>
</AttrArray>
</Key>
</Entity>
View:
<?xml version="1.0" encoding="windows-1252" ?>
<!DOCTYPE ViewObject SYSTEM "jbo_03_01.dtd">
<!---->
<ViewObject
xmlns="http://xmlns.oracle.com/bc4j"
Name="FeedbackView"
Version="11.1.2.60.81"
SelectList="Feedback.FEEDBACK_ID,
Feedback.PAGE_NAME,
Feedback.SEVERITY,
Feedback.INTERNAL_ACTION,
Feedback.FEEDBACK_NOTE,
Feedback.INTERNAL_NOTE,
Feedback.REVIEWED_BY,
Feedback.CREATED_BY,
Feedback.CREATION_DATE,
Feedback.ACTION_DATE,
Feedback.ASSIGNED_TO"
FromList="FEEDBACK Feedback"
BindingStyle="OracleName"
CustomQuery="false"
PageIterMode="Full"
UseGlueCode="false"
OrderBy="Feedback.PAGE_NAME asc,Feedback.FEEDBACK_ID desc">
<EntityUsage
Name="Feedback"
Entity="ichip.util.Feedback"/>
<ViewAttribute
Name="FeedbackId"
IsNotNull="true"
PrecisionRule="true"
EntityAttrName="FeedbackId"
EntityUsage="Feedback"
AliasName="FEEDBACK_ID"/>
<ViewAttribute
Name="PageName"
IsNotNull="true"
PrecisionRule="true"
EntityAttrName="PageName"
EntityUsage="Feedback"
AliasName="PAGE_NAME"
DefaultValue="Feedback"/>
<ViewAttribute
Name="Severity"
IsNotNull="true"
PrecisionRule="true"
EntityAttrName="Severity"
EntityUsage="Feedback"
AliasName="SEVERITY"/>
<ViewAttribute
Name="InternalAction"
PrecisionRule="true"
EntityAttrName="InternalAction"
EntityUsage="Feedback"
AliasName="INTERNAL_ACTION"/>
<ViewAttribute
Name="FeedbackNote"
IsNotNull="true"
PrecisionRule="true"
EntityAttrName="FeedbackNote"
EntityUsage="Feedback"
AliasName="FEEDBACK_NOTE"/>
<ViewAttribute
Name="InternalNote"
PrecisionRule="true"
EntityAttrName="InternalNote"
EntityUsage="Feedback"
AliasName="INTERNAL_NOTE"/>
<ViewAttribute
Name="ReviewedBy"
PrecisionRule="true"
EntityAttrName="ReviewedBy"
EntityUsage="Feedback"
AliasName="REVIEWED_BY"/>
<ViewAttribute
Name="CreatedBy"
IsNotNull="true"
PrecisionRule="true"
EntityAttrName="CreatedBy"
EntityUsage="Feedback"
AliasName="CREATED_BY"/>
<ViewAttribute
Name="CreationDate"
IsNotNull="true"
PrecisionRule="true"
EntityAttrName="CreationDate"
EntityUsage="Feedback"
AliasName="CREATION_DATE"/>
<ViewAttribute
Name="ActionDate"
PrecisionRule="true"
EntityAttrName="ActionDate"
EntityUsage="Feedback"
AliasName="ACTION_DATE"/>
<ViewAttribute
Name="AssignedTo"
PrecisionRule="true"
EntityAttrName="AssignedTo"
EntityUsage="Feedback"
AliasName="ASSIGNED_TO"/>
</ViewObject>

Similar Messages

  • How to call a form so as it starts edit  mode (new record) directly

    Hi,
    I want to call a form from a button so as it starts edit mode directly (for a new record).
    I also want to pass it parameters for the new record
    please help me
    thanks

    Suppose you want to call the form with the ename as CLARK. You can call the form like this:
    <portal_schema>.wwa_app_module.link?p_arg_names=_moduleid&p_arg_values=<module_id of the form>&p_arg_names=ename&p_arg_values=CLARK
    Note that it will not query the database for values unless you pass the argument enamecond as well.
    Regards,
    Hsiu

  • Performance issue in update new records from Ekko to my ztable

    I'm doing changes to an existing program
    In this program I need to update any new purchase orders created in EKKO-EBELN to my ztable-ebeln.
    I need to update my ztable with the new records created on that particular date.
    This is a daily running job.
    This is the code I wrote and I'm getting 150,000 records into this loop and I'm getting performance issue, can Anyone suggest me how to avoid performance issue.
    loop at tb_ekko.
        at new ebeln.
          read table tb_ztable with key ebeln = tb_ekko-ebeln binary search.
          if sy-subrc <> 0.
            tb_ztable-ebeln = tb_ekko-ebeln.
            tb_ztable-zlimit = ' '.
            insert ztable from tb_ztable.
          endif.
        endat.
      endloop.
    Thanks
    Hema.

    Modify  your code as follows:
    loop at tb_ekko.
    at new ebeln.
    read table tb_ztable with key ebeln = tb_ekko-ebeln binary search.
    if sy-subrc <> 0.
    tb_ztable_new-ebeln = tb_ekko-ebeln.
    tb_ztable_new-zlimit = ' '.
    append tb_ztable_new.
    clear tb_ztable_new.
    endif.
    endat.
    endloop.
    insert ztable from table tb_ztable_new.
    Regards,
    ravi

  • Save only edited or new records

    Hi,
    I have a block based on a table and display a few records on the form after retrieving records from the table behind. Now I should be able to edit a record or add a new record to the existing records on the screen. So when i click the save button I only want the rows which are new or have been edited to go back into the db. This is the piece of code I was using for the save button in the on-button-clicked action.
    IF alert_button=alert_button1 THEN
    GO_BLOCK('my_block');
    IF NOT Form_Success THEN RAISE Form_Trigger_Failure;
    END IF;
    /* ** Commit if anything is changed */
    IF :System.record_Status IN ('CHANGED','NEW') THEN Commit_Form;
    END IF;
    msg_info('Your changes have been saved.');
    END IF;
    When I do this all the records on the screen gets inserted into the table instead of only the one's I have edited or newly inserted. I only want to insert rows which are new or edited into the table after I click the save button.

    If the only reason for your procedure is to filter the records, Forms handles this natively when you place the Form in "Enter Query" mode (Forms 6i = F7, Forms 9i or higher = F11). A user can enter their search criteria in each field displayed (to include Oracle Wildcard charaters) and then execute the query using F8 (Forms 6i) or Ctrl+F11 (Forms 9i or higher). This is one of the great features of Forms is that it doesn't require additionaly programming to accomodate searches. Once has queried the records into the data block, Forms keeps track of which records were modified or are new. When you Save (Commit_Form), Forms will update or insert as needed to save the changes the user made.
    As Inol suggested, if you need to gather search criteria fro m your us er a different way, you can use the criteria to change the W here Clause of the data block to display records. In this situation, you would code your "Search" button to modify the w here clause. Here's an example w here a user can search on an employee's first name, last name, employee id or any combination of the three:
    First Name [                  ]    Last Name [                      ] Emp ID [                     ]
    [SEARCH]
    /* Sample When-Button-Pressed trigger for Search button */
    /* Example of searching by Last Name */
    DECLARE
       v_def_where    VARCHAR2(500);
    BEGIN
       IF ( :search_block.first_name IS NOT NULL ) THEN
          v_def_where := 'first_name = :search_block.first_name';
       END IF;  
       IF ( :search_block.last_name IS NOT NULL ) THEN
          IF (v_def_where IS NOT NULL ) THEN
             v_def_where := v_def_where || ' and ';
          END IF;
          v_def_w here := v_def_w here || ' last_name = :search_block.last_name';
       END IF;
       IF ( :search_block.employee_id IS NOT NULL ) THEN
          IF (v_def_where IS NOT NULL ) THEN
             v_def_w here := v_def_w here || ' and ';
          END IF;
          v_def_w here := v_def_w here || ' last_name = :search_block.employee_id';
       END IF;
      IF ( v_def_w here IS NOT NULL ) THEN
          /* Forms 6i */
          S et_B lock_Property('DATA_BLOCK',DEFAULT_W HERE, v_def_w here);
          /* Forms 9i or Higher */
          S et_B lock_Property('DATA_BLOCK',ONETIME_W HERE, v_def_w here);
          Execute_Query;
       ELSE
          Message ('No Search Criteria was entered.');
          Message ('No Search Criteria was entered.');
          RAISE Form_Trigger_Failure;
       END IF;
    END;NOTE: As you can see I had to EDIT this post numerous times to get it to save. X-( There are spaces embedded in the code sample.
    Hope this helps,
    Craig B-)
    If a response is helpful or correct, please mark it accordingly.
    Edited by: CraigB on May 17, 2010 12:21 PM
    Edited by: CraigB on May 17, 2010 12:22 PM
    Edited by: CraigB on May 17, 2010 12:23 PM
    Edited by: CraigB on May 17, 2010 12:24 PM
    Edited by: CraigB on May 17, 2010 12:24 PM
    Edited by: CraigB on May 17, 2010 12:24 PM
    Edited by: CraigB on May 17, 2010 12:26 PM
    Edited by: CraigB on May 17, 2010 12:28 PM
    Edited by: CraigB on May 17, 2010 12:29 PM
    Edited by: CraigB on May 17, 2010 12:31 PM
    Edited by: CraigB on May 17, 2010 12:33 PM
    Edited by: CraigB on May 17, 2010 12:34 PM
    Edited by: CraigB on May 17, 2010 12:36 PM
    Edited by: CraigB on May 17, 2010 12:37 PM
    Edited by: CraigB on May 17, 2010 12:37 PM

  • Commit_form creating issue with When-New-Record-Instance trigger

    Hello friends,
    I am using Oracle forms 6i . I have a multi-data block. I have written commit_form in when-new-record-instance of the data block. When I launch the form on my instance the form does not open.
    But when I comment out this code, the form opens on the instance. What could be the exact problem?
    Also is there any condition that I can specify if the whole data block is null when I open the form?

    Hi...
    In When-New-Record-Instance, check if the block status is NEW. If Not, then just apply COMMIT_FORM;
    try this code in your trigger
    IF :SYSTEM.BLOCK_STATUS = 'CHANGED'
    THEN
    COMMIT_FORM;
    END IF;
    Should work for you.
    Thanks....

  • Imported Form and sub-form from another database. Sub-form not creating new records tied to parent form's data.

    I have imported all objects from an old access db (.adp file) into a new db (.accdb).  All of my data lives in sql server so I have added all the tables and views to the .accdb as linked tables.  My forms all connect to data, but I am having issues
    with a sub form.  The sub form does not allow for creation of children records tied to the parent record the way the old db did/does.
    Correct - old format .adp file (notice the empty second record in sub-form with the defaulted date of today's date):
    Incorrect - new .accdb file (notice the lack of empty second record in sub-form like above):
    If I click the create new record icon in the bottom of the subform, it creates a completely blank record not tied to the parent record (fields blacked out in screen shots above).  When using this button all parent record fields are blank.  
    I have also verified the child table used in the sub-form has a valid Fky relationship to parent table used in the parent form.
     

    Have you checked each forms 'Filter' property (in Design view) to make sure they are blank and that each forms 'Filter On Load' property to make sure it is set to 'No'? Also, you might try inserting the following commands in each forms On
    Open event:
    DoCmd.RunCommand acCmdRemoveAllFilters
    DoCmd.ShowAllRecords
    If you can open each forms Record Source and they are showing that new records are able to be entered (the new record * is showing at the bottom of the recordset), then check each forms On Load and On Open events to make sure there is no filtering.
    In addition, check any macro or VBA commands behind the button that opens the main form to make sure there is no SQL filtering in the DoCmd.OpenForm command.
    If one of the forms Record Source does NOT allow new records, then you will need to change that Record Source so the new record * indicator shows.
    Out of ideas at this point.

  • Cancel the creation of a new record from a tree-form

    Hi all,
    We have an application with a tree-form interface. On the form is an option to create a new object (e.g. Employee, as an analogy). We would like to provide a way to cancel the creation and return to the previous selected node/employee; e.g. with a cancel button.
    How can we accomplish that?
    We tried to use the standard bindings rollback as an actionListener (#{bindings.Rolback.execute}), but this doesn't work as expected. The employee on the form is not the same as the selected one in the tree, but always the first one. After deep investigations it seems that the synchronization mthod
    JhsPageLifecycle.restoreRowCurrencies tries the synchronization with the (now obsolete) key of the new record.
    This gives the impression that rollback can be used to rollback changes on existing objects, but not to rollback the creation of a new record. So we're looking for another approach; any suggestions?
    Ciao
    Aino

    Hi,
    problem does not seem to be solved after all :-(
    As I wrote in the first post, the rollback tries to synchronize, using the id of the new row (that we retrieve from a database sequence when the viewrow is created).
    Any suggestion how we can synchronize with the 'selected' row?
    The strange thing is that it seems to work when we create a 'subordinate' (like create an employee from a department page), but it does not work when we create the same object (like a department from a department page).
    Ciao
    Aino

  • How to populate new record on data entry form based on search results?

    Hello,
    I'm new to jdeveloper im using version 11.1.2.1.0.
    Usually Im using forms 10g.
    I created search panel with table and its working but problem is how to transfer/populate all the field value according to that search result to New data Entry Form
    by clicking the table record or a button.
    Given :
    TABLES,EO
    1. PatientMasterIndex
    2. PatientTransactionMaster <<---- master
    3. PatientTransactionDetail <<-- detail relation
    Here the scenario,
    After Search of any patient, when i clicked one or more patient (which Jdeveloper allow multi select on jtable) on the table record it should automatically transfer or copied to the text field, i want to show on the form of PatientTransactionMaster like PatientNumber,PatientInsuranceNumber etc. to be save on db as new record, also non database field for view only like patient Name,address,age.
    IN forms i can do that by :PatientTransactionMaster.PatientNumber := :blocksearch.PatientSearchNumber ,etc.....
    or an item trigger to populate the said PatientTransactionMaster block. ( select .... into :PatientTransactionMaster.PatientNumber,etc....)
    Any suggestion,links,sample is highly appreciated.
    Sorry for my english.
    Thank you very much

    Hi,
    Do you want to create a detail record that will include some values from your master record??
    Or do you want to create a record with values from your Search criteria, only in the case you do not have any results?
    if it is the second case.
    When do you want to do that? After a press of button? or immediately?
    In general you have to handle the values from search criteria.
    Additionally, if you use ViewCriteria, you have to have bind variables for your search criteria that you will want to use.
    So in general, you have to know the values by using bind variables, understand that the query has no results (This can be done in many ways, depending on your implementation. if you are using a button, you could make a disable condition with iterator.estimatedRowCount property.)
    Perform the insert operation with the values from the bind variables.
    Regards,
    Dimitris.

  • ADF Forms Issue

    Hi All,
    I am fairly new to JDeveloper so please bear with me.
    Based on the ADF Tutorial for Forms/4GL developers I have developed a simple ADF form that edits data on a database table. The table is built from a data control, has bound managed session beans for each of the editable items and has 2 simple command buttons - 1 to submit changes to the form (action listener -> commit), the other to rollback (action listener - rollback)
    The form compiles OK and then runs OK via the OC4J Embedded Server.
    However when trying to use the command buttons to perform a submit changes or to rollback the operation is not performed and it also looks as though the resulting redirecting URL is not correct. The original URL appears on the link with just the # (hash) sign appearing after it e.g.
    http://10.101.7.34:8989/Data_Maintenance-Data_Maintenace-context-root/faces/app/grademaintain.jspx
    becomes after clicking on a command button -
    http://10.101.7.34:8989/Data_Maintenance-Data_Maintenace-context-root/faces/app/grademaintain.jspx#
    I have also noticed that the range selector on the table is also not working and displays the second URL above.
    Can anyone advise what I am doing wrong and why JDeveloper may be doing this ?
    Please find source for the page below :-
    ============================================================
    <?xml version='1.0' encoding='windows-1252'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:af="http://xmlns.oracle.com/adf/faces"
    xmlns:afh="http://xmlns.oracle.com/adf/faces/html">
    <jsp:output omit-xml-declaration="true" doctype-root-element="HTML"
    doctype-system="http://www.w3.org/TR/html4/loose.dtd"
    doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"/>
    <jsp:directive.page contentType="text/html;charset=windows-1252"/>
    <f:view>
    <afh:html>
    <afh:head title="grademaintain_edit">
    <meta http-equiv="Content-Type"
    content="text/html; charset=windows-1252"/>
    </afh:head>
    <afh:body>
    <h:form>
    <af:messages/>
    <h:form>
    <h:form>
    <af:panelPage title="#{res['fpgrademaintain.pageTitle']}">
    <f:facet name="menu1"/>
    <f:facet name="menuGlobal"/>
    <f:facet name="branding">
    <h:graphicImage height="85" width="137"
    url="/images/ids_logo2.JPG"/>
    </f:facet>
    <f:facet name="brandingApp"/>
    <f:facet name="appCopyright"/>
    <f:facet name="appPrivacy"/>
    <f:facet name="appAbout"/>
    <af:table value="#{bindings.GradeVwView1.collectionModel}"
    var="row" rows="#{bindings.GradeVwView1.rangeSize}"
    first="#{bindings.GradeVwView1.rangeStart}"
    emptyText="#{bindings.GradeVwView1.viewable ? 'No rows yet.' : 'Access Denied.'}">
    <af:column sortProperty="GradeId" sortable="true"
    headerText="#{bindings.GradeVwView1.labels.GradeId}">
    <af:inputText value="#{row.GradeId}"
    required="#{bindings.GradeVwView1.attrDefs.GradeId.mandatory}"
    columns="#{bindings.GradeVwView1.attrHints.GradeId.displayWidth}"
    autoSubmit="true"
    binding="#{backing_app_grademain_edit.inputText1}">
    <f:convertNumber groupingUsed="false"
    pattern="#{bindings.GradeVwView1.formats.GradeId}"/>
    </af:inputText>
    </af:column>
    <af:column sortProperty="ChannelId" sortable="true"
    headerText="#{bindings.GradeVwView1.labels.ChannelId}">
    <af:inputText value="#{row.ChannelId}"
    required="#{bindings.GradeVwView1.attrDefs.ChannelId.mandatory}"
    columns="#{bindings.GradeVwView1.attrHints.ChannelId.displayWidth}"
    autoSubmit="true" disabled="true">
    <f:convertNumber groupingUsed="false"
    pattern="#{bindings.GradeVwView1.formats.ChannelId}"/>
    </af:inputText>
    </af:column>
    <af:column sortProperty="Channel" sortable="true"
    headerText="#{bindings.GradeVwView1.labels.Channel}">
    <h:inputText value="#{row.Channel}"
    binding="#{backing_app_grademain_edit.inputText3}"/>
    </af:column>
    <af:column sortProperty="Grade" sortable="true"
    headerText="#{bindings.GradeVwView1.labels.Grade}">
    <af:inputText value="#{row.Grade}"
    required="#{bindings.GradeVwView1.attrDefs.Grade.mandatory}"
    columns="#{bindings.GradeVwView1.attrHints.Grade.displayWidth}"
    autoSubmit="true"
    binding="#{backing_app_grademain_edit.inputText4}">
    <f:convertNumber groupingUsed="false"
    pattern="#{bindings.GradeVwView1.formats.Grade}"/>
    </af:inputText>
    </af:column>
    <af:column sortProperty="ValueFrom" sortable="true"
    headerText="#{bindings.GradeVwView1.labels.ValueFrom}">
    <af:inputText value="#{row.ValueFrom}"
    required="#{bindings.GradeVwView1.attrDefs.ValueFrom.mandatory}"
    columns="#{bindings.GradeVwView1.attrHints.ValueFrom.displayWidth}"
    binding="#{backing_app_grademain_edit.inputText5}">
    <f:convertNumber groupingUsed="false"
    pattern="#{bindings.GradeVwView1.formats.ValueFrom}"/>
    </af:inputText>
    </af:column>
    <af:column sortProperty="ValueTo" sortable="true"
    headerText="#{bindings.GradeVwView1.labels.ValueTo}">
    <af:inputText value="#{row.ValueTo}"
    required="#{bindings.GradeVwView1.attrDefs.ValueTo.mandatory}"
    columns="#{bindings.GradeVwView1.attrHints.ValueTo.displayWidth}"
    autoSubmit="true"
    binding="#{backing_app_grademain_edit.inputText6}">
    <f:convertNumber groupingUsed="false"
    pattern="#{bindings.GradeVwView1.formats.ValueTo}"/>
    </af:inputText>
    </af:column>
    <af:column sortProperty="EffFromDate" sortable="true"
    headerText="#{bindings.GradeVwView1.labels.EffFromDate}">
    <af:inputText value="#{row.EffFromDate}"
    required="#{bindings.GradeVwView1.attrDefs.EffFromDate.mandatory}"
    columns="#{bindings.GradeVwView1.attrHints.EffFromDate.displayWidth}"
    autoSubmit="true"
    binding="#{backing_app_grademain_edit.inputText7}">
    <f:convertDateTime pattern="#{bindings.GradeVwView1.formats.EffFromDate}"/>
    </af:inputText>
    </af:column>
    <af:column sortProperty="EffToDate" sortable="true"
    headerText="#{bindings.GradeVwView1.labels.EffToDate}">
    <af:inputText value="#{row.EffToDate}"
    required="#{bindings.GradeVwView1.attrDefs.EffToDate.mandatory}"
    columns="#{bindings.GradeVwView1.attrHints.EffToDate.displayWidth}"
    autoSubmit="true"
    binding="#{backing_app_grademain_edit.inputText8}">
    <f:convertDateTime pattern="#{bindings.GradeVwView1.formats.EffToDate}"/>
    </af:inputText>
    </af:column>
    </af:table>
    <af:commandButton actionListener="#{bindings.Commit.execute}"
    text="Submit Changes"
    action="Home"
    binding="#{backing_app_grademain_edit.commandButton1}"/>
    <af:commandButton actionListener="#{bindings.Rollback.execute}"
    text="Rollback"
    immediate="true" action="Home"
    binding="#{backing_app_grademain_edit.commandButton2}">
    <af:resetActionListener/>
    </af:commandButton>
    </af:panelPage>
    </h:form>
    </h:form>
    </h:form>
    </afh:body>
    </afh:html>
    </f:view>
    </jsp:root>
    ===========================================================
    Many thanks for your help in advance.
    Cheers,
    Gary

    Hi Gary,
    I'll just clear a couple of things up first.
    Both the command buttons and the range selector on the table should be pointing to that URL you mention (with the hash). This is the way that JSF/ADF works. Even if you have specified that a navigation case should redirect, it still first fires a request to the current page.
    As far as I can see, there is no obvious problem with your page code. There are some things I would do.
    1. You have three h:form components in your page. Remove the two below the af:messages component. You only need one form.
    2. Check that there exist Commit and Rollback executables in the page definition file (right-click on page and select Go to Page Definition).
    3. Check that there exists a navigation case from this page to the home page and that it is named Home (Look in the faces-config.xml file).

  • Problem with a primary key when creating a new record in Forms

    My table has a field - MDD_KEY - that is a primary key. It is updated from a sequence with a before-insert database trigger. I know this works properly as the primary key was accurately populated when I inserted 1433 records.
    In Forms 6, I have a form based on that table. I have set the mdd_key as a hidden field because I assume it will be entered by the before-insert trigger. However, when I enter data into the table, and then try to save it, I get a FRM-40202: Field must be entered. - followed by - FRM-40222: Disabled item MDD_KEY failed validation.
    If I set DATA Required to no, when I try to save I get an FRM-40600: Record has already been inserted - but no such record exists in the database. I know this record is unique and does NOT exist because I deliberately made it up.
    In the property palatte, the attributes of the field are:
    DATA Data Type Number
    Required Yes
    DATABASE Database Item Yes
    Primary Key Yes
    Query Only No
    Query Allowed Yes
    Query Length 0
    Insert Allowed Yes
    Update Allowed Yes
    Update Only if Null No
    Lock Record No
    I assume that my problem is that with a new record, the form wants to see the MDD_KEY populated before it saves - but that isn't going to happen until the before insert trigger fires in the database. I assume I have to populate that field within forms, but how do I do that without messing up the database trigger/sequence? I will have to load more data directly into the database - so I need the database trigger in place.
    I have not used primary keys before so I am more than a little bit confused about how and when it should be populated when a new record is created in Forms.
    Any help would be appreciated as I cannot enter new data into my form (works well with existing data).
    Thanks
    Glenn

    hi
    if u have any problem using seq then try that statemetn ur block level in ur form
    PRE-INSERT trigger
    select nvl(max(nvl(srno,0)),0)+1 into :srno from tablename;
    Rizwan

  • Edit existing or add new record based on key field

    Greetings and Salutations!
    I am working on an APEX 3.0 application and I need to verify a key field value to determine if the record already exists, if it does not exist, I need to add it, if it does exist, I need to update/edit it. I'm not sure how to do this, but below is what I am considering (in pseudo code):
    get the asset_tag #
    asset_search_value = :asv
    select asset_tag from asset_table were asset_tag = :asv
    IF :asv (unique key value is found) UPDATE
    else
    INSERT (create new record with asset_tag = :asv)
    ENDIF
    I hope that my explanation is clear.
    I have considered doing a function to search for a key match and if one exists, I can proceed to the UPDATE screen, otherwise, I can proceed to that INSERT screen.
    I'm intermediate with APEX and little better at pl/sql, but rapidly learning.
    I should mention that my problem is coming up with a method to see if my query returns no records.
    Thanks in advance for your assistance!
    Charles
    Message was edited by:
    cp29020

    Charles,
    You said you were thinking about creating a function to search for a key match. First, I suggest you do so in a package. A function that returns a boolean should do. Something like what follows:
    FUNCTION asset_exists (
       p_id IN TABLE_NAME.ID%TYPE
       RETURN BOOLEAN
    AS
       l_retval BOOLEAN;
       CURSOR asset_exists_test_cur
       IS
          SELECT *
          FROM table_name
          WHERE id = asset_exists.p_id;
       l_asset_exists_test ASSET_EXISTS_TEST_CUR%ROWTYPE;  
    BEGIN
       OPEN asset_exists_test_cur;
       FETCH asset_exists_test_cur INTO l_basic_user_test;
       l_retval := asset_exists_test_cur%FOUND;
       CLOSE asset_exists_test_cur;
       RETURN l_retval;
    END asset_exists;Then you can use that function as needed to branch your logic. Remember to create a unique constraint on the table if it is not the primary key or doesn't already have one.
    Dan

  • Set atribute value from session bea while creating new record using ADF BC

    hi,
    i want to set the value of new record attribute from session bean while
    using ADF BC using creation form. how can i set the value of a perticular arribute of a record to the value stored in session bean.

    Chapter 9 in the ADF Developer's Guide for Forms/4GL Developers (available on the ADF Learning Center at http://www.oracle.com/technology/products/adf/learnadf.html ) describes how to accomplish this along with other typical kinds of programmatic business logic.

  • Oracle ADF - First record is shown on form no matter which record is edited

    Hi,
    I am using ADF application for development with J Developer version 11.1.1.4.0
    in my project i am having screens(pages) which contain table with form and we are displaying data from that table
    on form using partial Triggers. when i am going to edit records except fist record the record doesn't show on form
    by default it is showing first record . it should display that particular selected records in in that form.
    Plz suggest a solution for the same.
    Thanks,
    vinod

    Hi
    see the source code
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
    xmlns:PGN="/PaginationDefLib">
    <jsp:directive.page contentType="text/html;charset=UTF-8"/>
    <f:view>
    <af:document id="d1"
    title="#{finiqwebappuiBundle['TreasuryDepartmentSetup.scrTitle']}">
    <af:form id="f1">
    <af:pageTemplate viewId="/WEB-INF/templates/FinIqWebAppTemplate.jspx"
    id="pt1">
    <f:facet name="center">
    <af:group id="g1">
    <af:outputLabel id="ol1" styleClass="AFHeaderLevelOne"
    value="#{finiqwebappuiBundle['TreasuryDepartmentSetup.scrTitle']}"/>
    <af:panelGroupLayout id="pgl1">
    <af:panelHeader text=" " id="ph1" styleClass="AFStretchWidth">
    <af:messages id="m1" inline="true"/>
    <af:outputText id="otDisplayMsg"
    binding="#{TreasuryDepartmentSetupBean.otDisplayMsg}"
    inlineStyle="color:Red;" visible="false"
    partialTriggers="saveButton"/>
    </af:panelHeader>
    <af:panelGroupLayout id="pgl3" layout="vertical"
    inlineStyle="width:570px; border-color:Silver; border-style:solid; border-width:thin;">
    <af:panelGroupLayout id="pgl9" layout="vertical"
    inlineStyle="border-style:none;"
    partialTriggers="t1" halign="left">
    <af:panelGroupLayout id="pgl5" layout="horizontal">
    <af:panelFormLayout id="pfl2"
    inlineStyle="width:280px; border-style:none;"
    labelAlignment="start">
    <af:selectOneChoice label="#{finiqwebappuiBundle['TreasuryDepartmentSetup.entityName']}"
    valueChangeListener="#{TreasuryDepartmentSetupBean.changeValue}"
    binding="#{TreasuryDepartmentSetupBean.entityId}"
    autoSubmit="true" id="soc1">
    <af:forEach var="item"
    items="#{sessionScope.FINIQGV.loginMappedEntities}">
    <af:selectItem label="#{item.entityName}"
    value="#{item.entityId}" id="sil1"/>
    </af:forEach>
    </af:selectOneChoice>
    <af:inputText value="bindings.TBDBookId.inputValue"
    label="Label 6" id="itBookId"
    visible="false">
    <f:validator binding="#{bindings.TBDBookId.validator}"/>
    </af:inputText>
    <af:inputText value="#{bindings.BookName.inputValue}"
    label="#{finiqwebappuiBundle['TreasuryDepartmentSetup.branchName']}"
    maximumLength="#{bindings.BookName.hints.precision}"
    binding="#{TreasuryDepartmentSetupBean.itBookName}"
    id="itBookName" autoSubmit="false"
    disabled="true" required="true"
    requiredMessageDetail="#{finiqwebappuiBundle['TreasuryDepartmentSetup.msgBookNameReq']}">
    <f:validator binding="#{bindings.BookName.validator}"/>
    </af:inputText>
    <af:inputText value="#{bindings.BookCode.inputValue}"
    label="#{finiqwebappuiBundle['TreasuryDepartmentSetup.branchCode']}"
    maximumLength="#{bindings.BookCode.hints.precision}"
    binding="#{TreasuryDepartmentSetupBean.itBranchCode}"
    id="itBranchCode" disabled="true"
    required="true"
    requiredMessageDetail="#{finiqwebappuiBundle['TreasuryDepartmentSetup.msgBookCodeReq']}">
    <f:validator binding="#{bindings.BookCode.validator}"/>
    </af:inputText>
    <af:inputText value="#{bindings.TBDMisc1.inputValue}"
    label="#{finiqwebappuiBundle['TreasuryDepartmentSetup.misc1']}"
    maximumLength="#{bindings.TBDMisc1.hints.precision}"
    binding="#{TreasuryDepartmentSetupBean.itMisc1}"
    id="itMisc1" disabled="true"/>
    </af:panelFormLayout>
    <af:spacer width="10" height="10" id="s1"/>
    <af:panelFormLayout id="pfl3" labelAlignment="start"
    inlineStyle="width:270px; border-style:none;">
    <af:inputText value="#{bindings.TBDMisc2.inputValue}"
    label="#{finiqwebappuiBundle['TreasuryDepartmentSetup.misc2']}"
    maximumLength="#{bindings.TBDMisc2.hints.precision}"
    binding="#{TreasuryDepartmentSetupBean.itMisc2}"
    id="itMisc2" disabled="true">
    <f:validator binding="#{bindings.TBDMisc2.validator}"/>
    </af:inputText>
    <af:selectOneChoice label="#{finiqwebappuiBundle['TreasuryDepartmentSetup.activation']}"
    binding="#{TreasuryDepartmentSetupBean.socTBDDeactivate}"
    id="socTBDDeactivate"
    value="#{bindings.TBDDeactivate.inputValue}"
    disabled="true">
    <af:selectItem label="Yes" value="0" id="si1"/>
    <af:selectItem label="No" value="1" id="si2"/>
    </af:selectOneChoice>
    <af:inputText value="#{bindings.TBDMisc3.inputValue}"
    label="#{finiqwebappuiBundle['TreasuryDepartmentSetup.misc3']}"
    maximumLength="#{bindings.TBDMisc3.hints.precision}"
    binding="#{TreasuryDepartmentSetupBean.itMisc3}"
    id="itMisc3" disabled="true"/>
    <af:inputText value="#{bindings.TBDMisc4.inputValue}"
    label="#{finiqwebappuiBundle['TreasuryDepartmentSetup.misc4']}"
    maximumLength="#{bindings.TBDMisc4.hints.precision}"
    binding="#{TreasuryDepartmentSetupBean.itMisc4}"
    id="itMisc4" disabled="true"/>
    <af:inputText value="#{bindings.TBDBookEntityId.inputValue}"
    label="#{bindings.TBDBookEntityId.hints.label}"
    id="TBDBookEntityId" visible="false"
    binding="#{TreasuryDepartmentSetupBean.tbdBookEntityid}"/>
    </af:panelFormLayout>
    </af:panelGroupLayout>
    <af:spacer width="10" height="10" id="s5"/>
    <af:panelGroupLayout id="pgl4">
    <af:spacer width="10" height="10" id="s4"/>
    <af:commandButton id="addButton"
    binding="#{TreasuryDepartmentSetupBean.addButton}"
    action="#{TreasuryDepartmentSetupBean.newAction}"
    text="#{finiqwebappuiBundle['Common.addButton']}"></af:commandButton>
    <af:commandButton id="editButton"
    action="#{TreasuryDepartmentSetupBean.editAction}"
    binding="#{TreasuryDepartmentSetupBean.editButton}"
    text="#{finiqwebappuiBundle['Common.editButton']}"></af:commandButton>
    <af:commandButton text="#{finiqwebappuiBundle['Common.saveButton']}"
    disabled="true" id="saveButton"
    binding="#{TreasuryDepartmentSetupBean.saveButton}"
    action="#{TreasuryDepartmentSetupBean.saveAction}"></af:commandButton>
    <af:commandButton disabled="#{!bindings.Rollback.enabled}"
    id="cancelButton"
    binding="#{TreasuryDepartmentSetupBean.cancelButton}"
    text="#{finiqwebappuiBundle['Common.cancelButton']}"
    actionListener="#{bindings.Rollback.execute}"
    immediate="true"
    action="#{TreasuryDepartmentSetupBean.cancelAction}"></af:commandButton>
    </af:panelGroupLayout>
    </af:panelGroupLayout>
    </af:panelGroupLayout>
    <af:spacer width="10" height="10" id="s2"/>
    <af:panelGroupLayout layout="vertical" id="pgl6">
    <af:panelGroupLayout id="pgl2" layout="horizontal"
    valign="bottom"
    inlineStyle="width:230px;">
    <af:quickQuery label=" " id="qryId1" searchDesc=" "
    value="#{bindings.TreasuryDepartmentVO1Query.quickQueryDescriptor}"
    model="#{bindings.TreasuryDepartmentVO1Query.queryModel}"
    queryListener="#{bindings.TreasuryDepartmentVO1Query.processQuery}"
    layout="vertical">
    <f:facet name="end">
    <af:group id="g3">
    <af:commandLink text="Advanced" rendered="false"
    id="cl1"/>
    </af:group>
    </f:facet>
    </af:quickQuery>
    <af:commandImageLink id="ex1" icon="/images/excel_j.jpeg"
    shortDesc="#{finiqwebappuiBundle['Common.exportButton']}"
    partialTriggers="qryId1 "
    visible="#{bindings.TreasuryDepartmentVO1Iterator.estimatedRowCount ne '0' ? 'true':'false'}"
    partialSubmit="true">
    <af:exportCollectionActionListener exportedId="t1"
    type="excelHTML"/>
    </af:commandImageLink>
    </af:panelGroupLayout>
    <af:table columnStretching="last"
    summary="Treasury Departments"
    value="#{bindings.TreasuryDepartmentVO1.rangeSet}"
    var="row"
    rows="#{bindings.TreasuryDepartmentVO1.rangeSize}"
    fetchSize="#{sessionScope.FINIQGV.displayRecordCount}"
    rowBandingInterval="0"
    selectedRowKeys="#{bindings.TreasuryDepartmentVO1.collectionModel.selectedRow}"
    selectionListener="#{backingBeanScope.PaginationDefBean.rowSelected}"
    rowSelection="single"
    partialTriggers="::soc1 ::qryId1 ::ex1 ::pd1"
    binding="#{TreasuryDepartmentSetupBean.bookTable}"
    id="t1" inlineStyle="height:220.0px;" width="881">
    <f:attribute name="VOObject" value="TreasuryDepartmentVO1"/>
    <af:column rowHeader="unstyled" sortProperty="BookCode"
    sortable="true" align="left"
    headerText="#{finiqwebappuiBundle['TreasuryDepartmentSetup.branchCode']}(#{bindings.TreasuryDepartmentVO1.estimatedRowCount})"
    id="c8">
    <af:outputText value="#{row.BookCode}" id="ot10"/>
    </af:column>
    <af:column sortProperty="TBDBookId" sortable="true"
    headerText="#{finiqwebappuiBundle['TreasuryDepartmentSetup.branchId']}"
    id="c2">
    <af:outputText value="#{row.TBDBookId}" id="ot8"/>
    </af:column>
    <af:column sortProperty="BookName" sortable="true"
    headerText="#{finiqwebappuiBundle['TreasuryDepartmentSetup.branchName']}"
    id="c3">
    <af:outputText value="#{row.BookName}" id="ot1"/>
    </af:column>
    <af:column sortProperty="TBDMisc1" sortable="true"
    headerText="#{finiqwebappuiBundle['TreasuryDepartmentSetup.misc1']}"
    id="c10" width="50">
    <af:outputText value="#{row.TBDMisc1}" id="ot3"/>
    </af:column>
    <af:column sortProperty="TBDDeactivateForDisplay"
    sortable="true"
    headerText="#{finiqwebappuiBundle['TreasuryDepartmentSetup.activation']}"
    id="c9">
    <af:outputText value="#{row.TBDDeactivateForDisplay}"
    id="ot4"/>
    </af:column>
    <af:column sortProperty="TBDMisc2" sortable="true"
    headerText="#{finiqwebappuiBundle['TreasuryDepartmentSetup.misc2']}"
    id="c7">
    <af:outputText value="#{row.TBDMisc2}" id="ot11"/>
    </af:column>
    <af:column sortProperty="TBDMisc3" sortable="true"
    headerText="#{finiqwebappuiBundle['TreasuryDepartmentSetup.misc3']}"
    id="c5">
    <af:outputText value="#{row.TBDMisc3}" id="ot7"/>
    </af:column>
    <af:column sortProperty="TBDMisc4" sortable="true"
    headerText="#{finiqwebappuiBundle['TreasuryDepartmentSetup.misc4']}"
    id="c4">
    <af:outputText value="#{row.TBDMisc4}" id="ot5"/>
    </af:column>
    </af:table>
    <af:panelGroupLayout id="dcpanel" layout="horizontal">
    <af:panelGroupLayout id="paginationDC" layout="horizontal"
    partialTriggers="qryId1 t1"
    visible="#{bindings.TreasuryDepartmentVO1.estimatedRowCount > '10' ? 'true':'false'}">
    <PGN:PaginationDef First="First" Last="Last"
    Iterator="TreasuryDepartmentVO1Iterator"
    VOObject="TreasuryDepartmentVO1"
    NextSet="NextSet"
    PreviousSet="PreviousSet" id="pd1"/>
    </af:panelGroupLayout>
    </af:panelGroupLayout>
    </af:panelGroupLayout>
    </af:panelGroupLayout>
    </af:group>
    </f:facet>
    </af:pageTemplate>
    </af:form>
    </af:document>
    </f:view>
    </jsp:root>

  • ADF: any good examples on inserting a new record

    Hi, I'm currently developing a
    web based application (using jsp + struts on top of ADF)
    and I've seen many many demos and viewlets on
    how to create a page that reads a list of employees
    or master-detail relationship of records.
    However, when I try to make a page which can insert
    a new record (ex. new employee, new department, etc),
    I am baffled, because I couldn't find a good example
    that showed me how to do it.
    Has anyone have a good example?
    thank you.

    Did you check the tutorials page?
    For example:
    http://otn.oracle.com/products/jdev/collateral/tutorials/9050/bizcomp_jsp_tut.html

  • 11G ADF java datacontrol and displaying new records in ADF table

    Hi,
    In 11g I have a java class which return a list of objects and I made a data control on it. I displayed this in a ADF Table based on a ADF tree binding.
    When I fire the create operation on this java data control I see in the tree binding that the new entry is created and even the table has the correct
    rowcount but the new records are not displayed in the adf table. I added PPR but this not work.
    Empty new classes are displayed when they are added before the page is loaded.
    the only difference between a class created by ADF and initial by the adf datacontrol is that mAtrrHintsMap hashmap of DCdataRow is null and the other has 2 entries
    What can it be in 10.1.3 it works
    here my test data
    public class Data {
    private String lovLabel;
    private String lovValue;
    public Data() {
    public Data(String lovLabel, String lovValue) {
    super();
    this.lovLabel = lovLabel;
    this.lovValue = lovValue;
    public void setLovLabel(String lovLabel) {
    this.lovLabel = lovLabel;
    public String getLovLabel() {
    return lovLabel;
    public void setLovValue(String lovValue) {
    this.lovValue = lovValue;
    public String getLovValue() {
    return lovValue;
    here the data control class
    public class LovData {
    public LovData() {
    public List<Data> getLovData() {
    List<Data> data = new ArrayList<Data>(4);
    data.add(new Data ("One","1"));
    data.add(new Data ("Two","2"));
    data.add(new Data ("Three","3"));
    data.add(new Data ());
    return data;
    here is the pagedef
    <executables>
    <methodIterator id="getLovDataIter" Binds="getLovData.result"
    DataControl="LovData" RangeSize="25"
    BeanClass="nl.whitehorses.model.Data"/>
    </executables>
    <bindings>
    <methodAction id="getLovData" InstanceName="LovData.dataProvider"
    DataControl="LovData" RequiresUpdateModel="true"
    Action="invokeMethod" MethodName="getLovData"
    IsViewObjectMethod="false"
    ReturnName="LovData.methodResults.getLovData_LovData_dataProvider_getLovData_result">
    </methodAction>
    <tree IterBinding="getLovDataIter" id="Data">
    <nodeDefinition DefName="nl.whitehorses.model.Data">
    <AttrNames>
    <Item Value="lovLabel"/>
    <Item Value="lovValue"/>
    </AttrNames>
    </nodeDefinition>
    </tree>
    <action IterBinding="getLovDataIter" id="Create" RequiresUpdateModel="true"
    Action="createRow"/>
    </bindings>
    </pageDefinition>
    here is the adf page
    <af:panelCollection inlineStyle="width:309px; height:168px;" id="pc2">
    <f:facet name="menus"/>
    <f:facet name="toolbar">
    <af:toolbar>
    <af:commandToolbarButton actionListener="#{bindings.Create.execute}"
    text="Create"
    disabled="#{!bindings.Create.enabled}"
    partialTriggers="table1 ::pc1:table2"/>
    </af:toolbar>
    </f:facet>
    <f:facet name="statusbar"/>
    <af:table value="#{bindings.Data.collectionModel}" var="row"
    rows="#{bindings.Data.rangeSize}"
    emptyText="#{bindings.Data.viewable ? 'No rows yet.' : 'Access Denied.'}"
    fetchSize="#{bindings.Data.rangeSize}" id="table1"
    binding="#{UserPreferences.table1}">
    <af:column sortProperty="lovLabel" sortable="false"
    headerText="#{data.lovLabel}">
    <af:outputText value="#{row.lovLabel}"/>
    </af:column>
    <af:column sortProperty="lovValue" sortable="false"
    headerText="#{bindings.Data.hints.lovValue.label}">
    <af:outputText value="#{row.lovValue}"/>
    </af:column>
    </af:table>
    </af:panelCollection>
    and here some backing bean code
    DCBindingContainer bc = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    FacesCtrlHierBinding treeData = (FacesCtrlHierBinding)bc.getControlBinding("Data");
    Row[] rows = treeData.getAllRowsInRange();
    System.out.println("tree 1_1 "+rows.length+" "+table1.getRowCount());
    treeData.refreshControl();
    System.out.println("tree 1_2 "+rows.length+" "+table1.getRowCount());
    AdfFacesContext.getCurrentInstance().addPartialTarget(table1) ;
    hope this helps
    thanks Edwin

    What if you place the create button in the same panelGroup as the table?
    I did a quick try and it seemed to work fine for me.
    jspx code:
    <?xml version='1.0' encoding='windows-1252'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
              xmlns:f="http://java.sun.com/jsf/core"
              xmlns:h="http://java.sun.com/jsf/html"
              xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
      <jsp:directive.page contentType="text/html;charset=windows-1252"/>
      <f:view>
        <af:document>
          <af:messages/>
          <af:form>
            <af:panelGroupLayout>
              <af:commandButton actionListener="#{bindings.Create.execute}"
                                text="Create"
                                disabled="#{!bindings.Create.enabled}"
                                partialTriggers="table1"/>
              <af:table value="#{bindings.lovData.collectionModel}" var="row"
                        rows="#{bindings.lovData.rangeSize}"
                        emptyText="#{bindings.lovData.viewable ? 'No rows yet.' : 'Access Denied.'}"
                        fetchSize="#{bindings.lovData.rangeSize}" id="table1">
                <af:column sortProperty="lovLabel" sortable="false"
                           headerText="#{bindings.lovData.hints.lovLabel.label}">
                  <af:outputText value="#{row.lovLabel}"/>
                </af:column>
                <af:column sortProperty="lovValue" sortable="false"
                           headerText="#{bindings.lovData.hints.lovValue.label}">
                  <af:outputText value="#{row.lovValue}"/>
                </af:column>
              </af:table>
            </af:panelGroupLayout>
          </af:form>
        </af:document>
      </f:view>
    </jsp:root>

Maybe you are looking for

  • File Receiver - Alert Config

    Hello all, I have scenario IDOC to File. Now if the file is not posted at particular location on FTP and in acknowledgement i am getting the error from FTP for file size. But No alerts triggered for this. Is there any reason for this? (Alert Configur

  • Cluster in a dialog box

    Hi, I am creating an application for a user to enter configuration data for running a test. I would like to have the user click on items on tree, and a dialog will pops up with a cluster control. Once they change settings in the cluster control and p

  • Motion 4 is there a limit to the duration of a clip imported to M4

    Is there a limit to the duration of a clip imported in Motion 4. My clip is being cut short a few seconds. ??????????????

  • Html Region Background showing outside of Region

    Hi, I would have assumed that if I had a html region as an URL, then it would display the full html page inside the region. However, what actually happens is the content is inside the html region, but the background appears outside the region. I just

  • Sending mail without attachment file

    Hi Sapfans: I would like to send mail without attachment file, just a notice, needing multiple receiver, can change the mail title, Which function shoud I use? I just found out sending mail with attachment file there, Thanks a lot!