Validation of value entry in Jtable

Hi experts,
I created a Jtable to display data as matix. And when I enter/edit data in the jtable (fileds of the matrix cell) and press save button my program will update the changed values in the table or insert as a new record in the table. A problem is when I enter a value in the cell and without pressing 'Enter', if I press the off button the last entered value in the cell is not validated. The old value is inserted.

Cust/size S M L XL XLL <-sizes (columns)
1001 5 45
12 9 1002
.
.
.
1008 22 65 32 54 8 <-quantity ordered

^
.|
Customers (lines)

When I change the value of 22 to 35 and without pressing the "enter" button if I read (using SET_CUSTOM_PROPERTY('BL1.) JTABLE ', 1, ' SETCELLPOS', a. «, » || (b) and GET_CUSTOM_PROPERTY('BL1.) JTABLE', 1, 'GETCELLVAL')) the data in the field and update the table her not reflecting not.

I tried the following codes to validate
1. ENTER
2 SET_CUSTOM_PROPERTY('BL1.) JTABLE ', 1, ' SETCELLPOS', 1 | «, » || (1);
3 SET_CUSTOM_PROPERTY('BL1.) JTABLE', 1, 'SET_CURRENT_CELL_VALUE', 1);



Please, help me to overcome this difficulty.

Published by: Balaji.M on November 15, 2008 17:35

Published by: Balaji.M on November 15, 2008 17:43

Thanks, Andreas for great participation. ;)

I downloaded a patched version of the file fjtable.jar on the site.

François

Tags: Oracle Development

Similar Questions

  • 'valid integer value' does that mean?

    When you print a file created by the Canadian tax preparation software, in PDF format I get "A00000000 is not a valid integer value"... What does this mean?

    An integer is a number. Whatever this by a letter or symbols of any kind is not an integer. At some stage in the operation, the program expects an integer and becomes something else instead.

    You can print on paper of a PDF document created by the tax software? Or are you trying to take the tax info and put it in a PDF? If you print on paper, you can find it easier to get help from the society of tax software. If you print on paper and that the PDF file was created successfully, I would try to print the PDF file from another computer, or to another printer, or preferably both.

    Assuming you are printing on paper in PDF format, I would see if you can print from another PDF file. In addition, you can check your printer - either update, driver or reinstall it. Drivers, sometimes being damaged.

    Let us know is it y of the above works.

  • Bring transform value entries in Adobe After Effects?

    Last night I opened After Effects CS4 to rotate and to scale an image. But when I click on the layer and twirl down the transform tab, the values in yellow, which are often to the right of the values are missing! And I do not know how to retrieve.

    So if this has happened to anyone before can you please tell me how to get yellow value entry numbers to come back? I looked through the preferences to see if there is a way to reset all the settings of AE, but I can't find something that seems useful.

    Help, please!

    PS. These entries I think are also known as the value of X and Y.  I can always handle if for example, I did a right click on "rotation" and select "Change value", but it of slow and tedious and rejects me the ability to manipulate values on several layers.  I need these values back yellow.

    It is likely that you unwittingly press "F4" and swapped the 'Switches' Panel for Panel 'Modes '.

    Try to hit F4 to toggle switches Panel again.

    If this does not work, right-click on the title bar of the Panel box:

    And in the flying columns, make sure switch is checked on:

  • Flashplayer ' $' is not a valid integer value

    I've just installed and started playing with Captiveate2 (since her RoboDemo5). I tried the found the branch tab and started playing, but when I asked for a slide to open another project I get this error message (Flash player ' $' is not a valid integer value). Any suggestions?

    On a plus note what this product! He continues to improve.

    Ah, all becomes clear! Thanks for the help with this it's much appreciated.

    (Now, I'll go off and see what I can break, maybe a beta-tester (joke))

    See you soon

    John

  • Java Swing-how do I get the value of a JTable to display dynamically in a JPanel

    I need the sum of the values from the values entered in the JTable to be included in the text of the partition field in the adjoining JPanel.
    Also posted here - http://www.coderanch.com/t/512189/GUI/java/value-JTable-show-up-dynamically.
    import javax.swing.*;
    import javax.swing.table.*;
    import javax.swing.event.*;
    import javax.swing.table.DefaultTableCellRenderer;
    
    import java.awt.*;
    import java.util.*;
    import java.awt.color.*;
    import java.awt.event.*;
    
    public class TableandPanel extends JFrame
    {
         public static void main(String[] args)
         {
              JFrame frame = new JFrame("Table and Panel");
                                           frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                                           frame.setSize(100, 300);
            
                                            frame.setVisible(true);
                  String colHdrA = "Some Values";                    
                  TableofSums tableofSums = new TableofSums(10, colHdrA);
                  int sumValue = tableofSums.getSumValues();
                  String sumValueS = String.valueOf(sumValue);
                  SumValuesPanel newPanel = new SumValuesPanel( "Score", sumValueS, "Rank");
                  JPanel thePanel = new JPanel();
                  thePanel.add(new JScrollPane(tableofSums));
                  thePanel.add(newPanel);
                  frame.add(thePanel);
                  frame.pack();
              frame.setVisible(true);
         }
    }
    
    //---------table class starts here---------------------------
    
    public class TableofSums extends JPanel implements TableModelListener
    {
        public static void main(String[] args)
         {          
             SwingUtilities.invokeLater(new Runnable() 
                {
                    public void run() 
                      {               
             JFrame frame = new JFrame("Table");
             frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
             frame.setSize(208, 230);
             //frame.add(new JScrollPane(table));
                frame.setVisible(true);
                String colHdrA = "Some Values";                    
                TableofSums tableofSums = new TableofSums(10, colHdrA);
                 frame.setContentPane(tableofSums);
                  //frame.add(new JScrollPane(timerepTable));
               frame.pack();
               frame.setVisible(true);
                       
                   }
                });
         }
         
         private int noOfRows = 0;
         private JTable table;
         private String colName = null;
         private int sumValues = 0;
         
         public TableofSums(int noOfRows, String colName)
         {
              this.noOfRows = noOfRows;
              this.colName = colName;
              makeTable();          
         }
         
         private void makeTable()
         {
              Object columns[] = new Object[] {"<html><center>" + this.colName + "</center></html>"};
              
             Object[][] data = new Object[noOfRows][1];
             
             for (int i = 0; i<noOfRows; i++)
                {                
                    data[0] = new Integer(0);          
         }
         DefaultTableModel model = new DefaultTableModel(data, columns);
         model.addTableModelListener(this);
         table = new JTable(model)
         {
         @Override
         public boolean isCellEditable(int row, int column)
         {
         switch (column)
         {
              case 0: return true;
         }
         return false;
         }
         
         @Override
         public Class<?> getColumnClass(int columnIndex)
         {
         switch (columnIndex)
         {
         case 0: return Integer.class;
         }
         return null;
         }
         };
         table.setRowHeight(25);
         table.setDefaultRenderer(Integer.class, new SomeCellRenderer());
         this.add(new JScrollPane(table));
         }

    ///--------------------------------tablemodellistener---------------------------------
    //gets the values entered in the table and calculates the sum
    //-------------------------------------------------------------------------------------------
         public void tableChanged(TableModelEvent e)
    {
         System.out.println(e.getSource());
         if(e.getType() == TableModelEvent.UPDATE)
         {
              int row = e.getFirstRow();
              int column = e.getColumn();
              TableModel model = table.getModel();
              sumValues = 0;
              for (int i=0; i<noOfRows; i++)
              {
                   int intValue = (Integer)model.getValueAt(i, column);
                   sumValues += intValue;
              }
              System.out.println ("row modified: " + row + " sumValues: " + sumValues);
         }
         
    }
    //--------------------------------------cell renderer------------------------------------------------------
         
         public class SomeCellRenderer extends JLabel implements TableCellRenderer
         {
              
         public SomeCellRenderer()
         {
              setOpaque(true);      
         }

         public Component getTableCellRendererComponent(JTable table, Object
                   value, boolean isSelected, boolean hasFocus, int row, int column)
              {
              String cellValue = String.valueOf(value);
              this.setText(cellValue);
              this.setBackground(Color.LIGHT_GRAY);
              this.setHorizontalAlignment(SwingConstants.CENTER);
         return this;
              }
         }
         public int getSumValues()
         {
              return sumValues;
         }
    }


    //-------------------------Panel Class Starts here-------------------------------------

    public class SumValuesPanel extends JPanel
    {
         /**
         * @param args
         */
         public static void main(String[] args)
         {
              JFrame.setDefaultLookAndFeelDecorated(true);
              JFrame frame = new JFrame("SumValuesPanel");
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              SumValuesPanel newContentPane = new SumValuesPanel( "Score", "XX.XX", "Rank");
              
              frame.setContentPane(newContentPane);
              frame.pack();
              frame.setVisible(true);
         }
         
    //------Variables declaration
    private JPanel thePanel;
    private JLabel scorejLabel;
    private JTextField ScorejTextField;
    private String scoreLabel;
    private String scoreValue;
    private JLabel rankLabel;
    private String rankLabelTxt;
    private JTextField rankTextField;
    private String rankText;
    //-------End of variables declaration

    public SumValuesPanel (String setScoreLabel,String setScoreVal, String rankLabel)
    {
         scoreLabel = setScoreLabel;
         scoreValue = setScoreVal;
         this.rankLabelTxt = rankLabel;
              
         createSumValuesPanel();
    }

    private void createSumValuesPanel()
    {         
    thePanel = new JPanel();

    rankLabel = new JLabel();
    rankTextField = new JTextField();
         scorejLabel = new JLabel();
    ScorejTextField = new JTextField();

    thePanel.setBackground(new Color(235, 233, 230));
    thePanel.setBorder(BorderFactory.createLineBorder(new Color(0, 0, 0)));
    thePanel.setPreferredSize(new Dimension(200, 180));

    scorejLabel.setHorizontalAlignment(SwingConstants.CENTER);
    scorejLabel.setText(scoreLabel);
    scorejLabel.setBorder(BorderFactory.createLineBorder(new Color(0, 0, 0)));
    scorejLabel.setPreferredSize(new Dimension(40, 20));

    ScorejTextField.setEditable(false);
    ScorejTextField.setHorizontalAlignment(JTextField.CENTER);
    ScorejTextField.setText(scoreValue);
    ScorejTextField.setBorder(BorderFactory.createLineBorder(new Color(0, 0, 0)));
    ScorejTextField.setMaximumSize(new Dimension(60, 25));
    ScorejTextField.setMinimumSize(new Dimension(35, 15));
    ScorejTextField.setPreferredSize(new Dimension(55, 20));

    rankLabel.setHorizontalAlignment(SwingConstants.CENTER);
    rankLabel.setText(rankLabelTxt);
    rankLabel.setBorder(BorderFactory.createLineBorder(new Color(0, 0, 0)));
    rankLabel.setPreferredSize(new Dimension(90, 20));

    rankTextField.setEditable(false);
    rankTextField.setBackground(new Color(255,255,0));
    rankTextField.setHorizontalAlignment(JTextField.CENTER);
    rankTextField.setText(rankText);
    rankTextField.setBorder(BorderFactory.createLineBorder(new Color(0, 0, 0)));
    rankTextField.setPreferredSize(new Dimension(55, 20));

    thePanel.add(scorejLabel);
    thePanel.add(ScorejTextField);
    thePanel.add(rankLabel);
    thePanel.add(rankTextField);

    this.add(thePanel);
    }

    }
    Edited by: 799076 on Oct 1, 2010 8:50 AM
    
    Edited by: 799076 on Oct 2, 2010 3:59 AM - added the code tags.
    
    Edited by: 799076 on Oct 2, 2010 4:01 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            

    OK, here's my "simple" example Say you have a class, TablePanel, that extends from JPanel that holds a JTable and this table contains two columns of integers in a DefaultTableModel and you want to get and display the sum of the columns of numbers whenever they are changed:

    class TablePanel extends JPanel {
       public static final String[] COL_HEADERS = {"A", "B"};
       private static final Integer[][] DATA = {{1, 2}, {3, 4}, {5, 6}};
       private DefaultTableModel model = new DefaultTableModel(DATA, COL_HEADERS) {
          @Override
          public Class getColumnClass(int columnIndex) {
             return Integer.class;
          }
       };
    
       public TablePanel() {
          JTable table = new JTable(model);
          setLayout(new BorderLayout());
          add(new JScrollPane(table));
       }
    //....
    

    A way to listen for changes to the table is to provide a method that allows outside classes to add a TableModelListener your JTable model:

       public void addTableModelListener(TableModelListener listener) {
          model.addTableModelListener(listener);
       }
    

    You could also give him public methods to enable this class get the money and return:

       public int getSumA() {
          int sum = 0;
          for (int i = 0; i < model.getRowCount(); i++) {
             sum += (Integer) model.getValueAt(i, 0);
          }
          return sum;
       }
    
       public int getSumB() {
          int sum = 0;
          for (int i = 0; i < model.getRowCount(); i++) {
             sum += (Integer) model.getValueAt(i, 1);
          }
          return sum;
       }
    }
    

    While you have another class, SumPanel, that displays two JLabels, one to hold the sum of column A and one for the sum of column B:

    class SumPanel extends JPanel {
       private JLabel sumA = new JLabel(" ", SwingConstants.RIGHT);
       private JLabel sumB = new JLabel(" ", SwingConstants.RIGHT);
    
       public SumPanel() {
          setLayout(new GridLayout(1, 0));
          add(sumA);
          add(sumB);
    
          //....
       }
       //.....
    

    You'd give public methods to allow outside classes to set the text for the JLabels that class:

       public void setTextSumA(String text) {
          sumA.setText(text);
       }
    
       public void setTextSumB(String text) {
          sumB.setText(text);
       }
    

    Then, you might have your own class TableModelListener, ModelListener, which has references to both of the above classes:

    class ModelListener implements TableModelListener {
       private TablePanel tablePanel;
       private SumPanel sumPanel;
    
       public ModelListener(TablePanel tablePanel, SumPanel sumPanel) {
          this.tablePanel = tablePanel;
          this.sumPanel = sumPanel;
    
          //...
       }
    //....
    

    who will set the SumPanel labels whenever its tableChanged method is called by the model:

       @Override
       public void tableChanged(TableModelEvent e) {
          int sumA = tablePanel.getSumA();
          int sumB = tablePanel.getSumB();
    
          sumPanel.setTextSumA(String.valueOf(sumA));
          sumPanel.setTextSumB(String.valueOf(sumB));
       }
    
    }
    

    Then you can link everything together in your main graphical interface as follows:

          TablePanel tablePanel = new TablePanel();
          SumPanel sumPanel = new SumPanel();
          ModelListener myModelListener = new ModelListener(tablePanel, sumPanel);
          tablePanel.addTableModelListener(myModelListener);
    

    All assembled, it could look as follows:

    import java.awt.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.table.DefaultTableModel;
    
    public class TableAndPanel2 {
    
       private static void createAndShowUI() {
          TablePanel tablePanel = new TablePanel();
          SumPanel sumPanel = new SumPanel();
          ModelListener myModelListener = new ModelListener(tablePanel, sumPanel);
          tablePanel.addTableModelListener(myModelListener);
    
          JFrame frame = new JFrame("Table And Panel 2");
          frame.getContentPane().add(tablePanel, BorderLayout.CENTER);
          frame.getContentPane().add(sumPanel, BorderLayout.PAGE_END);
          frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          frame.pack();
          frame.setLocationRelativeTo(null);
          frame.setVisible(true);
       }
    
       public static void main(String[] args) {
          java.awt.EventQueue.invokeLater(new Runnable() {
             public void run() {
                createAndShowUI();
             }
          });
       }
    }
    
    class TablePanel extends JPanel {
       public static final String[] COL_HEADERS = {"A", "B"};
       private static final Integer[][] DATA = {{1, 2}, {3, 4}, {5, 6}};
       private DefaultTableModel model = new DefaultTableModel(DATA, COL_HEADERS) {
          @Override
          public Class getColumnClass(int columnIndex) {
             return Integer.class;
          }
       };
    
       public TablePanel() {
          JTable table = new JTable(model);
          setLayout(new BorderLayout());
          add(new JScrollPane(table));
       }
    
       public void addTableModelListener(TableModelListener listener) {
          model.addTableModelListener(listener);
       }
    
       public int getSumA() {
          int sum = 0;
          for (int i = 0; i < model.getRowCount(); i++) {
             sum += (Integer) model.getValueAt(i, 0);
          }
    
          return sum;
       }
    
       public int getSumB() {
          int sum = 0;
          for (int i = 0; i < model.getRowCount(); i++) {
             sum += (Integer) model.getValueAt(i, 1);
          }
    
          return sum;
       }
    
    }
    
    class SumPanel extends JPanel {
       private JLabel sumA = new JLabel(" ", SwingConstants.RIGHT);
       private JLabel sumB = new JLabel(" ", SwingConstants.RIGHT);
    
       public SumPanel() {
          setLayout(new GridLayout(1, 0));
          add(sumA);
          add(sumB);
    
          sumA.setBorder(BorderFactory.createLineBorder(Color.black));
          sumB.setBorder(BorderFactory.createLineBorder(Color.black));
       }
    
       public void setTextSumA(String text) {
          sumA.setText(text);
       }
    
       public void setTextSumB(String text) {
          sumB.setText(text);
       }
    }
    
    class ModelListener implements TableModelListener {
       private TablePanel tablePanel;
       private SumPanel sumPanel;
    
       public ModelListener(TablePanel tablePanel, SumPanel sumPanel) {
          this.tablePanel = tablePanel;
          this.sumPanel = sumPanel;
    
          tableChanged(null);
       }
    
       @Override
       public void tableChanged(TableModelEvent e) {
          int sumA = tablePanel.getSumA();
          int sumB = tablePanel.getSumB();
    
          sumPanel.setTextSumA(String.valueOf(sumA));
          sumPanel.setTextSumB(String.valueOf(sumB));
       }
    
    }
    
  • Form Validation failure: "value is not a date and time in the format"

    Hello world

    I am facing a weird problem in my custom OAF page. I'm displaying the records of a particular table through dynamic VO and dynamic array. All records appear correctly. But when I try to click on NEXT 10 records in a table, I get the error like "FAILED FORM VALIDATION: 1000 ORG CUST BO VERSION is not a date and time in the format. Just like in the screenshot below.

    DESKTOP.JPG

    Strange part of the question, if I select the columns to display not related to this day, so I only am not facing problems. If I select only dates to display and also am not facing this problem. If I use the mixture of this type varchar2 and data, I get this error.

    I tried to change the type of data but no use.

    If we close, look at the PARTY_ID error message trying to copy its data to ORG_CUST_BO_VERSION the last column. Why what's happening clue me less. Can anyone guide me on this please?

    The problem is that you use the same name for the creation of the MessageTextInputBean inside the Table.

    The name of MessageTextInputBean make it dynamic.

    ex: -.

    OAMessageTextInputBean oamessage = (OAMessageTextInputBean) createWebBean (pageContext,

    MESSAGE_TEXT_INPUT_BEAN,

    NULL,

    'text' + columnNo);

    See you soon

    AJ

  • Valid product key entry on says no sticker

    Product key

    I've entered my product key I found under my laptop, but when I entered the product key to Dungeon, saying that the key is invalid can someone advise me on how get the entered product key so I can start using microsoft

    That you try to use the key for?

    Office and Windows are two distinct products, and the product key for one will not work for the other.

    The label on the case of the machine is certainly for Windows, not office.

    If you try to activate an Office installation, you will need to purchase an Office product (or at least the key for it)

  • The runtime value entry

    Hi all

    I have 2 tables
    (a) the source table consists of date, the employee id and salary (now the same employee id date and different wages)
    (b) the target table consists of the wage which contains no data, up to

    Now, I want to fill the salary of an employee in the target table, which gives a specific date during the execution (which exist in the source table)... How do I proceed with this?

    Kind regards
    Sourav

    Hi Clerck,

    Yes, I suppose that the date may not be identical across all employee IDS the best way is the filter date max and load the data. I would like to know if you find difficulties in its application.

    PS: Its still think best to close the thread and the point tag u.

    Thank you
    Guru

  • the value entry and exit points at start and end of the clip

    Hi all, I am new to first having already used Avid and FCP. One that allows you to set both and out points according to both the beginning and the end of the clip is a key that I can't locate. that is, when I want to put the whole clip in my sequence or lift a clip of my sequence help tip. I know there are other ways to do these things, but I want to stick to the way I'm used to.

    Thank you

    If I had to do... I would not put any points and just use Insert / Overlay or extract / shortcuts lift.

    They all need choosing the clip or the window anyway.

  • Is it possible to add the entry in an element value.

    In my organization, we have element named "Presences", containing the two input values

    1. 1-in-Time
    2. 2 - timeless,

    After three years management now wants to add 3rd of entry named 'OT - HR' values

    Is it possible to add the entry in an element value.

    Hello Hussain,

    If your item is indirect, then you can add a new value entry, the first date of start of the element.

    If a direct element (i.e., if there are references to this element for all assignments, then you can not)

    In case you are unable to create a new entry value, the best way is to rename the old element to element_name_old and create a new item of the same name.

    Make sure that you update all balances etc accordingly.

    And then you can end date the old element and create entries for all employees for the new item.

    Hope that helps,

    See you soon,.

    Vignesh

  • entry not long enough for the date format value

    Hi all
    my table PF having IN_DATE is number format we save date number format as 20120101 (Jan 01, 2012)
    and IN_DATE can have 0 (zeros) also.

    When running under query, I get error "not long enough for the format of the value entry date.
    Please, help me to sort it, why this error is coming?

    Thanks in advance
    SELECT * FROM pf WHERE 
    TO_DATE(IN_DATE,'YYYYMMDD') > TRUNC(SYSDATE)-100
    and IN_DATE  != 0;
    Published by: user10736825 on May 20, 2013 15:30

    Hello

    When you store date information in a column NUMBER (or string), you just ask in trouble. The best way to avoid this problem is to use a DATE for date information column.

    The next best thing is to avoid the conversion of the NUMBER into a DATE. DATEs (such as returned by SYSDATE) still can b converted without risking a mistake, so instead of

    user10736825 wrote:

    SELECT * FROM pf WHERE
    TO_DATE(IN_DATE,'YYYYMMDD') > TRUNC(SYSDATE)-100
    and IN_DATE  != 0;
    

    use:

    SELECT  *
    FROM      pf
    WHERE      in_date  > TO_NUMBER ( TO_CHAR ( TRUNC (SYSDATE) - 100
                                         , 'YYYYMMDD'
                               )
                        )
    ;
    
  • APP-FND-00806: the default value is not valid for the p_period_from segment

    We get this error when a user selects a date that is two years of one of our custom reports. I am fairly new to value sets, so I'm not sure what to include here. The parameter on which the problem has a custom value game which is a list of standard date format type values, but there is no validation of value.

    I have watched a few other items of metalink but have not yet find something that could solve this problem.

    Have you reviewed these docs?

    R12 - Standard presentation on how error - APP-FND-00806 the value xxxxxxis default invalid segment. ledger_id [815823.1 ID]
    "APP-FND-00806' error executing create accounting to the custom help responsibility [ID 1300931.1] program."
    Create accounting assets cannot be run from custom responsibilities [ID 1257416.1]
    Create accountants Fail with error APP-FND-00806 [ID 1189102.1]
    Impossible to run some reports of responsibility related to the custom Application APP-FND-00806 [ID 1436456.1]

    Thank you
    Hussein

  • Adding validation to page during page layout

    Hello

    I have a report page that is divided into two sections. The top section contains the parameters in the form of Page elements that the user can enter, then click on a "Submit" button to submit a report. Once they click the submit button, the results appear in the interactive report section below.

    The interactive report query is based on the point of page settings and I configure SQL so that during initial entry to the page, when the page elements are all zero, the query is not return all possible results. The Send button contains an action of "submit Page".

    My question is, I want to apply validation to the page now to control things like the fields required and some slightly more advanced example at least one of four specified fields must be met etc. I don't know how to put the validation in place to achieve this goal, and what I've found so far is that even if I put the item page of 'Value' property to check for a NULL value, once you click on the button send that the error at the top of the page, but the report always returns results based on other parameters that can be filled. I can understand why he did this because we are going to submit the page and we have some of the elements which depends the full page report query. I want to make all the validation when the user clicks on submit, however, if one of them fails, then I wouldn't have to send the page i.e. return all the results of the query.

    Could you please indicate the best way to reach my goal and how do I put the validation? I need to keep the design the same, i.e. the user enters parameters at the top, and then clicks on a Submit button to reveal the results down.

    Thank you

    user10248308 wrote:

    Please update your forum profile with a recognizable username instead of "user10248308": Video tutorial how to change username available

    Always include the information described in these guidelines when you post a question: How to get the answers from the forum

    I have a report page that is divided into two sections. The top section contains the parameters in the form of Page elements that the user can enter, then click on a "Submit" button to submit a report. Once they click the submit button, the results appear in the interactive report section below.

    The interactive report query is based on the point of page settings and I configure SQL so that during initial entry to the page, when the page elements are all zero, the query is not return all possible results. The Send button contains an action of "submit Page".

    My question is, I want to apply validation to the page now to control things like the fields required and some slightly more advanced example at least one of four specified fields must be met etc. I don't know how to put the validation in place to achieve

    This type of validation can be simply implemented with the help of a type Page-level PL/SQL Expression Validation using the coalesce function:

    coalesce(:p1, :p2, :p3, :p4) is not null
    

    where :p1 , :p2 , etc., are the search criteria the items page.

    what I've found so far, is that even if I put the item page of 'Value' property to check for a NULL value, once you click on the button send that the error at the top of the page, but the report always returns results based on other parameters that can be filled. I can understand why he did this because we are going to submit the page and we have some of the elements which depends the full page report query. I want to make all the validation when the user clicks on submit, however, if one of them fails, then I wouldn't have to send the page i.e. return all the results of the query.

    Could you please indicate the best way to reach my goal and how do I put the validation? I need to keep the design the same, i.e. the user enters parameters at the top, and then clicks on a Submit button to reveal the results down.

    The page must be submitted in order to trigger validation, which is the best way to handle this.

    APEX includes both integrated conditions reflecting the State of the page validation: Inline Validation errors displayed and No. Inline Validation errors displayed. You can use these conditionally perform one of the two before the process header to switch a page flag point PX_VALIDATION_FAILED (set property Condition Never so it is not rendered on the page) of the item between 1 and 0 respectively.

    Rather than include the conditions of report rendering in the SQL report, I would recommend making the report interactive whole region conditional on the existence of criteria and the lack of validation errors. Move the report criteria NOT predicates NULL of the report source SQL to a condition Expression PL/SQL area and add an another predicate to the condition that verifies that the validation flag value is 0.

  • AF:inputDate validation

    jdev 11.1.1.7

    I demanded a validation in af:inputdate, so I did following:

    < af:inputDate value = "#{bindings." Dob.inputValue}.

    label = "Date of birth".

    required = "#{bindings." DOB.hints.Mandatory}.

    shortDesc = "#{bindings." DOB.hints.ToolTip}"id ="id1">

    < f: validator binding = "#{bindings." DOB. Validator} "/ >"

    < af:convertDateTime pattern = "#{bindings." DOB.format} "/ >"

    < minimum af:validateDateTimeRange = "1900-01-01" maximum = "2000-01-01" / >

    "" < af:convertDateTime hintDate = ""

    messageDetailConvertDate ="" / > "

    < / af:inputDate >

    It works perfectly fine and validations are being implemented that requires the user to enter the date between 01/01/1900-01/01/2000.

    However, I have to change the validation for the entry date are not later than 18 years from the current date.

    It filed as date of birth, it must restrict the user with birth date, not less than 18 years.

    Please indicate how?

    I did it through alternative way:

    label = 'Date of birth' autoSubmit = 'true '.

    required = "#{bindings." DOB.hints.Mandatory}.

    shortDesc = "#{bindings." DOB.hints.ToolTip}"id ="id1 ".

    Binding = "#{pageFlowScope.registerBean.input_userDOB}" > "

    maximum = "#{pageFlowScope.registerBean.userDOBMax}" / > "

    messageDetailConvertDate ="" / > "

    userDOBMax defined in a bean managed as:

    userDOBMax private date;     the guy here is java.util.date

    {} public void setUserDOBMax (Date userDOBMax)

    this.userDOBMax = userDOBMax;

    }

    public Date getUserDOBMax() {}

    Calendar now = Calendar.GetInstance ();

    now = Calendar.GetInstance ();

    Now.Add (Calendar.YEAR,-18);

    return Now.getTime ();

    }

  • How to force you to update to the date entry before you validate a text field?

    I have this code:

    Custom blur for txtWeekEndingDate script

    (function () {}

    var weekEnding = new Date (event.value);

    day of week var = new Array (7);

    day of week [0] = 'Sunday ';

    day of week [1] = "Monday";

    day of week [2] = "Tuesday";

    day of week [3] = "Wednesday";

    day of week [4] = "Thursday";

    day of week [5] = "Friday";

    day of week [6] = "Saturday";

    var dayOfWeek = weekday [weekEnding.getDay ()];

    var strWeekEnding = weekEnding.toLocaleDateString ();

    Do nothing if the field is empty

    If (! event.target.value) return;

    If the value is not a valid email address...

    If (dayOfWeek! = 'Sunday') {}

    .. .that the user knows that the value is not a valid end date of week...

    App.Alert ({CMSG: "you entered, '" + strWeekEnding + "". ""}) Please enter a date on Sunday. ', nIcon:3, nType:0, cTitle:this.documentFileName});

    .. .and set the focus on this field

    event.target.setFocus ();

    } / / endif dayOfWeek! = "Sunday".

    })();

    The problem is that if the user enters something like "1/1" in the input box (which has a date format defined in the properties of the text box in the "mm/dd/yyyy') it sets the variable weekEnding to"undefined ". Without the validation script, it properly changes the date "01/01/2013", but it seems that this change occurs after the execution of script OnBlur. How can I force the update occur before the script is run?

    When an entry of "1/1" gets converted to "01/01/2013", it is only for what is displayed in the field. " The value of the underlying field remains on "1/1". The point is the value of the field does not change, just what is displayed in the field. This means that there is no direct method to get the text that is displayed.

    You can add a custom script to Validate that changes a value entry of "1/1" to "01/01/2013".» Then, you would get just the value of the field to recover. If you want more help with this approach, after once again.

Maybe you are looking for

  • HP Envy 700-074 Graphics Card problem Windows 8

    Greetings, I recently bought the HP ENVY 700-074 (http://http://h10025.www1.hp.com/ewfrf/wc/product?cc=us & dlc = in & lang = to & lc = in & product = 5371495). Initial setup went fine without any problem.  I replaced the power supply so that I could

  • Satellite P200-1EE - update of HD-DVD Player question

    Hard drive crashed a few days ago.Re-installed everything using the recovery disk.More than 200 updates to vista. TEMPRO installed after all updates for Vista.The problem is the update of the HD DVD of 2007 = callelua.asp? ID = 60624.Returned as an e

  • iMac black screen

    I have an old iMac for 5 years with a black screen. I think the backlight has gone. I have replace a small Board which runs the backlight, but it didn't fix it. How can I replace the backlight system, and it's something I can do myself? I don't want

  • OKI 810 works do not with el capitan

    I upgraded to El Capitan, and then my printer Oki C810 CDN has stopped working. When printing I get the answer: filter Stopped-' failed in the dialog box I tried: 1. download and install the file update OKI on their web site (Hiper - c) 2 remove the

  • How to protect the FPGA IP?

    Hi guys,. I have developed an application of FPGA and build the VIs as a bitfile. I wonder how to protect it? If others purchase my product with the same hardware and simply copy my bitfile, it will work too, no? Is there than a unique material of FP