ADF Toystore question:  no blank row in viewobject on "Add" JSP form

A new thread based on Suggestions for Automatic Commit/Rollback
In the ADF Toystore application, I did not notice the blank row behavior in the user registration section like we encountered in the other thread posting (Suggestions for Automatic Commit/Rollback To test this, I created another instance of the Accounts viewobject (called it AllAccounts) inside the ToyStoreService app module and then created a JSP to list the contents of the AllAccounts viewobject. Then, I went to the registration page (which creates a blank row in the view object with a status of STATUS_INITIALIZED) and then without submitting the form, I clicked on the link that I created to view the contents of the AllAccounts view object and noticed that a blank row did not appear. What is causing a blank row to appear in our discussions in the other thread (Suggestions for Automatic Commit/Rollback but not in the ADF Toystore application? I guess somehow this row with a status of STATUS_INITIALIZED is being "removed" but I cannot find the code that does this.
Steve -- any ideas?

I was trying to figure out what would be the best practice to implement 'partial rollback'. Could not really find the example in Toy Store demo. For example if we create new account, the model will get dirty. And let's say user does NOT commit the record but rather uses link and navigates to some other pages. After some work user may commit the transaction which in turn will commit blank entry in account table. Well for the sake of example let's assume that this is possible scenario.
So what I am up to is how to implement 'cancel' operation when user changes his/her mind and does something else rather then commit/save_changes in new/edit screens? What would be the best practice?
What I have done so far is rather too bulky. I have implemented event handler for all my links and cancel button in data page:
   * "Cancel" Event Handler.
   * @param ctx The DataAction context
  public void onCancel(DataActionContext ctx) {
    HttpServletRequest request = ctx.getHttpServletRequest();
    BindingContext bcc = HttpBindingContext.getContext(request);
    DCBindingContainer dbc = DCUtil.findBindingContainer(bcc, "modifyAddSchedulingUIModel");   
    DCIteratorBinding studentCat = dbc.getIteratorBinding("AddModifyScheduleView1",null , "AddModifyScheduleView1Iterator");
    Row currentRow = studentCat.getNavigatableRowIterator().getCurrentRow();   
    currentRow.refresh(Row.REFRESH_REMOVE_NEW_ROWS | Row.REFRESH_WITH_DB_FORGET_CHANGES);
    dbc.getApplicationModule().getTransaction().commit();
    String target = "individual";
    ctx.setActionForward(target);
  Any other idea?

Similar Messages

  • EvDRE Question -- Inserting Blank Rows

    Hi all,
    Here's a good question that we've run into a couple of different times with EvDRE:  Say you are specifying a Memberset to expand on that will consist of a comma-delimited list like:
    bas(Accounts_Receivable), Accounts_Receivable,
    bas(Accounts_Payable), Accounts_Payable,
    bas(Notes_Receivable), Notes,Receivable,
    bas(Fixed_Assets), Fixed_Assets   ...etc.
    This would expand each of the four account groups, and follow each of them with their respective parent.
    Question:  What's the best way to insert a blank row after each parent/subtotal?
    It turns out that if you use the SUPPRESS=Y for that Expansion, that the Blanks get suppressed (since the suppression is .  Also, I'm not sure if there is a good Before/After Range option... But, how about maybe using INSERT ?
    Thanks,
    Garrett

    Garrett,
    You can insert blank lines by adding extra commas with nothing in between.
    So in your example this would mean:
    bas(Accounts_Receivable), Accounts_Receivable,,bas(Accounts_Payable), Accounts_Payable,,bas(Notes_Receivable), Notes,Receivable,bas(Fixed_Assets), Fixed_Assets
    Suppression will also suppress the blank lines, so you cannot use that function in this solution.
    The option 'insert' will give you the possibilitie to manually insert new lines which you have to select with your right mouse button as an enduser, so I think this is useless this situation.
    Hope this helps,
    Alwin

  • Need to add a blank row to a table when checkbox selected

    Hi ALL,
    I have a custom page having 2 check boxes and few fields , i am doing search operation by entering one checkbox checked and few other fields and data displaying in table region.
    my requirement is when i select second check box and click one button as add new row it should create a blank row in the table, means table should  availabe with a blank row so that user can insert data,
    please help me on thsi
    Thnaks

                 Hi there ,
                 If you 're working with advance table then you have an default option to create a blank row , please through topic 'add another row '
                 in jdev guide .
                 If you are working the regular table region then you might follow the below code suggested .
                 Create a new item of the type button ( not submit button ) and handle the event in PFR of your controller class
                String addRow=pageContext.getParameter(EVENT_PARAM);   //  "addRow " is an event attached to table
                if("addAnotherRow".equals(addRow))  
                      am.invokeMethod("AddRow");
              In AMimplementation class :
       public void AddRow()
        OAViewObject headerVO = (OAViewObject)getsdaPacelineWorkupHeaderUpdateVO1();
        sdaPacelineWorkupHeaderUpdateVORowImpl rowh = (sdaPacelineWorkupHeaderUpdateVORowImpl)headerVO.getCurrentRow();
        rowh.getPacelineHeaderId();
        OAViewObject lineVO = (OAViewObject)getsdaPacelineWorkupLineUpdateVO1();
        Row lineRow = lineVO.createRow();
        Row lineRo = lineVO.last();
        lineRow.setAttribute("PacelineHeaderId",rowh.getPacelineHeaderId());   
        lineRow.setNewRowState(Row.STATUS_INITIALIZED);
        lineVO.last();
        lineVO.next();
        lineVO.insertRow(lineRow);
        lineVO.setCurrentRow(lineRow);
        lineVO.setCurrentRow(lineVO.last());
      Note : Replace your vo name in place of sdaPacelineWorkupHeaderUpdateVO1()
       Please let me know if you have any questions .
      Regards ,
    Keerthi

  • JTable Blank Rows When INSERT/DELETE in other panel with same ViewObject

    Hi,
    Jdev 10.1.2
    JClient
    2 panels based on same ViewObject in same AM
    One panel with Grid UI => JTable
    Other panel with Form UI
    When I insert or delete a record in the panel with Form UI and return to the panel with JTable blank rows are displayed.
    The problem remains even after commiting before returning to JTable panel.
    When I activate the execute button in the JTable panel, the display is OK but the currency is lost.
    I suppose calling the refresh method when returning to the JTable panel should solve the problem.
    Can you please suggest me a server-side/model workaround:
    refresh (which option to use ??)
    Thanks
    Frederic
    PS I tried the workaround of thread 10.1.2 JClient binding Error. but that doesn't help.

    Same problem with default wizard generated Master-Detail Form.
    When in the detail more then 10 rows exist, the scrollbar shows that not all rows are displayed.
    If I use the scrollbar to view the last rows they are blank, in order to display them I must activate the next button one time for each additional row.
    The workaround is to enter -1 in the range size of the iterator.
    But what if the range size is 10.
    Is the blank rows display a bug?
    OR
    Must the scrolling area (size of JScrollPane) be defined according to the range size of the iterator?
    If the latter is true:
    Can somebody give me some clues on which attributes of the JScrollPane must be set (PreferredSize, MinimumSize ??) and on how to calculate this area: total width & total height if the row height for the table is set to 20?
    Your help will be appreciated
    Frederic

  • Insert  Blank row  After every Row  in alv report

    How to insert blank  row After every row  in Alv report

    what do you mean by a 'blank row'? ALV displays tabular data with 'any' number of columns. Now if you actually want a blank row (no columns at all, just a row), then that is just not possible. If I'm not mistaken, this question was posted before, so try to do a search on SCN. See what is says.

  • Blank row added after cancel button on create page

    Hi All,
    I have a create item page where I insert items into the item table in the database.
    On press of the cancel button on this create page, the control reaches a itemlist page with my old search criteria and result but with a new blank row added to it.
    Anybody know what's wrong?

    Sorry, I misunderstood your previous question. When the cancel button is pressed. I am using pageContext.forwardImmediately with parameters to forward back to my search page. Then in the search page controller I call the AM initQuery method to run the query. My initQuery method has the following code,
    StringBuffer whereClause = new StringBuffer(200);
    Vector parameters = new Vector(3);
    int clauseCount = 0;
    int bindCount = 0;
    setWhereClauseParams(null);
    if ((Program != null) && (!("".equals(Program.trim()))))
    whereClause.append("PROGRAM = :");
    whereClause.append(++bindCount);
    parameters.addElement(Program);
    clauseCount++;
    if ((PId != null) && (!("".equals(PId.trim()))))
    Number PIdNum = null;
    try
    PIdNum = new Number(PId);
    catch(Exception e)
    throw new OAException("AK", "FWK_TBX_INVALID_EMP_NUMBER");
    if (bindCount > 0)
    whereClause.append(" AND (P_ID = :");
    else
    whereClause.append(" (P_ID = :");
    whereClause.append(++bindCount);
    whereClause.append(")");
    parameters.addElement(PIdNum);
    clauseCount++;
    setWhereClause(whereClause.toString());
    if (bindCount > 0)
    Object[] params = new Object[bindCount];
    parameters.copyInto(params);
    setWhereClauseParams(params);
    executeQuery();

  • Getting Blank Rows and Good Rows in the same bound table

    Hi, a little brief here I am a developer at Oracle and am trying to use ADF and Oracle BC's on my webpages.
    I am using Oracle TopLink and ADF to display the contents of several tables. The issue I encounter is that TopLink for some reason (I hypothesize memory constraints) does not return the actual contents of the rows but instead nulls to the front end for my ADF Read-Only Table on the page. The number of rows is correct but only the first 11 rows are displayed and after that the rows are completely blank, I cannot navigate to the third set of rows (the second set of rows I can navigate to because there is one good row there) and when I select one of the blank rows and try to perform an action it gives null for the contents of the actual row and throws an exception. How can I resolve this issue?
    I have tested that I can see the full contents of the table correctly on another page with less content, but when I put the table on the page that has multiple iterators and also BC's on it only the first 11 rows are visible. Is there an easy solution to this issue, why does it occur, and why is there no error thrown when the null rows are given to the page? Does anyone know of a solution to this issue?

    Resolved the issue, the problem was that I had a refresh that was on ALWAYS on the component, I change the refresh to a RENDER MODEL refresh and now can see the whole table.

  • Excel export contains a blank row for the Report Header

    Hi,
    I am getting a blank row as the first row in my SSRS report when exported to excel. I have already taken care of following things,
    1. I have hidden all of the Page Header items using Globals
    2. The position of Report Body Tablix is 0, that means there is no space between report header and Report Body.
    I have developed this Report in SSRS 2012, please let me know if any more details are required. I think even after hiding Header Items, excel creates a placeholder for page header. I can't remove header from my reports as it is needed to be published in
    pdf.
    Regards
    Mohit

    Hi Mohit,
    According to your description, you are getting a blank row as the first row in your excel report when you export the report to excel, you have hidden all the items in the Page Header by using the Globals, right?
    This blank row is for the page header, although you have hidden all the items in it, but it will still display when export report to excel. Because we can’t hidden the page Header directly. Normally, we can hidden all the items in the page Header, So in
    the design phase we can also see the blank area above the report body when preview.
    We have an alternative way by add the “SimplePageHeaders” setting in “RSReportserver.config” file, after configuration the page Header will not display in the first row of the worksheet but is rendered to the Excel page header. In Reporting Services, the
    “SimplePageHeaders” default value is “FALSE” and it indicates that the page header is rendered to the first row of the worksheet. In order to display the page header in the Header/Footer section of Excel, we need to set the “SimplePageHeaders” setting value
    to “TRUE”. I did a test on my local machine and here are my steps:
    Navigate to RSReportserver.config file: <drive:> Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services\ReportServer\RSReportserver.config.
    Backup the RSReportserver.config file before modify it, open the RSReportserver.config file with Notepad format.
    Set the Excel rendering extension code like this:
    <Render>
    <Extension Name="EXCELOPENXML" Type="Microsoft.ReportingServices.Rendering.ExcelOpenXmlRenderer.ExcelOpenXmlRenderer,Microsoft.ReportingServices.ExcelRendering">
    <Configuration>
    <DeviceInfo>
    <SimplePageHeaders>TRUE</SimplePageHeaders>
    </DeviceInfo>
    </Configuration>
    </Extension>
    </Render>
      4.  Save the RSReportserver.config file.
    Note: Changing the rendering extension parameters only affects rendering operations on the Report Server.
    When I access to Report Manager and export the report(includes a page header) to Excel format, the blank row will disappear now.
    Similar thread for your reference:
    SimplePageHeader property in SSRS 2008 not working
    Removing 2 top blank rows when export to excel in ssrs 2008
    r2 report
    You can find more detail in these articles about the page header and page footer:
    Exporting to Microsoft Excel (Report Builder and SSRS)
    If you still have any question, please feel free to ask.
    Regards
    Vicky Liu

  • Adding a blank row to a JTable when a user begins to edit a current row

    Hi, this may be a daft question, but I've been looking through the forum and didnt find anything that really helped me. So I'm posting this in the hope someone will be a ble to point me in the right direction.
    In my current application I have a JTable. It currently contains a single emptry row. What I wish to happen is when a user begins to edit that empty row a new blank row is added to the bottom of the table.
    I'm using a custom table model, as there maybe data loaded from a Oracle database at a later date and have included an "addRow()" method which will add the blank row.
    What i'm struggling with is a way to detect when the user has started to edit the blank row and so when to call my "addRow()" method.
    I tried experimenting with propertyChange listeners but they didnt seem effective. Could someone please provide me with either a solution or a pointer in the right direction.
    Thanks for your help

    What I wish to happen is when a user begins to edit that empty row a new blank row is added to the bottom of the table.Well a user could start to edit the last row, but then they could use the escape key to cancel the cell editing. So I would only add the empty row once a cell has actually been updated.
    For this I would use a TableModelListener. The listener will only fire when the data in a cell is changed. So once the event is received you simply check if the row of the edited cell is the last row of the table.

  • Extra blank rows in vba spreadsheet zoom

    Here's how it happens:
    - in Excel 2003 VBA
    - two row dims
    - right row dim is fixed list of mbrs
    - left row dim is single member zoom
    - sheet has other stuff on it, so retrieve range is not entire sheet
    - top of retrieve range is in row 6
    so when I call EssVZoomIn() in this situation, the result is that there are 5 blank rows between each instance of a member in the left row dim. That is the exact number of rows above the retrieve range in this sheet, and it turns out that is the variable: if I move the retrieve range to row 7, I get 6 empty rows everywhere.
    I have tried every spreadsheet option that would appear to have any impact, no joy. I have tried using a free form mode retrieve, which works, but then I can't preserve formulas in the sheet, which I need to do.
    I can work around this, but what a silly thing to have to do, like do the zoom in a separate sheet, or remove all the empty rows after the zoom. Does anyone have any ideas about how to disable this "feature"?
    Thanks!

    Dheepan wrote:
    I am trying to spool a table result to a .dat file.
    The problem is the output spool file has 3 rows after each row with a column having its row data split as 3 for every enter key in the data.
    Eg:
    Original data as in DB
    A B C
    1 1 ABC DEF GH
    2 1 DEF GHI JK
    SPOOL FILE O/P
    A | B | C |
    1 | 1 | ABC |
         | |DEF |
         | |GH |
    2 | 1 | DEF |
         | | GHI |
         | | JK |
    Thanks,
    Dheepancan you post script?
    BTW, have you included SET TRIMSPOOL ON ?
    When you have moved your question, Close that thread ORACLE SPOOLING extra blank rows
    Edited by: CKPT on Mar 24, 2012 10:07 PM

  • Remove extra blank rows in ORACLE SPOOLING

    I am trying to spool a table result to a .dat file.
    The problem is the output spool file has 3 rows after each row with a column having its row data split as 3 for every enter key in the data.
    Eg:
    Original data as in DB
    A B C
    1 1 ABC DEF GH
    2 1 DEF GHI JK
    SPOOL FILE O/P
    A | B | C |
    1 | 1 | ABC |
         | |DEF |
         | |GH |
    2 | 1 | DEF |
         | | GHI |
         | | JK |
    Thanks,
    Dheepan

    Dheepan wrote:
    I am trying to spool a table result to a .dat file.
    The problem is the output spool file has 3 rows after each row with a column having its row data split as 3 for every enter key in the data.
    Eg:
    Original data as in DB
    A B C
    1 1 ABC DEF GH
    2 1 DEF GHI JK
    SPOOL FILE O/P
    A | B | C |
    1 | 1 | ABC |
         | |DEF |
         | |GH |
    2 | 1 | DEF |
         | | GHI |
         | | JK |
    Thanks,
    Dheepancan you post script?
    BTW, have you included SET TRIMSPOOL ON ?
    When you have moved your question, Close that thread ORACLE SPOOLING extra blank rows
    Edited by: CKPT on Mar 24, 2012 10:07 PM

  • How to add a Blank row ?

    Hello Experts
    I probably have a very simple question - but i just need to kno :
    What is an option if i want to leave a blank row as a seperator between data sets in my report output ?
    I have to report on the portal and this would be a BI 7.0 Query.
    Please suggest
    Regards
    Shweta

    well - I was looking for an option to use the query designer to do this. so i created a structure in the rows and added a Key figure to it and after that i wanted to blank out the values by using cell definition and saying hide results there.
    However ; i see some issues here
    1. the cell definition box on my query is grayed out - any idea why ?
    2. what if i want to add key figures in columns - since i am using them in a structure in the rows - i can not use them in columns - but actually - i will want key figs in columns - so then the alternative that i am using is not feasible - so what can i do then ?
    I don't think i will use WAD or web template.
    what do you suggest ?
    Regards
    Shweta

  • About having multiple blank  rows on master detail form

    Can I have multiple blank rows on detail form when I create master detail form?
    please help me
    shuyue

    Let me answer my own question.
    Set the number of rows to 500 and it will dynamically set to the number of rows.

  • Sap.m.Table generating first two blank rows after adding more rows.

    Hi everyone,
                          I am stucked in a very bad condition the problem is with the table rows and columns. I am generating dynamic table columns and rows based on searched unit so whenever i am searching i created a function for initializing the table rows and columns i am looping the array for whatever the size of rows and columns it will display up to 5. My issue is with the request going is adding more times then the required one. So if anyone can check for the solution. Only problem is my data is generated correct but next time i call this method again it is hiding the first 2 rows.
    function initializeGrid() {
        if (SHOPFLOOR_DCS_UNIT_KEY != null) {
            var dcsComboBox = sap.ui.getCore().byId("selectDCSName");
            var dcsName = dcsComboBox.getValue();
            var viewData = {};
            viewData.EntityName = "DataCollectionSetAttribute";
            viewData.Condition = [{ColumnName : "DcsName",Value :dcsName}];
            viewData.Projection = {AttributeName:true,AttributeType:true,Length:true,Precision:true,LowerLimit:true,
                    UpperLimit:true,DefaultValue:true };
            $
            .ajax({
                type : "POST",
                url : "/demo/xsds/designer/SelectByQueryService.xsjs",
                contentType : "application/json",
                data : JSON.stringify(viewData),
                dataType : "json",
                success : function(data) {
                    /*dcDataTable.unbindItems();
                    dcDataTable.removeAllItems();
                    dcDataTable.removeAllColumns();*/
                    var dcsCols = data;
                    if (data != null
                            && data.length > 0) {
                        var firstColumn = [{
                            "AttributeName": "SerialNumber",
                            "ModifiedAttributeName": "SerialNumber"
                        for (var index = 0; dcsCols.length > index; index++) {
                            var currentRow = dcsCols[index];
                            if (currentRow.AttributeName != null
                                    && currentRow.LowerLimit != null
                                    && currentRow.UpperLimit != null) {
                                dcsCols[index].ModifiedAttributeName = currentRow.AttributeName
                                + "["
                                    + currentRow.LowerLimit
                                    + " - "
                                    + currentRow.UpperLimit
                                    + ","
                                    + "Def:"
                                    + currentRow.DefaultValue
                                    + "]";
                                firstColumn
                                .push(dcsCols[index]);
                            } else if (currentRow.AttributeName != null) {
                                dcsCols[index].ModifiedAttributeName = currentRow.AttributeName
                                + "["
                                    + "Def:"
                                    + currentRow.DefaultValue
                                    + "]";
                                firstColumn
                                .push(dcsCols[index]);
                            if (currentRow.AttributeType != null
                                    && currentRow.AttributeType == "LocalDate")
                                dateAttributes[dateAttributes.length] = currentRow.AttributeName;
                        dcsCols = firstColumn;
                        runtimeDCS = dcsCols;
                        console.log("dcsCols", dcsCols);
                        var viewData = {};
                        viewData.EntityName = dcsName;
                        viewData.Cmd="GET";
                        viewData.UnitKey=SHOPFLOOR_DCS_UNIT_KEY;
                        $.ajax({
                            type : "POST",
                            url : "/demo/xsds/designer/AddOrRemoveDCSDataService.xsjs",
                            contentType : "application/json",
                            data : JSON.stringify(viewData),
                            dataType : "json",
                            success : function(data) {
                                console.log("dcsVals"+
                                        JSON.stringify(data)+data.length);
                                dcDataTable.removeAllColumns();
                                for (var i = 0; i < data.length; i++) {
                                    for (key in data[i]) {
                                        var textValue = data[i][key];
                                        if (typeof textValue !== "object"
                                                && typeof textValue === "string"
                                                && textValue
                                                .indexOf("/Date(") > -1) {
                                            var startIndex = textValue
                                            .indexOf("(");
                                            var endIndex = textValue.indexOf(")");
                                            var tempValue = textValue.substring(startIndex + 1,endIndex);
                                            var tempDate = new Date(parseInt(tempValue));
                                            data[i][key] = tempDate.toDateString();
                                dcsModel.setData({dcsRows : data});
                                sap.ui.getCore().setModel(dcsModel);
                                var columnList = new sap.m.ColumnListItem();
                                dcDataTable.bindItems({
                                    path: "/dcsRows/",
                                    template: columnList,
                                for (var i = 0; i < dcsCols.length && i<5; i++) {
                                    dcDataTable.addColumn(new sap.m.Column({
                                        header : new sap.m.Label({
                                            text : dcsCols[i].ModifiedAttributeName
                                    columnList.addCell(new sap.m.Text({
                                        text : {
                                            path : dcsCols[i].AttributeName
                                clearItems();
                            },error : function(response) {
                                console.log("Request Failed==>",response);
                                if (response.responseText.indexOf('<html>') == -1)
                                    console.log(JSON.stringify(response.responseText));
                                else
                                    console.log("Invalid Service Name");
                },error : function(response) {
                    console.log("Request Failed==>",response);
                    if (response.responseText.indexOf('<html>') == -1)
                        console.log(JSON.stringify(response.responseText));
                    else
                        console.log("Invalid Service Name");
        else {
            console.log("Data not found!!!");

    No, even with the select box gone the table still doesn't show the last two rows, so this seems indeed be irrelevant to the question.
    Best Regards,
    S.
    ***update***
    I tried to create a simple case in which the same strange behavior occurs but I can't seem to reproduce it. The table that produces the two blank rows is part of a complex application and I tried to extract enough of it for a simple test case that behaves the same way but I can't manage to do that. I guess that once I have the behavior I will also know what causes it.
    It seems that the iterator is set to rangesize 10 but the table rests on rangesize 12, when I looked at other tables in the application it seems that if I want to set the rangesize from 57 to 50, it remains on 57.
    Can anyone help me with either this limited info or otherwise instruct me to get more info ?
    Best Regards,
    S.
    Edited by: matdoya on Dec 1, 2008 5:51 AM

  • [10.1.2] Blank row issue again when validation of new row fails

    Hi,
    I have read Steve's tip (http://www.oracle.com/technology/products/jdev/tips/muench/blankrow/index.html) about the new 'Create-no-direct-inset' article. I tried out the new feature and it works as long no error occurs when transaction commits.
    When a validation indicates an error, the row gets inserted into the iterator and and if you don't fix the error (Back-Button) you have the blank row again.
    I think, the current feature is a good starting point for a complete solution to the problems:
    1.) Handling of Back-Button in Struts/ADF
    2.) Inserting of newly created but never committed rows
    Just a guess: Do the problems come from the new ADF binding style because all data which is rendered in a table or form comes from a binding?
    Does anyone has implemented a workaround to that problems (JDev 9052 and 1012)?
    Thanks,
    Markus

    Once you have submitted the data, the row is no longer STATUS_INITIALIZED, it becomes STATUS_NEW.
    To remove it, you need to call remove() on it.
    This is not new behavior in 10.1.2.

Maybe you are looking for