Strange behavior in JTable using JFileChooser as custom editor

I have an application that I am working on that uses a JFileChooser (customized to select images) as a custom editor for a JTable. The filechooser correctly comes up when I click (single click) on a cell in the table. I can use the filechooser to select an image. When I click on the OPEN button on the filechooser, the cell then displays the editor class name.
I have added prints to the editor methods and have determined that editing is stopped before the JTable adds the listener. I have looked at the code and have searched doc for examples but have not found what I am doing wrong. Can anyone help?
I configured the table editor as follows:
//Set up the editor for the Image cells.
private void setUpPictureEditor(JTable table) {
table.setDefaultEditor(String.class, new PictureChooser());
Below is the code for the JTable editor that I am using:
package com.board;
import java.io.*;
import java.util.Vector;
import java.util.EventObject;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.JFileChooser;
import javax.swing.JPanel;
import javax.swing.table.TableCellEditor;
import javax.swing.event.CellEditorListener;
import javax.swing.event.ChangeEvent;
public class PictureChooser extends JLabel implements TableCellEditor
boolean DEBUG = true;
int line=0;
static private String newline = "\n";
protected boolean editing;
protected Vector listeners;
protected File originalFile;
protected JFileChooser fc = new JFileChooser("c:\\java\\jpg");
protected File newFile;
public PictureChooser()
super("PictureChooser");
if (DEBUG)
     System.out.println(++line + "-PictureChooser constructor");
     listeners = new Vector();
     fc.addChoosableFileFilter(new ImageFilter());
     fc.setFileView(new ImageFileView());
     fc.setAccessory(new ImagePreview(fc));
private void setValue(File file)
if (DEBUG)
     System.out.println(++line + "-PictureChooser.setValue method");
     newFile = file;
public Component getTableCellEditorComponent(JTable table,
                              Object value,
                              boolean isSelected,
                              int row,
                              int col)
if (DEBUG)
     System.out.println(line + "-PictureChooser.getTableCellEditorComponent row:" + row + " col:" + col + " method");
     fc.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent e) {
               String cmd = e.getActionCommand();
               System.out.println(++line + "-JFileChooser.actionListener cmd:" +
                                   cmd);
               if (JFileChooser.APPROVE_SELECTION.equals(cmd))
                    stopCellEditing();
               else
                    cancelCellEditing();
     //editing = true;
     //fc.setVisible(true);
     //fc.showOpenDialog(this);
     int returnVal = fc.showOpenDialog(this);
     if (returnVal == JFileChooser.APPROVE_OPTION)
     newFile = fc.getSelectedFile();
     table.setRowSelectionInterval(row,row);
     table.setColumnSelectionInterval(col,col);
     return this;
// cell editor methods
public void cancelCellEditing()
if (DEBUG)
     System.out.println(++line + "-PictureChooser.cancelCellEditing method");
     fireEditingCanceled();
     editing = false;
     fc.setVisible(false);
public Object getCellEditorValue()
if (DEBUG)
     System.out.println(++line + "-PictureChooser.getCellEditorValue method");
     return new ImageIcon(newFile.toString());
public boolean isCellEditable(EventObject eo)
if (DEBUG)
     System.out.println(++line + "-PictureChooser.isCellEditable method");
     return true;
public boolean shouldSelectCell(EventObject eo)
if (DEBUG)
     System.out.println(++line + "-PictureChooser.shouldSelectCell method");
     return true;
public boolean stopCellEditing()
if (DEBUG)
     System.out.println(++line + "-PictureChooser.stopCellEditing method");
     fireEditingStopped();
     editing = false;
     fc.setVisible(false);
     return true;
public void addCellEditorListener(CellEditorListener cel)
if (DEBUG)
     System.out.println(++line + "-PictureChooser.addCellEditorListener method");
     listeners.addElement(cel);
public void removeCellEditorListener(CellEditorListener cel)
if (DEBUG)
     System.out.println(++line + "-PictureChooser.removeCellEditorListener method");
     listeners.removeElement(cel);
public void fireEditingCanceled()
if (DEBUG)
     System.out.println(++line + "-PictureChooser.fireEditingCanceled method");
     setValue(originalFile);
     ChangeEvent ce = new ChangeEvent(this);
     for (int i=listeners.size()-1; i>=0; i--)
     ((CellEditorListener)listeners.elementAt(i)).editingCanceled(ce);
public void fireEditingStopped()
if (DEBUG)
     System.out.println(++line + "-PictureChooser.fireEditingStopped method");
     ChangeEvent ce = new ChangeEvent(this);
     for (int i=listeners.size()-1; i>=0; i--)
System.out.println(++line + "-PictureChooser listener " + i);
     ((CellEditorListener)listeners.elementAt(i)).editingStopped(ce);

try this code. it work fine.
regards,
pratap
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.border.*;
import javax.swing.table.*;
import java.io.*;
public class TableDialogEditDemo extends JFrame {
     public TableDialogEditDemo() {
          super("TableDialogEditDemo");
          MyTableModel myModel = new MyTableModel();
          JTable table = new JTable(myModel);
          table.setPreferredScrollableViewportSize(new Dimension(500, 70));
          //Create the scroll pane and add the table to it.
          JScrollPane scrollPane = new JScrollPane(table);
          //Set up renderer and editor for the Favorite Color column.
          setUpColorRenderer(table);
          setUpColorEditor(table);
          //Add the scroll pane to this window.
          getContentPane().add(scrollPane, BorderLayout.CENTER);
          addWindowListener(new WindowAdapter() {
               public void windowClosing(WindowEvent e) {
                    System.exit(0);
     private void setUpColorRenderer(JTable table) {
          table.setDefaultRenderer(File.class, new PictureRenderer(true));
     //Set up the editor for the Color cells.
     private void setUpColorEditor(JTable table) {
          table.setDefaultEditor(File.class, new PictureChooser());
     class PictureRenderer extends JLabel     implements TableCellRenderer {
          Border unselectedBorder = null;
          Border selectedBorder = null;
          boolean isBordered = true;
          public PictureRenderer(boolean isBordered) {
               super();
               this.isBordered = isBordered;
               setOpaque(false);
               setHorizontalAlignment(SwingConstants.CENTER);
          public Component getTableCellRendererComponent(
                                        JTable table, Object value,
                                        boolean isSelected, boolean hasFocus,
                                        int row, int column) {
               File f = (File)value;
               try {
                    setIcon(new ImageIcon(f.toURL()));
               catch (Exception e) {
               e.printStackTrace();
               return this;
     class MyTableModel extends AbstractTableModel {
          final String[] columnNames = {"First Name",
                                             "Favorite Color",
                                             "Sport",
                                             "# of Years",
                                             "Vegetarian"};
          final Object[][] data = {
               {"Mary", new Color(153, 0, 153), "Snowboarding", new Integer(5), new File("D:\\html\\f1.gif")},
               {"Alison", new Color(51, 51, 153), "Rowing", new Integer(3), new File("D:\\html\\f2.gif")},
               {"Philip", Color.pink, "Pool", new Integer(7), new File("D:\\html\\f3.gif")}
          public int getColumnCount() {
               return columnNames.length;
          public int getRowCount() {
               return data.length;
          public String getColumnName(int col) {
               return columnNames[col];
          public Object getValueAt(int row, int col) {
               return data[row][col];
          public Class getColumnClass(int c) {
               return getValueAt(0, c).getClass();
          public boolean isCellEditable(int row, int col) {
               if (col < 1) {
                    return false;
               } else {
                    return true;
          public void setValueAt(Object value, int row, int col) {
               data[row][col] = value;
               fireTableCellUpdated(row, col);
     public static void main(String[] args) {
          TableDialogEditDemo frame = new TableDialogEditDemo();
          frame.pack();
          frame.setVisible(true);
import java.awt.Component;
import java.util.EventObject;
import java.awt.event.*;
import java.awt.*;
import javax.swing.*;
import javax.swing.event.*;
import javax.swing.table.*;
import java.io.*;
public class PictureChooser extends JButton implements TableCellEditor, ActionListener {
     protected EventListenerList listenerList = new EventListenerList();
     protected ChangeEvent changeEvent = new ChangeEvent(this);
     private File file;
     public PictureChooser() {
          super("");
          setBackground(Color.white);
          setBorderPainted(false);
          setMargin(new Insets(0,0,0,0));
          addActionListener(this);
     public Component getTableCellEditorComponent(JTable table, Object value,
                                             boolean isSelected, int row, int column) {
     File f = (File)value;
     try {
          setIcon(new ImageIcon(f.toURL()));
     catch (Exception e) {
          e.printStackTrace();
     return this;
     public void actionPerformed(ActionEvent e)
     JFileChooser chooser = new JFileChooser("d:\\html");
     int returnVal = chooser.showOpenDialog(this);
          if(returnVal == JFileChooser.APPROVE_OPTION) {
               file = chooser.getSelectedFile();
               System.out.println("You chose to open this file: " + chooser.getSelectedFile().getName());
               fireEditingStopped();
          else
               fireEditingCanceled();
     public void addCellEditorListener(CellEditorListener listener) {
     listenerList.add(CellEditorListener.class, listener);
     public void removeCellEditorListener(CellEditorListener listener) {
     listenerList.remove(CellEditorListener.class, listener);
     protected void fireEditingStopped() {
     System.out.println("fireEditingStopped called ");
     CellEditorListener listener;
     Object[] listeners = listenerList.getListenerList();
     for (int i = 0; i < listeners.length; i++) {
          if (listeners[i] == CellEditorListener.class) {
          listener = (CellEditorListener) listeners[i + 1];
          listener.editingStopped(changeEvent);
     protected void fireEditingCanceled() {
     CellEditorListener listener;
     Object[] listeners = listenerList.getListenerList();
     for (int i = 0; i < listeners.length; i++) {
          if (listeners[i] == CellEditorListener.class) {
          listener = (CellEditorListener) listeners[i + 1];
          listener.editingCanceled(changeEvent);
     public void cancelCellEditing() {
     System.out.println("cancelCellEditing called ");
     fireEditingCanceled();
     public boolean stopCellEditing() {
     System.out.println("stopCellEditing called ");
     fireEditingStopped();
     return true;
     public boolean isCellEditable(EventObject event) {
     return true;
     public boolean shouldSelectCell(EventObject event) {
     return true;
     public Object getCellEditorValue() {
          return file;

Similar Messages

  • Strange behavior of JTable..Help plz

    Hi,
    Assume i have 5 rows in my JTable. I wrote a function on right click i get a popup window with an option delete row, which deletes the row successfully,
    The problem is when i sort the data in JTable. on column click JTable is getting sorted, in which assume 2nd row got replaced with 4th row and vice versa.
    Now when i try to delete the 4th row, it is delete the 2nd row data, which was there at the place of 4th row before sorting. In this regard i am trying to print the row number before deleting. It is displaying as 4th, but deleting 2nd row.
    Hope i am clear. Please suggest me in solving this strange behavior of JTable sorting problem.
    Regards,
    Ravi

    MyTableModel tablemodel = new MyTableModel(colnames,values);
    TableSorter sorter = new TableSorter(tablemodel);
    JTable table = new JTable(sorter)
    tablemodel.removeRow(row); // last line is the code where i am deleting the row, it's deleting the wrong row.
    do i need to remove the last line code and make respective changes in TableSorter.java class.
    ore
    here itself do i need to do some changes. ?
    There is a method that will convert the view row to the model row private Row[] getViewToModel()
    my question is how TableSorter.java class comes to know that i am deleting the perticular row.

  • JDEV Team: Strange behavior in TOMCAT using DATATAGS (VERY CRITICAL)

    I am encountering some strange behavior when I deploy my application to TOMCAT.
    If I run in JDeveloper (webtogo) everything works fine but the behavior changes completely in TOMCAT.
    Let me try and explain my situation here.
    I have 3 jsps :
    1.iss_listApps.jsp which is used to browse all the available records, allows the user to navigate to a specific record and edit or delete.
    2. app_edit.jsp which is used to edit/delete a specific row passed from iss_listApps.jsp.
    3. app_edit_post.jsp which is used to save the changes.
    Note that I use an anchor ">Edit</a> to pass a row from the browser page to the edit page.
    For your convenience I have listed all the source files below.
    Now here are my problems:
    Problem 1. If I run it in JDeveloper, I am able to browse the records and go to a specific record to edit and delete by clicking on the "Edit" anchor provided in the browser page.
    I can also go to the edit page and backout out of it by not saving the changes. In that case I am back in my browser page and I can again click on the "Edit" anchor to a specific record.
    However if I am in TOMCAT, I am able to browse and go to a specific record so long as I make changes to it and save it. If for any reason, I do not save a record and I go back to my browser
    page then any subsequent calls to to edit a specific record goes to the same OLD RECORD that I did not save.
    I fail to understand why? Maybe the "webtogo" server automatically refreshes when I click on the "back tab". If so, how do I automatically refresh a jsp page when I click on the "back tab" in TOMCAT.
    I would sincerely appreciate any help on this.
    Problem 2. I have an include jsp tag in my browser page. defined as
    <jsp:include page="Message.jsp" flush="true">
    <jsp:param name="colspan" value="2"/>
    </jsp:include>.
    This section of the code is currently commented out because if I uncomment it then it runs ok in JDeveloper but in Tomcat it causes the browser page to always navigate to the first record if I want to edit a specific record.
    I would sincerely appreciate any answer on this.
    Here are my source files:
    1. iss_ListApps.jsp (browser page). Please see how the anchor is formed. It causes no problems
    in JDeveloper.
    <%@ page contentType="text/html;charset=WINDOWS-1252"%>
    <HTML>
    <base target="contentsframe">
    <head>
    </head>
    <body>
    <%@ taglib uri="/webapp/DataTags.tld" prefix="jbo" %>
    <jbo:ApplicationModule id="NewBC4J.NewBC4JModule" configname="NewBC4J.NewBC4JModule.NewBC4JModuleLocal" username="issue" password="issue"/>
    <jbo:RollBack appid="NewBC4J.NewBC4JModule" />
    <jbo:DataSource id="app_vo" appid="NewBC4J.NewBC4JModule" viewobject="ApplicationsView" ></jbo:DataSource>
    <jbo:RefreshDataSource datasource="app_vo" />
    <table width="100%" bgcolor="tan" border="0" align="center" cellpadding="3" cellspacing="0">
    <%--
    <jsp:include page="Message.jsp" flush="true">
    <jsp:param name="colspan" value="2"/>
    </jsp:include> --%>
    <form name="list" target="body" action="app_edit.jsp" method="post">
    <tr><th colspan="4">List of Valid Applications</th></tr>
    <tr>
    <th> </th>
    <th align="left"><u>Code</u></th>
    <th align="left"><u>Name</u></th>
    <th align="left"><u>Description</u></th>
    </tr>
    <tr>
    <jbo:RowsetIterate datasource="app_vo">
    <td>
    <a href="app_edit.jsp?RowKeyValue=<jbo:ShowValue datasource="app_vo" dataitem="RowKey"/>">Edit</a>
    </td>
    <td>
    <jbo:ShowValue datasource="app_vo" dataitem="Code" />
    </td>
    <td>
    <jbo:ShowValue datasource="app_vo" dataitem="Name" />
    </td>
    <td>
    <jbo:ShowValue datasource="app_vo" dataitem="A ppDesc" />
    </td>
    </tr>
    </jbo:RowsetIterate>
    </form>
    </table>
    <table width="100%" bgcolor="skyblue" align="center" cellpadding="10" cellspacing="0" >
    <tr>
    <form NAME="AddForm" action="app_add.jsp">
    <td>
    <input type = "submit" name="submit" value="Add" align="center" >
    </td>
    </form>
    </tr>
    </table>
    </body>
    <jbo:ReleasePageResources releasemode="Stateful" appid="NewBC4J.NewBC4JModule" />
    </html>
    2. Second Source File: app_edit.jsp (Allows editing of a record)
    <%@ page contentType="text/html;charset=WINDOWS-1252"%>
    <HTML>
    <base target="contentsframe">
    <HEAD>
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=WINDOWS-1252">
    <META NAME="GENERATOR" CONTENT="Oracle JDeveloper">
    <TITLE>
    </TITLE>
    </HEAD>
    <BODY>
    <%@ taglib uri="/webapp/DataTags.tld" prefix="jbo" %>
    <jbo:ApplicationModule id="NewBC4J.NewBC4JModule" configname="NewBC4J.NewBC4JModule.NewBC4JModuleLocal" />
    <jbo:DataSource id="app_vo" appid="NewBC4J.NewBC4JModule" viewobject="ApplicationsView" />
    <jbo:Row id="myrow" datasource="app_vo" rowkeyparam="RowKeyValue" action="Find">
    <jbo:SetAttribute dataitem="*"/>
    </jbo:Row>
    <table width="100%" bgcolor="skyblue" border="0" align="center">
    <tr>
    <td>
    <table width="100%" bgcolor="tan" border="0" align="center" cellpadding="3" cellspacing="0">
    <form NAME="iForm" action="app_edit_post.jsp">
    <tr>
    <th colspan="2">
    "Edit/Delete Applications"
    </th>
    </tr>
    <jsp:include page="Message.jsp" flush="true">
    <jsp:param name="colspan" value="2"/>
    </jsp:include>
    <tr>
    <td align="right"><b><font color="red"> Name:</font></b></td>
    <td> <jbo:InputText datasource="app_vo" dataitem="Name" cols="50" />
    </td>
    </tr>
    <tr>
    <td align="Right"><b><font color="red"> Description: </font></b></td>
    <td> <jbo:InputTextArea datasource="app_vo" dataitem="AppDesc" cols="50" rows="5" />
    </td>
    </tr>
    </table>
    <!-- Create a table for the save and Delete Buttons -->
    <table width="100%" bgcolor="skyblue" align="center" cellpadding="10" cellspacing="0" >
    <tr>
    <input name="RowKeyValue" type="hidden" value="<jbo:ShowValue datasource="app_vo" dataitem="RowKey"/>" />
    <td>
    <input type = "submit" name="submit" value="Save">
    </td>
    </form>
    <form NAME="DelForm" action="app_del_post.jsp">
    <input name="RowKeyVal" type="hidden" value="<jbo:ShowValue datasource="app_vo" dataitem="RowKey"/>" />
    <td>
    <input type = "submit" name="submit" value="Delete">
    </td>
    </form>
    </tr>
    </table>
    </td>
    </tr>
    </table>
    </BODY>
    </HTML>
    <jbo:ReleasePageResources releasemode="Stateful" />
    3. Third source file app_edit_post.jsp (ALlows saving the changes made to a specific record)
    <%@ page contentType="text/html;charset=ISO-8859-1"%>
    <HTML>
    <BODY>
    <%@ taglib uri="/webapp/DataTags.tld" prefix="jbo" %>
    <jbo:ApplicationModule id="NewBC4J.NewBC4JModule" configname="NewBC4J.NewBC4JModule.NewBC4JModuleLocal" />
    <jbo:DataSource id="app_vo" appid="NewBC4J.NewBC4JModule" viewobject="ApplicationsView" ></jbo:DataSource>
    <%
    try
    %>
    <jbo:Row id="row3" datasource="app_vo" rowkeyparam="RowKeyValue" action="Update" >
    <jbo:SetAttribute dataitem="*" />
    </jbo:Row>
    <jbo:Commit appid="NewBC4J.NewBC4JModule" />
    <p><font face="Arial, Helvetica, sans-serif"><b><font color="006699">Application Successfully Updated</b></font></font> </p>
    <%
    catch(Exception exc)
    out.println("<pre> ");
    exc.printStackTrace(new java.io.PrintWriter(out));
    out.println("</pre>");
    %>
    <br>
    <br>
    <form action="app_ListApps.jsp" method="post"><input type="submit" value="Click to Continue"></form
    <jbo:ReleasePageResources releasemode="Stateful" />
    </BODY>
    </HTML>
    null

    I would not expect the 'back' button to automatically refresh the page. This button basically traverses the history of pages. Since Tomcat is caching your pages, you can try to control it's interaction with the browser by:
    1. Adding cache control pragmas to the returned content so it doesn't get cached.(look at www.w3c.org at the HTTP spec)
    2. dont rely on the back button, place a link on your pages to go back to the list page.
    3. change your cache control settings in your browser to check for a new page every time a url is visited.

  • Strange behavior of JTable with TableCellRender.

    Hi, all!
    i am creating a graphic application using Swing. i wanna use a single column table to display list of pictures.
    JScrollPane tablePane = new JScrollPane();
    TableValues tv = new TableValues(TableValues.TYPE_FRAME);
    JTable picTable = new JTable(tv);
    picTable.setCellSelectionEnabled(true);
    TableColumnModel tcm = picTable.getColumnModel();
    TableColumn tc = tcm.getColumn(0);
    tc.setCellRenderer(new PicRender());
    tablePane.setViewportView(picTable);
    this.getContentPane().add(tablePane);
    When i run the code, the JTable seems refreshing the cells at all the time! (And i did not click anything or move the cursor above the table).
    and CPU time runs as high as 99%!
    Please help. Thank you in advance.
    the following is my TableCellRender:
    public class PicRender extends JLabel implements TableCellRenderer {
    static Border selectedBorder = BorderFactory.createBevelBorder(BevelBorder.RAISED, Color.magenta, Color.magenta);
    static Border unselectedBorder = BorderFactory.createEmptyBorder();
    static int counter = 0;
    public PicRender() {
    super();
    System.out.println("Creating label");
    public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int col) {
    try {
    TableValues tv = (TableValues) table.getModel();
    BufferedImage image = tv.getPic(row);
    int imageHeight = image.getHeight();
    int imageWidth = image.getWidth();
    Icon icon = new ImageIcon(image);
    //setIcon(icon);
    setText("#" + row);
    setToolTipText(tv.getToolTip(row));
    table.setRowHeight(row, imageHeight + 10);
    setHorizontalAlignment(SwingConstants.CENTER);
    if(isSelected) {
    setBorder(selectedBorder);
    }else{
    setBorder(unselectedBorder);
    catch (Exception ex) {
    setIcon(null);
    setText("Thumbnails N/A");
    System.out.println("Paint: " + row + "\t" + (++counter));
    return this;
    * The following methods copied from Sun's DefaultTableCellRender.java.
    * Overridden for performance reasons.
    public void validate() {}
    public void revalidate() {}
    public void repaint(long tm, int x, int y, int width, int height) {}
    public void repaint(Rectangle r) {}
    protected void firePropertyChange(String propertyName, Object oldValue,
    Object newValue) {
    // Strings get interned...
    if (propertyName == "text") {
    // super.firePropertyChange(propertyName, oldValue, newValue);
    public void firePropertyChange(String propertyName, boolean oldValue,
    boolean newValue) {}

    It is probably related to the fact that you are setting the tables row height in the renderer this will fire a render message when the height changes. One height is applied to all rows of a table. This means that is you have images of different heights you are continually changing the tables row height and therefore continually rendereing.
    My approach would be to have all the images fit into a set size ( say 64*64 ( with scaling if neccesary ) you could then have a popup show the full size image if required.

  • Strange behavior with DefaultCellEditor

    Hello everybody,
    I found a strange behavior with DefaultCellEditor using a JTextField in a JTable. The following line will show, what I mean:
    setDefaultCellEditor(String.class,new DefaultCellEditor(new JTextField()));
    Imho this should do the same as JTable does already, when it installs a JTextField as default cell editor for cell values of the String class. But, it seems, that it is not the same:
    When I add this line in the constructor of a JTable subclass the editor component seems to be less wide and less high to the right and bottom - it looks so with Win95 with JDK 1.4.0 - but with Win2000 it is correct for example.
    My question is - how can it be, that the normal default cell editor does not have this behavior but when I use the line above, it is displayed in the wrong way?- What does the default cell editor in another way than I do it, that it has not this ugly display?
    I would like to look in the sources, but unfortunately I can't find the source code in JDK 1.4.0 - perhaps you have a hint, where to find it.
    greetings Marsian

    It seems the Label doesn't like it, that it is in a GridCell with rowspan = 2
    If it is in a normal cell (no rowspan), it works.
    If I add ColumnConstraints to the gridpane, it kind of works, but the Label still occupies more space than it should.
    Edited by: csh on 19.07.2012 03:51

  • PageCheckSeconds not working in WLS 5.1SP11. Strange behavior..

              Hello All,
              We are using Weblogic 5.1 SP11 and I am seeing a strange behavior when I use the
              JSPC pre-compiler.
              Using JSPC compiler, I get class/source files in the workingDir that have two underscores
              prepended to the file name...Eg : index.jsp is translated into __index.java and pre-compiled
              into __index.class. Now when i start the webserver and
              then access this page, it does a re-compile and then
              creates class files and source files that have one underscore prepended to the file
              name Eg : index.jsp is precompiled into index.java and index.class.
              Also, the byte sizes of the two classfiles are different...What is the reason for
              this occurence ??....I looked at index.jsp and it does not contain a <jsp:include>
              that could have potentially explained the issue...
              I have set the pageCheckSeconds in the weblogic.properties file to -1 and also we
              are using the exploded directory format....
              Could someone please explain this phenomenon with WLS ??...How do
              you let WLS know about the pre-compiled classes ???...
              By JSPC Compiler
              Name               Size          Time
              __index.java     129 kB     3.06 PM
              __index.class      34 kB          3.07 PM
              By the Server on Request
              Name               Size          Time
              _index.java          146 kB             3.22 PM
              _index.class             36 kB          3.22 PM
              Please let me know if more information is needed....
              Thanks,
              Venkat
              

    Hi.
              Hmmm, hard to say. Please open a case with support on this.
              Regards,
              Michael
              Venkat K wrote:
              > Mike,
              >
              > Thanks for your reply.
              >
              > I did check again to make sure that weblogic510sp11.jar
              > is in the front. Any other suggestions ??
              >
              > Thanks,
              > Venkat
              >
              > Michael Young <[email protected]> wrote:
              > >Hi.
              > >
              > >When you invoke weblogic.jspc from the command line do you have weblogic510sp11.jar
              > >at the front
              > >of your classpath?
              > >
              > >One possibility might be that you have sp11 applied when running WLS but
              > >not when you compile
              > >from the command line, or vice versa.
              > >
              > >Regards,
              > >Michael
              > >
              > >Venkat K wrote:
              > >
              > >> Hello All,
              > >>
              > >> We are using Weblogic 5.1 SP11 and I am seeing a strange behavior when
              > >I use the
              > >> JSPC pre-compiler.
              > >>
              > >> Using JSPC compiler, I get class/source files in the workingDir that have
              > >two underscores
              > >> prepended to the file name...Eg : index.jsp is translated into __index.java
              > >and pre-compiled
              > >> into __index.class. Now when i start the webserver and
              > >> then access this page, it does a re-compile and then
              > >> creates class files and source files that have one underscore prepended
              > >to the file
              > >> name Eg : index.jsp is precompiled into index.java and index.class.
              > >>
              > >> Also, the byte sizes of the two classfiles are different...What is the
              > >reason for
              > >> this occurence ??....I looked at index.jsp and it does not contain a <jsp:include>
              > >> that could have potentially explained the issue...
              > >>
              > >> I have set the pageCheckSeconds in the weblogic.properties file to -1
              > >and also we
              > >> are using the exploded directory format....
              > >>
              > >> Could someone please explain this phenomenon with WLS ??...How do
              > >> you let WLS know about the pre-compiled classes ???...
              > >>
              > >> By JSPC Compiler
              > >> Name Size Time
              > >> __index.java 129 kB 3.06 PM
              > >> __index.class 34 kB 3.07 PM
              > >>
              > >> By the Server on Request
              > >> Name Size Time
              > >> _index.java             146 kB          3.22 PM
              > >> _index.class            36 kB           3.22 PM
              > >>
              > >> Please let me know if more information is needed....
              > >>
              > >> Thanks,
              > >> Venkat
              > >
              > >--
              > >Michael Young
              > >Developer Relations Engineer
              > >BEA Support
              > >
              > >
              Michael Young
              Developer Relations Engineer
              BEA Support
              

  • Stopping cell editing in a JTable using a JComboBox editor w/ AutoComplete

    Hi there! Me again with more questions!
    I'm trying to figure out the finer parts of JTable navigation and editing controls. It's getting a bit confusing. The main problem I'm trying to solve is how to make a JTable using a combo box editor stop editing by hitting the 'enter' key in the same fashion as a JTextField editor. This is no regular DefaultCellEditor though -- it's one that uses the SwingX AutoCompleteDecorator. I have an SSCCE that demonstrates the issue:
    import java.awt.Component;
    import java.awt.EventQueue;
    import javax.swing.AbstractCellEditor;
    import javax.swing.JComboBox;
    import javax.swing.JFrame;
    import javax.swing.JTable;
    import javax.swing.WindowConstants;
    import javax.swing.table.DefaultTableModel;
    import javax.swing.table.TableCellEditor;
    import javax.swing.table.TableModel;
    import org.jdesktop.swingx.autocomplete.AutoCompleteDecorator;
    public class AutoCompleteCellEditorTest extends JFrame {
      public AutoCompleteCellEditorTest() {
        JTable table = new JTable();
        Object[] items = {"A", "B", "C", "D"};
        TableModel tableModel = new DefaultTableModel(2, 2);
        table.setModel(tableModel);
        table.getColumnModel().getColumn(0).setCellEditor(new ComboCellEditor(items));
        getContentPane().add(table);
        setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
        pack();
      private class ComboCellEditor extends AbstractCellEditor implements TableCellEditor {
        private JComboBox comboBox;
        public ComboCellEditor(Object[] items) {
          this.comboBox = new JComboBox(items);
          AutoCompleteDecorator.decorate(this.comboBox);
        public Object getCellEditorValue() {
          return this.comboBox.getSelectedItem();
        public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) {
          comboBox.setSelectedItem(value);
          return comboBox;
      public static void main(String[] args) {
        EventQueue.invokeLater(new Runnable() {
          public void run() {
            new AutoCompleteCellEditorTest().setVisible(true);
    }Problem 1: Starting to 'type' into the AutoCompleteDecorate combo box doesn't cause it to start editing. You have to hit F2, it would appear. I've also noticed this behaviour with other JComboBox editors. Ideally that would be fixed too. Not sure how to do this one.
    Problem 2: After editing has started (say, with the F2 key), you may start typing. If you type one of A, B, C, or D, the item appears. That's all good. Then you try to 'complete' the edit by hitting the 'enter' key... and nothing happens. The 'tab' key works, but it puts you to the next cell. I would like to make the 'enter' key stop editing, and stay in the current cell.
    I found some stuff online suggesting you take the input map of the table and set the Enter key so that it does the same thing as tab. Even though that's not exactly what I desired (I wanted the same cell to be active), it didn't work anyway.
    I also tried setting a property on the JComboBox that says that it's a table cell editor combo box (just like the DefaultCellEditor), but that didn't work either. I think the reason that fails is because the AutoCompleteDecorator sets isEditable to true, and that seems to stop the enter key from doing anything.
    After tracing endless paths through processKeyBindings calls, I'm not sure I'm any closer to a solution. I feel like this should be a fairly straightforward thing but I'm having a fair amount of difficulty with it.
    Thanks for any direction you can provide!

    Hi Jeanette,
    Thanks for your advice. I looked again at the DefaultCellEditor. You are correct that I am not firing messages for fireEditingStopped() and fireEditingCancelled(). Initially I had copied the behaviour from DefaultCellEditor but had trimmed it out. I assumed that since I was extending AbstractCellEditor and it has them implemented correctly that I was OK. But I guess that's not the case! The problem I'm having with implementing the Enter key stopping the editing is that:
    1) The DefaultCellEditor stops cell editing on any actionPerformed. Based on my tests, actionPerformed gets called whenever a single key gets pressed. I don't want to end the editing on the AutoCompleteDecorated box immediately -- I'd like to wait until the user is happy with his or her selection and has hit 'Enter' before ending cell editing. Thus, ending cell editing within the actionPerformed listener on the JComboBox (or JXComboBox, as I've made it now) will not work. As soon as you type a single key, if it is valid, the editing ends immediately.
    2) I tried to add a key listener to the combo box to pick up on the 'Enter' key and end the editing there. However, it appears that the combo box does not receive the key strokes. I guess they're going to the AutoCompleteDecorator and being consumed there so the combo box does not receive them. If I could pick up on the 'Enter' key there, then that would work too.
    I did more reading about input maps and action maps last night. Although informative, I'm not sure how far it got me with this problem because if the text field in the AutoCompleteDecorator takes the keystroke, I'm not sure how I'm going to find out about it in the combo box.
    By the way, when you said 'They are fixed... in a recent version of SwingX', does that mean 1.6.2? That's what I'm using.
    Thanks!
    P.S. - Maybe I should create a new question for this? I wanted to mark your answer as helpful but I already closed the thread by marking the answer to the first part as correct. Sorry!
    Edited by: aardvarkk on Jan 27, 2011 7:41 AM - Added SwingX versioning question.

  • Adding custom navigation rules results in strange behavior

    Hello,
    We'd like to add navigation rules to our application. To avoid post-JHeadstart-generation-steps we created an extra faces-config-custom.xml file which contains the navigation rules. When adding this file to the web.xml and run the aplication we encounter strange behavior
    - Errors are shown in duplicate
    - 'Transaction completed' messages are not shown
    Try adding the underneath faces-config-custom.xml to a standard HR demo project and you will get the same behavior.
    (1) What is the reason of this strange behavior?
    (2) How can we add custom navigation rules, without having to do post creation steps?
    Regards Leon
    [faces-config-custom.xml]
    <?xml version="1.0" encoding="windows-1252" ?>
    <!DOCTYPE faces-config PUBLIC
    "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
    "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
    <faces-config xmlns="http://java.sun.com/JSF/Configuration">
    <navigation-rule>
    <from-view-id>*</from-view-id>
    <navigation-case>
    <from-outcome>BezwaarVerzoeken</from-outcome>
    <to-view-id>/pages/inboeken/BezwaarVerzoeken.jspx</to-view-id>
    </navigation-case>
    <navigation-case>
    <from-outcome>LosseOpdrachten</from-outcome>
    <to-view-id>/pages/inboeken/LosseOpdrachten.jspx</to-view-id>
    </navigation-case>
    </navigation-rule>
    </faces-config>
    [Add faces-config-custom.xml to web.xml]
    <context-param>
    <param-name>javax.faces.CONFIG_FILES</param-name>
    <param-value>/WEB-INF/faces-config-custom.xml,...

    Leon,
    When you perform a drag and drop operation, JDeveloper adds the following lines to the faces-config.xml:
    <lifecycle>
    <phase-listener>
    Oracle.adf.controller.faces.lifecycle.ADFPhaselistener
    </phase-listener>
    </lifecycle>
    However, JHeadstart uses its own subclass of ADFPhaselistener, and defines the lifecycle element in JhsCommon-beans.xml. Due to a bug in ADF, ADF does not look for the lifecycle element in other files than faces-config, and adds its own element in faces-config.xml If you remove these lines, everything works fine again.
    To prevent this from happening again, you can move the following entry from JhsCommon-beans.xml to faces-config.xml:
    <lifecycle> <phase-listener>oracle.jheadstart.controller.jsf.lifecycle.JhsADFPhaseListener</phase-listener>
    </lifecycle>
    And then make a custom template for JhsCommon-beans.vm where you remove this entry.
    Steven Davelaar,
    JHeadstart team.

  • Strange behavior after using NIK plug-ins

    Every once in a while I encounter this strange behavior of Aperture. I first process the NEF's in Aperture (white balance, Exposure, Enhance... and, when needed, Cropping) and then I fine tune the image with the NIK plug-ins; when needed DfIne 2.0, Viveza, Color Efex Pro 3.0 and Sharpener Pro 3.0 Output Sharpener.
    If I look at the processed picture then, I get a perfect presentation of the photo;
    !http://users.skynet.be/fc419085/Aperture-1.jpg!
    But when I press Z to zoom into a 100% preview I get this;
    !http://users.skynet.be/fc419085/Aperture-2.jpg!
    When I select the Loup in the normal view mode I get this;
    !http://users.skynet.be/fc419085/Aperture-3.jpg!
    This doesn't happen with all my pictures, yesterday I processed a series of 8 pictures an 6 of them showed this behavior the other two acted normal and I can't see what I did differently whit these last two.
    When I export the strangely behaving photo's to a Tiff or a Jpeg, I get perfectly normal pictures.
    The original NEF behaves normal. I have seen this behavior with NEF's from a Nikon D200, D2x and a D300. I have Aperture 2.1.2 running on a 2.33 GHz Intel Core Duo MacBook Pro running Mac OS X 10.5.6
    Does anybody know what's happening and if so, how to solve this problem?
    Cheers,
    Ivan

    I did some testing and what I found is too weird to be true.
    First this mashed up look doesn't only happen after using NIK plug-ins, it also happens when making a roundtrip to Photoshop, given that certain conditions are met.
    Give it a try yourself. Crop an image to an uneven pixelcount dimension, for example 4227 x 2797 and make a roundtrip to Photoshop. Then have a 100% view look at the new image in Aperture. You'll have a mashed up view, at least I do.
    Now crop the same original image to an even pixelcount dimension, for example 4228 x 2798 and make an roundtrip to Photoshop once more. When you have a 100% view of the new image now, you'll see a perfectly normal photo.
    Do you think Aperture developers are reading this forum?

  • Strange Behavior of program while using BAPI_PO_CREATE1

    Hello SAP GURUs,
    I've created an Upload Program using BAPI_PO_CREATE1 for Mass Service PO Creation.
    When I execute the program and Specify the File for uploading, It Gives me errors as
    E     BAPI     1     No instance of object type PurchaseOrder has been created. External reference:
    E     MEPO     0     Purchase order still contains faulty items
    E     6     436     In case of account assignment, please enter acc. assignment data for item
    But when I come back to Selection Screen of the Program and specify the SAME FILE AGAIN and Execute,
    The Program runs successfully and generates the PO number.
    I have never seen such strange behavior in any BAPIs before.
    Pls help..

    PERFORM refresh_tables.
      PERFORM fill_tables.
    END-OF-SELECTION.
    Display the Summary as an ALV Grid Display
      IF NOT ig_mymssg[] IS INITIAL.
        PERFORM display_basic_list . "Grid Display
      ELSE.
        MESSAGE s000 WITH 'No data exists'(051).
        STOP.
      ENDIF.
    *&      Form  refresh_tables
          text
    -->  p1        text
    <--  p2        text
    FORM refresh_tables .
      REFRESH:   ig_fieldcat,
                 ig_mymssg,
                 poitem,
                 poitemx,
                 poaccount,
                 poaccountx,
                 poservices,
                 ig_return.
                wt_itab,  record,  record2 .
    ENDFORM.                    " refresh_tables
    *&      Form  fill_tables
          text
    -->  p1        text
    <--  p2        text
    FORM fill_tables .
      record2[] = record[].
      record3[] = record[].
      DELETE ADJACENT DUPLICATES FROM record COMPARING id_no.
      DELETE ADJACENT DUPLICATES FROM record2 COMPARING id_no po_item.
      SELECT MAX( packno ) FROM esll INTO wrk_packno.
      LOOP AT record.
        CLEAR : poheader, poheaderx, wa_poitem, wa_poitemx, wa_poservices, wa_poaccount, wa_poaccountx, wa_poschedulex, wa_poschedule.
        REFRESH: poitem, poitemx, poaccount, poaccountx, poservices, ig_return,  posrvaccessvalues, poschedule, poschedulex.
        PERFORM po_header.
        LOOP AT record2 WHERE id_no = record-id_no.
          wrk_packno = wrk_packno + 1.
          PERFORM po_item.
          PERFORM po_scheudle.
          PERFORM acc_assignment.
          PERFORM po_services.
        ENDLOOP.
        PERFORM create_po.
      ENDLOOP.
    ENDFORM.                    " fill_tables
    *&      Form  display_basic_list
          text
    -->  p1        text
    <--  p2        text
    FORM display_basic_list .
      g_repid = sy-repid.
      PERFORM f2000_fieldcat_init .
      PERFORM display_alv_grid_1.
    ENDFORM.                    " display_basic_list
    *&      Form  f2000_fieldcat_init
          text
    -->  p1        text
    <--  p2        text
    FORM f2000_fieldcat_init .
      REFRESH ig_fieldcat.
      PERFORM fill_fields_of_fieldcatalog USING 'IG_MYMSSG'
                                                  'STATUS'
                                                    c_x
                                                    'Status'
                                                    '10'.
      PERFORM fill_fields_of_fieldcatalog USING 'IG_MYMSSG'
                                                'RECORD'
                                                c_x
                                                'Record'
                                                '20'.
      PERFORM fill_fields_of_fieldcatalog USING 'IG_MYMSSG'
                                                'ERRMSG'
                                                'Message'
                                                '100'.
    ENDFORM.                    " f2000_fieldcat_init
    *&      Form  display_alv_grid_1
          text
    -->  p1        text
    <--  p2        text
    FORM display_alv_grid_1 .
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program = g_repid
          i_structure_name   = 'IG_MYMSSG'
          i_grid_title       = 'LOG'
          is_layout          = wg_layout
          it_fieldcat        = ig_fieldcat[]
          i_save             = c_save
        TABLES
          t_outtab           = ig_mymssg
        EXCEPTIONS
          program_error      = 1
          OTHERS             = 2.
      IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    ENDFORM.                    " display_alv_grid_1
    *&      Form  fill_fields_of_fieldcatalog
          text
         -->P_0626   text
         -->P_0627   text
         -->P_C_X  text
         -->P_0629   text
         -->P_0630   text
    FORM fill_fields_of_fieldcatalog  USING    p_tabname TYPE slis_tabname
                                               p_field TYPE slis_fieldname
                                               p_key TYPE c
                                               p_name
                                               len.
    To fill in the fields of the table fieldcatalog depending on the field
      CLEAR wg_fieldcat.
      wg_fieldcat-fieldname = p_field. " The field name and the table
      wg_fieldcat-tabname = p_tabname.. " name are the two minimum req
      wg_fieldcat-key = p_key. " Specifies the column as a key
      wg_fieldcat-seltext_l = p_name. " Column Header
      wg_fieldcat-outputlen = len.
      APPEND wg_fieldcat TO ig_fieldcat.
    ENDFORM.                    " fill_fields_of_fieldcatalog
    *&      Form  create_po
          text
    -->  p1        text
    <--  p2        text
    FORM create_po .
      CLEAR : wg_return.
      REFRESH : ig_return.
      CALL FUNCTION 'BAPI_PO_CREATE1'
        EXPORTING
          poheader          = poheader
          poheaderx         = poheaderx
        IMPORTING
          exppurchaseorder  = po_no
        TABLES
          return            = ig_return
          poitem            = poitem
          poitemx           = poitemx
          poschedule        = poschedule
          poschedulex       = poschedulex
          poaccount         = poaccount
          poaccountx        = poaccountx
          poservices        = poservices
          posrvaccessvalues = posrvaccessvalues.
      SORT ig_return BY type.
      READ TABLE ig_return INTO wg_return WITH KEY type = 'S'.
      IF sy-subrc EQ 0.
        CLEAR : wg_return.
        REFRESH : ig_return.
        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
        CLEAR wg_errmsg.
        WRITE icon_green_light AS ICON TO wg_errmsg-status.
        CONCATENATE record-id_no po_no INTO wg_errmsg-record SEPARATED BY '/'.
       wg_errmsg-record = po_no.
        wg_errmsg-errmsg = 'PO created'.
        APPEND wg_errmsg TO ig_mymssg.
      ELSE.
        CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
        READ TABLE ig_return INTO wg_return WITH KEY type = 'E' TRANSPORTING message.
        CLEAR wg_errmsg.
        WRITE icon_red_light AS ICON TO wg_errmsg-status.
        wg_errmsg-record = record-id_no.
        wg_errmsg-errmsg = wg_return-message.
        APPEND wg_errmsg TO ig_mymssg.
      ENDIF.
    ENDFORM.                    " create_po
    *&      Form  po_header
          text
    -->  p1        text
    <--  p2        text
    FORM po_header .
      poheader-comp_code   = record-comp_code.
      poheader-doc_type    = record-doc_type.
      poheader-vendor      = record-vendor.
      poheader-purch_org   = 'SERV'.
      poheader-pur_group   = record-pur_group.
      poheader-currency    = 'INR'.
      poheaderx-comp_code   = 'X'.
      poheaderx-doc_type    = 'X'.
      poheaderx-vendor      = 'X'.
      poheaderx-purch_org   = 'X'.
      poheaderx-pur_group   = 'X'.
      poheaderx-currency    = 'X'.
    ENDFORM.                    " po_header
    *&      Form  po_item
          text
    -->  p1        text
    <--  p2        text
    FORM po_item .
    DATA : days TYPE num2.
    DATA : final_dt TYPE datum.
    DATA : is_ok TYPE boole_d.
    DATA : msg_hndlr TYPE REF TO if_hrpa_message_handler.
    days = 20.
    CALL FUNCTION 'HR_ECM_ADD_PERIOD_TO_DATE'
       EXPORTING
         orig_date       = sy-datum
         num_days        = days
         signum          = '+'
         message_handler = msg_hndlr
       IMPORTING
         result_date     = final_dt
         is_ok           = is_ok.
      CLEAR: wa_poitem,wa_poitemx.
      wa_poitem-po_item      = record2-po_item.
      wa_poitem-short_text   = record2-short_text.
      wa_poitem-plant        = record2-plant.
      wa_poitem-matl_group   = 'S001'.
      wa_poitem-tax_code     = 'LA'.
      wa_poitem-item_cat     = item_cat.
      wa_poitem-pckg_no      = wrk_packno.
      wa_poitem-acctasscat   = acctasscat.
    wa_poitem-gr_to_date   = final_dt.
      APPEND wa_poitem TO poitem.
      wa_poitemx-po_item      = record2-po_item.
      wa_poitemx-po_itemx      = 'X'.
      wa_poitemx-short_text   = 'X'.
      wa_poitemx-plant        = 'X'.
      wa_poitemx-tax_code     = 'X'.
      wa_poitemx-item_cat     = 'X'.
      wa_poitemx-acctasscat   = 'X'.
      wa_poitemx-pckg_no      = 'X'.
      wa_poitemx-matl_group   = 'X'.
      wa_poitem-gr_to_date    = 'X'.
      APPEND wa_poitemx TO poitemx.
    ENDFORM.                    " po_item
    *&      Form  PO_SERVICES
          text
    -->  p1        text
    <--  p2        text
    FORM po_services .
      CLEAR: wa_poservices, wa_posrvaccessvalues.
      wa_poservices-pckg_no = wrk_packno.
      wa_poservices-line_no  = '0000000001'.
      wa_poservices-outl_ind = 'X'.
      wa_poservices-subpckg_no = wa_poservices-pckg_no + 1.
      wa_poservices-from_line = '000001'.
      APPEND wa_poservices TO poservices.
      CLEAR wa_poservices.
      wrk_packno = wrk_packno + 1.
      wa_poservices-pckg_no = wrk_packno.
      wa_poservices-line_no  = '0000000002'.
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
        EXPORTING
          input  = record2-service
        IMPORTING
          output = record2-service.
      wa_poservices-ext_line = '0000000010'.
      wa_poservices-service  = record2-service.
      wa_poservices-quantity = record2-quantity.
      wa_poservices-gr_price = record2-gr_price.
      wa_posrvaccessvalues-pckg_no = wrk_packno.
      wa_posrvaccessvalues-line_no = '0000000002'.
      wa_posrvaccessvalues-serial_no = '01'.
      wa_posrvaccessvalues-serno_line = '01'.
    wa_posrvaccessvalues-quantity = record2-quantity.
    wa_posrvaccessvalues-net_value = record2-gr_price.
      APPEND wa_poservices TO poservices.
      APPEND wa_posrvaccessvalues TO posrvaccessvalues.
    ENDFORM.                    " PO_SERVICES
    *&      Form  ACC_ASSIGNMENT
          text
    -->  p1        text
    <--  p2        text
    FORM acc_assignment .
      DATA : tmp_gl LIKE bapimepoaccount-gl_account.
      tmp_gl = '400265'.
      CLEAR : wa_poaccount, wa_poaccountx.
      wa_poaccount-po_item      =  record2-po_item.
      wa_poaccount-serial_no    = '01'.
      wa_poaccount-co_area      = '1000'.
      wa_poaccount-quantity     = record2-quantity.
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
        EXPORTING
          input  = tmp_gl
        IMPORTING
          output = wa_poaccount-gl_account.
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
        EXPORTING
          input  = record2-orderid
        IMPORTING
          output = wa_poaccount-orderid.
      APPEND wa_poaccount TO poaccount.
      wa_poaccountx-po_item      = record2-po_item.
      wa_poaccountx-serial_no    = '01'.
      wa_poaccountx-co_area      = 'X'.
      wa_poaccountx-quantity     = 'X'.
      wa_poaccountx-gl_account   = 'X'.
      wa_poaccountx-orderid      = 'X'.
      APPEND wa_poaccountx TO poaccountx.
    ENDFORM.                    " ACC_ASSIGNMENT
    *&      Form  PO_SCHEUDLE
          text
    -->  p1        text
    <--  p2        text
    FORM po_scheudle .
      CLEAR : wa_poschedule, wa_poschedulex.
      wa_poschedule-po_item = record2-po_item.
      wa_poschedule-sched_line = '0001'.
    wa_poschedule-del_datcat_ext = 'D'.
      wa_poschedule-delivery_date = sy-datum.
      wa_poschedule-quantity = record2-quantity.
      APPEND wa_poschedule TO poschedule.
      wa_poschedulex-po_item = record2-po_item.
      wa_poschedulex-sched_line = '0001'.
      wa_poschedulex-po_itemx = 'X'.
      wa_poschedulex-sched_linex = 'X'.
    wa_poschedulex-del_datcat_ext = 'X'
      wa_poschedulex-delivery_date = 'X'.
      wa_poschedulex-quantity = 'X'.
      APPEND wa_poschedulex TO poschedulex.
    ENDFORM.                    " PO_SCHEUDLE

  • Strange Behavior with gMSA in Server 2012 R2

    Greetings,
    I have been doing some testing with gMSA Accounts in a Server 2012 R2 environment (two separate environments, actually), and I have noticed something very strange that occurred in both environments, which does not appear to be occurring in one of our customer's
    self-managed environments.
    We created a Group Managed Service Account using the following article:
    http://blogs.technet.com/b/askpfeplat/archive/2012/12/17/windows-server-2012-group-managed-service-accounts.aspx
    Everything went smoothly, and the account installs/tests successfully on both of the hosts that we are testing on. I am able to set my services to run under the account, and most of them appear to work fine. I am having some issues with a few of my services,
    and I believe that the strange behavior I am seeing may have something to do with this - described below: 
    As soon as I set the service's Log On Account (via the Log On Tab under the Service's Properties), the entirety of the "Log On" tab changes to "greyed out," and I am unable to change the Log On account back via the GUI (Screenshot
    attached).
    I found that I am able to successfully change the account via Command Line using sc.exe, but the Log On tab remains greyed out! So far, I have found nothing to remedy this, but confirmed that it happens for any service I set to use the gMSA as the Logon
    Account, and that it happens in 2 separate test environments, but not in a Customer's production environment - very strange.
    All servers in this environment are running Server 2012 R2, and domain Functional Level is currently Server 2012.
    I have been unable to find any information online about this behavior, so I am hoping someone has seen this before, and can explain why this is happening.
    Nick

    VIvian,
    Yes, we used the Install-AdServiceAccount gMSA command on each host using the gMSA account, and then ran Test-AdServiceAccount gMSA, which returned "True."
    However, one thing I noticed is that if I run Test-ADServiceAccount gMSA as a Local Administrator, it fails with the following:
    PS C:\Users\Administrator> Test-AdServiceAccount gMSA$
    Test-AdServiceAccount : The server has rejected the client credentials.
    At line:1 char:1
    + Test-AdServiceAccount gMSA$
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : SecurityError: (:) [Test-ADServiceAccount], AuthenticationException
        + FullyQualifiedErrorId : ActiveDirectoryCmdlet:System.Security.Authentication.AuthenticationException,Microsoft.A
       ctiveDirectory.Management.Commands.TestADServiceAccount
    If I run Test-ADServiceAccount gMSA as Domain Administrator, it returns true:
    PS C:\Users\Administrator.<domainname>> Test-AdServiceAccount gMSA$
    True
    Is this normal?
    Overall, I think the issue I am running into is at the Application Level, and not a problem with the gMSA, as it appears to be working. (Can Start/Stop services without any issues). I will be investigating my issue further with 3rd-party vendors, unless
    you think there is something wrong with my gMSA accounts based on the information I have provided.
    Nick

  • Strange Behavior in modifying the values in VO

    I have a VO based on EO from a custom table. The query is something like:
    select EO.x, EO.y, (EO.x*EO.y) xy from EO
    I have displayed the values from this VO on to a table in OAF page. All the columns are messageTextInput but the third column (xy) is read-only. I have written a fireAction to execute when x or y values are changed to update the xy value accordingly.
    Code in CO:
    if ("ValueChange".equals(pageContext.getParameter(EVENT_PARAM)))
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    am.invokeMethod("UpdateXY");
    pageContext.forwardImmediately(<Same Page>, null,
    OAWebBeanConstants.KEEP_MENU_CONTEXT,
    null, null, true,
    OAWebBeanConstants.ADD_BREAD_CRUMB_NO);
    Code in AM:
    public void UpdateXY()
    xxVOImpl vo = getxxVO1();
    Row r = vo.first();
    while (vo.hasNext())
    r = vo.next();
    Object X = r.getAttribute("X");
    String X_string = X.toString();
    float X_value = Float.parseFloat(X_string);
    Object Y = r.getAttribute("Y");
    String Y_string = Y.toString();
    float Y_value = Float.parseFloat(Y_string);
    Float XY = new Float(X_value*Y_value);
    r.setAttribute("XY",(Object)XY);
    The problem is as follows. During the first time I try to update a value, the control goes through the logic and returns to the page but the XY value is not updated. But if i change a second value and tab out, the codes works and displays both the updated values of XY. From then on, the code is working fine.
    I'm also not updating the first row and so I didnt perform any logic in AM for the first row.
    Please help me out in finding out the reason for this strange behavior.

    This nature is fine, basically initially your EO x and y columns are null and unless you do a commit, these values don't go in db. The third column will take x and Y coumns values from db and multiply and will get null.
    To solve this issue, you get the values from VO columns x and y in PPR and and put x*y in the third column of Vo, IN THAT ROW.or you can directly get hold of the bean which hold the value of x*y and use setValue after getting x*y.
    ---Mukul

  • Strange behavior of BAPI_SALESORDER_SIMULATE

    Hi All,
    I am using standard BAPI - BAPI_SALESORDER_SIMULATE , to simulate the sales order creation.
    But this BAPI gives strange behavior for different customers but same material combination.
    I get incorrect schedule line for one customer.
    The material is a non-stock material and purchase requisition is generated for each material to vendor.
    The sales area is same for both the customers, while executing the BAPI.
    However, for same material but for different customer, schedule line appears incorrect and different for these two customers.
    Can you help me on this ?
    Thanks,
    Sarang

    Hi All,
    I am using standard BAPI - BAPI_SALESORDER_SIMULATE , to simulate the sales order creation.
    But this BAPI gives strange behavior for different customers but same material combination.
    I get incorrect schedule line for one customer.
    The material is a non-stock material and purchase requisition is generated for each material to vendor.
    The sales area is same for both the customers, while executing the BAPI.
    However, for same material but for different customer, schedule line appears incorrect and different for these two customers.
    Can you help me on this ?
    Thanks,
    Sarang

  • Strange behavior of Windows Azure Compute Emulator (SDK 2.3)

    Today, after an update of the Azure SDK from 2.2 to 2.3, I noticed that only one of the two instances of my web role is started in
    the Azure Compute Emulator, the output of the Start-AzureEmulator is this:
    VERBOSE: Starting Emulator...
    VERBOSE: Role is running at http://127.0.0.1:81/
    Role is running at tcp://127.0.0.1:3389/
    Role is running at tcp://127.0.0.1:3389/
    VERBOSE: Started
    and only one instance is started in the Azure Compute Emulator.
    But in the past was something similar to this one:
    VERBOSE: Starting Emulator...
    VERBOSE: Role is running at http://127.0.0.1:81/
    http://127.0.0.1:82/
    Role is running at tcp://127.0.0.1:3389/
    Role is running at tcp://127.0.0.1:338/
    VERBOSE: Started
    and two instances were started.
    I already found this thread:
    http://stackoverflow.com/questions/13946634/strange-behavior-of-windows-azure-compute-emulator-sdk-1-8-with-multiple-role
    but it was not useful in my case (Microsoft.WindowsAzure.Common.WorkArounds.BindToAllIpsWorkAroundEnabled is False).
    Thanks in advance for any help.
    OS: Windows 8.1
    Azure SDK: 2.3
    Azure Compute Emulator: 2.3.0.0

    Hi,
    As far as I know, powershell didn't have a parameter to start azure emulator with full express, please try to use Command-line to test, refer to
    http://msdn.microsoft.com/en-us/library/gg433130.aspx for more details, if this didn't give you help, please feel free to let me know.
    Best Regards,
    Jambor
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • IMac mouse problems / strange behavior (impossible to configure mouse preferences)

    I work in a design and communication school, the used hardware is iMac (Intel) whit Lion (OS X 10.7), we have several rooms equipped with these Macs where students light up their data on the server.
    Today, 3 of these Macs had problems with the mouse, including mine.
    Basically the clicks don´t work correctly. We cant close windows, open folders or change some options by clicking, but we can open softwares, scroll.
    In safari if i search something, when I try to click the link i want, safari opens a new tab instead the one i am at, and has other strange behaviors. So I´ve tried to change the mouse settings, and when i make a change, for example: change the scroll button to "buttun 3" the mouse automatically assumes all buttons to dashboard, but not at the configurations window because it says that scrool button still "button 3",  when i use the click or the scroll or any button it just slid me to dashboard or a setting that has nothing to do with my option.
    This is really causing a big problem since we are a school.. I already tried to change the mouse, clean, try another usb ports, search for update or restart but it still doing the same.
    I think it have something to do with an update.. but not sure.. would be really gratefull if someone knows how to solve this.
    As a temporary solution,i disabled all options using only the mouse click, but to do it, i had to plug in my tablet (that works perfectly for the record) and use it instead of mouse (since it was impossible to use it), than went to mouse preferences and disable left click, scroll and side buttons and then restart the Mac (or else it wont work)..
    it will work fine but still a problem cause I use all mouse buttons custom as well as the students...

    I have been experiencing a freezing mouse as well. I updated the mouse drivers but it is still happening. I have been repairing the permissions and noticed something very strange see the mention of a -t. I have been running unix systems since 1984 and have never seen that before....
    Determining correct file permissions.
    Permissions differ on ./Library, should be drwxrwxr-t , they are drwxrwxr-x
    Owner and group corrected on ./Library
    Permissions corrected on ./Library
    Permissions differ on ./private/var/log/secure.log, should be -rw------- , they are -rw-r-----
    Owner and group corrected on ./private/var/log/secure.log
    Permissions corrected on ./private/var/log/secure.log
    Permissions repair complete
    Permissions differ on ., should be drwxrwxr-t , they are drwxr-xr-x
    Owner and group corrected on .
    Permissions corrected on .
    The privileges have been verified or repaired on the selected volume
    I reported this to Apple and they told me to erase the hard drive reinstall the
    system. I really don't want to have to do that. It seems like something is taking
    control of the machine.....

Maybe you are looking for

  • Apple's DVI to Video adapter broken in Mavericks

    Good Day, I've been monitoring this community forum as a guest only, because IMHO registering with anything over the Internet is equivalent to giving up a piece of your soul, but I could not find anything that would help my unique situation since upg

  • Using my New MacBook Pro in Brazil - Please Help

    I recently purchased a new MacBook Pro, and plan to take it with me to Brazil next month. This is a gift for a relative of mine. Is anyone aware whether or not I need to consider addressing configuration changes to accommodate the fact that it will o

  • Refencing movie clips created dynamically

    I am adding a series of clips using attachMovie and adding a unique numeric identifier to the name of those clips by incrementing through the number of photos in an xml file using "i" as the variable and adding it to the name ("ptextHldr" + i + "_mc"

  • LDT for a Form Function

    Hi, We have a requirement to create a new form function and attach it to a menu. Can sm one let me know the FNDLOAD command for download of the ldt file for this form function thats newly created.. Thanks in advance. - Lakshmi

  • If I use TM, do I need a back-up at all?

    I mean, if my disk completely crashed permanently, can I rely on TM to re-create what I had with a new disk, in a worse case scenario? Just wondering if I am relying on TM too heavily for back-up.