Strange LOV behaviour in new rows (UIX)

Hi all,
we are using UIX for a JHS implementation project and came across a "JHS-00107: Table data are out of date, please requery" error while testing our JHS-generated forms. The problem arises in a table with multi-row-insert enabled where some of the (hidden) fields are already filled in by default (using the application structure -> view object editor). If we then select a value in the LOV and it is returned to the base page, the error is generated and the selected LOV value does not appear. Also, the row is marked dirty and asks for submission if I try to navigate to another page afterwards.
If we leave out the defaults, no error is generated.
Is there a workaround possible for this problem, as we would very much like to keep the default values in there ?
Also (but this is not really important to our case), an LOV always seems to return its selected value to the upper new row, even if a second or third new rows LOV button was used.
Best regards,
Benjamin

Sandra,
here's my scenario:
+ I unzipped the jhsdemo, adapted connection settings for my db and set the paths in appstructure files to the path i unzipped to
+ In the model project, I extended the Subordinates viewobject with the DepId attribute of the Employee entity object.
+ In the appstructure file of the viewcontrollerinternal project, I set use table range to false, enable insert multiple rows and set the new rows property to one for the subordinates group (subgroup of employees). I also added an LOV to this group for selecting the Department.
+ using the JHS viewobject property editor for the subordinates group, i set the display and display in tables value for FirstName to hidden and set a default value '${bindings.EmployeeFirstName}' for the same column.
+ Finally, I reran the JHS app generator
in this case, if I select a department using the LOV, after returning from the LOV popup, nothing changes (so the LOV value is not shown on the page)
If I set the display to true again and do the same for the EmpId attribute (hiding it and filling in '${bindings.EmployeeId}', which is the Id of this subordinates manager), the "JHS-00107: Table data are out of date, please requery" error appears as soon as I try to select a value from the LOV.
I guess the second case means the error has something to do with the foreign key relationship which I try to give a default value. I think for this particular situation (entering a default value of the manager), JHS would take care of the FK link automatically by itself, but at least in the first case the LOV doesn't really do what users might expect ?
Best regards,
Benjamin De Boe

Similar Messages

  • Strange screen behaviour on new imac

    Have had the new imac for a couple of weeks now and all of a sudden the display has started behaving very strangely. Intermittently it is distorting - jagged lines and graphics screwed. Screen capture is linked here:
    http://www.malw.co.uk/photos/screencap.jpg
    Hope someone can help! Thanks.

    I was hoping I wouldn't have to do that. I've been on the phone for two hours to Applecare who have tried reinstalling OSX (archive mode?), PRAM reset etc. The computer is fine though in safe mode, which leads me to believe the problem might be software based? Their solution now is a complete reinstall so basically I have to spend not only time reinstalling but getting everything back in order - I have an 80gb itunes library and 20gb of photos for starters, plus a load of software I've installed. Anyway, before I have to take that rather drastic route, hopefully someone might come up with something I haven't tried yet.

  • Strange/unusual behaviour of New-ish(Old white style) Macbook

    I got my Macbook the same week the new ones came out, so its not very old.
    Since day 1, sometimes when i turn it on the green light from the built in camera comes on, and wont go off until shut down. This then makes photobooth and any application that needs the camera unusable, until i restart.
    Also recently, its started taking ages to start up. I only have the factor 1GB installed, but before it was nippy.
    Then, one day it wouldn't start at all. It just stayed on the blue screen and that was it. So i booted from disc and archived and installed leopard, and it starts up but its still very slow.
    I've got Leopard Onyx so i delete caches and unused files regurlarly and i even ran an anti virus to see if anything was going on, but nothing.
    Its 4 months old, and just frustrating to wait 3-4mins for it to start up properly. It used to be on 30 seconds or so, so any advice is great.
    Its the 2.1Ghz, intel core 2 duo, 1GB RAM, 120G HDD.
    Thanks in advance

    How much of that hard drive is free? OS X needs at least 10% of the hard drive open at all times in order to function at its best. Have you used Disk Utility to repair permissions? If you open up Activity Monitor (Applications>Utilities) and look at All Processes, is any one program using a lot of CPU/RAM?
    Also you don't need to shutdown your MacBook unless you've installed an update requiring it--or if it's being unusually difficult. Sleep mode consumes very little power and you won't have to wait for the machine to boot!
    ~Lyssa

  • Strange lov behaviour

    i've a datablock 'employees'.
    i've a lov 'locations' with columns 'id', 'name' and 'desc' where 'id' is not displayed.
    the lov-table looks like this:
    ID NAME DESC
    1 BE Bern
    2 ZH Zurich
    3 ZH Zurich2
    4 GE Geneva
    employees.location is FK to location.id
    when i choose ZH-Zurich from the lov and want to save the changes, the lov is displayed again. and after choosing ZH-Zurich again, the changes are saved.
    i set validate from list property of the text-item which holds ZH to YES.
    i know that 'NAME' is not unique in my lov. does the first column in the lov have to be unique when i set "validate from list property" to YES?

    I have a similar problem in Forms 9i. I have fields with LOVs and Validate from list set to Y. If I type in a value or populate it as an initial value or from another LOV, when I commit the record the LOV pops up even though the value in the field is on the fields own LOV. If I then select the identical value from the LOV it commits quite happily.
    Similarly on another form if I populate a field with an initial value or type it in, the LOV pops up but if I select the identical value (in this case 'Y' or 'N' - not exactly complicated) from the LOV, it is fine.
    This problem seems to occur on some fields but not on other seemingly identical fields, but it is consistent in that on the fields where it does occur, it always occurs. I have checked the SQL in the record groups and it is all correct. And in one of the cases above there are only 2 static values - Y or N - how can they be wrong?

  • How to create new row in Adf uix table

    hi,
    I am using Jdev 10.1.2 , Can any body tell me how to insert new row in table ?
    Thanx

    Hi,
    try creating a createInsert action.
    Regards,
    Koen Verhulst

  • Strange JTable behaviour - everything is highlighted

    Hello all,
    im experiencing some strange JTable behaviour, and im not so sure why. When i run my program, the JTable appears, but all the cells are highlighted in advance. Also, i can now only select one cell at a time. I have set myTable.setSelectionModeListSelectionModel.SINGLE_INTERVAL_SELECTION);  myTable.setCellSelectionEnabled(true);and my renderer code is below. I call the renderer by using the setDefaultRenderer method with(Object.class,myRenderer).
    I have also changed isCellEditable to return true. If i dont use Object.class, and try to use my own custom class, the JTable is not all highlighted, but it doesnt seem to use myRenderer, and when i click on the header of Column A, all cells from column B and beyond become highlight, which is not normal behaviour. I thought the colum you selected should be highlighted.
    Sorry for the long post, i hope the above makes sense...this is really quite bizzare, and im not so sure why this is happening. Thanks for any advice you can give, regards, Rupz
    import javax.swing.*;
    import javax.swing.table.DefaultTableCellRenderer;
    import javax.swing.border.*;
    import java.awt.Component;
    import java.awt.Color;
    import java.awt.Rectangle;
    import java.util.*;
    import java.awt.*;
    public class MyTableCellRenderer extends DefaultTableCellRenderer{
         private Font cellFont;
         private LineBorder  selectBorder;
        private EmptyBorder emptyBorder;
         public MyTableCellRenderer() {
              super();
              setOpaque(true);
              emptyBorder  = new EmptyBorder(1, 2, 1, 2);
              cellFont = new Font("Times", Font.PLAIN, 10);
              setFont(cellFont);
              selectBorder = new LineBorder(Color.red);
         private boolean isHeaderCell(int row, int column){return column == 0;}
         public Component getTableCellRendererComponent (JTable myTable, Object value, boolean isSelected, boolean hasFocus, int row, int column){
              //super.getTableCellRendererComponent(myTable, value, isSelected, hasFocus,row, column);
              if (isSelected){
                   super.setForeground(myTable.getSelectionForeground());
                   super.setBackground(myTable.getSelectionBackground());
                   setBorder(selectBorder);
              else{
                   super.setForeground(myTable.getSelectionForeground());
                   super.setBackground(myTable.getSelectionBackground());
                   setBorder(emptyBorder);
         if (hasFocus) {
              setBorder(selectBorder);
              if (myTable.isCellEditable(row,column)) {
                   super.setForeground(UIManager.getColor("Table.focusCellForeground"));
                   super.setBackground(UIManager.getColor("Table.focusCellBackground"));
         else {setBorder(noFocusBorder);}
         setValue(value, isSelected, hasFocus, row, column);
    //      Color bDis = getBackground();
    //      boolean colourEquals = (bDis != null) && (bDis.equals(myTable.getBackground()) ) & myTable.isOpaque();
    //      setOpaque (!colourEquals);
         return this;
         public void setValue (Object value, boolean hasFocus, boolean isSelected, int row, int column){
              if (value instanceof myCell){
                   myCell foo = (myCell)value;
                   Object data = foo.getValue(row,column);
                   if (isHeaderCell(row, column)) {
                    //label cells are center aligned
                        setHorizontalAlignment(JTextField.CENTER);
                       }else {
                              if (data instanceof Number) {
                                  //numbers are right justified
                            setHorizontalAlignment(JTextField.RIGHT);
                              }else {
                                  //everything else is left justified
                            setHorizontalAlignment(JTextField.LEFT);
                          //value to display in table
                       setText((data == null) ? "" : data.toString());
               else {
                          //not cell object so render with toString of that object
                          setText((value == null) ? "" : value.toString());

    Hi VV!
    thanks for the reply - now the table isnt all highlight when loaded, but as for cell celection..thats a different matter. I did have myTable.setCellSelectionEnabled(true); but no, the cell behaviour is really, eally weird, quite hard to explain, but here goes.
    If i try to select cell D1 and D2 - D1 is selected, D2, E2,F2 and so on become selected. If i try to add D3 to the mix, the entire row 3 is selected, and as soon as i let go of the mouse button, the entire table except row 1 gets selected. really really weird. Below is my tableModel and what i do to the table. Thanks for your help,
    regards
    Rupz
    myTable.setModel(new myTableModel(this,40,40));
         // Create a row-header to display row numbers.
         // This row-header is made of labels whose Borders,
         // Foregrounds, Backgrounds, and Fonts must be
         // the one used for the table column headers.
         // Also ensure that the row-header labels and the table
         // rows have the same height.
         numRows = myTable.getColumnCount();
         numCols = myTable.getRowCount();
         TableColumn       aColumn   = myTable.getColumnModel().getColumn(0);
         TableCellRenderer aRenderer = myTable.getTableHeader().getDefaultRenderer();
         Component aComponent = aRenderer.getTableCellRendererComponent(myTable, aColumn.getHeaderValue(), false, false, -1, 0);
         Font  aFont       = aComponent.getFont();
         Color aBackground = aComponent.getBackground();
         Color aForeground = aComponent.getForeground();
         Border      border  = (Border)UIManager.getDefaults().get("TableHeader.cellBorder");
         FontMetrics metrics = getFontMetrics(cellFont);
          * Creating a panel to be used as the row header.
          * Since I'm not using any LayoutManager,
          * a call to setPreferredSize().
         JPanel pnl = new JPanel((LayoutManager)null);
         Dimension dim = new Dimension( 40,  rowHeight*numRows);
         pnl.setPreferredSize(dim);
         // Adding the row header labels
         dim.height = rowHeight;
         for (int ii=0; ii<numRows; ii++) {
           JLabel lbl = new JLabel(Integer.toString(ii+1), SwingConstants.CENTER);
           lbl.setFont(aFont);
           lbl.setBackground(aBackground);
           lbl.setForeground(aForeground);
           lbl.setBorder(border);
           lbl.setBounds(0, ii*dim.height, dim.width, dim.height);
           pnl.add(lbl);
         JViewport vp = new JViewport();
         dim.height = rowHeight*numRows;
         vp.setViewSize(dim);
         vp.setView(pnl);
         // Set resize policy and make sure
         // the table's size is tailored
         // as soon as it gets drawn.
         myTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
         Dimension dimScpViewport = myTable.getPreferredScrollableViewportSize();
         if (numRows>30) dimScpViewport.height = 30*rowHeight;
         else           dimScpViewport.height  = numRows*rowHeight;
         if (numCols>15)
           dimScpViewport.width = 15*myTable.getColumnModel().getTotalColumnWidth()/numCols;
         else
           dimScpViewport.width = myTable.getColumnModel().getTotalColumnWidth();
         myTable.setPreferredScrollableViewportSize(dimScpViewport);
         myTable.repaint();
    And the table model
    public class myTableModel extends DefaultTableModel {
         private MySpread mySpreadsheet;
         public myTableModel (MySpread aSpreadsheet){
              super();
              mySpreadsheet = aSpreadsheet;
         public myTableModel (MySpread aSpreadsheet, int rows,int cols){
              super(rows,cols);
    //                 for(int x = 0; x < rows; x++) {
    //                      myCell temp = new myCell(new Integer(x+1));
    //                  super.setValueAt(temp, x, 0);
            for(int x =0 ; x < rows; x++)
             for (int y = 0; y < cols; y++)
              // we initialize it here
              super.setValueAt(new myCell(rows,cols,("")),x,y);
         mySpreadsheet = aSpreadsheet;
         public boolean isCellEditable(int row, int column) {return true;}  
         

  • Strange ArrayList behaviour

    Hi guys,
    to do some processing in my ADF application I need to make a deep copy of some HtmlRowLayouts. I need this copy in order not to mess up my layout. I was trying to write a method for this, but it causes some very strange behaviour. The idea is to copy the arraylist of children and then create a new row with the copy of the children. My code :
         * Creates a rowLayout with ID equal to rowLayout concatenated with a number.
        public HtmlRowLayout createRowLayout() {
            HtmlRowLayout rowLayout = (HtmlRowLayout)FacesContext.
                    getCurrentInstance().getApplication().
                    createComponent(HtmlRowLayout.COMPONENT_TYPE);
            rowLayout.setId("rowLayout" + Integer.toString(nextRowLayoutID));
            nextRowLayoutID++;
            return rowLayout;
        public HtmlRowLayout createCopyOfRowLayout(HtmlRowLayout row) {
            System.out.println("content of row");
            printContentOfRow(row);
            HtmlRowLayout copy = createRowLayout();
            ArrayList<HtmlCellFormat> cells = (ArrayList<HtmlCellFormat>)row.getChildren();
            ArrayList<HtmlCellFormat> copyOfCells = new ArrayList<HtmlCellFormat>(cells);
            ListIterator copyOfCellsIter = copyOfCells.listIterator();
            System.out.println("copyOfCells.size() = " + copyOfCells.size());
            ArrayList<HtmlCellFormat> childrenOfCopy = (ArrayList<HtmlCellFormat>)copy.getChildren();
            while(copyOfCellsIter.hasNext()) {
                HtmlCellFormat cell = (HtmlCellFormat)copyOfCellsIter.next();
                childrenOfCopy.add(cell);
                //copyOfCells.remove(cell);
            System.out.println("copy.getChildCount() = " + copy.getChildCount());
            System.out.println("content of copy");
            printContentOfRow(copy);
            return copy;
        }This gives as output for content of row
    07/11/12 11:40:35 content of row
    07/11/12 11:40:35 child 0 = HtmlCellFormat[UINodeFacesBean, id=cellFormat18]
    07/11/12 11:40:35 child 0 has child CoreObjectSpacer[UINodeFacesBean, id=spacer7]
    07/11/12 11:40:35 child 0 has child CoreOutputText[UIXFacesBeanImpl, id=output2]
    07/11/12 11:40:35 outputText value = NAME
    07/11/12 11:40:35 child 0 has child CoreOutputText[UIXFacesBeanImpl, id=output4]
    07/11/12 11:40:35 outputText value = 1
    07/11/12 11:40:35 child 1 = HtmlCellFormat[UINodeFacesBean, id=cellFormat19]
    07/11/12 11:40:35 child 1 has child CoreInputText[UIXEditableFacesBeanImpl, id=input2]
    07/11/12 11:40:35 inputText label = Product name
    07/11/12 11:40:35 inputText value = water
    07/11/12 11:40:35 child 2 = HtmlCellFormat[UINodeFacesBean, id=cellFormat7]
    07/11/12 11:40:35 child 2 has child CoreObjectSpacer[UINodeFacesBean, id=spacer9]
    07/11/12 11:40:35 child 3 = HtmlCellFormat[UINodeFacesBean, id=cellFormat10]
    07/11/12 11:40:35 child 3 has child CoreObjectSpacer[UINodeFacesBean, id=spacer10]
    07/11/12 11:40:35 child 4 = HtmlCellFormat[UINodeFacesBean, id=cellFormat11]
    07/11/12 11:40:35 child 4 has child CoreObjectSpacer[UINodeFacesBean, id=spacer11]
    07/11/12 11:40:35 child 5 = HtmlCellFormat[UINodeFacesBean, id=cellFormat12]
    07/11/12 11:40:35 child 5 has child CoreObjectSpacer[UINodeFacesBean, id=spacer12]
    07/11/12 11:40:35 child 6 = HtmlCellFormat[UINodeFacesBean, id=cellFormat13]
    07/11/12 11:40:35 child 6 has child CoreObjectSpacer[UINodeFacesBean, id=spacer13]
    07/11/12 11:40:35 child 7 = HtmlCellFormat[UINodeFacesBean, id=cellFormat20]
    07/11/12 11:40:35 child 7 has child CoreObjectSpacer[UINodeFacesBean, id=spacer8]
    07/11/12 11:40:35 child 7 has child CoreOutputText[UIXFacesBeanImpl, id=output3]
    07/11/12 11:40:35 outputText value = SHEPNR
    07/11/12 11:40:35 child 8 = HtmlCellFormat[UINodeFacesBean, id=cellFormat21]
    07/11/12 11:40:35 child 8 has child CoreInputText[UIXEditableFacesBeanImpl, id=input3]
    07/11/12 11:40:35 inputText label = Shepherd Number
    07/11/12 11:40:35 inputText value = null
    07/11/12 11:40:35 child 9 = HtmlCellFormat[UINodeFacesBean, id=cellFormat14]
    07/11/12 11:40:35 child 9 has child CoreObjectSpacer[UINodeFacesBean, id=spacer14]
    07/11/12 11:40:35 child 10 = HtmlCellFormat[UINodeFacesBean, id=cellFormat17]
    07/11/12 11:40:35 child 10 has child CoreObjectSpacer[UINodeFacesBean, id=spacer15]
    The copy constructor of ArrayList (ArrayList<HtmlCellFormat> copyOfCells = new ArrayList<HtmlCellFormat>(cells);) does the right thing.
    However, the content of copy is wrong
    07/11/12 11:40:35 content of copy
    07/11/12 11:40:35 child 0 = HtmlCellFormat[UINodeFacesBean, id=cellFormat19]
    07/11/12 11:40:35 child 0 has child CoreInputText[UIXEditableFacesBeanImpl, id=input2]
    07/11/12 11:40:35 inputText label = Product name
    07/11/12 11:40:35 inputText value = water
    07/11/12 11:40:35 child 1 = HtmlCellFormat[UINodeFacesBean, id=cellFormat7]
    07/11/12 11:40:35 child 1 has child CoreObjectSpacer[UINodeFacesBean, id=spacer9]
    07/11/12 11:40:35 child 2 = HtmlCellFormat[UINodeFacesBean, id=cellFormat10]
    07/11/12 11:40:35 child 2 has child CoreObjectSpacer[UINodeFacesBean, id=spacer10]
    07/11/12 11:40:35 child 3 = HtmlCellFormat[UINodeFacesBean, id=cellFormat11]
    07/11/12 11:40:35 child 3 has child CoreObjectSpacer[UINodeFacesBean, id=spacer11]
    07/11/12 11:40:35 child 4 = HtmlCellFormat[UINodeFacesBean, id=cellFormat12]
    07/11/12 11:40:35 child 4 has child CoreObjectSpacer[UINodeFacesBean, id=spacer12]
    07/11/12 11:40:35 child 5 = HtmlCellFormat[UINodeFacesBean, id=cellFormat13]
    07/11/12 11:40:35 child 5 has child CoreObjectSpacer[UINodeFacesBean, id=spacer13]
    07/11/12 11:40:35 child 6 = HtmlCellFormat[UINodeFacesBean, id=cellFormat20]
    07/11/12 11:40:35 child 6 has child CoreObjectSpacer[UINodeFacesBean, id=spacer8]
    07/11/12 11:40:35 child 6 has child CoreOutputText[UIXFacesBeanImpl, id=output3]
    07/11/12 11:40:35 outputText value = SHEPNR
    07/11/12 11:40:35 child 7 = HtmlCellFormat[UINodeFacesBean, id=cellFormat21]
    07/11/12 11:40:35 child 7 has child CoreInputText[UIXEditableFacesBeanImpl, id=input3]
    07/11/12 11:40:35 inputText label = Shepherd Number
    07/11/12 11:40:35 inputText value = null
    07/11/12 11:40:35 child 8 = HtmlCellFormat[UINodeFacesBean, id=cellFormat14]
    07/11/12 11:40:35 child 8 has child CoreObjectSpacer[UINodeFacesBean, id=spacer14]
    07/11/12 11:40:35 child 9 = HtmlCellFormat[UINodeFacesBean, id=cellFormat17]
    07/11/12 11:40:35 child 9 has child CoreObjectSpacer[UINodeFacesBean, id=spacer15]
    07/11/12 11:40:35 child 10 = HtmlCellFormat[UINodeFacesBean, id=cellFormat18]
    07/11/12 11:40:35 child 10 has child CoreObjectSpacer[UINodeFacesBean, id=spacer7]
    07/11/12 11:40:35 child 10 has child CoreOutputText[UIXFacesBeanImpl, id=output2]
    07/11/12 11:40:35 outputText value = NAME
    07/11/12 11:40:35 child 10 has child CoreOutputText[UIXFacesBeanImpl, id=output4]
    07/11/12 11:40:35 outputText value = 1
    So, the first child is added as last one, and the rest is in the right order.
    Anyone any suggestions?
    Thx

    Well, I would like to use copies for the following reason: I have a inputline on my screen which consist of 2 inputfields. For the processing of this I need these inputs seperated. The reason for this I will omit, cause it has no value for this discussion. I certainly have to use copies, because in the next page I have a backButton. When I click this I go to the original page, where the layout is completely messed up when I use the original cells. The code above doesn't do the trick. But I managed to write a code that works by writing own copy constructors. However my questions was not about whether I had to use copies, but about the behaviour of the addition with the arraylist.
    this is the copy constructor of the row:
        public HtmlRowLayout createCopyOfRowLayout(HtmlRowLayout row) {
            HtmlRowLayout copy = createRowLayout();
            ArrayList<HtmlCellFormat> cells = (ArrayList<HtmlCellFormat>)row.getChildren();
            ArrayList<HtmlCellFormat> copyOfCells = new ArrayList<HtmlCellFormat>();
            for (int copyNb = 0; copyNb < cells.size(); copyNb++) {
                HtmlCellFormat origCell = cells.get(copyNb);
                copyOfCells.add(createCopyOfCellFormat(origCell));
            ArrayList<HtmlCellFormat> childrenOfCopy = (ArrayList<HtmlCellFormat>)copy.getChildren();
            for (int i = 0; i < copyOfCells.size(); i++) {
                HtmlCellFormat cell = copyOfCells.get(i);
                childrenOfCopy.add(i, cell);
            childrenOfCopy.add(0,copyOfCells.get(0));
            return copy;
        }The line above the 'return copy' is very strange to me. I would believe that this already happened in the for loop. However when I drop this line, the first item appears at the end.

  • Commiting 3 new rows - only 2 exist after

    Hi OTN,
    in my ADF BC application I have a bounded taskflow for creating new rows.
    It contains CreateInsert operations for VO1 and VO2 (VO2 is a child of VO1 and a child of another VO which is not touched by the taskflow). I've put postChanges between those operations so no temporary keys are there - the keys are generated via DB triggers.
    After those operations another bounded taskflow is called which contains CreateInsert for VO3 (VO3 is a child of VO1) and a form where Commit is called.
    After Commit I navigate to a test page which shows three forms representing VO1, VO2 and VO3. The page shows me that each of three new rows was created - I see them (with the real key valyes) in the forms.
    But in database only two new rows appeared. VO1 and VO3 (tables) have new rows, but no new row appeared in VO2 table. The form on a test page showed me a VO2 row which really didn't exist.
    Why is there no new row in one of tables?
    I use only one ApplicationModule.
    VO2 is a standard VO based on an entity. It is updatable.
    No errors in logfile.
    I how absolutely NO idea, why does it happen.
    Would love to hear an advice.
    Thanks.
    JDev 11.1.1.3

    Hi,
    if VO2 is dependent on VO1, when you create a new row in VO how to do you ensure its getting committe before VO2 gets committed ? Did you set the composite flag on the association between the two ? Another solution to handle this synchronization - to avoid constraint validations - is documented in the Fusion developer guide
    Frank

  • How to insert a new Row in a table? - Need help

    Hi everyone,
    I'm using JDeveloper 10.1.2, UIX pages and STRUTS.
    This is my situation: When I navigate from page one to page two, I have in my page2 one table and I need to create a new row with some values by default, but I don't want to commit this line except the user decides to complete this line.
    Can anyone help me? This is very important.
    Thanks,
    Atena

    Hi Sascha,
    thanks very much for your replay.
    My project changed and I have another question about this. My page1 has a table (table1) and when I select one line from table1 and press a button, I go to page 2.
    I have an action in the Struts-Config.xml like this in page2 (S2PopUpObstaculos):
    <action path="/S2PopUpObstaculos" type="oracle.jheadstart.controller.strutsadf.action.JhsDataActionSaveObstaculos" className="oracle.jheadstart.controller.strutsadf.action.JhsDataActionMapping" parameter="/WEB-INF/page/S2PopUpObstaculos.uix" name="DataForm">
    <set-property property="modelReference" value="S2AltaSociais2UIModel"/>
    <set-property property="bindParams" value="S2DominiosLevel1Iterator=${data.S2AltaSociais2UIModel.Obstaculo},${data.S2AltaSociais2UIModel.AlsEpsPsId},${data.S2AltaSociais2UIModel.AlsEpsId},${data.S2AltaSociais2UIModel.Obstaculo}"/>
    </action>
    But now, the problem is, if I don't select one Row from table1 and press the button to go to page2, I need to pass diferent parameters to page 2, like this:
    <set-property property="bindParams" value="S2DominiosLevel1Iterator=0,${data.S2AltaSociais2UIModel.AlsEpsPsId},${data.S2AltaSociais2UIModel.AlsEpsId},0"/>
    </action>
    Do you have any ideia how to do this? Can you help me?
    Thanks,
    Atena

  • Add new row to a table

    Hello!
    I'm using JDev 11.2 and I'm trying to add a new row to a table object (using create insert)
    the catch is this-
    and the new empty row that will appear- I want a value set instead of one of the values- so the user can choose which value to insert
    do you know how can this be done?
    (just to be clear- i know how to add a value set, I know how to add new row- dont know how to make the new row contain value set field)
    tnx for your time
    Talya

    If you use a model driven list of value on the attribute in question this should work automatically.
    Have you setup a LOV on the attribute? Have you (on the attribute) checked that the ui-hint is set to selectOneChoice?
    Timo

  • Problem in creating new row

    Hi,
    I am facing a strange problem. i have created many new rows and inserted the data, but now i am facing a strange problem.
    This is my requirement.
    I have table with table action button as create.
    when i click create it is not at all creating new row for the view object but instead it will take the row at the top of the table and replace that line with new data.
    Below is the code :
    In CO
    In PR
    if (!pageContext.isBackNavigationFired(false))
    TransactionUnitHelper.startTransactionUnit(pageContext, "RVSchematicAttributeCreateTxn");
    if (!pageContext.isFormSubmission())
    System.out.println("control entered create block");
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    System.out.println("before calling ");
    am.invokeMethod("createRVSchematicAttribute",null);
    System.out.println("after calling ");
    else
    if (!TransactionUnitHelper.isTransactionUnitInProgress(pageContext, "RVSchematicAttributeCreateTxn", true))
    OADialogPage dialogPage = new OADialogPage(NAVIGATION_ERROR);
    pageContext.redirectToDialogPage(dialogPage);
    IN PFR
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    if(pageContext.getParameter("Apply")!=null)
    System.out.println("apply button is clicked");
    OAViewObject vo = (OAViewObject)am.findViewObject("xxczVAGCSSchematicAttributeVO1");
    String schematicId = (String)vo.getCurrentRow().getAttribute("SchematicId");
    String msg= "SchematicId "+schematicId+"has been added";
    am.invokeMethod("apply");
    System.out.println("returned back to create CO");
    OAException confirmMessage = new OAException(msg,OAException.CONFIRMATION);
    pageContext.putDialogMessage(confirmMessage);
    pageContext.forwardImmediately("OA.jsp?page=/va/oracle/apps/xxcz/gcs/maintenance/webui/xxczVAGCSRVSchematicAttributeResultsPG",
    null,
    OAWebBeanConstants.KEEP_MENU_CONTEXT,
    null,
    null,
    true, // retain AM
    OAWebBeanConstants.ADD_BREAD_CRUMB_NO);
    in AM
    public void createRVSchematicAttribute()
    System.out.println("entered createRVSchematicAttribute ");
    xxczVAGCSSchematicAttributeVOImpl vo = this.getxxczVAGCSSchematicAttributeVO1();
    // OAViewObject vo = (OAViewObject)this.getxxczVAGCSSchematicAttributeVO1();
    vo.setMaxFetchSize(0);
    vo.clearCache();
    if (!vo.isPreparedForExecution())
    vo.executeQuery();
    /* Row row = vo.createRow();
    vo.insertRow(row);
    row.setNewRowState(Row.STATUS_INITIALIZED);
    System.out.println("Row.STATUS_INITIALIZED");*/
    int rowCount = vo.getRowCount();
    Row row = vo.createRow();
    vo.insertRowAtRangeIndex(rowCount, row);
    row.setNewRowState(Row.STATUS_INITIALIZED);
    Please help me i don't know where i am going wrong. i have checked so many times but didn't find any bug.
    -Mithun

    Hi Zafar,
    Ok i will explain my problem with an example.
    I have employee table with following fields.
    Empname
    Empnumber
    Salary
    Table data
    Empname EmpNumber Salary
    Jack 10 1000
    sam 20 2000
    joe 30 3000
    Above is the table structure for which i need to add another row
    I have two page one results page and another create page
    In Results page i will show the above table structure with table action button "Create" in order to insert new record to table.
    When i click Create button it will navigate to create page
    In Create page i will get the below data
    Empname : Jack
    Empnumber :10
    Salary :1000
    Instead of
    Empname :
    Empnumber :
    Salary :
    suppose now if i change the jack to jack1 , 10 to 11 , or 1000 to 10001 and click submit
    Now the result page will show
    Empname EmpNumber Salary
    Jack1 11 1001
    sam 20 2000
    joe 30 3000
    No fourth row is created it is actually behaving like update functionality and updating the top most row.
    -Mithun

  • Strange memory behaviour using the System.Collections.Hashtable in object reference

    Dear all,
    Recently I came across a strange memory behaviour when comparing the system.collections.hashtable versus de scripting.dictionary object and thought to analyse it a bit in depth. First I thought I incorrectly destroyed references to the class and
    child classes but even when properly destroying them (and even implemented a "SafeObject" with deallocate method) I kept seeing strange memory behaviour.
    Hope this will help others when facing strange memory usage BUT I dont have a solution to the problem (yet) suggestions are welcome.
    Setting:
    I have a parent class that stores data in child classes through the use of a dictionary object. I want to store many differenct items in memory and fetching or alteging them must be as efficient as possible using the dictionary ability of retrieving key
    / value pairs. When the child class (which I store in the dictionary as value) contains another dictionary object memory handeling is as expected where all used memory is release upon the objects leaving scope (or destroyed via code). When I use a system.collection.hashtable
    no memory is released at all though apears to have some internal flag that marks it as useable for another system.collection.hashtable object.
    I created a small test snippet of code to test this behaviour with (running excel from the Office Plus 2010 version) The snippet contains a module to instantiate the parent class and child classes that will contain the data. One sub will test the Hash functionality
    and the other sub will test the dictionary functionality.
    Module1
    Option Explicit
    Sub testHash()
    Dim Parent As parent_class
    Dim d_Count As Double
    'Instantiate parent class
    Set Parent = New parent_class
    'Create a child using the hash collection object
    Parent.AddChildHash "TEST_hash"
    Dim d_CycleCount As Double
    d_CycleCount = 50000
    'Add dummy data records to the child container with x amount of data For d_Count = 0 To d_CycleCount
    Parent.ChildContainer("TEST_hash").InsertDataToHash CStr(d_Count), "dummy data"
    Next
    'Killing the parent when it goes out of scope should kill the childs. (Try it out and watch for the termination debug messages)
    'According to documentation and debug messages not really required!
    Set Parent.ChildContainer("TEST_hash") = Nothing
    'According to documentation not really as we are leaving scope but just to be consistent.. kill the parent!
    Set Parent = Nothing
    End Sub
    Sub testDict()
    Dim Parent As parent_class
    Dim d_Count As Double
    'Instantiate parent class
    Set Parent = New parent_class
    'Create a child using the dictionary object
    Parent.AddChildDict "TEST_dict"
    Dim d_CycleCount As Double
    d_CycleCount = 50000
    'Blow up the memory with x amount of records
    Dim s_SheetCycleCount As String
    s_SheetCycleCount = ThisWorkbook.Worksheets("ButtonSheet").Range("K2").Value
    If IsNumeric(s_SheetCycleCount) Then d_CycleCount = CDbl(s_SheetCycleCount)
    'Add dummy data records to the child container
    For d_Count = 0 To d_CycleCount
    Parent.ChildContainer("TEST_dict").InsertDataToDict CStr(d_Count), "dummy data"
    Next
    'Killing the parent when it goes out of scope should kill the childs. (Try it out and watch for the termination debug messages)
    'According to documentation and debug messages not really required!
    Set Parent.ChildContainer("TEST_dict") = Nothing
    'According to documentation not really as we are leaving scope but just to be consistent.. kill the parent!
    Set Parent = Nothing
    End Sub
    parent_class:
    Option Explicit
    Public ChildContainer As Object
    Private Counter As Double
    Private Sub Class_Initialize()
    Debug.Print "Parent initialized"
    Set ChildContainer = CreateObject("Scripting.dictionary")
    End Sub
    Public Sub AddChildHash(ByRef ChildKey As String)
    If Not ChildContainer.Exists(ChildKey) Then
    Dim TmpChild As child_class_hashtable
    Set TmpChild = New child_class_hashtable
    ChildContainer.Add ChildKey, TmpChild
    Counter = Counter + 1
    Set TmpChild = Nothing
    End If
    End Sub
    Public Sub AddChildDict(ByRef ChildKey As String)
    If Not ChildContainer.Exists(ChildKey) Then
    Dim TmpChild As child_class_dict
    Set TmpChild = New child_class_dict
    ChildContainer.Add ChildKey, TmpChild
    Counter = Counter + 1
    Set TmpChild = Nothing
    End If
    End Sub
    Private Sub Class_Terminate()
    Debug.Print "Parent being killed, first kill all childs (if there are any left!) - muahaha"
    Set ChildContainer = Nothing
    Debug.Print "Parent killed"
    End Sub
    child_class_dict
    Option Explicit
    Public MemmoryLeakObject As Object
    Private Sub Class_Initialize()
    Debug.Print "Child using Scripting.Dictionary initialized"
    Set MemmoryLeakObject = CreateObject("Scripting.Dictionary")
    End Sub
    Public Sub InsertDataToDict(ByRef KeyValue As String, ByRef DataValue As String)
    If Not MemmoryLeakObject.Exists(KeyValue) Then MemmoryLeakObject.Add KeyValue, DataValue
    End Sub
    Private Sub Class_Terminate()
    Debug.Print "Child using Scripting.Dictionary terminated"
    Set MemmoryLeakObject = Nothing
    End Sub
    child_class_hash:
    Option Explicit
    Public MemmoryLeakObject As Object
    Private Sub Class_Initialize()
    Debug.Print "Child using System.Collections.Hashtable initialized"
    Set MemmoryLeakObject = CreateObject("System.Collections.Hashtable")
    End Sub
    Public Sub InsertDataToHash(ByRef KeyValue As String, ByRef DataValue As String)
    If Not MemmoryLeakObject.ContainsKey(KeyValue) Then MemmoryLeakObject.Add KeyValue, DataValue
    End Sub
    Private Sub Class_Terminate()
    Debug.Print "Child using System.Collections.Hashtable terminated"
    Set MemmoryLeakObject = Nothing
    End Sub
    Statistics:
    TEST: (Chronologically ordered)
    1.1 Excel starting memory: 25.324 kb approximately
    Max memory usage after hash (500.000 records) 84.352 kb approximately
    Memory released: 0 %
    1.2 max memory usages after 2nd consequtive hash usage 81.616 kb approximately
    "observation:
    - memory is released then reused
    - less max memory consumed"
    1.3 max memory usages after 3rd consequtive hash usage 80.000 kb approximately
    "observation:
    - memory is released then reused
    - less max memory consumed"
    1.4 Running the dictionary procedure after any of the hash runs will start from the already allocated memory
    In this case from 80000 kb to 147000 kb
    Close excel, free up memory and restart excel
    2.1 Excel starting memory: 25.324 kb approximately
    Max memory usage after dict (500.000 records) 90.000 kb approximately
    Memory released: 91,9%
    2.2 Excel starting memory 2nd consequtive dict run: 27.552 kb approximately
    Max memory usage after dict (500.000 records) 90.000 kb approximately
    Memory released: 99,4%
    2.3 Excel starting memory 3rd consequtive dict run: 27.712 kb approximately
    Max memory usage after dict (500.000 records) 90.000 kb approximately
    Memory released:

    Hi Cor,
    Thank you for going through my post and took the time to reply :) Most apreciated. The issue I am facing is that the memory is not reallocated when using mixed object types and is not behaving the same. I not understand that .net versus the older methods
    use memory allocation differently and perhaps using the .net dictionary object (in stead of the scripting.dictionary) may lead to similar behaviour. {Curious to find that out -> put to the to do list of interesting thingies to explore}
    I agree that allocated memory is not a bad thing as the blocks are already assigned to the program and therefore should be reallocated with more performance. However the dictionary object versus hashtable perform almost identical (and sometimes even favor
    the dictionary object)
    The hashtable is clearly the winner when dealing with small sets of data.
    The issue arises when I am using the hash table in conjunction with another type, for example a dictionary, I see that the dictionary object's memory is stacked on top of the claimed memory space of the hashtable. It appears that .net memory allocation and
    reuse is for .net references only. :) (Or so it seems)
    In another example I got with the similar setup, I see that the total used memory is never released or reclaimed and leakage of around 20% allocated memory remains to eventually crash the system with the out of memory message. (This is when another class
    calls the parent class that instantiates the child class but thats not the point of the question at hand)
    This leakage drove me to investigate and create the example of this post in the first place. For the solution with the class -> parent class -> child class memory leak I switched all to dictionaries and no leakage occurs anymore but nevertheless thought
    it may be good to share / ask if anyone else knows more :D (Never to old to learn something new)

  • Retrieve new row's auto-increment key from dataprovider

    ** cross posted on SDN JSC Forum and Netbeans J2EE Nabble forum **
    I have a page that is bound to a MySQL table rowset or, alternately, a new (append()'ed) row. The row's Primary Key is a MySQL auto-increment Integer (translates to a Long.) After commit()'ing the the new row to the database, how would I then get the new row's ID (fieldname "ID")? If I refresh() the dataprovider and try to get the value an error is thrown.
    Some background: The dataprovider's backing rowset has a query parameter for the ID field. I set it to "0" if the page is creating a new row or I set it to the unique ID if the page is displaying an existing row. After the new row is committed, I need the new ID set the query parameter and synch up related rows in different tables that are keyed off the ID in this (master) table. I'd like to do this without "guessing" what the ID would be in advance as that method isn't foolproof in heavy usage.
    Additionally, it strikes me as a useful workaround if the unique ID was a UUID (mySQL UUID() function) that does not run the risk of any concurrency issues. Has anyone used this solution in VWP? How would I make the call for the underying DB (in this case MySQL, but could be anything) to generate the UUID? Is the call DB specific or is there a JDBC equivalent?
    UPDATE: never mind the GUID question, I can use the java.rmi.dgc.VMID class to autogenerate unique GUID's for this purpose. Being from a Lotus Notes background, I'm used to the power and flexibility such Unique ID's bring to the app. dev's portfolio.
    Thanks in adv. for any help .
    -Jake
    Message was edited by:
    jakeochs

    JSF together with JBoss Seam offers some real good possibilities to improve developer productivity. Right now, with JSF you can create forms where fields are persistent (saved in a database), but you have to write code to persist fields. In Notes/Domino, every field you drop in the form is automatically set to persist without writing a single piece of code. JBoss Seam aims to provide the missing glue to tie the JSF beans with business logic (EJB) and persistent layer (JPA). I think tools for Seam are still not mature. I would love to see JSC/VWB utilizing Seam. I know there is a NetBean plugin for Seam but it was written for old NetBeans (not VWP or JSC), so it doesn't work with the visual web pack where you can drag and drop JSF components.

  • Focusing a field/column in the new row of adf table

    Hi all,
         I am using JDeveloper 11.1.2.4.0. and UI-Shell Template in Main application and sub applications are added to this master application as ADF library jar files. Application is working fine.
    I am trying to focus to make focus on a column in the newly created row in one of the sub application by referring the below link
    http://adfnbpel.wordpress.com/2013/08/14/focusing-a-fieldcolumn-in-the-new-row-of-adf-table/
    I created a single application and found that its working
    But in my application focus is not working.
    When i checked the java script by using FireBug console it is found that comp = AdfPage.PAGE.findComponent(‘”+inputId+”‘); is getting as "undefined" , where inputId = table.getClientId(facesCtx) + “:” + rowId + “:” + “it3″; I am getting the exact row id also. When i tried with by passing the table id as input id like inputId = table.getClientId(facesCtx) ; the fire bug console then showing the table id. So its sound strange.
    What may be the cause of not able to find the input text it3 by using findComponent ?
    Is any body can suggest a solution for this.
    Thanks in advance,
    Gijith

    Hi,
    read up about "findComponentByAbsoluteLocator" in http://www.oracle.com/technetwork/developer-tools/jdev/1-2011-javascript-302460.pdf
    or check ...
    AdfPage JS doc
    Frank

  • Creating a New Row Using an ADF Iterator Binding without primary key value

    I dropped a Create action onto a DataAction which forwards to a UIX entry page which contains an enabled Commit button. Part of the primary key value is held in a session bean and it is also current in another view on the model side, but I am unable to access this value to set the EntityImpl primary key attribute.
    Upon submission the following error message is returned from the model:
    ORA-01400: cannot insert NULL into ("GTR"."EMPLOYMENT"."ACCOUNT")
    I would like to accomplish this with databinding and not create a custom create method on the application model. Is there a way to update the binding value for the new row in cache before the submission? Any advice would be welcome.

    I should add that I want the user to enter every attribute value, except for the account number. It must be possible to create a new row and have the account number supplied to the bindings another way.

Maybe you are looking for

  • FA error message

    Hi Expert, I got an error while posting an asset via F-02. "Auxiliary account assignment to asset is not possible, remove entry" I am posting to a fixed asset clearing account, then I entered the asset no. and ticked "asset reitrement". In the past,

  • BAPI_SALESORDER_CHANGE Quantity in the sALES ORDER NOT GETTING UPDATED.

    Hi Experts, i am adding a new line item to the sales order with line item number and material number and QUANTITY. by using BAPI_SALESORDER_CHANGE bapi every thing is geeting updated but QUANTITY field is not getting updated. regards, Jay Sawant.

  • Help, photoshop cs6 doesn't have textures

    Hi, I recently tried to create a puzzle using photoshop cs6 following this tutorial http://www.photoshopessentials.com/photo-effects/photoshop-puzzle/ problem is that when i reach step 6 i cant find the texture option under filter, here is an image o

  • EPM 11.1.2.0.0 Install

    Hi All, Has anyone install planning / essbase 11.1.2.0.0 on windows 7 64bit. Thanks!

  • The ipod could not be sync because the ipod could not be found on the network

    I plugged my ipod touch (4 gen) into my computer to  sync and charge and itunes will not sync it any more.  I the the error: the ipod could not be sync because the ipod could not be found on the network.  It says it backed up on 11/4/13 which was jus