UseCase--Displaying a Editable table on a form

Frnds,
Help me in doing my usecase...
Scenario@ Have to display an table on a form, such that selection of each row should navigate to another page(where we can edit that row content and updating to database).....
Done, creating an view object and dragged binding control on to the JSF page as ADF Table.....
Thanks
Ashok B.

Hahn,
Iam Confused....
I have an page(Home.jspx) displaying values(in read-only form)...
ex:
ID Name
1035 Ashok
1036 Babu
clicking on the value of ID(like on 1035) should navigate to another page(Details.jspx) where displaying entire details of that particular row with editable option.
As of now iam able to display the values of that table, but doesnot know how to make an link of that specific value....
Thanks,
Ashok B.
Edited by: user12130057 on Apr 24, 2012 4:02 AM

Similar Messages

  • Display/Edit Table Row in form's Header

    Hi all,
    I am going to develop a form with matrix. This form is connected to an UDO (with header and row tables).
    The "special" requirement is that when a user selects a row, the row details must be shown in the form's upper part, out of the matrix. Also, editing these fields should be permitted and it should be the same as editing the row. (I hope I explained myself correctly).
    My question is: has anyone done something like this before? How should I proceed?
    At the moment I already created the form with two folders.
    - Folder 1 shows the normal document header fields (CardCode, CardName, RefNum, etc.).
    - Folder 2 shows the same fields as one matrix row. The fields in Folder 2 are connected to UserDataSources.
    The matrix, document remarks and document total are always visible.
    Tomorrow I'll start the code to make this work, but I would appreciate any input you experts can provide.
    Thanks in advanced,
    Vítor Vieira

    Hi Binita,
    Not quite, but close. Instead of having two matrix's I'll have 1 matrix and a set of User Fields (in the form's title) that should act has a single matrix row.
    Please take a look my form so you can understand it better.
    Production Memo
    What I need it to code a solution were the user can edit the row value, either in the row itself or in the form's title fields.
    In other words, I'll need to connect the selected row to the fields I created in the form's title...
    Thanks for your help,
    Vítor Vieira

  • Null Pointer Exception when working with editable tables

    We are using editable tables in various places in forms that are embedded in views in our application.
    A few weeks ago we have discovered that we receive an exception when first clicking into an editable cell (see below). I can't exactly pinpoint when this started happening (might have been when updating from Luna SR1 to Luna SR2 but I am not sure) but I am certain that we didn't used to have this issue in the beginning.
    Is this something, others are also experiencing? Is this an issue of forms that use DISPLAY_HINT_VIEW (we don't have any editable tables in popup forms)?
    !ENTRY org.eclipse.ui 4 0 2015-06-10 12:14:13.423
    !MESSAGE Unhandled event loop exception
    !STACK 0
    java.lang.NullPointerException
    at org.eclipse.jface.viewers.ColumnViewerEditor.activateCellEditor(ColumnViewerEditor.java:216)
    at org.eclipse.jface.viewers.ColumnViewerEditor.handleEditorActivationEvent(ColumnViewerEditor.java:452)
    at org.eclipse.jface.viewers.ColumnViewer.triggerEditorActivationEvent(ColumnViewer.java:675)
    at org.eclipse.scout.rt.ui.swt.basic.table.SwtScoutTable$P_TableViewerEx.triggerEditorActivationEvent(SwtScoutTable.java:1019)
    at org.eclipse.jface.viewers.ColumnViewer.handleMouseDown(ColumnViewer.java:650)
    at org.eclipse.jface.viewers.ColumnViewer.access$0(ColumnViewer.java:646)
    at org.eclipse.jface.viewers.ColumnViewer$1.mouseDown(ColumnViewer.java:95)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:192)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4353)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4172)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3761)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1151)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:636)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:579)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
    at ch.sbb.cisi.angebot.scout.client.ui.swt.application.Application.startSecure(Application.java:45)
    at ch.sbb.cisi.angebot.scout.client.ui.swt.application.Application$1.run(Application.java:37)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAs(Subject.java:415)
    at ch.sbb.cisi.angebot.scout.client.ui.swt.application.Application.start(Application.java:34)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1438)

    I experienced the same issue with editable boolean cells.
    Left mouse click events produce the mentioned Exception, which causes the mouse down event to be lost. The mouse up event is still fired though, thereby it's possible that the value of another cell in the same row is updated as the contextColum, which is set by the mouse down event, hasn't been updated.
    Right mouse click events work as expected.

  • Display and edit currently selected row of ADF Table in ADF Form

    I have an ADF Read-only Table and ADF Form, which were created from the same Data Control.
    I need to be able to edit the selected row of the table in the form (just like in "Binding Data Controls to your JSF page" part of "Developing RIA Web Applications with Oracle ADF" Tutorial). However, I can't figure out how to do this :(
    I found the following solution on the Web: #{bindings.DeptView1.currentRow.dataProvider.dname} - but it doesn't work, since "the class oracle.jbo.server.ViewRowImpl does not have the property dataProvider".
    Sorry for the newbie question.
    Thanks in advance for any help!

    Hi,
    AFAIK, dataProvider is not supported on ADF BC, hence the error.
    If you have created ADF Read only table and form from the same data control you just need to refresh the form based on table selection to show up the selected record, to do which you just need to add partialTriggers property to the panelFormLayout and set its value to the id of table
    Sireesha

  • Saving a file from a form to be display on a table

    Hi i'm having some problems trying to save the filled out on the form to be displayed on the table i don't know how i am going to go about it can you please help me thanks.
    Here is the code for the form.
    import javax.swing.*;
    import javax.swing.text.*;
    import java.awt.*;              //for layout managers and more
    import java.awt.event.*;        //for action events
    import java.net.URL;
    import java.text.ParseException;
    import java.io.File;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import javax.swing.JComboBox;
    public class DD extends JPanel
                                 implements ActionListener {
        private String newline = "\n";
        protected static final String textFieldString = "Name"; 
        protected static final String textFieldString1 = "Start Time";
        protected static final String textFieldString2 = "End Time";
        protected static final String textFieldString3 = "Total Time(Minutes)";
        protected static final String ftfString = "Date";
        protected static final String buttonString = "JButton";
        JFormattedTextField startTime;
        JTextField totalTime;
        protected JLabel actionLabel;
        Component[][] rowData;
        private String[] shapeName = { "Meeting", "Lunch", "Holiday", "Sickness",
                 "Preparing report", "Administrative work", "Emails", "Query" };
        public DD() {
            setLayout(new BorderLayout());
            Panel data = new Panel();
              data.setLayout(new GridLayout(7, 4));
            rowData = new Component[7][];
    //      One row
                   for (int row = 0; row < 7; row++)
                        rowData[row] = new Component[5];
                        rowData[row][0] = new TextField(10);
                        rowData[row][1] = new TextField(10);
                        ((TextField) rowData[row][1]).addActionListener(this);
                        rowData[row][2] = new JComboBox(shapeName);
                        ((JComboBox) rowData[row][2]).addActionListener(this);
    //      ((TextField)rowData[ row ][ 2 ]).addActionListener(this);
                        rowData[row][3] = new TextField(10);
                        ((TextField) rowData[row][3]).addActionListener(this);
    //      JComboBox jcboxShapeCombo;
    //      System.out.println(rowData[row][2]);
    //      jcboxShapeCombo[2] = new JComboBox (shapeName);
    //      rowData[ row ][ 3 ] = new TextField(10);
                        rowData[row][4] = new TextField(10);
                        ((TextField) rowData[row][4]).addActionListener(this);
                        java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat("H:mm");
                        ((TextField) rowData[row][0]).setText(sdf.format(new java.util.Date()));
                        data.add(rowData[row][0]);
                        data.add(rowData[row][1]);
                        data.add(rowData[row][2]);
                        data.add(rowData[row][3]);
                        data.add(rowData[row][4]);
            //Create a regular text field.
            JTextField textField = new JTextField(10);
            textField.setActionCommand(textFieldString);
            textField.addActionListener(this);
            java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat("H:mm");
            startTime = new JFormattedTextField(sdf);
            startTime.setValue(new java.util.Date());
            startTime.setActionCommand(textFieldString1);
            startTime.addActionListener(this);
            JTextField textField2 = new JTextField(10);
            textField2.setActionCommand(textFieldString2);
            textField2.addActionListener(this);
            totalTime = new JTextField(10);
            totalTime.setActionCommand(textFieldString3);
            totalTime.addActionListener(this);
            //Create a formatted text field.
            JFormattedTextField ftf = new JFormattedTextField(
                      //java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat("H:mm");
                    java.util.Calendar.getInstance().getTime());
            ftf.setActionCommand(textFieldString);
            ftf.addActionListener(this);
            //Create some labels for the fields.
            JLabel textFieldLabel = new JLabel(textFieldString + ": ");
            textFieldLabel.setLabelFor(textField);
            JLabel textFieldLabel1 = new JLabel(textFieldString1 + ": ");
            textFieldLabel1.setLabelFor(startTime);
            JLabel textFieldLabel2 = new JLabel(textFieldString2 + ": ");
            textFieldLabel2.setLabelFor(textField2);
            JLabel textFieldLabel3 = new JLabel(textFieldString3 + ": ");
            textFieldLabel3.setLabelFor(totalTime);
            JLabel ftfLabel = new JLabel(ftfString + ": ");
            ftfLabel.setLabelFor(ftf);
            //Create a label to put messages during an action event.
            actionLabel = new JLabel("Type text in a field and press Enter.");
            actionLabel.setBorder(BorderFactory.createEmptyBorder(10,0,0,0));
            //Lay out the text controls and the labels.
            JPanel textControlsPane = new JPanel();
            GridBagLayout gridbag = new GridBagLayout();
            GridBagConstraints c = new GridBagConstraints();
            textControlsPane.setLayout(gridbag);
            JLabel[]labels = {textFieldLabel, textFieldLabel1,textFieldLabel2, textFieldLabel3, ftfLabel};
            JTextField[] textFields = {textField, startTime,textField2,totalTime, ftf};
            addLabelTextRows(labels, textFields, gridbag, textControlsPane);
            c.gridwidth = GridBagConstraints.REMAINDER; //last
            c.anchor = GridBagConstraints.WEST;
            c.weightx = 1.0;
            textControlsPane.add(actionLabel, c);
            textControlsPane.setBorder(
                    BorderFactory.createCompoundBorder(
                                    BorderFactory.createTitledBorder("Text Fields"),
                                    BorderFactory.createEmptyBorder(5,5,5,5)));
            //Create a text area.
            JTextArea textArea = new JTextArea(
            textArea.setFont(new Font("Serif", Font.ITALIC, 16));
            textArea.setLineWrap(true);
            textArea.setWrapStyleWord(true);
            JScrollPane areaScrollPane = new JScrollPane(textArea);
            areaScrollPane.setVerticalScrollBarPolicy(
                            JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
            areaScrollPane.setPreferredSize(new Dimension(250, 250));
            areaScrollPane.setBorder(
                BorderFactory.createCompoundBorder(
                    BorderFactory.createCompoundBorder(
                                    BorderFactory.createTitledBorder("Comment"),
                                    BorderFactory.createEmptyBorder(5,5,5,5)),
                    areaScrollPane.getBorder()));
            //Create an editor pane.
            JEditorPane editorPane = createEditorPane();
            JScrollPane editorScrollPane = new JScrollPane(editorPane);
            editorScrollPane.setVerticalScrollBarPolicy(
                            JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
            editorScrollPane.setPreferredSize(new Dimension(250, 145));
            editorScrollPane.setMinimumSize(new Dimension(10, 10));
            String[] initString =
            { "Meeting", "Lunch", "Holiday", "Sickness",
                     "Preparing report", "Administrative work", "Emails", "Query" };
            JList listCategories = new JList(initString);
            JScrollPane editorScrollPane = new JScrollPane(listCategories);
            editorScrollPane.setVerticalScrollBarPolicy(
                            JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
            editorScrollPane.setPreferredSize(new Dimension(250, 145));
            editorScrollPane.setMinimumSize(new Dimension(10, 10));
            //Create a text pane.
            JTextPane textPane = createTextPane();
            JScrollPane paneScrollPane = new JScrollPane(textPane);
            paneScrollPane.setVerticalScrollBarPolicy(
                            JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
            paneScrollPane.setPreferredSize(new Dimension(250, 155));
            paneScrollPane.setMinimumSize(new Dimension(10, 10));
            //Put the editor pane and the text pane in a split pane.
            JSplitPane splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT,
                                                  editorScrollPane,
                                                  paneScrollPane);
            splitPane.setOneTouchExpandable(true);
            splitPane.setResizeWeight(0.5);
            JPanel rightPane = new JPanel(new GridLayout(1,0));
            rightPane.add(splitPane);
            rightPane.setBorder(BorderFactory.createCompoundBorder(
                            BorderFactory.createTitledBorder("Category of Task"),
                            BorderFactory.createEmptyBorder(5,5,5,5)));
            JPanel rightPane = new JPanel(new GridLayout(1,0));
            rightPane.add(editorScrollPane);
            //Put everything together.
            JPanel leftPane = new JPanel(new BorderLayout());
            leftPane.add(textControlsPane,
                         BorderLayout.PAGE_START);
            leftPane.add(areaScrollPane,
                         BorderLayout.CENTER);
            add(leftPane, BorderLayout.LINE_START);
            add(rightPane, BorderLayout.LINE_END);
            JButton button = new JButton("Submit");
            button.setCursor(Cursor.getDefaultCursor());
            //button.setMargin(new Insets(0,0,0,0));
            button.setActionCommand(buttonString);
            button.addActionListener(this);
            add(button, BorderLayout.SOUTH);
            button.addActionListener(new ActionListener()
                   public void actionPerformed(ActionEvent evt)
                        String toPrint = collectData();
                        newFile(toPrint);
       private String collectData()
              String toPrint = "";
              for (int i = 0; i < rowData.length; i++)
                   Component[] currentRowComps = rowData;
                   for (int j = 0; j < currentRowComps.length; j++)
                        Component currentComp = currentRowComps[j];
                        if (currentComp instanceof TextField)
                             TextField tf = (TextField) currentComp;
                             toPrint += tf.getText() + " - ";
                        else if (currentComp instanceof JComboBox)
                             JComboBox box = (JComboBox) currentComp;
                             Object selection = box.getSelectedItem();
                             if (selection != null)
                                  toPrint += selection.toString() + " - ";
                   toPrint += "\n";
              return toPrint;
         private File newFile(String data)
              File newfile = null;
              try
                   newfile = new File("I:\\ouput.doc");
                   System.out.println("DATA? - " + data);
                   FileOutputStream fos = new FileOutputStream(newfile);
                   fos.write(data.getBytes());
                   fos.close();
                   // JOptionPane.showMessageDialog(null, "Save File");
                   JOptionPane.showMessageDialog(null, "File saved.", "Success",
                   JOptionPane.INFORMATION_MESSAGE);
              catch (IOException ioexc)
                   JOptionPane.showMessageDialog(null, "Error while saving file: " + ioexc,
                   "Error", JOptionPane.ERROR_MESSAGE);
              return null;
    private void addLabelTextRows(JLabel[] labels,
    JTextField[] textFields,
    GridBagLayout gridbag,
    Container container) {
    GridBagConstraints c = new GridBagConstraints();
    c.anchor = GridBagConstraints.EAST;
    int numLabels = labels.length;
    for (int i = 0; i < numLabels; i++) {
    c.gridwidth = GridBagConstraints.RELATIVE; //next-to-last
    c.fill = GridBagConstraints.NONE; //reset to default
    c.weightx = 0.0; //reset to default
    container.add(labels[i], c);
    c.gridwidth = GridBagConstraints.REMAINDER; //end row
    c.fill = GridBagConstraints.HORIZONTAL;
    c.weightx = 1.0;
    container.add(textFields[i], c);
    public void actionPerformed(ActionEvent e) {
    String prefix = "You typed \"";
    if (textFieldString2.equals(e.getActionCommand()))
    JTextField source = (JTextField)e.getSource();
    actionLabel.setText(prefix + source.getText() + "\"");
    java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat("H:mm");
    try {
                        java.util.Date end = sdf.parse(source.getText());
                        java.util.Date start = sdf.parse(startTime.getText());
                        long difference = (end.getTime() - start.getTime()) / 60000;
                        totalTime.setText(Long.toString(difference));
                   } catch (ParseException e1) {
                        // TODO Auto-generated catch block
                        e1.printStackTrace();
    if (textFieldString1.equals(e.getActionCommand()))     {JTextField source = (JTextField)e.getSource();
            actionLabel.setText(prefix + source.getText() + "\"");}
    if (textFieldString2.equals(e.getActionCommand()))     {JTextField source = (JTextField)e.getSource();
            actionLabel.setText(prefix + source.getText() + "\"");}
    if (textFieldString3.equals(e.getActionCommand()))     {JTextField source = (JTextField)e.getSource();
            actionLabel.setText(prefix + source.getText() + "\"");}
    else if (textFieldString.equals(e.getActionCommand())) {
    //JPasswordField source = (JPasswordField)e.getSource();
    //actionLabel.setText(prefix + new String(source.getPassword())
    //+ "\"");
    } else if (buttonString.equals(e.getActionCommand())) {
    Toolkit.getDefaultToolkit().beep();
    private JEditorPane createEditorPane() {
    JEditorPane editorPane = new JEditorPane();
    editorPane.setEditable(false);
    java.net.URL helpURL = DD.class.getResource(
    "DailyDairyDemoHelp.html");
    if (helpURL != null) {
    try {
    editorPane.setPage(helpURL);
    } catch (IOException e) {
    System.err.println("Attempted to read a bad URL: " + helpURL);
    } else {
    System.err.println("Couldn't find file: Daily Dairy.html");
    return editorPane;
         private JTextPane createTextPane() {
    String[] initString =
    { "Meeting", "Lunch", "Holiday", "Sickness",
         "Preparing report", "Administrative work", "Emails", "Query" };
    String[] initStyles =
    { "regular", "italic", "bold", "small", "large",
    "regular", "button", "regular", "icon",
    "regular"
    JTextPane textPane = new JTextPane();
    StyledDocument doc = textPane.getStyledDocument();
    addStylesToDocument(doc);
    try {
    for (int i=0; i < initString.length; i++) {
    doc.insertString(doc.getLength(), initString[i],
    doc.getStyle(initStyles[i]));
    } catch (BadLocationException ble) {
    System.err.println("Couldn't insert initial text into text pane.");
    return textPane;
    protected void addStylesToDocument(StyledDocument doc) {
    //Initialize some styles.
    Style def = StyleContext.getDefaultStyleContext().
    getStyle(StyleContext.DEFAULT_STYLE);
    Style regular = doc.addStyle("regular", def);
    StyleConstants.setFontFamily(def, "SansSerif");
    Style s = doc.addStyle("italic", regular);
    StyleConstants.setItalic(s, true);
    s = doc.addStyle("bold", regular);
    StyleConstants.setBold(s, true);
    s = doc.addStyle("small", regular);
    StyleConstants.setFontSize(s, 10);
    s = doc.addStyle("large", regular);
    StyleConstants.setFontSize(s, 16);}
    /*s = doc.addStyle("icon", regular);
    StyleConstants.setAlignment(s, StyleConstants.ALIGN_CENTER);
    ImageIcon pigIcon = createImageIcon("images/Pig.gif",
    "a cute pig");
    if (pigIcon != null) {
    StyleConstants.setIcon(s, pigIcon);
    s = doc.addStyle("button", regular);
    StyleConstants.setAlignment(s, StyleConstants.ALIGN_CENTER);
    ImageIcon soundIcon = createImageIcon("images/sound.gif",
    "sound icon");
    JButton button = new JButton();
    if (soundIcon != null) {
    button.setIcon(soundIcon);
    } else {
    button.setText("BEEP");
    button.setCursor(Cursor.getDefaultCursor());
    button.setMargin(new Insets(0,0,0,0));
    button.setActionCommand(buttonString);
    button.addActionListener(this);
    StyleConstants.setComponent(s, button);
    /** Returns an ImageIcon, or null if the path was invalid. */
    protected static ImageIcon createImageIcon(String path,
    String description) {
    java.net.URL imgURL = DD.class.getResource(path);
    if (imgURL != null) {
    return new ImageIcon(imgURL, description);
    } else {
    System.err.println("Couldn't find file: " + path);
    return null;
    * Create the GUI and show it. For thread safety,
    * this method should be invoked from the
    * event dispatch thread.
    private static void createAndShowGUI() {
    //Create and set up the window.
    JFrame frame = new JFrame("DailyDairyDemo");
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    //Add content to the window.
    frame.add(new DD());
    //Display the window.
    frame.pack();
    frame.setVisible(true);
    public static void main(String[] args) {
    //Schedule a job for the event dispatching thread:
    //creating and showing this application's GUI.
    SwingUtilities.invokeLater(new Runnable() {
    public void run() {
    //Turn off metal's use of bold fonts
              UIManager.put("swing.boldMetal", Boolean.FALSE);
              createAndShowGUI();
    And here is the code for the table.
    import java.awt.*;
    import java.awt.event.*;
    import java.util.*;
    import java.io.*;
    import java.util.Date;
    import java.sql.*;
    import java.text.*;
    import javax.swing.*;
    import javax.swing.border.*;
    import javax.swing.event.*;
    import javax.swing.table.*;
    public class DDTable extends JFrame{
         protected JTable m_table;
         protected DDTableData m_data;
         protected JLabel m_title;
         public DDTable(){
              super("DDTABLE");
              setSize(600, 300);
              UIManager.put("Table.focusCellHighlightBorder",new LineBorder(Color.black, 0));
              m_data = new DDTableData();
              m_title = new JLabel(m_data.getTitle(), SwingConstants.CENTER);
              m_title.setFont(new Font("Helvetica", Font.PLAIN, 24));
              getContentPane().add(m_title, BorderLayout.NORTH);
              m_table = new JTable();
              m_table.setAutoCreateColumnsFromModel(false);
              m_table.setModel(m_data);
              for (int k = 0; k < m_data.getColumnCount(); k++) {
                   DefaultTableCellRenderer renderer = new DefaultTableCellRenderer();
                   renderer.setHorizontalAlignment(DDTableData.m_columns[k].m_alignment);
                   TableColumn column = new TableColumn(k, DDTableData.m_columns[k].m_width, renderer, null);
                   m_table.addColumn(column);
              JTableHeader header = m_table.getTableHeader();
              header.setUpdateTableInRealTime(false);
              setJMenuBar(createMenuBar());
              JScrollPane ps = new JScrollPane();
              ps.getViewport().setBackground(m_table.getBackground());
              ps.getViewport().add(m_table);
              getContentPane().add(ps, BorderLayout.CENTER);
              protected JMenuBar createMenuBar(){
                   JMenuBar menuBar = new JMenuBar();
                   JMenu mFile = new JMenu("File");
                   mFile.setMnemonic('f');
                   Action actionNew = new AbstractAction("New Appointment"){
                        public void actionPerformed(ActionEvent e){
                             if (!promptToSave())
                                  return;
                             newDocument();
                        JMenuItem item = new JMenuItem(actionNew);
                        item.setMnemonic('n');
                        item.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_N, InputEvent.CTRL_MASK));
                        mFile.add(item);
                        Action actionSave = new AbstractAction("Save Appointment"){
                             public void actionPerformed(ActionEvent e){
                                  boolean m_textChanged = false;
                                  if (!m_textChanged)
                                       return;
                                  saveFile(false);
                              item = new JMenuItem(actionSave);
                             item.setMnemonic('s');
                             item.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_S, InputEvent.CTRL_MASK));
                             mFile.add(item);
                   JMenuItem mData = new JMenuItem("Retrieve Data");
                   mData.setMnemonic('r');
                   ActionListener lstData = new ActionListener(){
                   public void actionPerformed(ActionEvent e){
                        retrieveData();
                   mData.addActionListener(lstData);
                   mFile.add(mData);
                   mFile.addSeparator();
                   JMenuItem mExit = new JMenuItem("Exit");
                   mExit.setMnemonic('x');
                   ActionListener lstExit = new ActionListener(){
                        public void actionPerformed(ActionEvent e){
                             System.exit(0);
                   mExit.addActionListener(lstExit);
                   mFile.add(mExit);
                   menuBar.add(mFile);
                   return menuBar;
              protected void saveFile(boolean b) {
                   // TODO Auto-generated method stub
              protected void newDocument() {
                     //Create and set up the window.
                 JDialog frame = new JDialog();//"DailyDairyDemo");
                 frame.setModal(true);
                 //frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                 //Add content to the window.
                 frame.add(new DD());
                 //Display the window.
                 frame.pack();
                 frame.setVisible(true);
                 JOptionPane.showMessageDialog(this, "Done!");
                 //loadFile();
              protected boolean promptToSave() {
                   // TODO Auto-generated method stub
                   return true;
              public void retrieveData(){
                   Runnable updater = new Runnable(){
                        public void run(){
                             SimpleDateFormat frm = new SimpleDateFormat("MM/dd/yyyy");
                             String currentDate = frm.format(m_data.m_date);
                             String result =
                             (String)JOptionPane.showInputDialog(DDTable.this,"Please enter date in form mm/dd/yyyy:", "Input", JOptionPane.INFORMATION_MESSAGE, null, null, currentDate);
                             if (result==null)
                                  return;
                             java.util.Date date = null;
                             try{
                                  date = frm.parse(result);
                             catch (java.text.ParseException ex){
                                  date = null;
                             if (date == null){
                                  JOptionPane.showMessageDialog(DDTable.this, result+" is not a valid date", "Warning", JOptionPane.WARNING_MESSAGE);
                                  return;
                             setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
                             try{
                                  m_data.retriveData(date);
                             catch (Exception ex){
                                  JOptionPane.showMessageDialog(DDTable.this,"Error retrieving data:\n"+ex.getMessage(),"Error",JOptionPane.ERROR_MESSAGE);
                             setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
                             m_title.setText(m_data.getTitle());
                             m_table.tableChanged(new TableModelEvent(m_data));
                   SwingUtilities.invokeLater(updater);
         public static void main(String argv[]){
              DDTable frame = new DDTable();
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              frame.setVisible(true);
       class DDData{
            public String m_name;
            public String m_date;
            public String m_startTime;
            public String m_endTime;
            public String m_totalTime;
            public String m_comment;
            public String m_category;
            public DDData(String name, String date,String startTime, String endTime, String totalTime, String comment, String category){
                 m_name = name;
                 m_date = date;
                 m_startTime = startTime;
                 m_endTime = endTime;
                 m_totalTime = totalTime;
                 m_comment = comment;
                 m_category = category;
       class ColumnData{
            public String m_title;
            public int m_width;
            public int m_alignment;
            public ColumnData(String title, int width, int alignment) {
                 m_title = title;
                 m_width = width;
                 m_alignment = alignment;
       class DDTableData extends AbstractTableModel{
         private static final long serialVersionUID = 1L;
         static final String QUERY = "SELECT symbols.name,"+"data startTime, data.endTime, data.totalTime, data.comment, data.category FROM DATA INNER JOIN SYMBOLS"
         +"ON DATA.symbol = SYMBOLS.symbol WHERE"+
         "month(data.date1)=? AND day(data.date1)=?"+
         "AND year(data.date1)=?";
         @SuppressWarnings("unchecked")
         public void retriveData(Date date)
         throws SQLException, ClassNotFoundException {
              try {
                   File f = new File("appointments.dat");
                   FileInputStream fis = new FileInputStream(f);
                ObjectInputStream ois = new ObjectInputStream(fis);
                m_vector = (Vector<DDData>) ois.readObject();
                ois.close();
                fis.close();
               } catch(ClassCastException ex) {
               } catch(FileNotFoundException ex) {
               } catch(IOException ex) {
              /*GregorianCalendar calendar = new GregorianCalendar();
              calendar.setTime(date);
              int month = calendar.get(Calendar.MONTH)+1;
              int day = calendar.get(Calendar.DAY_OF_MONTH);
              int year = calendar.get(Calendar.YEAR);
              m_date = date;
              m_vector = new Vector();
              Connection conn = null;
              PreparedStatement pst = null;
              try{
                   //Load the JDBC-ODBC bridge driver
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                   conn = DriverManager.getConnection("jdbc:odbc:Market", "admin", "");
                   pst = conn.prepareStatement(QUERY);
                   pst.setInt(1, month);
                   pst.setInt(2, day);
                   pst.setInt(3, year);
                   ResultSet results = pst.executeQuery();
                   while (results.next()){
                        String name = results.getString(1);
                        String startTime = results.getString(2);
                        String endTime = results.getString(3);
                        String totalTime = results.getString(4);
                        String comment = results.getString(5);
                        String category = results.getString(6);
                        m_vector.addElement(new DDData(name, startTime, endTime, totalTime, comment, category, category));
                   sortData();
              finally{
                   if (pst != null )
                        pst.close();
                   if (conn != null)
                        conn.close();
         private void saveData() {
              try {
                   File f = new File("appointments.dat");
                   FileOutputStream fos = new FileOutputStream(f);
                ObjectOutputStream oos = new ObjectOutputStream(fos);
                oos.writeObject(m_vector);
                oos.close();
                fos.close();
               } catch(IOException ex) {
         private void sortData() {
              // TODO Auto-generated method stub
         static final public ColumnData m_columns[] = {
                 new ColumnData("Name", 100, JLabel.LEFT),
                 new ColumnData("Date", 100, JLabel.LEFT),
                 new ColumnData("Start Time", 100, JLabel.RIGHT),
                 new ColumnData("End Time", 100, JLabel.RIGHT),
                 new ColumnData("Total Time", 100, JLabel.RIGHT),
                 new ColumnData("Comment", 200, JLabel.RIGHT),
                 new ColumnData("Category", 100, JLabel.RIGHT),
            protected SimpleDateFormat m_frm;
            protected Vector<DDData> m_vector = new Vector<DDData>();
            protected Date m_date;
            public DDTableData(){
                 m_frm = new SimpleDateFormat("MM/dd/yyyy");
                 setDefaultData();
            public void setDefaultData(){
                 try{
                      m_date = m_frm.parse("07/31/2007");
                 catch (java.text.ParseException ex){
                      m_date = null;
                 m_vector.removeAllElements();
                 m_vector.addElement(new DDData("Jerome", null, "Dan", null, null, null, null));
            public int getRowCount(){
                 return m_vector==null ? 0 : m_vector.size();
            public int getColumnCount(){
                 return m_columns.length;
            public String getColumnName(int column){
                 return m_columns[column].m_title;
            public boolean isCellEditable(int nRow, int nCol){
                 return false;
            public Object getValueAt(int nRow, int nCol){
                 if (nRow < 0 || nRow>=getRowCount())
                      return "";
                 DDData row = m_vector.elementAt(nRow);
                 switch (nCol){
                 case 0: return row.m_name;
                 case 1: return row.m_date;
                 case 2: return row.m_startTime;
                 case 3: return row.m_endTime;
                 case 4: return row.m_totalTime;
                 case 5: return row.m_comment;
                 case 6: return row.m_category;
                 return "";
            public String getTitle(){
                 if (m_date==null)
                      return "Daily Dairy";
                 return "Daily Dairy at "+m_frm.format(m_date);

    here is code to collect the data pls what can i do to get the data on the form display on the JTable in the all categories as on the form pls...
    private String collectData()
              String toPrint = "";
              for (int i = 0; i < rowData.length; i++)
                   Component[] currentRowComps = rowData;
                   for (int j = 0; j < currentRowComps.length; j++)
                        Component currentComp = currentRowComps[j];
                        if (currentComp instanceof TextField)
                             TextField tf = (TextField) currentComp;
                             toPrint += tf.getText() + " - ";
                        else if (currentComp instanceof JComboBox)
                             JComboBox box = (JComboBox) currentComp;
                             Object selection = box.getSelectedItem();
                             if (selection != null)
                                  toPrint += selection.toString() + " - ";
                   toPrint += "\n";
              return toPrint;
         private File newFile(String data)
              File newfile = null;
              try
                   newfile = new File("I:\\ouput.doc");
                   System.out.println("DATA? - " + data);
                   FileOutputStream fos = new FileOutputStream(newfile);
                   fos.write(data.getBytes());
                   fos.close();
                   // JOptionPane.showMessageDialog(null, "Save File");
                   JOptionPane.showMessageDialog(null, "File saved.", "Success",
                   JOptionPane.INFORMATION_MESSAGE);
              catch (IOException ioexc)
                   JOptionPane.showMessageDialog(null, "Error while saving file: " + ioexc,
                   "Error", JOptionPane.ERROR_MESSAGE);
              return null;
    private void addLabelTextRows(JLabel[] labels,
    JTextField[] textFields,
    GridBagLayout gridbag,
    Container container) {
    GridBagConstraints c = new GridBagConstraints();
    c.anchor = GridBagConstraints.EAST;
    int numLabels = labels.length;
    for (int i = 0; i < numLabels; i++) {
    c.gridwidth = GridBagConstraints.RELATIVE; //next-to-last
    c.fill = GridBagConstraints.NONE; //reset to default
    c.weightx = 0.0; //reset to default
    container.add(labels[i], c);
    c.gridwidth = GridBagConstraints.REMAINDER; //end row
    c.fill = GridBagConstraints.HORIZONTAL;
    c.weightx = 1.0;
    container.add(textFields[i], c);
    Message was edited by:
    desaint
    Message was edited by:
    desaint

  • While Creating New Insert Form Existing Data Display from the Table

    Hi
    I am New To Sun Java Studio Creator and New to Java Also While Creating New Insert Form Existing Data Display from the Table while i am Run the Form. Can any one help me to Solve this one

    Dear Giri,
    As per your Advise, Literally I have Search the Properties for the Components to set value Null, but I am Unable to find the Value in Properties palate. I have tried in various options like
    In the Properties Palate
    TextField1_onselect use Value null
    TextField1_text I have selected use Value option and I have manually Keyed-in null;
    In the JSP Page, I have manually keyed in the null value below said
    <ui:textField binding="#{BI.textField2}" id="textField2" style="position: absolute; left: 240px; top: 96px" text="#{BI.bDataProvider.value['ISSUENO'] = null}"/>
    <ui:textField binding="#{BI.textField2.Value = null }" id="textField2" style="position: absolute; left: 240px; top: 96px" text="#{BI.bDataProvider.value['ISSUENO'] = null}"/>
    At last I am Failure. I am ignorant of it. Can you please help me on this where I have to set null value for the components? I will be very kind of you

  • Display button in a click to edit table only after click

    Hi all,
      I like the click to edit functionality in ADF tables, and have a button in one of the columns that I only want to be displayed in edit mode (that is only once the user has clicked on a particular row). Currently, all fields show up as read only and are editable when the user clicks on a row, but it looks like the button is always visible. I have tried a few EL expressions for setting the visible property of the button but have not found one that works. Could you help in defining an EL or give me a hint on how I could hide the buttons in the table and only display then for the row that is clicked and is editable?
    Thanks,

    Jobinesh blogged about this here Decompiling ADF Binaries: Conditional rendering of editor components for a clickToEdit table
    Timo

  • Validate Planning form Drop Downs against combo edit tables

    I've got a requirement on the last 2 hyperion planning implementations to validate drop down menus on planning data forms against peoplesoft combo edit tables. Is there any possible way to do this without concatenating dimensions?
    For example if a user picks fund 5432 and in peoplesoft's combo edit table that fund only has 5 associated projects the project drop down should only show 5 projects out of 1000. The same exact validation would also apply to smartlists replicating dimensions in public sector planning and budgeting.
    Thanks in advance!
    Mark

    Don't expect any answers as to what Adobe is planning on doing. The people posting here are 99% users, just like you, not Adobe employees. And those who do know will probably not say so, anyway...
    1) That's possible using a script. But you can always add a single space as the default value...
    2) Also possible with a script, but very buggy and not recommended.
    3) Also possible with a script.
    4) That one's easy. Use a blank PDF file where you create those menus, and then you could simply copy them over to your other files from there.
    5) There are currently two date pickers available for Acrobat forms: The one by FormRouter and a newer one by Max Wyss, which is not free but is quite good and uses a dialog object instead of form fields.
    You can request new features here, by the way:
    https://www.adobe.com/cfusion/mmform/index.cfm?name=wishform

  • ADF Master Form / Detail editable table : how to update the table ?

    Hello,
    I'm using ADF faces with entity objects.
    Here is a simple explanation of the model :
    Table DOCUMENT --> Table LINEA DOCUMENT can have 0 or several row in the LINE table. Model is quite simple.
    I'd like to create JSF pages to create and update DOCUMENT/LINE items.
    I began with the Edit one :
    In my DataControls I have something like :
    AllDocuments
    |
    +- Id
    |
    +- Name
    |
    +-> AllDocumentLines
          |
          +- IdLine
          |
          +- ValueI created a form with the "AllDocuments" items having navigation and submit button.
    I created an editable table with "AllDocumentLines" items.
    The values are correctly filled.
    My questions are :
    - Which kind of "button" I have to add at the end of each row of the table to :
    * validate the update if "Value" changes ? I tried to drag/drop the related Create button but it stays disabled.
    * delete the row
    - Which button can I put to "Add" a new row ?
    I searched the forum but can't find answers of my problem.
    Edit: I'm using JDeveloper 11.1.1.3.0
    Edited by: Christophe on Jul 2, 2010 5:12 PM

    For creating a record drag the createInsert operation and for delete drag the delete operation - just make sure to drag the operation from the right VO in the data control palette.
    The you can drag the commit and rollback operations from the AM level - and you can change the "Disabled" properties of the buttons to false.

  • Form load rules are not working on display and edit forms

    Hi
    I have customized SharePoint 2013 list form using InfoPath 2013. I want to hide certain fields based on user group. I created rules on form load for that. These rules are working fine on New Form but are not working on display and edit form.
    What can I do?

    It could be because the value might have not changed ie, you might be checking for a particular value, the values might have got overwritten when the new form is saved, see if that value is blank or overwritten in display and edit forms.
    I would first check the form load rules and check those values again in Display form and edit form, if the values are not getting cleared/overwritten.
    It would be better if you could upload the screenprint.
    Hope this helps!
    Ram - SharePoint Architect
    Blog - SharePointDeveloper.in
    Please vote or mark your question answered, if my reply helps you

  • ADF Faces Dependent list boxes in an editable table

    Hi,
    I'm working with JDeveloper 10.1.3.1.0.
    I saw the topic "How to build dependent list boxes with ADF II" on F. Nimphius' Blogbuster.
    There it is shown how to handle dependent list boxes in an ADF Faces form. I tried this for an editable table but it doesn't work correctly: If there is more than one row in the resultset of the table, both dependent list boxes have the same content in all the rows though the content in the database is different.
    Can anyone help me?
    Thanks.

    Ok - I will try.
    I built the listboxes like it is described in "ADF Faces: How to built dependent lists boxes with ADF and ADF Faces Part II", Frank Nimphius' Blogbuster July, 2006.
    This is the full code of my ManagedBean:
    package asdb.view.backing;
    import javax.faces.context.FacesContext;
    import javax.faces.el.ValueBinding;
    import javax.faces.event.ValueChangeEvent;
    import javax.faces.model.SelectItem;
    import oracle.adf.model.OperationBinding;
    import oracle.adf.model.binding.DCIteratorBinding;
    import oracle.adf.view.faces.component.core.input.CoreInputText;
    import oracle.binding.BindingContainer;
    import oracle.jbo.Row;
    import oracle.jbo.ViewObject;
    import oracle.jbo.client.Configuration;
    import oracle.jbo.uicli.binding.JUCtrlValueBindingRef;
    public class AktMitFktEdit {
    private BindingContainer bindings;
    public AktMitFktEdit() {
    public void kategorieWechsel(ValueChangeEvent valueChangeEvent) {
    // Add event code here...
    BindingContainer bc = this.getBindings();
    DCIteratorBinding kategorienIter = (DCIteratorBinding)
    bc.get("OrganKategIterator1");
    Row rw =
    kategorienIter.getRowAtRangeIndex(((Integer)valueChangeEvent.getNewValue()).intValue());
    String kategorie = (String)rw.getAttribute("Kategorie");
    OperationBinding opBindingOrganeLovIter = (OperationBinding)bc.get("ExecuteWithParams");
    opBindingOrganeLovIter.getParamsMap().put("kategorieParam",kategorie);
    opBindingOrganeLovIter.execute();
    public void setBindings(BindingContainer bindings)
    this.bindings = bindings;
    public BindingContainer getBindings() {
    return bindings;
    It works fine, when the user only want to update existing rows. But if he had inserted a new row and afterwards want to update existing rows, the listboxes don't show the correct contents. No error messages are displayed.

  • [JHS 10.1.2.2 build 32] Editting table results in NoSuchElementException

    Hi All,
    hopefully somebody has already encountered and solved this problem.
    We are using jHeadstart 10.1.2.2 build 32 and have generated our application in JSPs. But i'm running into a quite structural problem when using the editable table.
    I execute the following steps:
    - On a few pages we have editable tables that display one empty (new) row at the bottom.
    - The tables (views) have a few mandatory columns (attributes).
    - I do not fill all the required field in the empty row
    - I press the commit button
    The page shows the relevant message (the field is mandatory) in the screen but also dumps a NoSuchElementException in the last line.
    The last line shown is the 'new' row.
    java.util.NoSuchElementException
         at java.util.AbstractList$Itr.next(Unknown Source)
         at org.apache.taglibs.standard.tag.common.core.ForEachSupport$SimpleForEachIterator.next(ForEachSupport.java:143)
         at org.apache.taglibs.standard.tag.common.core.ForEachSupport.next(ForEachSupport.java:165)
         at javax.servlet.jsp.jstl.core.LoopTagSupport.doAfterBody(LoopTagSupport.java:301)
         at _web_2d_inf._page._referentie._TalenTable._jspService(_TalenTable.java:367)
         [SRC:/WEB-INF/page/referentie/TalenTable.jsp:161]
         at com.orionserver[Oracle Application Server Containers for J2EE 10g (9.0.4.2.0)].http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:349)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.2.0)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:782)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.2.0)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.2.0)].server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:226)
         at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069)
         at org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:274)
         at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455)
         at org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:320)
         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)
         at oracle.jheadstart.controller.strutsadf.JhsRequestProcessor.process(JhsRequestProcessor.java:385)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
         at oracle.jheadstart.controller.strutsadf.JhsActionServlet.process(JhsActionServlet.java:130)
         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.2.0)].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
         at oracle.jheadstart.controller.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:176)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.2.0)].server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:16)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:239)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.2.0)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:617)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.2.0)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.2.0)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:794)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.2.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.2.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.2.0)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
         at java.lang.Thread.run(Unknown Source)I've tracked the problem down to the RangeSetWrapper class that returns a size of 6 but fills the errorBeans property with only 5 objects. When getting the 6th row (index 5) the errorBeans array throws an IndexOutOfRangeException which in turn results in the NoSuchElement exception.
    Does anybody recognize this problem? Does anybody have a solution? I'm trying to hack into the RangeSetWrapper class, but am not very succesfull at the moment (Well the Exception is gone, but rows get mixed up ;-))
    Regards,
    Robert Willems of Brilman
    Ps. An extract from the JSP page:
    <c:set var="RbsTalenViewNewRows" value="1" scope="request"/>
    <c:forEach var="RbsTalenView" varStatus="status" items="${jhsTableBindings.RbsTalenView.rangeSet}">
       <html:hidden name="RbsTalenView" property="rowKeyStr" indexed="true"/>
       <c:set var="editMode" scope="request" value="${status.index lt bindings.TalenIterator.estimatedRowCount and bindings.TalenIterator.currentRowIndexInRange!=-1}"/>
            <tr class="altRow<c:out value="${status.index % 2 + 1 }"/>">
          <c:set var="rowKeyStr" scope="request" value="${RbsTalenView.rowKeyStr}"/>
       <td nowrap="nowrap">
          <font class="required">*</font>
          <c:if test='${RbsTalenView.TalenUnicode == null}' >
            <html:text name="RbsTalenView" property="TalenUnicode" size="10" maxlength="3" indexed="true"/>
          </c:if>
          <c:if test='${RbsTalenView.TalenUnicode != null}' >
            <html:text name="RbsTalenView" property="TalenUnicode" size="10" maxlength="3" indexed="true" disabled="true"/>
          </c:if>
       </td>
       <td nowrap="nowrap">
          <html:text name="RbsTalenView" property="TalenNaam" size="30" maxlength="64" indexed="true"/>
       </td>
       <td class="fixed">
              <jsp:include page="/common/customDeleteButton.jsp" flush="true">
                <jsp:param name="deleteEvent" value="setCurrentRowWithKey~RbsTalenView"/>
              </jsp:include>
       </td>
            </tr>
          </c:forEach>   The exception is raised during the </c:forEach> (afterBody)

    Problem solved....
    It seems we had overridden some framework method in a subclass of JhsDataAction called clearFormBeanValues(). If you don't call this method you will get the exception stack i encountered. (The comments said the forms were always cleared and it shouldn't do that when errors were encountered.... too bad, not a name ;-))
    Hopefully nothing else will break now i ripped out that code ;-)
    Regards,
    Robert

  • JDev 11g TP4: ADF tables and ADF form pop-ups PPR?

    I was hoping somebody could help me with the following please.
    I'm currently having a bit of an issue with ADF tables and ADF forms embedded in a pop-up, where the wrong record is shown in the popup. I suspect it's a PPR problem but am unsure. My scenario:
    1) I have the following table:
    CREATE TABLE "CHRIS_MUIR_DELETE_ME" (
    "ID" NUMBER(5,0)
    "SOME_COLUMN" VARCHAR2(20 BYTE)
    CONSTRAINT "CHRIS_MUIR_DELETE_ME_PK" PRIMARY KEY ("ID"));2) I have a default ADF BC EO/VO combination for this table.
    3) I have an ADF Faces RC page with a read-only table based on this VO:
    <af:table value="#{bindings.ChrisMuirDeleteMeView.collectionModel}" var="row"
       rows="#{bindings.ChrisMuirDeleteMeView.rangeSize}"
       emptyText="#{bindings.ChrisMuirDeleteMeView.viewable ? 'No rows yet.' : 'Access Denied.'}"
       fetchSize="#{bindings.ChrisMuirDeleteMeView.rangeSize}"
       selectedRowKeys="#{bindings.ChrisMuirDeleteMeView.collectionModel.selectedRow}"
       selectionListener="#{bindings.ChrisMuirDeleteMeView.collectionModel.makeCurrent}"
       rowSelection="single" partialTriggers="myDialog">
      <af:column sortProperty="Id" sortable="false"
        headerText="#{bindings.ChrisMuirDeleteMeView.hints.Id.label}">
         <af:outputText value="#{row.Id}">
            <af:convertNumber groupingUsed="false" pattern="#{bindings.ChrisMuirDeleteMeView.hints.Id.format}"/>
         </af:outputText>
      </af:column>
      <af:column sortProperty="SomeColumn" sortable="false"
         headerText="#{bindings.ChrisMuirDeleteMeView.hints.SomeColumn.label}">
        <af:outputText value="#{row.SomeColumn}"/>
      </af:column>
    </af:table>Note that rowSelection is set to "single".
    3) The page also includes a popup-dialog combo that shows the same data from the table (ie. they're based on the same VO) as an ADF Input Form:
    <af:popup id="myPopUp">
      <af:dialog type="okCancel" id="myDialog">
         <af:panelFormLayout>
            <af:inputText value="#{bindings.Id.inputValue}"
                label="#{bindings.Id.hints.label}"
                required="#{bindings.Id.hints.mandatory}">
               <f:validator binding="#{bindings.Id.validator}"/>
               <af:convertNumber groupingUsed="false" pattern="#{bindings.Id.format}"/>
            </af:inputText>
            <af:inputText value="#{bindings.SomeColumn.inputValue}"
                label="#{bindings.SomeColumn.hints.label}"
                required="#{bindings.SomeColumn.hints.mandatory}"/>
            </af:inputText>
         </af:panelFormLayout>
      </af:dialog>
    </af:popup>Note that the table's partialTriggers is set to the id of the dialog. This implies on return from the dialog, the table will update itself to reflect any changes.
    4) I have a data bound Create commandButton, + a simple Edit commandButton. The Edit button includes an <af:showPopupBehavior> to display the popup:
    <af:commandButton
        actionListener="#{bindings.Create.execute}" text="Create"
        disabled="#{!bindings.Create.enabled}"
        partialTriggers="table1"/>
    <af:commandButton text="Edit">
        <af:showPopupBehavior popupId="myPopUp"/>
    </af:commandButton>If you run the form with the following steps, you can reproduce my issue:
    1) Click the create button, this will create a blank record in the <af:table>
    2) Click the edit button and give the 2 fields values, press ok. Note this is reflected back in the table.
    3) Click the create button, you will now see another blank record in the <af:table>. Note that the current row selection highlight is on the new record.
    4) In the table select the original record, then the Edit button. Oddly the input form is showing the blank record, not the original record even though we selected it in the <af:table>
    This implies to me that I have to hook up a PPR event such that the fields on the popup know to update themselves when the user selects a new row in the table.
    I've tried setting the partialTriggers property for the popup, dialog and individual fields on the popup page to the table id, but this doesn't seem to work.
    Does anybody have any suggestions on how I'm meant to hook up the partialTriggers in this case? I'm at a bit of a loss to know what to do to solve this issue. Is it possible the table selectionListener isn't working?
    Thanks for your help in advance.
    Regards,
    CM.

    G'day gang
    This morning I had a chance to play with Pavle's suggestions, specifically the popup contentDelivery option, and it's solved the issue. Specifically changing the contentDelivery option to lazyUncached was the golden solution.
    As the popup component help states, the default functionality is: "lazy -- the default strategy described above. The content isn't loaded until you show the popup once, but then is cached."
    ....cached being the issue I was seeing.....
    While the lazyUncached options states: "lazyUncached -- the content isn't loaded until you show the popup, and then is re-fetched every subsequent time you show the popup. Use this strategy if the popup shows data that can become stale."
    The nasty thing about the lazy option is the fact that in the dialog it can show the previous cached result (even though you've selected a different record), and you can even appear to edit that cached result in the dialog, but when you press okay in the dialog and return to the previous table, it's updated the record you selected, not the cached result.
    Confusing, but not a bug if you understand the popup contentDelivery options.
    Frank, if you'd like it, I have the simple test case available to send you. But as it's not a bug I wont send it to you unless requested.
    Thanks to both of you for your assistance with this one. Once again your help is much appreciated! :)
    I'll take time out to blog about this in the next few weeks to assist others.
    Thanks & regards,
    CM.

  • Editable table with multiple rows

    Hi All!
    We're trying to develop some application in VC 7.0. That application should read data from some R/3 tables (via standard and custom functional modules), then display data to user and allow him/her to modify it (or add some data into table rows), and then save it back to R/3.
    What is the best way to do that?
    There's no problem with displaying data.
    But when I try to add something to table (on portal interface), I'm able to use only first row of the table... Even if I fill all fields of that row, I'm not able to add data to second row, etc.
    Second question. Is it possible to display in one table contents of output of several BAPIs? For example we have three bapis, one displaying user, second displays that user's subordinates, and the third one - that user's manager. And we want one resulting table...
    And last. What is the best way to submit data from table view in VC (portal) to R/3 table? I understand that we should write some functional module, that puts data to R/3. I'm asking about what should be done in VC itself. Some button, or action...
    Any help will be appreciated and rewarded :o)
    Regards,
    DK

    Here are some former postings:
    Editable table with multiple rows
    and
    Editable table with multiple rows
    Are you on the right SP-level?
    Can you also split up your posting: one question, one posting? This way you get faster answers, as people might just browse the headers.

  • ADF table and ADF form on the same view object

    Hi,
    As per the ADF demos available on ADF site, I created a jsf page with 2 panels. One panel is an ADF table based on a view object. And the other panel is and ADF form based on the same view object. My requirement is that as I scroll through the records in the ADF table, the ADF Form should dynamically display the details of the record in the ADF table. My understanding is that this should be automatic. However, its not working as expected. What have I missed?

    Hi,
    Apply PPR for form that displays details.
    Like :
    <af:table id="t3">
    </af:table>
    <af:panelFormLayout id="pfl2" partialTriggers="t3">
    </af:panelFormLayout >

Maybe you are looking for

  • IPod Nano wont updat songs!!!

    Okay, when I plug my ipod nano into the USB port and my itunes pop up, the stage where my ipod would usually update itself is replaced with a popup window that says: Songs on "iPod Nano" cannot be updated because of all the playlists selected for upd

  • Where is the LaTeX documentation?

    In my arch setup, /usr/share/texmf/doc and /usr/share/texmf-dist/doc are completely empty. The texdoc command also finds nothing. Which package contains the latex package documentations? Currently, the following are installed: $ pacman -Qqs texlive t

  • Lightroom 4.4 works and Windows 8?

    Any info about whether Lightroom 4.4 works well with Windows 8?

  • Keep having to install

    I can install and use Skype on my Mac no problem but every time I want to use it, I have to download and it and install it again. Any idea? Solved! Go to Solution.

  • How do I restore iTunes music library from ipod(s) and gift card $s?

    Two Questions: 1) Had to have my hard drive rebuilt due to a major virus issue with my computer. Had to remove all software. Now when I download my new version of iTunes and try to sync my iPod its looking for the previous software iTunes account and