[ADF, JDev12.1.3] Master w/playback af:form only af:tables detail: how to handle insert and edit through forms?

Hallo,

I have a fragment like this...

When it is called mode "CreeateWithParams", the user must complete the form in the 1st tab and then can optionally add lines in the af: tables of the other tabs. All changes must be committed/rollbacked together.

I would like to make the tables readonly and manage the mounting (the image in the tabs details that I forgot to put a "Edit" button) and inserting records in a pop up form.

Each detail table will have its own noise to the top of the form. I would create each form drag-and - drop the fields of the istance VO even used for FA: table.

I would like to know if this is a good approach, putting the 3 need to popup forms directly in the fragment? Or I have to put each shape in a mono-fragment bounded task flows and put the fragment in the popup?

Each pop up form will contain a confirmation and a Cancel button.

If the pop-up opens (for editing or inserting) and the user clicks the Cancel button, I do not see the changes in the table.

Changes must pass to the af: table as if the user click on the button confirm.

To achieve this, I guess that, when the user clicks Cancel, I can't use the AOS restore operation because this will cancel all pending, not only the last of them changes.

Could you kindly give some advice on how to achieve this?

Thank you

Federico

I would like to know if this is a good approach, putting the 3 need to popup forms directly in the fragment? Or I have to put each shape in a mono-fragment bounded task flows and put the fragment in the popup?

If you can make them reusable, use BTF.

Each pop up form will contain a confirmation and a Cancel button.

If the pop-up opens (for editing or inserting) and the user clicks the Cancel button, I do not see the changes in the table.

Changes must pass to the af: table as if the user click on the button confirm.

To achieve this, I guess that, when the user clicks Cancel, I can't use the AOS restore operation because this will cancel all pending, not only the last of them changes.

You can use the "save points" (create the point of check in popupFetchListener and restoring to the point of backup in popupCanceledListener)

See this example: http://www.oracle.com/ru/corporate/press/007-cancelform-savepoint-169126.pdf

Dario

Tags: Java

Similar Questions

  • [ADF, JDev12.1.3] master / detail af:tables the link is handled by ExecuteWithParams: how to create a master report / detail in a loop on the lines?

    Hallo,

    I have a page with 2 legs and they both contains an af:table created by dragging an instance of VO in the user interface.

    The 1st tab uses a master VO while the 2nd uses a VO detail.

    Between 2 your, there is not a link of VO master / detail.

    Opening Details tab I update the secondary table by calling the method ExecuteWithParams of the detail VO instance (in a managed bean).

    I would now like to generate a report that loop on the master table and that, for each line of master:

    • He writes in the report;
    • loops of registration of details (which are based on the master record) and also writes the report.


    Could you kindly suggest me which is the best way to achieve that through a code to write in a managed bean?

    Here I am interested how do to loop through the data, not in how to write the report.

    Thank you

    Federico

    Yes it will affect the selected line. If you want to ignore try using this code

        DCIteratorBinding iter = (DCIteratorBinding) BindingContext.getCurrent().getCurrentBindingsEntry().get("DepartmentsView1Iterator");
        ViewObject vo = iter.getViewObject();
        for (int i = 0; i < vo.getEstimatedRowCount(); i++)
        {
          Row r = vo.getRowAtRangeIndex(i);
          System.out.println("DeptId= " + r.getAttribute("DepartmentId"));
        }
    
  • [ADF, JDev12.1.3] Method in AM that returns a ViewRowImpl object. How...?

    Hallo,

    I need to create a method in the Module of the Application that returns a ViewRowImpl object.

    I want to call this method to a bean that will consume the returned line.

    I ask if this is possible, since in the AM configuration I don't see my method to expose it to the customer.

    What's wrong?

    Thank you

    Federico

    What's wrong?

    Documentation: https://docs.oracle.com/middleware/1213/adf/api-reference-model/oracle/jbo/server/ViewRowImpl.html

    "Client applications should not access this class on the client tier of an application. Instead, the Row interface must be used for access to the client tier. »

    In general, if you can use the class interface or application in a certain part of the code, always use interface.

    Dario

  • [ADF, JDev12.1.3] I would like to stress that af: table takes the entire width of page and column auto-augmenter/reduce their width in proportion to the amount of available space. How...?

    Hallo,

    I see that default ADF makes all the 100px wide columns and there is the possibility to stretch a column to take full available width.

    I would like to know if there is a function / approach in ADF which - occupies all the available space - auto-calcule the width of each column to 1) the width of DB fields and 2) space in the browser window.

    I could also set the with columns of table in columns (characters) or (better?) in pixels and the framework should only for reproportion widths according to the available width.

    Or track to follow is defining the width of the columns in the table (percentage) property?

    Thank you

    Federico

    There is the possibility to stretch a column to take full available width.

    AFAIK, you can stretch several columns (read the docs for this property)

    I would like to know if there is a function / approach in ADF which - occupies all the available space - auto-calcule the width of each column to 1) the width of DB fields and 2) space in the browser window.

    (1) as far as I know, no

    (2) you can add class AFStretchWidth to the styleClass property to af:table (or surround your table with af:panelCollection and add this style class here)

    Or track to follow is defining the width of the columns in the table (percentage) property?

    Is probably not.

    % has different interpretation in different browsers, so you should use the style class AFStretchWidth.

    Dario

  • [ADF, JDev12.1.3] What is the right approach to manage the Value property of a Date of entry through a bean?

    Hallo,

    I created a custom search form by dragging on the CIU af:inputText and af:inputDate.

    I have some difficulties in the treatment of af: inputDate CIU.

    I've linked the Value of each af:inputDate property to a Date variable in a range backingBean bean.

    It is the correct type of Date or can I use the String type?

    When the user clicks the button to search for the form of the search_action in the bean creates the query with parameters (identified by (?) because I am using SQL Server as DBMS).

    Then, I need programmatically check the values of af: inputDate CIU and then use them to define the query parameters.

    Are there property should I settle for FA: inputDate CIU to "do a good job? For example Valdiator, converter...?

    I see that when I use the calendar of af: inputDate, the field is entered in the format dd/mm/yyyy is good for me but I'm not able to uderstand how to treat the value to check by program and then use it to set a parameter to the query of VO.

    I also want to set the initial value of some CIU af:inputDate in the bean. It takes for example the 1st of the month 6 months ago. What code would I use to do this?

    You could you kindly help me (better if give me a simple example)?

    Thank you

    Federico

    I've linked the Value of each af:inputDate property to a Date variable in a range backingBean bean.

    It is the correct type of Date or can I use the String type?

    Date type is correct.

    Are there property should I settle for FA: inputDate CIU to "do a good job? For example Valdiator, converter...?

    Well, if you need validate the date, then you will need validator (or check the value in managed bean)

    It goes the same for the converter.

    I see that when I use the calendar of af: inputDate, the field is entered in the format dd/mm/yyyy is good for me but I'm not able to uderstand how to treat the value to check by program and then use it to set a parameter to the query of VO.

    In your beans, you will get the Date value, so no matter how it is displayed on the user interface.

    To date handling, you can use standard java api as java.util.Calendar

    I also want to set the initial value of some CIU af:inputDate in the bean. It takes for example the 1st of the month 6 months ago. What code would I use to do this?

    Use standard java api to calculate the new date, then assign accessor value in your bean (for example, in the constructor of the bean)

    Dario

  • [ADF, JDev12.1.3] When you use create/restoreSavepoint... Restore operation is still useful? And other doubts...

    Hallo,

    Dario and Timo advised me (in this thread Re: [ADF, JDev12.1.3] Master w/playback af:form only af:tables detail: how to handle insert and edit through forms?) I make a request using the functions create/restoreSavpoint to this fragment in my application.

    The tables are read-only, and the user can insert and modify records by a form of popup.

    Each table has its own pop-up that I created using a btf executed as diaolog (*).

    Before I open the popup, I create the backup point.

    BindingContext bctx = BindingContext.getCurrent();  
    DCDataControl dcDataControl = bctx.getDefaultDataControl();  
    String sph = (String) dcDataControl.createSavepoint();  
    AdfFacesContext.getCurrentInstance().getPageFlowScope().put("AdfmSavePoint", sph); 
    

    When the popup is closed, I restore the backup point if the Cancel button was clicked...

    Object confirmOrCancel = returnEvent.getReturnValue();  
    if (((String) confirmOrCancel).equals("cancel")) {  
      String sph = (String) AdfFacesContext.getCurrentInstance().getPageFlowScope().get("AdfmSavePoint");  
      BindingContext bctx = BindingContext.getCurrent();  
      DCDataControl dcDataControl = bctx.getDefaultDataControl();  
      dcDataControl.restoreSavepoint(sph);  
    } 
    

    I have these doubts:

    1. the button "CANCEL ALL" (so far) AM restore operation is still meaningful (is always useful) when you use the check points? Or can I avoid using the restore of the AM operation, creating a backup point before you enter the fragment and restore it if the user clicks on "RESTORE ALL"?
    2. for all tables: before opening the popup insert/change the backup point is implemented pageFlowScope under the same key 'AdfmSavePoint '. Is it OK or would it be better to use a different key for each table (for example 'AdfmSavePointTable1', 'AdfmSavePointTable2',...)?
    3. If the pageFlowScope already contains a checkpoint under the "AdfmSavePoint" key... What does if I give the floor to new .put ("AdfmSavePoint", sph)? Can I be sure that the old value is overwritten?
    4. is this safe with nested savepoint? For example in my case I want to create a backup before the fragment in the image point is displayed (and restore if the user leaves the fragment by clicking "RESTORE ALL"), then within the fragment, as I said above, I would manage other points of record when inserting/editing tables.
    5. I noticed that clicking on the button "RESTORE ALL" when it relates to the AM-restore operation causes this strange thing: when before displaying the fragment I call SetCurrentRowWithKey on the master istance VO... If I click on "ROLLBACK ALL" posted master VO Records changes and 1 minutes of the main of the VO table is displayed. Why the master istance VO is not reimain in the folder I've previously selected by SetCurrentRowWithKey?
    6. With reference to the expression (*) above. The BTF 'dialogue' I created contains only the page jspx with shape and a return to activity. I also tried a) create (and restore) the backup point, b) to call createInsert inside the "dialog box" operation BTF (see images below), but the createInsert on retail VO istance called inside the 'dialogue' BTF seems not to reflect on the table as when I call createInsert by calling btf. I have to make some adjustments in the 'dialogue' of BTF?

    Thank you

    Federico

    Federico,

    (1) Yes, what should happen if a user add or edit vo1 and click ok in the dialog box but decided that ask to work must be restored?

    (2) as long as you don't have that a dialog box is open, it should work.

    (3) the flowrate range of page is a map. You can put the same key more than once. If the key already exists, the value is replaced.

    (4) in fact, I don't know, but the sounds of complicated design. I guess you can record more points, but only in the order of creation. It's as if you try to rebuild the framework. BTF yo it even for you, when worn right. Please go to ADF Architecture Square and read and watch it task flow of related things.

    (5) this behavior is as expected. A restore resets all the iterators so thagetto point at the top of he. http://www.Oracle.com/technetwork/Developer-Tools/ADF/learnmore/OCT2010-OTN-Harvest-183714.pdf 'keep the line after cancellation' shows how to handle this situation.

    (6) I suppose have you refresh the table iterator, once you close the dialog box for the new data. But that's only a guess because it depends on how the btf share control of data and the your involved.

    Timo

  • [ADF, JDev12.1.3] How to get the column headers, request of VO and VO bind vars used by an af:table?

    Hallo,

    I want to create a method that takes as a parameter the id of an af:table (used to display the search results) and returns:

    • the column headings of the af: table
    • Visible property (true/false) of the columns af:table
    • the actual query of the VO instance used to create the af: table
    • the values of real bind variables passed to the query of the instance of VO

    I would like to create a servlet which takes the parameters reruns the query and returns a report Excel/PDF file that contains exactly the same columns and same of the af records: table.

    I'm a little confused on who use the code to achieve this... you kindly help me?

    I did a similar qustion here Re: [ADF, JDev12.1.3] how to export an af:table to Excel in an ADF Essentials application? but then I guessed that it was preferable to create a new thread.

    Thank you

    Federico

    For this, you can use this type of code

    Context LocaleContext = _adfTableBinding.getLocaleContext ();

    for (attr AttributeDef: attributeDef) {}

    Label As String = attr.getUIHelper () .getLabel (context);

    _logger.info ("Attritbute name:" + attr.getName () + "column name:" + attr.getColumnName () + "Col4Query name:" + attr.getColumnNameForQuery () +)

    "Name:"+ label);

    }

    which produces this output

    Timo

  • [ADF, JDev12.1.3] Which is the best way to define the properties of CIU/fragments of pages. Is the approach that I have used a good choice (for a beginner)?

    Hallo,

    in my app, that I have a lot of pages and fragments in which properties (for example rendered text, disabled, Selected,...), lots of user interface components must be set, before/when the page is displayed, depending on the session and pageFlow scope attributes.

    So far I have created for each page/one backingBean brought bean fragment in which I defined an attribute for each property defined (e.g. 2 properties for each UIC: UIC is 10...) "I have 20 attributes to manage in the bean).

    Then, I linked each attribute of the bean to the respective UIC property. You can see in this my thread (unfortunately without answers ) [ADF, JDev12.1.3] backingBean bean: a lot of properties to set for lots of CIU... is better by using the properties of the binding or access code (created by ID) UIC? a small example. I put the attributes the bean Builder (or in a function of 'action' if the APP properties must be set based on the interaction of the user).

    I would like to know:

    • If it is a good approach / recommended / safe or if there is a better way;
    • If the scope backingBean is OK, or if a larger scope would be better.

    As I asked in the thread in the link above, the situation can become difficult to manage if the PPP for which setting, properties are very different.

    So I'd like if there is no alternative that I can use to get the same result with less effort.

    For example, using the class ComponentReference or invokeOnComponentAPI could simplify my life? And their use could I always use backingBean brought beans?

    Thank you

    Federico

    Federico, please understand that this forum has no sla. I have other work to do, who pays my bills. I will do my best to help, but you can not expect the instant replay.

    (1) you must not use the bean to init your beans. You can delay load or init your beans instead.

    (2) as Frank and says you can use a bean to view range and use it to make your calculations as long as you know how their parameters go to the btf

    (3) you should always use the reference of the component if you bind a component to a bean. Make a habit of all scopes.

    As we do not know how you calculate the State and how often it changes while the Working Group is on the page, it is difficult to give further advice.

    Timo

  • Jdev 11.1.2.3 on RedHat 5.8 - use ADF Fusion Proj for Master

    Hello:
    I'm in accordance with the practice of creating shared libraries of ADF for model, the Code and the user interface, called CommonModel, CommonCode, CommonUI.
    Developers create subsystem projects that import these Libs ADF. Then several subsystems (such as ADF Libs) are combined into a master application that then creates the EAR file for deployment.

    Each of the subsystems are ADF Fusion Web Apps. (a model and viewController projects)
    Shared libraries are Custom apps. (with only a single project)

    The Question is what type of application to create for the Master project. The docs seem to indicate a custom project, but I think it's wrong and that I have to use a Web of Fusion ADF application for the master who would model and viewController projects.

    So, what type of application must be created for the master? Custom = a project or ADF Fusion app that has 2 projects (model and viewController)?

    Thanks for the help.

    Hello

    Keep in mind that the types of applications are a few models. Models include a set of libraries of different technologies that you can work on your project. However that does not limit you to use other technologies or libraries outside of this scope. Custom type is open to all.

    Juan C

  • [ADF, JDev12.1.3] How to display totals for numeric columns in an af:table?

    Hallo,

    I have a VO with numeric columns. I dragged the VO to UI to create an af:table.

    I would like to know if ADF allows you to easily add a footer to the af: table that automatically show the total of each digital line.

    This is to avoid creating a just another VO only to calculate and show the totals.

    Thank you

    Federico

    Why so complicated?

    Groovy is your friend here. Cech Tech Blog of Rohan Walia: ADF - Groovy for a Total of a column in a Table amount or do you it directly in the DB using Analytics functionms as shown here Andrejus Baranovskis Blog: Analytic Functions Oracle for Total and averaging in British Colombia ADF

    Timo

  • [ADF, JDev12.1.3] How to hide the asterisk for required fields in an af:form?

    Hallo,

    I would like to not display the asterisk in front of the label of the fields...

    ... so I set for all areas of the ShowRequired property to false.

    I do not understand why the asterisk continues to display...

    I have to set another property somewhere?

    Thank you

    Federico

    Check the documentation for the showRequired property (jdev or online: ADF RichClient API - ).

    As a workaround, you can put af:inputText in af:panelLabelAndMessage component and set simple = "true" to hide the label.

    Dario

  • [ADF, JDev12.1.3] How to create a page that is read-only or allowing changes according to the menu by which item it is accessible?

    Hallo,

    I'd like to go to the page that contains an af:table of 2 different menus: "Edit/insert data" and "read data".

    Is it possible to make a page that is read-only when the user accesses by "Read data" and that allows for changes when you access it through 'edit/insert data?

    Or do I have to create 2 different pages?

    Thank you

    Federico

    If the menu is outside the region, you must pass a parameter in the area and read this parameter passed within the region. You cannot directly access the bean of expanded view of inside the workflow.

    You can check out my blog 11.1.1.5.0 JDeveloper: router to use to create new or modify existing line | JDev & ADF Goodies

    That uses a router within a workflow to decide which page to display based on the parameter. Using this solution you can easily implement your use case using two different pages to show the table, a read-only, and the other to change.

    Timo

  • LOV cascading if I don't have only one table with the customer name and the name of the product in the ADF.

    Hi Please help me how to use cascade, if I don't have only one table with the customer name and the name of the product in the ADF... I use Jdeveloper 11.1.

    For the client, I used customer VO with client list to fill but to populate the product that I use bind variable PrODUCT_NAME select distinct from TABLE where client_name =: bindCustomer

    so first of all, I need to set the variable of liaison on behalf of the selected customer.

    Can you please tell me how to set this variable binding in this case.

    After you set the LOV to your product attribute, correspondting VO in the LOV will appear under view accessors.

    Change the accessor of the view, you will see the variable binding. Set its value to the customer field of the parent object.

    Visit this link: https://www.youtube.com/watch?v=nXwL2_RP7AQ

    Kind regards

    Elias.

  • The Master Table column updated based on the sum of column Table detail


    With the help of JDev 11.1.1.6.

    I have a master-detail table based on a link to BC.

    The main table has a column that displays an InputText or an OutputText, based on the value in another column.

    If the InputText is displayed, the user can enter a value and the database will be updated with that value.

    If the OutputText is displayed, it must be a sum of a column in the secondary table.  Also, this value will be written in the database.

    Question:

    How can I fill the OutputText in the main table with the sum of the values in a column in the secondary table?

    The detail table column is a manually entered InputText field.

    Thank you.

    Create a spike in the main table and write in its expression as follows - DetailVoAccessorName.sum ("ColumnName");

    This will calculate the sum of column table detail and then you can set the value of the transient attribute to attribute DB on backup operation

    Ashish

  • How to get the diagram ER or master child tables details

    Hi team,

    I would like to get the details of the child Master Table Details (ER Diagram). I use the PLSQL developer.

    Could you please suggest how to get this tool or by using the query.

    Thank you

    Vincent

    Hi mohamed,.

    Please use TOAD. You ask to go to the link below: -.

    Toad Data Modeling - Diagram ER to create and generate the Script DDL/SQL - videos - Toad Data Modeling - Toad World

    Thank you

    Jihane Narain Sylca

Maybe you are looking for

  • To bookmark pages will not appear in the bookmarks.

    Not too long ago, I lost all my favorites. I went on creating all new bookmarks. I had a lot of Favorites and I had just finished organizing them into folders. The next time I start my computer, they were all gone, and bookmarks that were previously

  • Qosmio F30: Driver WDM Video IN for the VfW capture?

    Someone Toshiba read these forums? Is there any hope that Toshiba can rewrite the pilot for the composite 'Video IN' material so that it works correctly under Windows and Video For Windows driver model so that it can be used with Windows Media Encode

  • Add memory to my desktop PC

    I have a Compac Presario desktop PC 6331rsh and need to add memory. I know that there are two locations of memory, which is currently listed with a 256 MB memory card.  Can I add another card with 512 MB of memory, or should it be an another 256? Wha

  • Installation disc

    LabVIEW 2012/Windows 7.  I created an installation disc for my sw construction in project of LV.  Can I install it on the target computer.  Something happen after weeks of operation where I think the sw became corrupted so I deleted the folder w exe

  • I installed Vista Service Pack 2 update...

    I installed an update to Vista Service Pack 2 and at the bottom right of my screen, it says Windows Vista (TM) evaluation copy. Build 6002.  My copy of windows Vista came with my RESUME!  Now when I turn on my computer it says my evaluation copy is o