Using wizard to create forms of master / detail

Hi guys,.

I'm using JHeadstart 11.1.1.3.35 and having major problems trying to create records of master / details in a layout of the wizard

Department Master (shape, style Assistant, insert enabled, new line on entry)
Group of retail employees (form, data dependant, allowed insert, update has allowed)

Using schema HR with a view link between services and employees

Main group Department (Assistant)
= > Region of the element (all the fields of the Department)
= > Region container
= > Region group (Group of retail employees)

(NB - if I used a group of the region as step in the wizard at a higher level, the following error occurred during the generation which is why I wrapped it in a container of the region...

[NewDepartmentNewEmp.jsff, default/pageComponent/formRegionGroup.vm] Journal of speed [error] method pushModelPointer threw the exception of reference $JHS for model default/pageComponent/formRegionGroup.vm at [1,1]
[NewDepartmentNewEmp.jsff, default/pageComponent/formRegionGroup.vm] org.apache.velocity.exception.MethodInvocationException: Invocation of method 'pushModelPointer' in class oracle.jheadstart.dt.jag.engine.velocity.JagEngineFacade threw exception class java.lang.NullPointerException: null

The problem is that the detail of employee group does not start in design mode.

I tried the create() method substitution in DepartmentsImpl

protected void create (AttributeList attributeList) {}
Super.Create (AttributeList);

NewEmployee RowIterator = this.getEmployees ();
NewRow row = newEmployee.createRow ();
newEmployee.insertRow (newRow);
}

I also tried the override of the executeQueryForCollection method in detail (saw this solution suggested in another post on creating a form-form master / detail)

protected void executeQueryForCollection (Object, object,
Object [] bindParams,
int i) {}
super.executeQueryForCollection (object, bindParams, i);
If (getEstimatedRowCount() == 0) {}
Line = createRow().
insertRow (row);
row.setNewRowState (Row.STATUS_INITIALIZED);
}
}

Nothing works well. I want to be able to use a wizard to create a record of master / detail in presentation view shape-to-shape. Is it possible, using a detail group, or do I have to create a separate view object that contains two master entity objects / detail in it and then just use the only VO in the Group Assistant of JHeadstart.

This seems a very basic requirement, I clearly do something wrong!

See you soon,.
Brent

Brent,

To start in design mode, you must create the Group NewDeptEMp as a top-level group, so he will have his own taskflow. You can then define the new display line on the input property.

In your wizard NewDept, you create a group of the region DIRECTLY under the container of the separatePages region, check "Include as ADFc region" then select the NewDeptEMp group.

To work around the error that you got during the generation of the group in the region as an immediate child of the container sepeartePages, use the following code to formGroupRegion.vm:

# revision_history
# Steven Davelaar 28-sep-2011
Additional support # 1.2 for the group in the region as child of separatePages region container
Team JHeadstart # 30-sep-2006
Historical revisions # 1.1 added, the basic version is 10.1.3.0.97 (SU1)

#if ($JHS.page.itemRegion)
#JHS_PARSE ($JHS.page.itemRegion.templateIdentifier $JHS.page.itemRegion)
#elseif ($JHS.page.regionContainer)
#JHS_PARSE ($JHS.page.regionContainer.templateIdentifier $JHS.page.regionContainer)
#elseif ($JHS.page.groupRegion)
#JHS_PARSE ($JHS.page.groupRegion.templateIdentifier $JHS.page.groupRegion)
#end

Steven Davelaar,
Jheadstart team.

Tags: Java

Similar Questions

  • How to display two dept details at the same time in the form of master-detail

    Hi Experts

    In Forms 6I, using the Scott schema, table DEPT & EMP has created a simple form of master-details relationships.

    Currently when user Dept Block shows all lines dept and EMP block display data based on the selection of deptno.

    It's only a deptno both.

    If the user in the No. 10, block EMP Dept will display all the data related to 10

    If the user moves to 20 Deptno, block EMP will display all the data related to 20.

    And so on.

    But our requirement, what happens if we want to see the 10 and 20 at once (both several deptno)

    Thank you

    Thanks for your information.

    In fact, our requirement is only to display data, he own be no matter what update of data/insertion.

    So below and working for our requirement

    • Remove relationship
    • Additional box on master block.
    • Write code cursor on the box selection - which will fill/clear data block information based on the checkbox selection on block Master.

    Oracle Apps training: how to display two Department employee details at the same time in the master/detail relationship

  • Failed to add new detail in the form of master detail record

    Hello

    I created a simple database application from scratch by selecting the start a page master detail. This has generated a report (for the parent) and a page of form (for the child). On using the form to add a new record to the child, the following error is generated:

    Internal error in the routine mru: ORA-20001: error in MRU: line = 1, ORA-01400: cannot insert NULL into ("Student" 1.) "" DELEGATE. " "" ""DELEGATE_ID"), insert"Student"1." DELEGATE values' ('DELEGATE_ID', 'CLIENT_ID', 'NAME', 'INITIAL', 'SEX', "SPECIAL_NEEDS") (: b1,: b2,: b3: b4,: b5,: b6)
    Error failed to process the update.

    The field 'child' in the error message is automatically hidden on the form and I guess on the generation of this form using the wizard I would have had the opportunity to link the field delegate_id to a trigger or a sequence like this seems to happen when you create a scratch from application database using other types of page. I'm new to Apex then I would be grateful if someone could let me know why this default behavior occurs.

    Kind regards

    Kevin.

    I tried for Apex 4.0.2 (my version) and 4.1 (on apex.oracle.com) and I'm wondering for the production of main PK and details in both versions.

    What are your steps exactly in the wizard? Like this?
    Create page-> form-> form detailed Master
    Now you see a list of steps sub whose "Source of primary key.

    Oh I see "Create an Application Assistant." in your message. Start with an empty application (blank page) and use the wizard to create a Page. Maybe it's the difference.

    Published by: InoL on November 18, 2011 09:27

  • Create lines of master / detail in Application Module Impl

    Hello

    I use Studio Edition Version 11.1.2.3.0

    I need to create programmatically from the lines of master / detail of a method in my Application Module Impl.

    I'm using the code below, but they always tell me that the foreign key is required in the detail row: oracle.jbo.AttrValException: Houston-27014: UserId in UserPreferenceEO attribute is required.

    Can anyone recommend the correct way to do this?

    Thank you very much

    NVP NameValuePairs = new NameValuePairs();
    nvp.setAttribute ("name", "value");
    RegisteredUsersVORowImpl = (RegisteredUsersVORowImpl) getUsers () .createAndInitRow (nvp) userRow;

    Create the line of userpref
    Get the detail line via the accessor on Master table display
    userRow.getUserPreferencesVO () .createAndInitRow (null);

    getTransaction () .commit ();

    I had a simular problem a few weeks back.
    To a master VO you must:

    this.getMasterVO().createRow();
    

    And for a VO detail:

    Row row = this.getDetailVO().createRow();
    ...do stuff with the row...
    this.getDetailVO().insertRow(row);
    

    Given that the captain creates and retail CreateInsert

  • Creating lines of master / details in a table

    Hello

    How to create the relationship of the master / detail between the columns in a table?

    For example, I have a table with 3 columns as address (input box), Country (a selection list box), State (select one box list). I create State LoVs using view accessors for table and country view object. By choosing a country, I need to dig the status column values according to the selected country.

    Thank you.

    Hello

    I guess that you need a "cascading LOVs.
    (1) create viewObject for list of country values. Named VO1.
    (2) create viewObject for list of status values. The name of VO2.
    (3) create view for (variable binding) VO2 criteria that may restrict the result by country.
    (4) create view accessor to get VO1.
    (5) create view accessor to get the VO2. Set the value of the bind variable which can provide country information dynamically. I guess it must be a Groovy expression.
    (View accessor 6) Create country LOV on step 4).
    (View accessor 7) create the State LOV on step 5).

    Fact

    On the view layer, you can enable PPR between countries and the States of the attributes.

    Todd

  • Unique constraint in the form of master detail error

    Hi all

    I need help, the following requirement.

    I have a master detail form developed on master-child table. the tables have the composite key.

    Old masters has a composite key on columns (A, B)

    Children table has a composite key on columns (A, B, C)

    Child block look something like below

    C       A          B

    10 AAA 1000

    20 1300 BBB

    30 CCC 1400

    40 DDD 1200

    Increments of column C with 10 for each record, and if a new record is insert in intermediaries the records it is incremented to 5.

    My requirement is when an end user attempts to insert record between 20 and 30 or 30 and 40 and clicks on save, the value of the C column must regenerate as shown below

    C       A          B

    10 AAA 1000

    20 1300 BBB

    XXX 30 900

    40 CCC 1400

    50 DDD 1200

    Button Save I wrote the following code

    Declare
      ln_Count NUMBER :=0;
      ln_c number :=0
      cursor c1 is
      select c
      from child
      where a=:child.a
      and b=:child.b
    Begin
      Go_Block('Child');
      First_Record;
      LOOP
      ln_Count:= ln_Count+10;
      :child.C := ln_Count;
      EXIT When :System.Last_Record = 'TRUE';
      Next_Record;
      END LOOP;
    
    
      For c_cur in c1 Loop
      update child
      set c:=ln_c+10
      where a=:child.a
      and b=:child.b 
      and c=c_cur.c
      end loop;
      Forms_DDL('commit');
         
         commit_prc('Commit');  -- We have our own program unit to call commit_form
    
    END;
    

    I tried above in a way because, before approving the changes to the table, I update the existing values in the table of the C column so I would not get unique constraint error.

    When you click the button Save, I get a constraint exception. Hope I made my requirement clear.

    Can someone give me a clue to this implementation.

    Thank you

    malandain

    With this update, all your C-columnvalue became negative. When you post the form thereafter, forms update agaion records one by one the new positive figures. Because the numbers of 'old' in the db are now negative, there will be no violation-UK.

  • Validation of the detail in a form records master detail.

    Hi all

    IAM trying to validate the detail records in a form master detail. I have a check box in the detail Section. I want to add validation that all the detail records are checked or all are unchecked. To do this, I added valdation method on the entity to master, but it only runs when any attribute of the master record is changed, but not when it comes to his detail record is updated or inserted. Please tell me where I can write this validation logic or how can I trigger to perform the validation method when a child record is updated.

    Thank you, Pradeep

    Please ask such questions on the JDeveloper forum in the future because it is not related to the JHeadstart.

    To get the desired behavior, you must check the Association membership on the association of the entity between the master and detail EO.

    Steven Davelaar,
    Jheadstart team.

  • problem in the form of master-detail when you use the ADF table for detail

    Hello

    jdev version - 11.1.2.1.0


    I create master shape detail using datacontrol drag as ADF master shape secondary Table.


    Now when I create a new line in the detail table using the key CreateInsert a new empty row created on top of the secondary table.

    and other show line that the previous record data based on the master.

    problem is I want to when I click on the createInsert button all the line of the secondary table must be empty and what line to fill two or three user then validate.



    Thanks in advance

    Hello

    If a secondary table has data, then createInsert adds to them. If you want to hide the existing lines, create a new instance of the View object and set the option "extract database" to "No. Rows. Use an af:switcher to change the specified table when the user clicks the createInsert button. There is some coding needed to have this use case in the ADF, but its essentially declarative. Bottom line, is that there is no option automated other than to create new lines in a separate page or dialog box if you are bothered by existing lines

    Frank

  • Who are the best trigger/s to use for this? (Issue of master-detail)

    Hi all

    I am currently updating an old Oracle database. The last phase is to apply foreign keys (their absence on the PB at the moment). It is fine - the keys are easily identified - but it will cause a problem with some of the application that uses these tables. It is written in Oracle Forms (version 10g, although a large part of the code is from an earlier version). In some forms, the block order is such that the detail is committed to the master! Of course, this now gives a constraint error. This was done largely for the purposes of validation, for example. to check some detail item exists before committing the master.

    What is the best way to solve this problem now? Is the trigger of the POST-FORMS-COMMIT the best to use for validation?

    The only idea I have for this would be to "rewrite" the userexit-standard pl/SQL code and proceed in the same way (POST-FORMS-COMMIT)

  • Master / detail Edit - any form of detail is displayed on the page?

    I have a simple application, built on a master of table BPR_PROC (a single column, PROC_NM). And a secondary table BPR_RUN (PROC_NM columns and a few others). There are only 4 pages: (1 House, Master 2, 3, 4 Login details). I did this as a standard form - create selection master / detail.

    When I create or edit a master (PBR_PROC), the mounting happens on details page - well, very well so far. But no form is displayed with the detail rows exist (according to the BPR_RUN of detail table) or whatever it is for me to go into details. (I'm sure I've done app M - d. before and the change of details form appears at the bottom of the details page but I am noit do here).

    Question: How can I fix to add / modify detail rows?

    WS: APEX_EXAMPLES_01
    User: demo
    PW: demo
    Appl: BPR_991203

    Thank you
    Howard

    (For later: Question: is there a simple way to do the master editing on master rather than on the detail page?)

    Howard (in training) wrote:
    Ah! I've recreated the problem - this time on pages 12 & 13 and as before

    the point value / Expression 1 Is NOT NULL column condition on the detail region seems to lack a little:

    So, it's a "bug"?

    Probably something to do with the creation of forms of master-detail using ROWID instead of a real process of generated by the wizard of PK. APEX theory. PKs relational DB meaningful, immutable like immutable PKs. Despite the bug condition region of detail, is why your column editable PROC_NM if it is used as the PK? It is a good way to break things. (I created now orphaned detail rows).

    If you want to take advantage of the built-in features of APEX as ARP and MRU wizard-generated process, then go with the flow: use surrogate keys. Otherwise you'll spend your time to write a lot of code manual.

  • Cannot create relationship master detail for datablock

    Hi guys, my form currently has a relationship master detail for 1 datablock and everything works well. I now have a need to do a datablock different, based on the same table as the previous datablock but for some reason any that it won't let me create the same master-detail relationships, as I did on the 1st slice (and I need the same relationships to sort the block shows the same data as the previous datablock).

    Anyone know why it won't let me create the relationship?

    I encountered a similar problem before. When you say that you cannot create relationships is - it simply because you cannot select the master/detail through the wizard? If this is the case, you should be able to make the relationship manually, or at least I could when I had the same problem. Although I can't help, but wonder why it wouldn't let you select them in the wizard. There may be an underlying reason for this. But anyway, try and make the relationship manually and let me know if it works.

  • Navigate a page master detail editing a page using detail rowKey

    Hi all

    I use JDev 11.1.1.0.1.

    A few cases test using HR schema:
    I have 2 pages countryLocation.jspx and departements.jspx with a control flow "deptFlow" between them.
    countryLocation.jspx is a master/detail page using country as a form of master and places like detail Table.
    Locations table is surrounded by an af:panelCollection. In the pane toolbar, there is an af:toolbarButton with "deptFlow" as an action. Button using 'table1:locationId' as partialTrigger.
    The departments.jspx page is also a master-detail with sites as a form of Master and departments as an array of detail.
    I do not support pods in the pages (should I?).
    When I click the button change, I want to see all the departments of the location I have selected table of localities in the countryLocation.jspx page.
    Unfortunately, this isn't the behavior.
    If I choose 'US' as a country and LocationId 1700 (Seattle) when I click on the button, it goes to departments.jspx Edit, but it shows LoactionId = 1000 (Rome - Italy).
    What Miss me?

    Thanks in advance.
    Paulo Domingues

    What technology do you use for the Service of the company (in the template)? ADF business components?
    If it's BC of the ADF, what type of departments use VO were based on the departments.jspx? It is a child of the locations, or is it a use of high level in the Application Module data model?

  • tree and master detail on same page oracle apex

    Hello.

    How can I create a form in the apex that contains a tree view and a master in detail on the same page?

    I already finished the tree, but when I finished the master Wizard detail, apex automatically creates a new page.

    any ideas?

    I use apex 4.2

    Thanks in advance.

    Siberia wrote:

    Hello.

    How can I create a form in the apex that contains a tree view and a master in detail on the same page?

    I already finished the tree, but when I finished the master Wizard detail, apex automatically creates a new page.

    any ideas?

    I use apex 4.2

    Thanks in advance.

    Backtrack. First create a form page master detail. On this form Page then create the tree. So the shape and the tree will be on the same page.

    BR,

    Patrick

  • master/detail relationship through two workflow

    Hello world

    I use jdev 11.1.1.7.0.

    In my application, I created a relationship master-detail between departments and employees (departments is master and employees is detail). Then, I created two stubborn workflow.

    Department-stream with a department.jsff and I drag / drop the departmentVO as a form.

    dep.png

    employee-stream with an employee.jsff, on this page I drag / drop employeeVO located under departmentVO in the control panel of data:

    emp2.png

    can I use these two TFs (Department-flow and employee-flow) through two different ways

    1- I create a main.jspx page and I put two TFs as an area on main.jspx.

          <af:form id="f1">
            <af:region value="#{bindings.departmentflow1.regionModel}" id="r1"/>
            <af:region value="#{bindings.employeeflow1.regionModel}" id="r2"
                       partialTriggers="::r1"/>
          </af:form>
    
    

    in this case when I run the homepage, two TFs are in sync with each other, I mean when I navigate between departments in the workflow Department, employees in the employee flows are discount

    and also if I enlist in the workflow Department then changes in the flow of employee will be validated.

    2- in this case first I create a master stream with an master.jsff and then I put two TFs as an area on master.jsff.

     <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
              xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
      <af:region value="#{bindings.departmentflow1.regionModel}" id="r1"/>
      <af:region value="#{bindings.employeeflow1.regionModel}" id="r2"
                 partialTriggers="::r1"/>
    </jsp:root>
    
    

    and finally I put flow master as a region on the page main.jspx.

           <af:form id="f1">
            <af:region value="#{bindings.masterflow1.regionModel}" id="r1"/>
          </af:form>
    
    

    in this case, when I run the main.jspx , always the two page two TFs are in sync with each other (updating of employees when I navigate between departments)

    but in this case the validation in the workflow Department commit not changes in the flow of employee.

    Anyone know how I can I have this (validation cause Department-stream flow used as case 1)?

    Habib

    Concerning

    Habib,

    I just did what you said.

    1. Ran the mainWithMasterFlow.jspx,

    2. the Department rendered initially has only one employee.

    3. has changed the salary. (Kept the emphasis placed in the same field)

    4 click "Commit".

    Above scenario failed, because the change in value has not been submitted. Try adding autoSubmit = true for the salary field and then repeat the procedure, you will see the file be saved.

    Rambeau

  • Problems on master detail CRUD

    Dear all,

    I'm trying to understand how ADFBC manages the relationship master detail like this
    is the first time where I need to manage the table relation.
    Practice, I only used a table but this time I need to manage the relationship, too.

    I have two tables that follow. They have a to-many.
    PART_ID in the PARTS_CODE table is filled by a sequence of DB.
    PARTS_CODE                                   PART_DESC
         - PART_ID (PK)                              - PART_ID (PK)
         - RANGE                                   - REGION  (PK)
         - CATEGORY                              - DESC
    Use case is like this:
    Table PARTS_CODE contains data on the parties while PARTS_DESC contains information on the description of the specific region of the parts.

    Now, I created a View object that links the two tables. Then I drag this display object from
    my data as a control table update-able.

    I just have a few questions on the implementations:
    1 when I drag and drop the CreateInsert button and click on it, I noticed that it adds a new line to the
    table, but I noticed that it creates the Text Input component only on the associated columns
    the PARTS_CODE Table, the other columns for the PART_DESC does not have the user interface components.
    How to solve this problem?

    2. how to manage the relationship such that when it inserts the data on the PARTS_CODE, I need
    to get the DB generated sequence number and put it in the PART_DESC table

    3. any demonstration/links which shows the CRUD operations involving arrays of master detail?

    I searched the forum for Crud master / detail, but I can only see the display of the relationship and not
    CRUD operations.

    Found this blog too http://andrejusb.blogspot.com/2009/03/create-operation-for-master-detail.html, but
    I can't even fully understand.

    JDEV 11G PS3

    Thank you

    You will need to create a black and white view link in your main table and details. The blog provides the code example if you step through the code, you will get to know exactly how it's done.

Maybe you are looking for