Super region in SD

Hi,
is there a maintenance transaction or customization in 4.7 version for 'Super Region' and the field name is 'SUREG'..I found tables TBKS and T005T and also related views like V_T005 and V_TBKSR but could find any clue where the Super Regions are maintained for a country.
Thanks in Advance and quick reply is much appreciated..
regards
sachin

Hi,
Did you finally find where to maintain the Super Regions for a country?
Thanks in advance,
Leire

Similar Messages

  • Problems displaying deserialized components

    I'm trying to save the state of some objects which extend JComponent and JLayeredPane, and they don't all redisplay on deserializing, although they seem to be in the containment tree.
    Basically, I have a class GamePanel which extends JLayeredPane. Also classes Square and Region both of which extend JComponent and use 2D graphics for painting themselves. It seems to serialize OK (but how does one tell?). But when I deserialize, only the lower level of the GamePanel is painted. However, the higher level is populated.
    Does anyone have any idea why they're not displaying? The code is below (TestKiller and its menus are generated by NetBeans - hence the slightly odd code). There are 5 menu items (I've simplified a lot from the original so it's a bit clunky): Add Region (you can only do this once in this version), Save As which serializes to a file, Restore which deserializes from a file, Exit which is obvious and Print which outputs the containment hierarchy of GamePanel to standard output.
    If you want to try it out, fire up the program, do a File|Add to add a Region (see the dotted lines) and File|Print to see that there's a Square at level 2 and a Region at level 3. Then File|Save as... to save it. Quit the program.
    Fire it up again and do a File|Restore and a File|Print. You'll see from the output that the Square and Region are there with identical parameters to the output before, but the Region hasn't displayed its outline.
    The output's below, with java-like comments added to show what I've done:
    D:>java -jar test*
    Painting gridlayer
    // File|Add Region
    New region 1
    Selecting square
    Checking region 1
    Painting gridlayer
    Painting region 1
    //File|Print
    Printing Gamepanel components
    com.ptoye.TestSBug1.Region[Region-1,4,4,60x60,alignmentX=0.0,alignmentY=0.0,border=,flags=0,maximumSize=,minim
    umSize=,preferredSize=]
    Bounds java.awt.Rectangle[x=4,y=4,width=60,height=60]
    Layer 3
    com.ptoye.TestSBug1.Square[Square-0:0,4,4,60x60,alignmentX=0.0,alignmentY=0.0,border=,flags=16777224,maximumSi
    ze=,minimumSize=,preferredSize=]
    Bounds java.awt.Rectangle[x=4,y=4,width=60,height=60]
    Layer 2
    \\File|Save
    Saving game to bug1.ksd
    D:>java -jar test*
    Painting gridlayer
    \\File|Restore
    Restoring game bug1.ksd
    Restored
    \\File|Print - same as above but only Square is displayed
    Printing Gamepanel components
    com.ptoye.TestSBug1.Region[Region-1,4,4,60x60,alignmentX=0.0,alignmentY=0.0,border=,flags=0,maximumSize=,minim
    umSize=,preferredSize=]
    Bounds java.awt.Rectangle[x=4,y=4,width=60,height=60]
    Layer 3
    com.ptoye.TestSBug1.Square[Square-0:0,4,4,60x60,alignmentX=0.0,alignmentY=0.0,border=,flags=16777224,maximumSi
    ze=,minimumSize=,preferredSize=]
    Bounds java.awt.Rectangle[x=4,y=4,width=60,height=60]
    Layer 2
    D:>
    Please someone tell me what I'm doing wrong. As a serialization newbie it's probably something simple, but no amount of validate() and pack() makes any difference.
    The code's below - a bit long I'm afraid but it's difficult to cut it down much more and display the problem. The main class (TestKiller) was generated by NetBeans.
    * TestKiller.java
    * Created on 01 August 2006, 22:13
    package com.ptoye.TestSBug1;
    import java.io.File;
    import java.io.FileFilter;
    import java.io.FileInputStream;
    import java.io.FileNotFoundException;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.ObjectInputStream;
    import java.io.ObjectOutputStream;
    import javax.swing.JFileChooser;
    import javax.swing.JOptionPane;
    * @author  PToye
    public class TestKiller extends javax.swing.JFrame {
      private GamePanel p;
      final String fileExtension="ksd";
       * Creates new form TestKiller
      public TestKiller() {
        initComponents();
        p=new GamePanel();
        setContentPane(p);
        p.setOpaque(true);
        setSize(p.getPreferredSize());
        pack();
      public static void showMessage(String s) {
        JOptionPane.showMessageDialog(null,s,"Error",JOptionPane.ERROR_MESSAGE);
      /** This method is called from within the constructor to
       * initialize the form.
       * WARNING: Do NOT modify this code. The content of this method is
       * always regenerated by the Form Editor.
      private void initComponents() {                         
        jMenuBar1 = new javax.swing.JMenuBar();
        jmFile = new javax.swing.JMenu();
        jmiAddRegion = new javax.swing.JMenuItem();
        jSeparator2 = new javax.swing.JSeparator();
        jmiSaveAs = new javax.swing.JMenuItem();
        jmiRestore = new javax.swing.JMenuItem();
        jmiExit = new javax.swing.JMenuItem();
        jSeparator1 = new javax.swing.JSeparator();
        jmiPrint = new javax.swing.JMenuItem();
        FormListener formListener = new FormListener();
        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Restore bug");
        jmFile.setText("File");
        jmiAddRegion.setText("Add region");
        jmiAddRegion.addActionListener(formListener);
        jmFile.add(jmiAddRegion);
        jmFile.add(jSeparator2);
        jmiSaveAs.setMnemonic('s');
        jmiSaveAs.setText("Save as...");
        jmiSaveAs.addActionListener(formListener);
        jmFile.add(jmiSaveAs);
        jmiRestore.setMnemonic('r');
        jmiRestore.setText("Restore");
        jmiRestore.addActionListener(formListener);
        jmFile.add(jmiRestore);
        jmiExit.setMnemonic('x');
        jmiExit.setText("Exit");
        jmiExit.addActionListener(formListener);
        jmFile.add(jmiExit);
        jmFile.add(jSeparator1);
        jmiPrint.setText("Print");
        jmiPrint.addActionListener(formListener);
        jmFile.add(jmiPrint);
        jMenuBar1.add(jmFile);
        setJMenuBar(jMenuBar1);
        pack();
      // Code for dispatching events from components to event handlers.
      private class FormListener implements java.awt.event.ActionListener {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
          if (evt.getSource() == jmiSaveAs) {
            TestKiller.this.jmiSaveAsActionPerformed(evt);
          else if (evt.getSource() == jmiRestore) {
            TestKiller.this.jmiRestoreActionPerformed(evt);
          else if (evt.getSource() == jmiExit) {
            TestKiller.this.jmiExitActionPerformed(evt);
          else if (evt.getSource() == jmiPrint) {
            TestKiller.this.jmiPrintActionPerformed(evt);
          else if (evt.getSource() == jmiAddRegion) {
            TestKiller.this.jmiAddRegionActionPerformed(evt);
      private void jmiAddRegionActionPerformed(java.awt.event.ActionEvent evt) {                                            
        p.dummyAdd();
        jmiAddRegion.setEnabled(false);
      private void jmiPrintActionPerformed(java.awt.event.ActionEvent evt) {                                        
        p.print();
      private void jmiSaveAsActionPerformed(java.awt.event.ActionEvent evt) {                                         
        File f;
        ObjectOutputStream oos=null;
        JFileChooser jfc=new JFileChooser();
        jfc.setFileSelectionMode(JFileChooser.FILES_ONLY);
        jfc.setMultiSelectionEnabled(false);
        jfc.addChoosableFileFilter(jfc.getAcceptAllFileFilter());
        jfc.addChoosableFileFilter(new KDSFileFilter());
        jfc.showSaveDialog(this);
        f=jfc.getSelectedFile();
        if (f==null) {
          showMessage("Null file found");
        int i=f.getName().lastIndexOf(".");
        if (i==-1) {
          f=new File(f.getAbsolutePath()+"."+fileExtension);
        try {
          oos=new ObjectOutputStream(new FileOutputStream(f));
        } catch (FileNotFoundException ex) {
          showMessage("Cannot find file "+f.getName());
          return;
        } catch (IOException ex) {
          showMessage("Cannot open file "+f.getName());
          return;
        if (oos!=null) {
          System.out.println("Saving game to "+f.getName());
          try {
            oos.writeObject(p);
          } catch (IOException ex) {
            showMessage("Cannot write game to "+f.getName()+"\n"+ex.getMessage());
          } finally {
            try {
              oos.close();
            } catch (IOException ex) {
      private void jmiExitActionPerformed(java.awt.event.ActionEvent evt) {                                       
        System.exit(0);
      private void jmiRestoreActionPerformed(java.awt.event.ActionEvent evt) {                                          
        File f;
        ObjectInputStream ois=null;
        JFileChooser jfc=new JFileChooser();
        jfc.setFileSelectionMode(JFileChooser.FILES_ONLY);
        jfc.setMultiSelectionEnabled(false);
        jfc.addChoosableFileFilter(jfc.getAcceptAllFileFilter());
        jfc.addChoosableFileFilter( new KDSFileFilter());
        jfc.showOpenDialog(this);
        f=jfc.getSelectedFile();
        if (f!=null) {
          try {
            ois=new ObjectInputStream(new FileInputStream(f));
          } catch (FileNotFoundException ex) {
            showMessage("Cannot find file "+f.getName());
            return;
          } catch (IOException ex) {
            showMessage("Cannot open file "+f.getName());
            return;
          if (ois!=null) {
            System.out.println("Restoring game "+f.getName());
            try {
              p=(GamePanel) ois.readObject();
            } catch (IOException ex) {
              showMessage("Cannot read game from file "+f.getName());
            } catch (ClassNotFoundException ex) {
              showMessage("Cannot restore game - wrong object type");
            try {
              ois.close();
            } catch (IOException ex) {
            pack();
            p.validate();
            p.repaint();
            System.out.println("Restored");
      private class KDSFileFilter extends javax.swing.filechooser.FileFilter {
        public boolean accept(File f) {
          if (f.isDirectory()) {
            return true;
          String ext = null;
          String s = f.getName();
          int i = s.lastIndexOf('.');
          if (i > 0 &&  i < s.length() - 1) {
            ext = s.substring(i+1).toLowerCase();
          return (ext==null || ext.equalsIgnoreCase(fileExtension));
        public String getDescription() {
          return "Killer Su Doku games";
       * @param args the command line arguments
      public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
          public void run() {
            new TestKiller().setVisible(true);
      // Variables declaration - do not modify                    
      private javax.swing.JMenuBar jMenuBar1;
      private javax.swing.JSeparator jSeparator1;
      private javax.swing.JSeparator jSeparator2;
      private javax.swing.JMenu jmFile;
      private javax.swing.JMenuItem jmiAddRegion;
      private javax.swing.JMenuItem jmiExit;
      private javax.swing.JMenuItem jmiPrint;
      private javax.swing.JMenuItem jmiRestore;
      private javax.swing.JMenuItem jmiSaveAs;
      // End of variables declaration                  
    * GamePanel.java
    * Created on 10 January 2007, 18:45
    * To change this template, choose Tools | Template Manager
    * and open the template in the editor.
    package com.ptoye.TestSBug1;
    import java.awt.Color;
    import java.awt.Component;
    import java.awt.Container;
    import java.awt.Dimension;
    import java.awt.Graphics;
    import java.awt.Graphics2D;
    import java.io.Serializable;
    import java.util.HashSet;
    import java.util.Set;
    import javax.swing.JLayeredPane;
    * @author PToye
    public class GamePanel extends JLayeredPane implements Serializable {
      private static final int GRID_LEVEL=2;
      private static final int REGIONS_LEVEL=3;
      private static final int THICK_WIDTH=4;
      private static final int THIN_WIDTH=1;
      static final int SQUARE_SIZE=60;
      private static final int SQUARES=1;  // test size
      static final int BIGSQUARES=SQUARES*SQUARES;
      static final int TotalSize=(SQUARES+1)*THICK_WIDTH+SQUARES*(SQUARES-1)*THIN_WIDTH+
          BIGSQUARES*SQUARE_SIZE;
      public final Color NORMAL_BACK_COLOUR=Color.WHITE;
      public final Color SELECTED_BACK_COLOUR=Color.PINK;
      int coordArray;  // used to be an array of start coords of each square
      private Region newRegion;
      private int regionId=1;
      private Square squareArray; // used to be an array
      private Region regions; // used to be a set
      /** Creates a new instance of GamePanel */
      public GamePanel() {
        super();
        regions=null;
        makeGridLayer();  //adds the white square
        setPreferredSize(new Dimension(TotalSize,TotalSize));
        setVisible(true);
        newRegion=null;
        setFocusable(true);
      public void dummyAdd() {
        setupRegion(squareArray);
        if (newRegion.checkNewRegion(1)) {
          addRegion(newRegion);
      public void addRegion(Region r) {
        if (regions==null) {
          regions=r;
          add(r,new Integer(REGIONS_LEVEL));
          r.repaint();
      void print() {
        Component[] cList=getComponents();
        System.out.println("Printing Gamepanel components");
        for (int i = 0; i < cList.length; i++) {
          Component c=cList;
    System.out.println(c.toString());
    System.out.println(" Bounds "+c.getBounds());
    System.out.println(" Layer "+getLayer(c));
    if (c instanceof Container) {
    printContainer((Container)c," ");
    void printContainer(Container c, String preString) {
    Component[] cList1=c.getComponents();
    for (int i = 0; i < cList1.length; i++) {
    Component comp=cList1[i];
    System.out.println(preString+comp.toString());
    System.out.println(preString+" Bounds "+comp.getBounds());
    if (comp instanceof Container) {
    printContainer((Container)comp,preString+" ");
    private void setupRegion(Square s) {
    if (newRegion==null) {
    newRegion=new Region(regionId++,this);
    Region r=s.getRegion();
    if (r==null) {
    newRegion.addSquare(s);
    selectSquare(s);
    s.setRegion(newRegion);
    } else {
    System.exit(1); // should not happen
    private void makeGridLayer() {
    int currentXCoord;
    int currentYCoord;
    int arrayIndex=0;
    Square sq;
    currentXCoord=THICK_WIDTH;
    currentYCoord=THICK_WIDTH;
    coordArray=currentYCoord;
    sq=new Square(0,0, NORMAL_BACK_COLOUR,this);
    add(sq,new Integer(GRID_LEVEL));
    squareArray=sq;
    public void paintComponent(Graphics g) {
    super.paintComponent(g);
    Graphics2D g2=(Graphics2D) g;
    System.out.println("Painting gridlayer");
    g2.setBackground(Color.BLACK);
    g2.setColor(Color.BLACK);
    g2.fillRect(0,0,TotalSize,TotalSize);
    void selectSquare(Square s) {
    System.out.println("Selecting square");
    s.setBackColour(SELECTED_BACK_COLOUR);
    * Square.java
    * Created on 28 December 2006, 15:53
    * To change this template, choose Tools | Template Manager
    * and open the template in the editor.
    package com.ptoye.TestSBug1;
    import java.awt.Color;
    import java.awt.Dimension;
    import java.awt.Graphics;
    import java.awt.Graphics2D;
    import java.io.Serializable;
    import javax.swing.JComponent;
    * @author PToye
    class Square extends JComponent implements Serializable {
    * X index in grid
    private int xIndex;
    * Y index in grid
    private int yIndex;
    * The square's parent grid
    private GamePanel parent;
    * Region it belongs to (or null if none)
    private Region region;
    * The background colour
    private Color backColour;
    private boolean marked;
    // public Square() {
    // System.out.println("New Square - null constructor");
    // addMouseListener(parent);
    * Create a new square
    public Square(int x, int y, Color bcol, GamePanel parent) {
    this.parent=parent;
    xIndex=x;
    yIndex=y;
    backColour=bcol;
    region=null;
    setName("Square-"+x+":"+y);
    setBounds(parent.coordArray,parent.coordArray,
    GamePanel.SQUARE_SIZE,GamePanel.SQUARE_SIZE);
    setOpaque(true);
    setVisible(true);
    public void paintComponent(Graphics g) {
    super.paintComponent(g);
    Graphics2D g2=(Graphics2D) g;
    // System.out.println("Painting square "+xIndex+","+yIndex+":"+getBounds());
    g2.setColor(backColour);
    g2.fillRect(0,0,GamePanel.SQUARE_SIZE,GamePanel.SQUARE_SIZE);
    g2.setColor(Color.BLACK);
    public Dimension getPreferredSize() {
    return new Dimension(GamePanel.SQUARE_SIZE,GamePanel.SQUARE_SIZE);
    public void setBackColour(Color backColour) {
    this.backColour = backColour;
    repaint(0,0,GamePanel.SQUARE_SIZE,GamePanel.SQUARE_SIZE);
    public Region getRegion() {
    return region;
    public void setRegion(Region region) {
    this.region = region;
    * Region.java
    * Created on 28 December 2006, 15:59
    * To change this template, choose Tools | Template Manager
    * and open the template in the editor.
    package com.ptoye.TestSBug1;
    import java.awt.BasicStroke;
    import java.awt.Color;
    import java.awt.Font;
    import java.awt.FontMetrics;
    import java.awt.Graphics;
    import java.awt.Graphics2D;
    import java.awt.geom.GeneralPath;
    import java.io.Serializable;
    import java.util.HashSet;
    import java.util.Iterator;
    import java.util.Set;
    import javax.swing.JComponent;
    * @author PToye
    * Class representing a region whose total sum is known
    public class Region extends JComponent implements Serializable {
    private static final float BORDER_WIDTH=1f;
    private static final float DASH_LENGTH=4f;
    private static final float[] dashes={DASH_LENGTH,DASH_LENGTH};
    private static final BasicStroke borderStroke=
    new BasicStroke(BORDER_WIDTH,BasicStroke.CAP_BUTT,BasicStroke.JOIN_MITER,
    1f,dashes,0);
    private static final int borderInset=3;
    private GamePanel parent;
    * The sum as given
    private int total;
    private String totalString;
    private int id;
    * The squares constituting the region
    private Square contents; // the square in the region
    private Square leadSquare; // top left-hand square
    private int leadXCoord,leadYCoord; // X, Y coords of lead square wrt border
    private GeneralPath border=null;
    public Region(int id, GamePanel parent) {
    super();
    this.id=id;
    this.parent=parent;
    setName("Region-"+id);
    contents=null;
    border=new GeneralPath();
    System.out.println("New region "+id);
    public void addSquare(Square s) {
    if (contents!=null) {
    contents=s;
    public boolean checkNewRegion(int tot) {
    System.out.println("Checking region "+id);
    border.moveTo(borderInset,borderInset);
    border.lineTo(GamePanel.SQUARE_SIZE-borderInset,borderInset);
    border.lineTo(GamePanel.SQUARE_SIZE-borderInset,GamePanel.SQUARE_SIZE-borderInset);
    border.lineTo(borderInset,GamePanel.SQUARE_SIZE-borderInset);
    border.lineTo(borderInset,borderInset);
    setBounds(parent.coordArray,parent.coordArray,GamePanel.SQUARE_SIZE,GamePanel.SQUARE_SIZE);
    repaint();
    return true;
    public void paintComponent(Graphics g) {
    int newX, newY;
    System.out.println("Painting region "+id);
    super.paintComponent(g);
    Graphics2D g2=(Graphics2D) g;
    g2.setColor(Color.BLACK);
    g2.setStroke(borderStroke);
    g2.draw(border);

    OK, I asked the FTE team and got this reply: "Lucida Grande is CTS's fallback font for Thai.  This font on OS 10.7 and 10.6 are not supporting Thai anymore.  The version on 10.5 was supporting it." This means that it's our bug that we keep using Lucida Grande as fallback font even Apple dropped support Thai script with that font after 10.6. Unfortunately this bug was deferred from current development release (11.2) because of time constraint. If this support is critical for your business, can you open a bug in our public bugbase and ask as many vote as possible? In this way I may be able to convince internal team to fix this bug in next release.
    Thank you for your feedback!
    Hitomi

  • Channel requests

    ATTENTION thebear61
    Your post was removed to a secure area out of public view because it violates forum posting guidelines.
    Forum Guidelines state >>> clickable link http://forums.comcast.com/t5/Forum-Guidelines/Posting-Guidelines/td-p/866289 which everyone should read BEFORE making a first post
    Please don't;
    Post personal information in the forums
    Please do your best to keep your identity and personal information safe. This includes:
    Your full name <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
    Your telephone number
    Your Physical/Mailing Address
    Email addresses <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
    Credit Card numbers
    Account numbers
    Personal public IP addresses
    Modem MAC address and / or serial number
    Active phishing links
    Other personally identifiable information
    Here is your post with the information removed;
    I would like to request a few channels in general and then some HD versions of existing channels.
    First, I would like to see Fox Sports 2, SEC Alternate, Big 10 Plus, and Pac 12 Oregon, Yes Network, New England Sports Network (NESN) added in the Seattle market. All in HD of course. The other competitors, that being Frontier Fios and Wave Broadband carry those in some combination. Also, if possible, and I don't know if they broadcast in hd, Northwest Cable News (NWCN) and all three of the Fox super regional channels, those being Fox Atlantic, Central and Pacific. I have a feeling they don't have hd versions. Just a few suggestions.
    Thank you
    Ted XXXXXXXXXXXXX
    XXXXXXXXXXXXXXXXXXXXXXX

    Thank you Becky_S. Just to make it easier, here are some links.
    A link in the right direction. Ideas Exchange. Share your ideas.
    http://forums.verizon.com/t5/Share-Your-Ideas-with-Verizon/idb-p/ideas
    A link to the TV Content Ideas, where you can search for previously requested content, and then Vote. Or post your own request.
    http://forums.verizon.com/t5/Share-Your-Ideas-with-Verizon/idb-p/ideas/label-name/fios%20tv%20conten...

  • Super Drive and DVD Regions

    Hi,
    I know that most DVD players lock out after a certain number of region changes but if I buy two super drives can I use one for my international DVDs and one for my American DVDs or is the region lock part of the hardware of my macbook air?
    Thanks.

    That should work.
    The region is supposed to be stored in the drive itself.

  • Super-Drive region playability issues...

    I work at an authorized campus reseller, and a professor stopped in and said he makes frequent trips between the US and Italy. However, he has switched the region of his DVD player so many times that it is now stuck in region-2 which is europe, of course. Is there any firmware or easy fix thing I can do or download.
    your help is much needed and greatly appreciated!

    Bob,
    the EASIEST solution for your prof would be to start using the VLC player instead of Apple's DVD Player.
    You can download it for free at videolan.org. It is extremely clever and well made, very slick, has a good design, plays virtually EVERY possible format available - and it does not care at all what region your DVD comes from.
    Just remember, after you installed VLC, to change the CD/DVD preferences in the System Prefs (under the Apple menu) to open VLC when you insert a DVD - otherwise the annoying Apple DVD Player would come up nagging...
    Ah, I forgot, VLC is free.

  • How can I get  the part image from a rectangle region?

    hi,
    I'm trying to draw a rectagle region on a picture with mouse and crop it. but the rectangle is not vertical along x-axis.that is to say, there is a angle between x-axis and the base of the rectangle. I don't know , how can I do it. Can someone give me some tip or some java-code. Thank you very much in advance.

    I completely misunderstood your question. As I read it again it seems clear and straight-forward. I'm sorry. Let's see if this is closer.
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.*;
    import java.awt.image.BufferedImage;
    import java.io.*;
    import java.net.*;
    import javax.imageio.ImageIO;
    import javax.swing.*;
    import javax.swing.event.MouseInputAdapter;
    public class CropImage
        BufferedImage original;
        CropPanel cropPanel;
        CropSelector selector;
        public CropImage()
            original = getImage();
            cropPanel = new CropPanel(original);
            selector = new CropSelector(cropPanel);
            cropPanel.addMouseListener(selector);
            cropPanel.addMouseMotionListener(selector);
            JFrame f = new JFrame();
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.getContentPane().add(getUIPanel(), "North");
            f.getContentPane().add(new JScrollPane(cropPanel));
            f.setSize(400,400);
            f.setLocation(200,200);
            f.setVisible(true);
        private BufferedImage getImage()
            String fileName = "images/coyote.jpg";
            BufferedImage image = null;
            try
                URL url = getClass().getResource(fileName);
                image = ImageIO.read(url);
            catch(MalformedURLException mue)
                System.err.println("url: " + mue.getMessage());
            catch(IOException ioe)
                System.err.println("read: " + ioe.getMessage());
            return image;
        private JPanel getUIPanel()
            final JButton
                mask    = new JButton("mask"),
                crop    = new JButton("crop"),
                restore = new JButton("restore");
            ActionListener l = new ActionListener()
                public void actionPerformed(ActionEvent e)
                    JButton button = (JButton)e.getSource();
                    if(button == mask)
                        selector.mask();
                    if(button == crop)
                        selector.crop();
                    if(button == restore)
                        cropPanel.restore(original);
            mask.addActionListener(l);
            crop.addActionListener(l);
            restore.addActionListener(l);
            JPanel panel = new JPanel();
            panel.add(mask);
            panel.add(crop);
            panel.add(restore);
            return panel;
        public static void main(String[] args)
            new CropImage();
    class CropPanel extends JPanel
        BufferedImage image;
        Dimension size;
        GeneralPath clip;
        Point[] corners;
        Area mask;
        boolean showMask;
        Color bgColor;
        public CropPanel(BufferedImage bi)
            image = bi;
            setSize();
            clip = new GeneralPath();
            showMask = false;
            bgColor = getBackground();
        protected void paintComponent(Graphics g)
            super.paintComponent(g);
            Graphics2D g2 = (Graphics2D)g;
            g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                                RenderingHints.VALUE_ANTIALIAS_ON);
            int w = getWidth();
            int h = getHeight();
            int x = (w - size.width)/2;
            int y = (h - size.height)/2;
            g2.drawImage(image, x, y, this);
            if(showMask)
                g2.setPaint(getBackground());
                g2.fill(mask);
            else
                g2.setPaint(Color.red);
                g2.draw(clip);
        public Dimension getPreferredSize()
            return size;
        public void setClip(Point[] p)
            corners = p;
            clip.reset();
            clip.moveTo(p[0].x, p[0].y);
            clip.lineTo(p[1].x, p[1].y);
            clip.lineTo(p[2].x, p[2].y);
            clip.lineTo(p[3].x, p[3].y);
            clip.closePath();
            repaint();
        public void clearClip()
            clip.reset();
            repaint();
        public void setMask(Area area)
            mask = area;
            showMask = true;
            repaint();
        public void setImage(BufferedImage image)
            this.image = image;
            setSize();
            showMask = false;
            clip.reset();
            repaint();
            revalidate();
        public void restore(BufferedImage image)
            setBackground(bgColor);
            setImage(image);
        private void setSize()
            size = new Dimension(image.getWidth(), image.getHeight());
    class CropSelector extends MouseInputAdapter
        CropPanel cropPanel;
        Point start, end;
        public CropSelector(CropPanel cp)
            cropPanel = cp;
        public void mask()
            Dimension d = cropPanel.getSize();
            Rectangle r = new Rectangle(0, 0, d.width, d.height);
            Area mask = new Area(r);
            Area port = new Area(cropPanel.clip);
            mask.subtract(port);
            cropPanel.setMask(mask);
        public void crop()
            Point[] p = cropPanel.corners;
            int w = p[2].x - p[0].x;
            int h = p[1].y - p[3].y;
            BufferedImage cropped = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB);
            Graphics2D g2 = cropped.createGraphics();
            g2.translate(-p[0].x, -p[3].y);
            cropPanel.paint(g2);
            g2.dispose();
            cropPanel.setBackground(Color.pink);
            cropPanel.setImage(cropped);
        public void mousePressed(MouseEvent e)
            if(e.getClickCount() == 2)
                cropPanel.clearClip();
            start = e.getPoint();
        public void mouseDragged(MouseEvent e)
            end = e.getPoint();
            // locate high and low points of rectangle from start
            int dy = end.y - start.y;
            int dx = end.x - start.x;
            double theta = Math.atan2(dy, dx);
            double spoke = start.distance(end)/2;
            double side = Math.sqrt(spoke*spoke + spoke*spoke);
            Point[] corners = new Point[4];           // counter-clockwise
            corners[0] = start;                       // left
            int x = (int)(start.x + side * Math.cos(theta + Math.PI/4));
            int y = (int)(start.y + side * Math.sin(theta + Math.PI/4));
            corners[1] = new Point(x, y);             // bottom
            corners[2] = end;                         // right
            x = (int)(start.x + side * Math.cos(theta - Math.PI/4));
            y = (int)(start.y + side * Math.sin(theta - Math.PI/4));
            corners[3] = new Point(x, y);             // top
            cropPanel.setClip(corners);
    }

  • Problem with LOVINput in a  region

    Hi,
    I have created a region with 2 messagetextinput beans and one messagelovinput bean and attached this region to a page, then all the fields are working properly.
    But when setrendered for this region is false and on an event, in processform request, i am setting rendered property for this region as true. In this case, messagelovinput bean is not working as expected. When i click on torch button, the popup is opening with an error saying access is denied. Early solution is appreaciated.
    Message: Access is denied.
    Line: 2
    Char: 1
    Code: 0
    URI: https://****.****.com/OA_HTML/cabo/jsps/a.jsp?_t=fredRC&enc=UTF-8&_minWidth=750&_minHeight=550&configName=OAConfig&contextURI=/OA_HTML/&redirect=%2FOA_HTML%2F&source=dbdAddress&searchText=&page=/oracle/apps/icx/por/req/webui/CheckoutSummaryPG&porMode=display&porSummaryPageFromCart=true&_ti=216551409&retainAM=Y&addBreadCrumb=N&OASF=ICX_POR_CHECKOUT_SUMMARY&oapc=12&oas=BQyUInzOsOlBuyqjM6b_6A..&event=lovFilter
    Thanks in advance

    This is how i am setting the property.
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processFormRequest(pageContext, webBean);
    OAApplicationModuleImpl am =(OAApplicationModuleImpl)pageContext.getRootApplicationModule();
    OAPageLayoutBean pagelayoutbean = pageContext.getPageLayoutBean();
    OAStackLayoutBean stacklayoutbean = (OAStackLayoutBean)pagelayoutbean.findIndexedChildRecursive("xxdbdIROneTimeAddressRN");
    if("enableaddress".equals(pageContext.getParameter(EVENT_PARAM))) {
    stacklayoutbean.setRendered(true);
    The region 'xxdbdIROneTimeAddressRN' is having messagelovinput bean.

  • Error in creating a new region in OAF

    I have created a new region and wanted to associate it to an existing page through personalization. Initially it errored out just on creating the Flexible layout where i just provided the id name. After bouncing the server several times, at one point of time i was successfull in associating the region by following the same steps, by which it was erroring out previously.
    Things were working fine. Now due to some other requirement i bounced the apache server one more and now again it is erroring out...
    Following is the error message:
    Logout
    Error Page
    Exception Details.
    oracle.apps.fnd.framework.OAException: oracle.adf.mds.exception.MDSRuntimeException: Unable to find component with absolute reference = /xxdev/oracle/apps/po/reqsummary/webui/XXDEVReqSummaryRN.LinesResultsTable.Supplier, XML Path = null. Please verify that the reference is valid and the definition of the component exists either on the File System or in the MDS Repository.
         at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:896)
         at oracle.apps.fnd.framework.webui.OAPageErrorHandler.prepareException(OAPageErrorHandler.java:1169)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:2142)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:532)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:420)
         at OA.jspService(_OA.java:213)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:335)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:478)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:401)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
         at oracle.apps.jtf.base.session.ReleaseResFilter.doFilter(ReleaseResFilter.java:26)
         at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
         at oracle.apps.fnd.security.AppsServletFilter.doFilter(AppsServletFilter.java:318)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:627)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:376)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:870)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:299)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:187)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    ## Detail 0 ##
    oracle.adf.mds.exception.MDSRuntimeException: Unable to find component with absolute reference = /xxdev/oracle/apps/po/reqsummary/webui/XXDEVReqSummaryRN.LinesResultsTable.Supplier, XML Path = null. Please verify that the reference is valid and the definition of the component exists either on the File System or in the MDS Repository.
         at oracle.adf.mds.internal.MUnResolvedState.resolveState(MUnResolvedState.java:195)
         at oracle.adf.mds.internal.ElementData.resolveState(ElementData.java:509)
         at oracle.adf.mds.internal.ElementData.getUntransAttrVal(ElementData.java:922)
         at oracle.adf.mds.internal.ElementData.getAttrVal(ElementData.java:835)
         at oracle.adf.mds.internal.ElementData.getAttributeValue(ElementData.java:260)
         at oracle.adf.mds.internal.Cache.getAttribute(Cache.java:237)
         at oracle.adf.mds.internal.MetadataManagerBase.getAttributeValueInternal(MetadataManagerBase.java:1103)
         at oracle.adf.mds.internal.MElementImpl.getAttrValueOrExpression(MElementImpl.java:620)
         at oracle.adf.mds.internal.MElementImpl.getAttributeValue(MElementImpl.java:230)
         at oracle.adf.mds.MElement.getLocalRef(MElement.java:291)
         at oracle.adf.mds.internal.XMElementImpl.<init>(XMElementImpl.java:367)
         at oracle.adf.mds.internal.XMElementImpl.createChild(XMElementImpl.java:656)
         at oracle.adf.mds.internal.XMElementImpl.resolveDescendants(XMElementImpl.java:282)
         at oracle.adf.mds.internal.XMElementImpl.resolveDescendants(XMElementImpl.java:283)
         at oracle.adf.mds.internal.XMElementImpl.getGroupings(XMElementImpl.java:120)
         at oracle.apps.fnd.framework.webui.JRAD2AKMapper.processRegion(JRAD2AKMapper.java:1163)
         at oracle.apps.fnd.framework.webui.JRAD2AKMapper.processGrouping(JRAD2AKMapper.java:1403)
         at oracle.apps.fnd.framework.webui.JRAD2AKMapper.processRegion(JRAD2AKMapper.java:1245)
         at oracle.apps.fnd.framework.webui.JRAD2AKMapper.processGrouping(JRAD2AKMapper.java:1403)
         at oracle.apps.fnd.framework.webui.JRAD2AKMapper.processRegion(JRAD2AKMapper.java:1245)
         at oracle.apps.fnd.framework.webui.JRAD2AKMapper.processGrouping(JRAD2AKMapper.java:1403)
         at oracle.apps.fnd.framework.webui.JRAD2AKMapper.processRegion(JRAD2AKMapper.java:1245)
         at oracle.apps.fnd.framework.webui.JRAD2AKMapper.processPage(JRAD2AKMapper.java:1008)
         at oracle.apps.fnd.framework.webui.JRAD2AKMapper.loadPage(JRAD2AKMapper.java:797)
         at oracle.apps.fnd.framework.webui.OAPageBean.initializeCustomizationsMDS(OAPageBean.java:6592)
         at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(OAPageBean.java:2317)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1888)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:532)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:420)
         at OA.jspService(_OA.java:213)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:335)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:478)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:401)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
         at oracle.apps.jtf.base.session.ReleaseResFilter.doFilter(ReleaseResFilter.java:26)
         at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
         at oracle.apps.fnd.security.AppsServletFilter.doFilter(AppsServletFilter.java:318)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:627)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:376)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:870)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:299)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:187)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    oracle.adf.mds.exception.MDSRuntimeException: Unable to find component with absolute reference = /xxdev/oracle/apps/po/reqsummary/webui/XXDEVReqSummaryRN.LinesResultsTable.Supplier, XML Path = null. Please verify that the reference is valid and the definition of the component exists either on the File System or in the MDS Repository.
         at oracle.adf.mds.internal.MUnResolvedState.resolveState(MUnResolvedState.java:195)
         at oracle.adf.mds.internal.ElementData.resolveState(ElementData.java:509)
         at oracle.adf.mds.internal.ElementData.getUntransAttrVal(ElementData.java:922)
         at oracle.adf.mds.internal.ElementData.getAttrVal(ElementData.java:835)
         at oracle.adf.mds.internal.ElementData.getAttributeValue(ElementData.java:260)
         at oracle.adf.mds.internal.Cache.getAttribute(Cache.java:237)
         at oracle.adf.mds.internal.MetadataManagerBase.getAttributeValueInternal(MetadataManagerBase.java:1103)
         at oracle.adf.mds.internal.MElementImpl.getAttrValueOrExpression(MElementImpl.java:620)
         at oracle.adf.mds.internal.MElementImpl.getAttributeValue(MElementImpl.java:230)
         at oracle.adf.mds.MElement.getLocalRef(MElement.java:291)
         at oracle.adf.mds.internal.XMElementImpl.<init>(XMElementImpl.java:367)
         at oracle.adf.mds.internal.XMElementImpl.createChild(XMElementImpl.java:656)
         at oracle.adf.mds.internal.XMElementImpl.resolveDescendants(XMElementImpl.java:282)
         at oracle.adf.mds.internal.XMElementImpl.resolveDescendants(XMElementImpl.java:283)
         at oracle.adf.mds.internal.XMElementImpl.getGroupings(XMElementImpl.java:120)
         at oracle.apps.fnd.framework.webui.JRAD2AKMapper.processRegion(JRAD2AKMapper.java:1163)
         at oracle.apps.fnd.framework.webui.JRAD2AKMapper.processGrouping(JRAD2AKMapper.java:1403)
         at oracle.apps.fnd.framework.webui.JRAD2AKMapper.processRegion(JRAD2AKMapper.java:1245)
         at oracle.apps.fnd.framework.webui.JRAD2AKMapper.processGrouping(JRAD2AKMapper.java:1403)
         at oracle.apps.fnd.framework.webui.JRAD2AKMapper.processRegion(JRAD2AKMapper.java:1245)
         at oracle.apps.fnd.framework.webui.JRAD2AKMapper.processGrouping(JRAD2AKMapper.java:1403)
         at oracle.apps.fnd.framework.webui.JRAD2AKMapper.processRegion(JRAD2AKMapper.java:1245)
         at oracle.apps.fnd.framework.webui.JRAD2AKMapper.processPage(JRAD2AKMapper.java:1008)
         at oracle.apps.fnd.framework.webui.JRAD2AKMapper.loadPage(JRAD2AKMapper.java:797)
         at oracle.apps.fnd.framework.webui.OAPageBean.initializeCustomizationsMDS(OAPageBean.java:6592)
         at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(OAPageBean.java:2317)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1888)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:532)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:420)
         at OA.jspService(_OA.java:213)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:335)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:478)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:401)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
         at oracle.apps.jtf.base.session.ReleaseResFilter.doFilter(ReleaseResFilter.java:26)
         at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
         at oracle.apps.fnd.security.AppsServletFilter.doFilter(AppsServletFilter.java:318)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:627)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:376)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:870)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:299)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:187)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    Logout
    Copyright (c) 2006, Oracle. All rights reserved.

    But this is not happening for other pages..only this page is creating problem...
    This region I am creating for the page whose navigation is as shown below:
    1) Login as PO Super User
    2) Go to Requisition Work Bench -> Requisitions -> Summary -> Lines Tab.
    In this page in the search region I need to add one Criteria Item named Requisition Description
    Now in our development instance,creating a Criteria Itme for this region through personalization is not enabled. But the same thing is enabled in the Test Environment. However if I go and just click on Create Item -> Criteria row and provide the id name and click on Apply the page is erroring out. Would anyone please try replication the same in their available instance and let me know whether they are facing similar issues.

  • Deleting a row from a Table Region

    Hi Everyone,
    Before I start I must say that I am fairly new to OA Framework.
    I thought this should be straight forward but it does not seem to be. Or I simplt dont know about it.
    I have a simple Query Region and a table (based on a VO). This VO is attached to an EO which is based on a simple employee table (EmployeeId being primary and mandatory field).
    I also have a delete icon which on clicking "fires an action" to delete this employee (Employee Id is passed as a parameter). I have added a "Add another row" button programatically by the following code in my processRequest of Controller
    oatablebean.setInsertable(true);
    oatablebean.prepareForRendering(pageContext);
    The problem is:
    When I press "Add another row" button and then press the Delete Icon (to delete the just added row), a pop-up comes to enter the mandatory field EmployeeId. I can understand that this is because of the mandatory field, but isnt there a way around it or way to supress it.
    I think it should allow me to delete, especially when I have not even started entering anything (just like in good old forms).
    Thanks in Advance,
    Warm Regards,
    Satya.

    Hi Satya,
    Create an event on delete image|Button.
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processFormRequest(pageContext, webBean); OAApplicationModule am =
    (OAApplicationModule)pageContext.getApplicationModule(webBean);
    String event = pageContext.getParameter("event");
    if ("<ItemPPREventName>").equals(event)) // Delete Button|Image Event
    // Get the identifier of the PPR event source row
    String rowReference = pageContext.getParameter(OAWebBeanConstants.EVENT_SOURCE_ROW_REFERENCE); //Getting Row Reference here
    Serializable[] parameters = { rowReference };
    // Pass the rowReference to a "handler" method in the application module.
    am.invokeMethod("<handleSomeEvent>", parameters);
    In your application module's "handler" method, add the following code to access the source row:
    OARow row = (OARow)findRowByRef(rowReference);
    if (row != null)
    ... // remove the row here
    Also please go through the Delete Exercise in Tutorials. I hope this answer your question
    Thanks
    --Anil                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Getting table region values on Save

    Hi ,
    I am extending the Work Order Creation and update page from Maintenance Super User screen,
    I am doing like below to get all lines in controller.
    +
    OAApplicationModule am = (OAApplicationModule)pageContext.getApplicationModule(webBean);
    OAViewObject vo = (OAViewObject)am.findViewObject("MaterialRequirementsVO");
    if (vo.getFetchedRowCount() > 0)
    System.out.println(String.valueOf("Fetched row count ").concat(String.valueOf(vo.getFetchedRowCount())));
    while (vo.hasNext())
    pageContext.writeDiagnostics(this,"Inventory ID "+vo.getCurrentRow().getAttribute("InventoryItemId"),3);
    vo.next();
    +
    but I get data only when rows are not updated(without any changes it just click on save), and if any of the column in the table region is updated then i get null VO error.. and wont get any details of column.
    OAF LOG: Event : Check Errors, in: oracle.apps.fnd.framework.webui.OAPageErrorHandler: Exception: Message not found. Application: EAM, Message Name: CANNOT_SAVE_WO. ,In VO: null
    Please help.
    Thanks,
    --Amit                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Hi ,
    I have answered it in another thread , see if that helps you .
    --Keerthi                                                                                                                                                                                   

  • Composition Association in a region

    I have read Steve Muench blog:
    [http://one-size-doesnt-fit-all.blogspot.com/2008/05/jbo-25030-failed-to-find-or-invalidate.html|http://one-size-doesnt-fit-all.blogspot.com/2008/05/jbo-25030-failed-to-find-or-invalidate.html]
    I have a simple master-detail relation (ex: Departments and Employees). I marked the association between entities as Composition Association.
    In my AM, I have only: Employees view as a detail of Departments view.
    In my page: Departments (master one) is a form and Employees (detail one) is a table.
    If I click "New Department" button, create(AttributeList attributeList) is fired from DepartmentsEntityImpl.
    Than, when I click "New Employees" button, create(AttributeList attributeList) is fired from EmployeesEntityImpl.
    If I click Commit, 2 new records are created and everything works like a charm.
    But my problem is when Employees view is in a region (sepatrate task flow with "Share data controls with calling task flow" behavior, and no input parameters).
    I am still using the Employees view which is a child of Departments.
    The navigation works fine. Navigating different departments, always refreshes the Employees table in the region, (So master-detail relation works fine.)
    The update works fine. Change something in a Department form, than change employees records and than click Commit button - updates everything.
    BUT now, cascading insert does not work.
    If I click "New Department" button, create(AttributeList attributeList) is fired from DepartmentsEntityImpl.
    Than, when I click "New Employees" button, create(AttributeList attributeList) is fired from EmployeesEntityImpl ::
    protected void create(AttributeList attributeList) {
    super.create(attributeList);
    this.setActiveFlag("Y");
    but I never rich: this.setActiveFlag("Y") - line. The pop up error is:
    Detail entity EmployeesEntity with row key oracle.jbo.Key[-21 ] cannot find or invalidate its owning entity.
    So, when the detail-view is on the page together with a master-view, everything is OK.
    When the detail-view is in a region, insert doesn not work.
    Can the detail-view BE in a region?
    Am I doing something wrong?

    When a new row is created through the ADF data binding layer, its new row status will be "STATUS_INITIALIZED" (and it will contain the create-time defaulted values).
    In order to transition from STATUS_INITIALIZED to STATUS_NEW, some additional attribute must be set on the model.
    This will occur when you submit your changes, or when individual field values are sent to the server due to their UI component's being marked AutoSubmit=true.
    When the master row is STATUS_NEW, then a newly-created, composted child row will be able to find its parent in the cache and no error will result.
    In contrast, if at the moment of creating the detail, the master row is still STATUS_INITIALIZED, then it will not be found in the cache and you'll get the InvalidOwnerException.
    In the case of separate regions, you might experiment with setting the skipValidation property on the pageDefinition to "skipDataControls" to avoid causing model-layer validation to occur on items that are not part of that region's page definition.

  • Restrict access to buttons, regions, etc. on a per user basis?

    My application restricts access to buttons, regions, etc. on a per user basis.
    Here is my application logic...
    1. A User can only edit items they own.
    2. A Super-User can edit all items
    So, when a user logs in, I use a post-authentication process to set the user ID to an application level item.
    Now, for example, to have an edit button display on a page, I need to check the item's owner ID against the application level user ID...and check to see if this user is on the Super User list via a query.(which could be set to another application level item upon login...I guess)
    Question...What is the best way to do this? Conditional display? Authorization scheme?
    Would something like the following work for a Conditional Display?
    Condition: SQL Expression
    &USER_ID.=&P6_ITEM_OWNER_ID. OR USER_ID in (select USER_ID from table where USER_ID=&USER_ID.)
    How would I do this with an Authorization Scheme? (I like the idea of updating the logic in single location...but I'm not sure if it is possible because I have to check PX_OWNER_ID would be different on each page.)

    Hi Denes,
    Thanks for your code which allows user to edit (if authorized) and view (if not).
    But some how - I do not get the image to show up - instead it show a small underline.
    From SQL point of view - here is what I get - when i run the sql
    '<img src="/i/ed-item.gif">',2,CR TEST,,,,dune2.cit.cornell.edu,CRDMTEST.CIT.CORNELL.EDU,PSPROD,,,CRDMTEST
    Here is my wrap_image function
    create or replace function wrap_image(p_user_name in varchar2,p_dm_name_id in number)
    return varchar2 IS
    v boolean := False;
    ret_val varchar2(1000);
    begin
    dbms_output.put_line('user='||p_user_name);
    dbms_output.put_line('dm_name='||p_dm_name_id);
    -- Check authorization if the user is super user - return true, else if he has edit priv on dm_name_id - return true - else false
    v:=ACL_DMTOOLS_DM_PRIV(p_user_name,p_dm_name_id);
    if v then
    ret_val := '<img src="/i/ed-item.gif">';
    ret_val := ''''||ret_val||'''';
    dbms_output.put_line('TRUE');
    else
    ret_val := '';
    dbms_output.put_line('FALSE');
    end if;
    return ret_val;
    end;
    Thanks for your great educational site.
    Regards
    atul

  • Re-using a seeded region using personalization or extension(EAM)

    Hi Gurus,
    I have a requirement to add certain additional fields in the 'Work Request Creation' screen.Now,the items needed are same as available in the 'Work Order Creation Screen'.
    Now,i was wondering if just replicating the same structure through personalization would work,but it dint:-0.Since i even i gave the same am and controller names,and i got a null pointer:-(
    I am wondering if there is any way to reuse the existing region somehow,or else i will have to create a custom table to store the data for 'work request' and then go bout doing a lot of extension and substituion.
    Please suggest.
    Can we have two am definitions for the same page.one at page level and one at region level???

    Hi Sumit,
    I am stuck with a major issue now regarding the same.
    Instead of going for a new am,i have added the custom table to the extended VO(using join) .the VO is not EO based so i use a pl/sql to commit my data.
    But,i need a 'WR number' in the custom table which comes from the seeded region.The problem here is tht the number is only generated on the click of 'apply'.
    i captured the event and called my custom pl/sql in the extended controller.The sad thing is that on click of apply,the wr number is generated but a re-direction happens.
    Due to this,my code written after the super call is not at all executed;-(
    And since the WR number which i need is only generated after clicking the apply,there is no point in writing my code before super,cos i wont get the WR number in that case.
    I am not sure how to go about it,though i am plannin to override the base class as a last resort.
    Any suggestions for the same

  • Help with Error:  PANIC: fatal region error detected; run recovery

    Here's what I'm trying to do:
    I am trying to us BDBXML in a webapp using tomcat 5.5. I have a class that is responsible for opening and closing the db. This class is accessed by a servlet for some AJAX RCP stuff and it also serves as an access point for a Web Service (Apache Axis). This class looks like this:
    public class DG implements Serializable {
    private javax.xml.datatype.DatatypeFactory datatypeFactory;
    private Environment environment;
    private EnvironmentConfig environmentConf;
    private XmlContainer xmlContainer = null;
    private XmlManager xmlManager = null;
    private XmlManagerConfig xmlManagerConfig;
    public DG() {
    try {
    File envHome = new File("C:\\bdbxml\\database");
    environmentConf = new EnvironmentConfig();
    environmentConf.setAllowCreate(true);
    environmentConf.setInitializeCache(true);
    environmentConf.setInitializeLocking(true);
    environmentConf.setInitializeLogging(true);
    environmentConf.setRunRecovery(true);
    environmentConf.setTransactional(true);
    environmentConf.setLockDetectMode(LockDetectMode.MINWRITE);
         //tried the following with default and 10000
         environmentConf.setMaxLockers(100000);
    environmentConf.setMaxLockObjects(100000);
    environmentConf.setMaxLocks(100000);
    environmentConf.setTxnMaxActive(100000);
    environment = new Environment(envHome, environmentConf);
    CheckpointConfig cpc = new CheckpointConfig();
    cpc.setKBytes(500);
    environment.checkpoint(cpc);
    xmlManagerConfig = new XmlManagerConfig();
    xmlManagerConfig.setAdoptEnvironment(true);
    xmlManager = new XmlManager(environment, xmlManagerConfig);
    XmlContainerConfig xmlContainerConfig = new XmlContainerConfig();
    xmlContainerConfig.setIndexNodes(true);
    xmlContainerConfig.setTransactional(true);
    xmlContainerConfig.setNodeContainer(true);
    xmlContainer = xmlManager.openContainer("container.dbxml", xmlContainerConfig);
    xmlContainer.sync();
    datatypeFactory = javax.xml.datatype.DatatypeFactory.newInstance();
    } catch (FileNotFoundException e) {
         e.printStackTrace();
    } catch (DatabaseException e) {
         e.printStackTrace();
    } catch (DatatypeConfigurationException e) {
         e.printStackTrace();
    public void close() {
    try {
    if (xmlContainer != null) {
    xmlContainer.close();
    if (xmlManager != null) {
    xmlManager.close();
    } catch (DatabaseException e) {
    e.printStackTrace();
    public String getDocument(String docId) {
    try {
    XmlDocument doc = xmlContainer.getDocument(docId);
    String docString = doc.getContentAsString();
    doc.delete();
    return docString;
    } catch (XmlException e) {
    e.printStackTrace();
    public Result[] search(Search search) {
    try {
         //normally I construct the query string using the Search object
    StringBuffer q = new StringBuffer("subsequence(collection('container.dbxml')/metadata[contains(./idinfo//title, 'Ecology')], 1,10)");
    XmlQueryContext xqc = xmlManager.createQueryContext();
    XmlQueryExpression xqe = xmlManager.prepare(q.toString(), xqc);
    XmlResults xr = xqe.execute(xqc);
    int i = 0;
    Vector<Result> vec = new Vector<Result>();
    while (xr.hasNext()) {
    XmlValue xv = xr.next();
    XmlDocument xd = xv.asDocument();
    Result r = new Result();
    r.setMetadata(xd.getContentAsString());
    r.setDocumentId(xd.getName());
    XmlValue groupVal = new XmlValue(XmlValue.STRING);
    xd.getMetaData("", "group", groupVal);
    r.setGroup(groupVal.asString());
    XmlValue ownerVal = new XmlValue(XmlValue.STRING);
    xd.getMetaData("", "owner", ownerVal);
    r.setOwner(ownerVal.asString());
    XmlValue createdVal = new XmlValue(XmlValue.DATE_TIME);
    xd.getMetaData("", "created", createdVal);
    r.setCreated(createdVal.asString());
    XmlValue updatedVal = new XmlValue(XmlValue.DATE_TIME);
    xd.getMetaData("", "updated", updatedVal);
    r.setModified(updatedVal.asString());
    r.setPosition(search.getStartPosition() + i);
    updatedVal.delete();
    createdVal.delete();
    ownerVal.delete();
    groupVal.delete();
    xd.delete();
    xv.delete();
    vec.add(r);
    i++;
    xr.delete();
    xqe.delete();
    xqc.delete();
    return vec.toArray(new Result[vec.size()]);
    } catch (XmlException e) {
    e.printStackTrace();
    // PLUS SOME OTHER METHODS, BUT USING ONLY THESE TO TEST
    The Servlet looks like this:
    public class DGServlet extends javax.servlet.http.HttpServlet implements javax.servlet.Servlet {
    private DG dg;
    private final XPathFactory xpf = XPathFactory.newInstance();
    private final XPath xp = xpf.newXPath();
    private final SimpleDateFormat df = new SimpleDateFormat("EEE MMM d HH:mm:ss z yyyy");
    public DGServlet() {
    super();
    @Override
    public void destroy() {
    try {
    dg.close();
    } catch (Exception e) {
    log(e.getMessage());
    e.printStackTrace();
    super.destroy();
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    String action = request.getParameter("action");
    if (action != null && !action.equals("")) {
    if (action.equals("search")) {
    response.setContentType("text/xml");
    Result[] result = null;
    try {
    result = dg.search(constructSearch(request));
    } catch (Exception e1) {
    log(e1.getMessage());
    e1.printStackTrace();
    if (result==null || result.length==0) {
    response.getWriter().print("0");
    return;
    StringBuffer sb = new StringBuffer("<results>");
    for (int i = 0; result != null && i < result.length; i++) {
    try {
    sb.append("<result"
    + " title='"
    + xp.evaluate("/metadata/idinfo//title", new InputSource(new StringReader(result[i]
    .getMetadata()))));
    sb.append("' northbc='"
    + xp.evaluate("//northbc", new InputSource(new StringReader(result.getMetadata())))
    + "' southbc='"
    + xp.evaluate("//southbc", new InputSource(new StringReader(result[i].getMetadata())))
    + "' eastbc='"
    + xp.evaluate("//eastbc", new InputSource(new StringReader(result[i].getMetadata())))
    + "' westbc='"
    + xp.evaluate("//westbc", new InputSource(new StringReader(result[i].getMetadata())))
    + "' docid='" + result[i].getDocumentId() + "' group='" + result[i].getGroup()
    + "' owner='" + result[i].getOwner() + "' position='" + result[i].getPosition()
    + "' modified='" + result[i].getModified() + "' created='" + result[i].getCreated()
    + "'>");
    NodeList nodes = (NodeList) xp.evaluate("//digform", new InputSource(new StringReader(result[i]
    .getMetadata())), XPathConstants.NODESET);
    for (int j = 0; j < nodes.getLength(); j++) {
    sb.append("<resource download='"
    + StringEscapeUtils.escapeXml(xp.evaluate("//networkr", new InputSource(
    new StringReader(XMLUtil.printDOMTree(nodes.item(j)))))));
    sb.append("' format='"
    + StringEscapeUtils.escapeXml(xp.evaluate("//formname", new InputSource(
    new StringReader(XMLUtil.printDOMTree(nodes.item(j)))))));
    sb.append("'></resource>");
    sb.append("</result>");
    } catch (XPathExpressionException e) {
    e.printStackTrace();
    log(e.getMessage());
    } catch (TransformerConfigurationException e) {
    e.printStackTrace();
    log(e.getMessage());
    } catch (TransformerFactoryConfigurationError e) {
    e.printStackTrace();
    log(e.getMessage());
    } catch (TransformerException e) {
    e.printStackTrace();
    log(e.getMessage());
    sb.append("</results>");
    response.getWriter().print(sb.toString());
    else if (action.equals("details")) {
    response.setContentType("text/html");
    String str = "";
    try {
    str = dg.getDocument(request.getParameter("docId"));
    response.getWriter().print(
    setTranslatePage(str, new java.net.URL(
    "http://localhost:8080/datastream/stylesheets/fgdc/fgdc_classic.xsl")));
    } catch (Exception e) {
    e.printStackTrace();
    log(e.getMessage());
    public void init() throws ServletException {
    super.init();
    dg = new DG();
    It seems to work fine for a while, but then I get errors like the following:
    PANIC: fatal region error detected; run recovery
    PANIC: fatal region error detected; run recovery
    PANIC: fatal region error detected; run recovery
    PANIC: fatal region error detected; run recovery
    PANIC: fatal region error detected; run recovery
    PANIC: fatal region error detected; run recovery
    PANIC: fatal region error detected; run recovery
    PANIC: fatal region error detected; run recovery
    PANIC: fatal region error detected; run recovery
    com.sleepycat.dbxml.XmlException: Error: DB_RUNRECOVERY: Fatal error, run database recovery, errcode = DATABASE_ERROR
    at com.sleepycat.dbxml.dbxml_javaJNI.XmlManager_prepare__SWIG_0(Native Method)
    at com.sleepycat.dbxml.XmlManager.prepare(XmlManager.java:586)
    at edu.washington.cev.datastream.api.DG.search(DG.java:935)
    at edu.washington.cev.datastream.servlets.DGServlet.doGet(DGServlet.java:83)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
    at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
    at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
    at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
    at java.lang.Thread.run(Thread.java:619)
    I've set this up on a Window XP machine using tomcat 5.5 and java 5 as well as a Redhat Linux machine with tomcat 5.5 and java 5. I'm using the Web Service point for other servers to access the database. Everything starts up and runs for a little while, but I can't seem to pin down what causes the errors. I've run recovery multiple times as well as started new databases. Any help is appreciated.

    There's a bug in your use of DB XML somewhere. Are you committing or aborting every transaction that you start, and calling delete() explicitly on all the DB XML objects that you use?
    Those errors mean your database has become corrupted somehow.
    John

  • Problem in displaying update page when multiple results table regions.....

    Hi,
    In Search page, I have 4 Search result table regions.(1.PropertyResultsTable,2.HouseDetailResultsTable,3.WaterDetailsResultsTable,4.ElectricityResultsTable)
    In PropertyResultsTable Search result table region when I click the update Icon its showing the Last table region's(i.e ElectricityResultsTable) update page.
    Same thing happening for 2.HouseDetailResultsTable,3.WaterDetailsResultsTable also.
    If my search page contain only one result table region I can able to update the record successfully.
    How to get the correct update page if there is more than one results table and each table has the update icon to update the respective record.
    Please suggest.
    Thanks & Regards,
    Sagarika

    Hi,
    Thanks for your response.
    Each search result table has its own controller and I have one RootController for handling 'Go' button click.
    Here is the code,
    public void processRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processRequest(pageContext, webBean);
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    //Transaction
    if (TransactionUnitHelper.isTransactionUnitInProgress(pageContext,
    "waterDetailCreateTxn",
    false)) {
    am.invokeMethod("rollbackServiceInfo");
    TransactionUnitHelper.endTransactionUnit(pageContext,
    "waterDetailCreateTxn");
    else if (TransactionUnitHelper.isTransactionUnitInProgress(pageContext,
    "waterDetailUpdateTxn",
    false)) {
    am.invokeMethod("rollbackServiceInfo");
    TransactionUnitHelper.endTransactionUnit(pageContext,
    "waterDetailUpdateTxn");
    * Procedure to handle form submissions for form elements in
    * a region.
    * @param pageContext the current OA page context
    * @param webBean the web bean corresponding to the region
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processFormRequest(pageContext, webBean);
    if ("update".equals(pageContext.getParameter(EVENT_PARAM))) {
    // The user has clicked an "Update" icon so we want to navigate
    // to the first step of the multistep "Update Employee" flow.
    // Retain AM
    // Do not display breadcrumbs
    pageContext.setForwardURL("OA.jsp?page=/uttara/oracle/apps/uttaraimc/createCitizen/webui/WaterDetailUpdatePG",
    null,
    OAWebBeanConstants.KEEP_MENU_CONTEXT,
    null, null, true,
    OAWebBeanConstants.ADD_BREAD_CRUMB_NO,
    OAWebBeanConstants.IGNORE_MESSAGES);
    Thanks & Regards,
    Sagarika

Maybe you are looking for

  • How to transfer Sales BOM from ECC to APO DP

    Hi, Demand planning require Sales BOM from ECC. Sales BOM in ECC will not have Routing & Work center, then how a PPM with Sales BOM can be transferred.  If i have to create a dummy routing & WC for those sales BOM it will be tidious job to create all

  • GRIR manual clearing

    We configured GRIR account for automatic posting and it also not allow to post celring thru F-03. Now I want to clear balance in GL : 322001 with corresponding entry in GL : 322007 both are GRIR accounts to knock off open items. This is required beca

  • I don't want it to autoformat the time in a table - anyone know what to do?

    I'm working on a table, and if I type in "8:00" it changes it to "10/22/2008 8:00:00 AM". Does anyone know what I have to do to stop it from doing this? Thanks, Justin

  • Bookmarks keep appearing in autocomplete

    I have tried going to "Tools -> Options -> Privacy -> When using the location bar, suggest: " If this option is set to "History and bookmarks" bookmarks will show up as the first suggestion with a star next to them. If this option is set to "History"

  • [svn:bz-trunk] 17299: BLZ-555: Bad version number in . class when starting JBoss 5.x with latest BlazeDS app

    Revision: 17299 Revision: 17299 Author:   [email protected] Date:     2010-08-12 05:36:37 -0700 (Thu, 12 Aug 2010) Log Message: BLZ-555: Bad version number in .class when starting JBoss 5.x with latest BlazeDS app The "testdata" package has been comp