Add a line to the table programmatically

Hello

How do I add lines to the af: table of the java class? for that to editable object view exist on the JSPX page

Thank you

Chaya

You can see the following code to add a line at the end of the table programmatically:

public String cb1_action() {}

Add the code in the event here...

BindingContainer bc is BindingContext.getCurrent () .getCurrentBindingsEntry ();.

JUCtrlHierBinding hierBinding = (JUCtrlHierBinding) bc.get ("EmployeesView3");

DCIteratorBinding dciter = hierBinding.getDCIteratorBinding ();

NavigatableRowIterator nav = dciter.getNavigatableRowIterator ();

NewRow row = nav.createRow ();

newRow.setNewRowState (Row.STATUS_INITIALIZED);

Line lastRow = nav.last ();

int lastRowIndex = nav.getRangeIndexOf (lastRow);

nav.insertRowAtRangeIndex (lastRowIndex + 1, newRow);

dciter.setCurrentRowWithKey (newRow.getKey () .toStringFormat (true));

Returns a null value.

}

For the case where you must add a line in different places of the table, see the link below:

http://adfsonal.blogspot.in/2013/02/create-row-at-end-of-ADF-table.html

Tags: Java

Similar Questions

  • Selected set of line in the table programmatically

    Hello!

    I use JDeveloper 11 g Release 2 (11.1.2.3.0).

    I want to put the line in a table programmatically. My intention is to choose a final that was inserted. (We can do this, questioning the highest Id).

    How can I do?

    Thanks in advance!

    Hello
    Check

    http://mjabr.WordPress.com/2011/07/02/how-to-control-the-location-of-the-new-row-in-aftable/
    http://itnewscast.com/applications/inserting-new-rows-last-row-table

  • Add lines to the table of results

    Hi all

    A table of results page updated, I have one called submitButton 'Add' to add rows at the bottom of the table to create a new record.
    Wrote a method create in AM, but it's always add a new line to the second last position.

    How to add a new line to the table after the last record?


    Thank you and best regards,
    Patricia

    In your method of AM

    You can use following code in AM

    VORowImpl row = (VORowImpl)vo.last();
    vo.setCurrentRow(row);
    vo.next();
    VORowImpl newrow = (VORowImpl)vo.createRow();
    vo.insertRow(newrow);
    

    I hope that helps!

    Thank you
    AJ

  • Add the line in the table of the ADF

    I am trying to add a new line to the table of the ADF. Here are my steps:
    1 create new entities to tables (new-> EJB-> entities from Tables)
    2. create the Session Bean (new->-> Session Bean EJB) with all required methods for earlier of the entity created
    3 create the control of data off of it (right click-> session bean create a Data control)-, it creates 'testFindAll '.
    4. After these steps, I drag / drop my "testFindAll" of data controls to form and create the table
    5. now I do drag & drop operation Create since my 'testFindAll-> operations", create a button and move the action to create CreateInsert

    And now, eating disorders: ((...)) When I click on the button to add the new line I get null pointer exception. Here is the part of the trace:

    java.lang.NullPointerException
    at oracle.adf.model.adapter.bean.UpdatableBeanDataControl.createRowData(UpdatableBeanDataControl.java:137)
    at oracle.adf.model.bean.DCBeanDataControl.createRowData(DCBeanDataControl.java:642)
    at oracle.adf.model.bean.DCDataVO.doCreateData(DCDataVO.java:870)
    at oracle.adf.model.bean.DCDataRow.create(DCDataRow.java:306)
    at oracle.jbo.server.ViewRowImpl.callCreate(ViewRowImpl.java:432)
    at oracle.jbo.server.ViewObjectImpl.createInstance(ViewObjectImpl.java:4679)
    at oracle.adf.model.bean.DCDataVO.createInstance(DCDataVO.java:567)
    at oracle.jbo.server.QueryCollection.createRowWithEntities(QueryCollection.java:1818)
    at oracle.jbo.server.ViewRowSetImpl.createRowWithEntities(ViewRowSetImpl.java:2211)
    at oracle.jbo.server.ViewRowSetImpl.doCreateAndInitRow(ViewRowSetImpl.java:2257)
    at oracle.jbo.server.ViewRowSetImpl.createRow(ViewRowSetImpl.java:2233)
    at oracle.jbo.server.ViewObjectImpl.createRow(ViewObjectImpl.java:9404)
    at oracle.jbo.uicli.binding.JUCtrlActionBinding.doIt(JUCtrlActionBinding.java:1223)
    at oracle.adf.model.binding.DCDataControl.invokeOperation(DCDataControl.java:2120)
    at oracle.adf.model.bean.DCBeanDataControl.invokeOperation(DCBeanDataControl.java:464)
    at oracle.adf.model.adapter.AdapterDCService.invokeOperation(AdapterDCService.java:307)
    at oracle.jbo.uicli.binding.JUCtrlActionBinding.invoke(JUCtrlActionBinding.java:693)
    at oracle.adf.controller.v2.lifecycle.PageLifecycleImpl.executeEvent(PageLifecycleImpl.java:394)
    at oracle.adfinternal.view.faces.model.binding.FacesCtrlActionBinding._execute(FacesCtrlActionBinding.java:217)
    at oracle.adfinternal.view.faces.model.binding.FacesCtrlActionBinding.execute(FacesCtrlActionBinding.java:176)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    ...


    I know I can do it if you create ViewObject rather than Tables and SessionBean entities. But I need this approach.

    Thank you very much!

    Hi Goran,

    What is your version of JDev? You try with EJB 3.0 or 2.1? I just tried (with 3.0) and it works fine (tested in JDev 11.1.1.2.0).

    Here's my pagedef

    
    

    Infact, I don't have to change the action of creation at CreateInsert. By default, it is CreateInsert only.

    Arun-

  • How to add multiple lines when the button is clicked

    How to add multiple lines when the click on button now is just add a row .plz give me idea how... waiting for answer

    / public final class screen extends MyScreen
    {
    /**
    * Creates a new object of MyScreen
    */
    ObjectChoiceField obj1 obj2, obj3, obj4.
    Table of String() = {'101 ', ' 102'};
    String of shadow [] = {"Shade1", "Shade2"};
    Rolls of string [] = {'101 ', ' 102'};
    String cutting [] = {"100-150", "150-200"};
    Chain of selectedindex1, selectedindex2, selectedindex3, selectedindex4;
    LabelField lbl1 lbl2, lbl3, lbl4;
        
    GFM LinedGridFieldManager;
    HFM HorizontalFieldManager, hfm1, hfm2 hfm3;
    VerticalFieldManager vfmMain;
        
    public MyScreen()
    {
        
    Set the displayed title of the screen
    hfm1 = new HorizontalFieldManager (HorizontalFieldManager.NO_VERTICAL_SCROLL |) HorizontalFieldManager.NO_VERTICAL_SCROLLBAR);
    hfm2 = new HorizontalFieldManager (HorizontalFieldManager.NO_VERTICAL_SCROLL |) HorizontalFieldManager.NO_VERTICAL_SCROLLBAR);
    hfm3 = new HorizontalFieldManager (HorizontalFieldManager.NO_VERTICAL_SCROLL |) HorizontalFieldManager.NO_VERTICAL_SCROLLBAR);
    HFM = new HorizontalFieldManager (HorizontalFieldManager.FIELD_RIGHT);
    vfmMain = new VerticalFieldManager (Manager.NO_VERTICAL_SCROLL |) Manager.NO_HORIZONTAL_SCROLLBAR);
            
    obj1 = new ObjectChoiceField ("", graph, 0, FIELD_LEFT);
    obj2 = new ObjectChoiceField ("", blind, 0, FIELD_LEFT);
    Obj3 = new ObjectChoiceField ("", rolls, 0, FIELD_LEFT);
    Obj4 = new ObjectChoiceField ("", cuts, 0, FIELD_LEFT);
            
    LBL1 = new LabelField("");
    LBL2 = new LabelField("");
    lbl3 = new LabelField("");
    lbl4 = new LabelField("");
            
    ButtonField btnAdd = new ButtonField ("ADD", FIELD_RIGHT);
            
    GFM = new LinedGridFieldManager (4, LinedGridFieldManager.VERTICAL_SCROLL);
            
    hfm1.setMargin (20, 0, 10, 0);
    hfm1. Add (new LabelField ("Chart"));
    hfm1. Add (obj1);
    hfm1. Add (new LabelField ("Shade"));
    hfm1. Add (obj2);
            
    hfm2. Add (new LabelField ("Rolls"));
    hfm2. Add (Obj3);
    hfm2. Add (new LabelField ("Cuts"));
    hfm2. Add (Obj4);
    HFM. Add (btnAdd);
            
    GFM. Add (new LabelField ("Chart"));
    GFM. Add (new LabelField ("Shade"));
    GFM. Add (new LabelField ("Rolls"));
    GFM. Add (new LabelField ("Cuts"));
            
    vfmMain.add (hfm1);
    vfmMain.add (hfm2);
    vfmMain.add (hfm3);
    vfmMain.add (hfm);
    vfmMain.add (new SeparatorField());
    vfmMain.add (gfm);
    Add (vfmMain);
            
    btnAdd.setChangeListener (new FieldChangeListener()
    {
    ' Public Sub fieldChanged (field field, int context) {}
    TODO self-generating method stub
    selectedindex1 = chart [obj1.getSelectedIndex ()];
    selectedindex2 = shade [obj2.getSelectedIndex ()];
    selectedindex3 = rolls [obj3.getSelectedIndex ()];
    selectedindex4 = cuts [obj4.getSelectedIndex ()];
                    
    While (LBL1. GetText(). Equals("") | LBL2. GetText(). Equals("") | lbl3. GetText(). Equals("") | lbl4. GetText(). Equals(""))
    {
    LBL1. SetText (selectedindex1);
    LBL2. SetText (selectedindex2);
    lbl3. SetText (selectedindex3);
    lbl4. SetText (selectedindex4);
                    
    GFM. Add (LBL1);
    GFM. Add (LBL2);
    GFM. Add (lbl3);
    GFM. Add (lbl4);
                    
    }
    }
    });
    }
    }

    Hi Piya,

    I run your code, and according to your logic that it works correctly.

    It's adding that line only once because according to your logic that one line can be added to MDT, if you do not want to add line on each click on the button, follow these steps:

    selectedindex1 = chart [obj1.getSelectedIndex ()];
    selectedindex2 = shade [obj2.getSelectedIndex ()];
    selectedindex3 = rolls [obj3.getSelectedIndex ()];
    selectedindex4 = cuts [obj4.getSelectedIndex ()];

    Lbl1 LabelField = new LabelField("");
    Lbl2 LabelField = new LabelField("");
    LabelField lbl3 = new LabelField("");
    LabelField lbl4 = new LabelField("");
    If (LBL1. GetText(). Equals("") | LBL2. GetText(). Equals("") | lbl3. GetText(). Equals("") | lbl4. GetText(). Equals(""))
    {
    LBL1. SetText (selectedindex1);
    LBL2. SetText (selectedindex2);
    lbl3. SetText (selectedindex3);
    lbl4. SetText (selectedindex4);
                    
    GFM. Add (LBL1);
    GFM. Add (LBL2);
    GFM. Add (lbl3);
    GFM. Add (lbl4);
                    
    }

  • How to add two lines when the second row is not visible, but also gets the first data line too?

    Mr President

    Jdev worm is 12.2.1

    How to add two lines when the second row is not visible, but also gets the first data line too?

    I want to add two lines like below picture, but want the second to remain invisible.

    tworows.png

    I asked this question but my way of asking was wrong, that's why for me once again.

    Concerning

    Try to follow these steps:

    1. in the database table to add the new column "JOIN_COLUMN" and add the new sequence "JOIN_SEQ".

    2. Add this new column in the entity object. (You can add this in entity object by right clicking on the entity object and then select "Synchronize with database" then the new column and press on sync)

    3. in your bookmark create button to create only one line NOT 2 rows.

    4 - Open the object entity--> java--> java class--> on the entity object class generate and Tick tick on the accessors and methods of data manipulation

    5 - Open the generated class to EntityImpl and go to the doDML method and write this code

      protected void doDML(int operation, TransactionEvent e)
      {
        if(operation == DML_INSERT)
        {
          SequenceImpl seq = new SequenceImpl("JOIN_SEQ", getDBTransaction());
          oracle.jbo.domain.Number seqValue = seq.getSequenceNumber();
          setJoinColumn(seqValue);
          insertSecondRowInDatabase(getAttribute1(), getAttribute2(), getAttribute3(), getJoinColumn());
        }
    
        if(operation == DML_UPDATE)
        {
          updateSecondRowInDatabase(getAttribute1(), getAttribute2(), getAttribute3(), getJoinColumn());
        }
    
        super.doDML(operation, e);
      }
    
      private void insertSecondRowInDatabase(Object value1, Object value2, Object value3, Object joinColumn)
      {
        PreparedStatement stat = null;
        try
        {
          String sql = "Insert into table_name (COLUMN_1,COLUMN_2,COLUMN_3,JOIN_COLUMN, HIDDEN_COLUMN) values ('" + value1 + "','" + value2 + "','" + value3 + "','" + joinColumn + "', 1)";
          stat = getDBTransaction().createPreparedStatement(sql, 1);
          stat.executeUpdate();
        }
        catch (Exception e)
        {
          e.printStackTrace();
        }
        finally
        {
          try
          {
            stat.close();
          }
          catch (Exception e)
          {
            e.printStackTrace();
          }
        }
      }
    
      private void updateSecondRowInDatabase(Object value1, Object value2, Object value3, Object joinColumn)
      {
        PreparedStatement stat = null;
        try
        {
          String sql = "update table_name set column_1='" + value1 + "', column_2='" + value2 + "', column_3='" + value3 + "' where JOIN_COLUMN='" + joinColumn + "'";
          stat = getDBTransaction().createPreparedStatement(sql, 1);
          stat.executeUpdate();
        }
        catch (Exception e)
        {
          e.printStackTrace();
        }
        finally
        {
          try
          {
            stat.close();
          }
          catch (Exception e)
          {
            e.printStackTrace();
          }
        }
      }
    
  • Added new line in the table

    Hello

    I have a table inside a panelCollection. When I press the button Add a new row (plu green) the empty line newly added appears in a random place in the table, but I want to appear as the first line of the table (top of the table). How I do that?

    Thank you very much
    Will do

    Will do,

    It is a weird behavior that was introduced in JDev 11.1.1.4. We fixed this in the next version by adding the new line always above the current line.

    You can do two things:
    -Make sure that the size of the range of the iterator binding is greater than the number of rows displayed, in this case the new line will be created directly below the current line
    -extend the JHeadstart TableBean class, override the createNewRow method and create a line in the first line

    Steven Davelaar,
    Jheadstart team.

  • How to set the text in the last line of the table to be bold

    Hi all

    I have two tables in the report on my page and I would like to have the last line of the table as a "BOLD" text data.

    I found a jQuery selector to select the last row of the table, but I do not know how to implement it in the Apex. I want to control what table will have changed last row and who won't.
    $("tr:last").css({backgroundColor: 'yellow', fontWeight: 'bolder'});
    Could someone help me how to create a dynamic action to accomplish, or if y at - there another solution?

    My test app:

    user name: [email protected]
    passwd: kurintest
    appl: REPORT_APPL 12451

    Thanks in advance,

    Jiri

    Nico Martens wrote:

    PS: If you worry about sql plsql context switching, use a box instead of my function. Which probably could increase performance.

    Using this technique , analytics, and casewould be more effective and offer the best separation of concerns:

    Source report

    select
              product_id
            , sum(quantity_on_hand) qty
            , avg(quantity_on_hand) avg
            , case
                when   count(*) over ()
                     = row_number() over (order by product_id nulls last)
                then
                  'bold'
                else
                  'normal'
              end font_weight
    from
              oehr_inventories
    group by
              rollup(product_id)
    order by
              product_id nulls last
    

    HTML column expression

    #PRODUCT_ID#
    

    Avoid generating HTML in the query when it is possible that its impact on the ability to use the features of declarative report as column sorting and setting in the form. (See examples on page 3)

    If you have a table with 100 rows and you show only 15 lines. Do you want the 15th line "BOLD" or just line 100Le.

    It is really the important issue here. If the reports do not use paging and always show all lines, then it's trivial to implement using dynamic Action (as shown on page 2):
    H4. When

    Event: After refresh
    Selection type: jQuery Selector
    jQuery Selector: .report-standard

    H4. Real Action

    Action: Run the JavaScript Code
    Fire on loading the Page: Yes
    Code:

    $(".report-standard tr:last-child td").css({backgroundColor: 'yellow', fontWeight: 'bolder'});
    

    (Here is to use appropriate DA / jQuery selectors to make sure that only reports including totals get this formatting applied...)

    For more complex presentations, a report of custom line model is the way forward, as in the link in the previous thread of the OP: + {: identifier of the thread = 2436912} +.

    Also note that the columns hidden, based on the GROUP_ID/GROUPING/GROUPING_ID functions are very useful in these reports. They can be used to report conditions of line to avoid the additional conditions to be ready in the query (as in the case above) and provide the break several levels of formatting.

  • Toggle buttons control according to the selected line in the table?

    Hello

    I have used JDev 11.1.1.2.0

    On my main page, it has a query section and view the result to a component of the lookup table and also has functioning as (update/deletion) buttons in the toolbar.

    I want to toggle buttons operating according to some value of the selected line in the table, and I searched on the OTN forum, found more than issues like that, but seemed no found a good solution.

    The table is a unique and has a status column selection, its data type is integer, and I want to activate the buttons when the value of the status field of the selected line is 0 or 1, disable the buttons when the State value is other values.

    Code of the table as:

    < af:table value = "#{bindings." Var VO1.collectionModel}"="row ".
    lines = ' #{bindings. " VO1.rangeSize}.
    emptyText = "#{bindingsVO1.viewable?" '} ". No data to display. ': 'Access Denied. »} »
    fetchSize = "#{bindings." VO1.rangeSize}.
    rowBandingInterval = '0 '.
    filterModel = "#{bindings." VOCriteriaQuery.queryDescriptor}.
    queryListener = ' #{bindings. " VOCriteriaQuery.processQuery}.
    filterVisible = "true" varStatus = "vs."
    selectedRowKeys = ' #{bindings. " VO1.collectionModel.selectedRow}.
    selectionListener = "#{bindings." VO1.collectionModel.makeCurrent}.
    rowSelection = "single" id = "resId1" >

    Operation code buttons like:
    < af:commandToolbarButton text = "Update" id = "ctb2" action = "editDAF" / >

    Any suggestions would be very helpful.

    Thank you
    zeroxin

    Hello

    bind to the attribute in the PageDef file for the status field. Then configure the PartialTriggers property button to point to the ID of the table. Of the disabled button property then points to the status as attribute link

    #{bindings.statusField.inputValue == 'value'}

    Frank

  • Add new records to the table of the ADF

    Hello

    I use Jdev 11.1.1.3.0.
    I have a Page of the ADF with detail Table of form - master, I want to add new records to the table reflecting in DB. Is it possible to do? pointers or demo?


    Thank you
    MB

    What are the components are used in your table? When you created the table originally, you specified as a table read-only? If your table contains components of af: outputText, then you will need either manually change components entry way, or remove the table and re-drop-the-in the form of table (not read-only)

    John

  • Edit/delete/add scene coordinates in the table during execution

    Hello world

    I managed to build table allows you to store and record the coordinates of the stage and remind to control steps. However, I need change/remove/add details of scene during execution. I also need to allow the user to directly edit the coordinate from the scene of the array. Wondering what someone knows what is the best way to do it? Or is it better to use the matrix or Cluster? Thanks in advance.

    Best regards

    Han Yen

    Han Yen wrote:

    Thanks much altenbach for all the advice. I tried to do a table 2D control. I've been playing with table in the control. However, I still can't find out how can I detect that I change the data in the table 2D with the more recent issue during execution? How can I then update my current table with the latest data?

    Well, the 2D table is updated immediately and you do not all the other tables.

    Do you mean that you want to update XAbs, etc. where the just changed line is already selected?

    In any case, here's a simple project, perhaps it will give you some ideas. I would recommend using also the tables for XYZPos, entrances etc. and the XYZabs. This simplifies the code because you reduce the number of terminals and table operations.

    Let me know if something is not clear to you.

  • missing parenthesis in insertion into separate lines select the table from the other table

    Hello

    could you help me with the following question?

    I have the following tables

    CREATE TABLE table1)

    ID varchar (12),

    col2 varchar (10),

    COL3 varchar (10),

    level varchar (10))

    CREATE TABLE table2)

    Id2 varchar (12)

    A varchar (10),

    B number (1)

    CONSTRAINT PRIMARY KEY PK (ID2, is));

    INSERT INTO table2 (ID2, A, B) SELECT ID, col2

    MAX (CASE WHEN level = "level 1" then 1

    level = 'level 2' then 2

    Level = 3 then 'niveau3') as colIN3)

    FROM table1 GROUP BY ID2, a.;

    the first table have duplicates as follows:

    Id2 COL2 COL3 level

    A1 pepe football level1

    A1 pepe football level2

    A1 pepe football level1

    A1 pepe basket level2

    A1 pepe pingpong level3

    the output should be selected with unique key (ID2, col3) lines and the level must be the greatest.

    Id2 COL2 COL3 level

    A1 pepe football level2

    A1 pepe basket level2

    A1 pepe pingpong level3

    The output of the script tells me the following messages:

    -lack of right parenthesis referring to the max function.

    Thanks adavance.

    Kind regards

    Hello

    Remember the ABC's of the GROUP BY:

    When you use a GROUP BY clause or in an aggregate function, then all in the SELECT clause must be:

    (A) a ggregate function,

    (B) one of the expressions "group By."

    (C) adding to C, or

    (D) something that Depends on the foregoing.  (For example, if you "GROUP BY TRUNC (dt)", you can SELECT "TO_CHAR (TRUNC (dt), 'Mon - DD')").

    To ask him, there are 5 columns in the SELECT clause.  The last one is a function MAX (...); It is an aggregate, is not serious.

    The first 2 columns are also named in the GROUP BY clause, so that they are well.

    The other 2 columns, country and internal_Id do not match any of the above categories.  These 2 columns cause the error.

    There are many ways to avoid this error, each producing different results.  You could

    • remove these 2 columns in the SELECT clause
    • Add these 2 columns in the GROUP BY clause
    • use the aggregation such as MIN, 2-column functions
    • remove the country from the SELECT clause and add internal_id to the GROUP BY clause
    • remove the internal_id from the SELECT clause, and add countries to the GROUP BY clause
    • ...

    What are the results you want?

    Whenever you have a question, please post a small example of data (CREATE TABLE and INSERT statements) for all the tables involved, so people who want to help you can recreate the problem and test their ideas.  Also post the results you want from this data, as well as an explanation of how you get these results from these data.

    Always say what version of Oracle you are using (for example, 11.2.0.2.0).

    See the FAQ forum: https://forums.oracle.com/message/9362002

  • How can I change the first line of the table to a header row if it contains PGF with tblHead tags

    So far, I have the following text in a JavaScript:

    If (tbl. FirstRowInTbl.FirstCellInRow.FirstPgf.PgfFmt.Name = "tblHead")

    {

    If (tbl. FirstRowInTbl.RowType = 1).

    1 is Constants.FV_ROW_BODY

    tbl. FirstRowInTbl.RowType = 0;

    0 is Constants.FV_ROW_HEADING

    on the other

    continue;

    }

    on the other

    continue;

    It does not work. I'm not comfortable with tbl. FirstRowInTbl.FirstCellInRow.FirstPgf.PgfFmt.Name.

    It is clearly wrong. How I would I want to determine the tag of the first paragraph of the first line?

    Any help is very appreciated!

    Thank you

    Ruth

    Ruth, here is a function that converts the body lines to the header of a table lines. Please let me know if you have any questions or comments. -Rick

    #target framemaker
    
    var doc = app.ActiveDoc;
    
    // Set a variable for the selected table.
    var tbl = doc.SelectedTbl;
    
    // Convert the first body row to a heading row.
    bodyToHeadingRow (tbl, 1, doc);
    
    function bodyToHeadingRow (tbl, num, doc) {
    
        var row = 0;
    
        // Select the top "num" rows in the table.
        tbl.MakeTblSelection (0, num - 1, 0, tbl.TblNumCols - 1);
        // Push the current clipboard contents and cut the selected rows.
        PushClipboard ();
        doc.Cut (Constants.FF_CUT_TBL_CELLS);
        // Add "num" number of heading rows to the table.
        row = tbl.FirstRowInTbl;
        row.AddRows (Constants.FV_Heading, num);
        // Select the new heading rows.
        tbl.MakeTblSelection (0, num - 1, 0, tbl.TblNumCols - 1);
        // Paste the rows from the clipboard into the new heading rows.
        doc.Paste (Constants.FF_REPLACE_CELLS);
        // Restore the clipboard contents.
        PopClipboard();
    
    }
    
  • Paragraph style by default when you add rows/columns of the table

    Hello

    I use InDesign CC and whenever I add a new row in the table or a column, that paragraph for these lines styles are in default in the styles I won't use. They are actually failed to really big styles title so I don't just add lines 3 and 4 and my table is out of the page. None of the surrounding cells, columns or lines contain the ID styles is emphasizing the use.


    How can I set the default style for a new row in the table or column?

    Thank you

    Paul.

    Hi, thanks for the help guys. I tried your suggestions but I always had the same problem. However I noticed that when the model documents have been opened there were styles by default selected in all the style panels. It seemed that it was these styles by default selected which were applied to new rows in the table.

    I opened the templates and all the panels style [none] or [standard paragraph], then saved the document.

    This solves the problem because no style is now applied when rows are added.

  • Need help on repeat lines of the table and the subform

    I hope someone can help me find a way to accomplish things with a subform of repeating table in a form I'm building.  I have attached the file here.

    https://workspaces.Acrobat.com/?d=2nUNZuTf2T4tsdSykMTlXw

    I have a table (AssessChart1Table) set up on pg 7 (analysis) and built in buttons (AddRowAssesChart1 and DeleteRowAssesChart1) so that the user can add or remove rows of additional data according to the needs.

    The problem is that the user enters also cross the line header (AssessChart1HeaderRow1) in this data table.  There are 10 available columns; However, they will have to add more data than that. Therefore, I made a button (AddMoreCourses) for the user to click on to add another instance of the subform table (AssessEvalChart1) and also to cancel adding the subform with this button (UndoAddMoreCourses).

    In addition, I setup that whatever data the user enters in the cell of this table cell (Prog-DeptObjChart1) are automatically transferred to another table (AssessChart2Table), cell (Prog-DeptObjChart2), which is located on the next page (AnalysisCont1).

    All above works very well except that whenever the user presses the button (AddMoreCourses) I don't want it to automatically fill cells of text field that are copied from (AssesChart1HeaderRow3) because I need the user to be able to enter different values rather than add more columns to fit their data.  In addition, I would like that the values of the cells in the left column to repeat well because these values will not change. Currently the values of the cells in the left column that wear down (AssessChart2Table) to get stripped on (AssessChart2Table) whenever I the user pushes button Add more courses or cancel add more courses.

    In summary, the tables would look like the attached screenshots:

    Analysis_-_Assement_Chart_1.png:Analysis_-_Assess_Chart_2.png

    Any help would be highly appreciated.  I'm not experienced with Livecycle Designer.  The form I built by reading the forums and the examples.

    Where you need it, I use Livecycle Designer v. 9.0.0.2.20120627.2.874785 on a Windows 7 Pro platform.

    Thank you!

    They will need to copy in a similar way as with the other lines. I would say on the exit event for the field of Prog-DeptObjChart1, add the code that copies the rawValue of him in the second table. Your code has something there now, but it does take into account that there will be multiple instances of the same line.

    Thus, in the constructor of your action, add another result to the condition of AddRowAssessChart1.click: Add a new instance of AssessChart2Row1.

    Then exit to Prog-DeptObjChart1 in the event, add this code.

    xfa.resolveNode ("AnalysisCont1.AssessEvalChart2.AssessChart2Table.AssessChart2Row1 [" + this. "]") parent.index +"]. Prog-DeptObjChart2") .rawValue = this.rawValue;

    Now when you exit the field you typed in, the text is copied in paragraph2.

Maybe you are looking for