Strange behaviour of a selectOneChoice in table

Hi,
I have an editable table where user can insert, delete, modify data. Some columns are rendered as selectOneChoice, using the list of value propertie of the attribute in the view object. But those lists behaves strangely. When user selects one option, the option is added to the list, and impact all other lists. Like if there is 10 values in the list, after 3 click of value change, there will be 13 options in the list, the 3 user has clicked.
On the the column code snippet :
<af:column sortable="false" width="60">
     <af:selectOneChoice value="#{row.bindings.ImputSam.inputValue}"
                                            readOnly="#{row.bindings.IsReadOnly.inputValue}" id="imputSam"
                                            contentStyle="border:none;background-color:#7f7f7f;"
                                            autoSubmit="true" partialTriggers="selectCP"
                                            simple="true">
                          <f:selectItems value="#{row.bindings.ImputSam.items}"/>
                        </af:selectOneChoice>
                      </af:column>In the view object, the view accessors is dependant of an attribute. So there is a view criteria in the accessors, with row level existence checked.
If anyone has a clue ?
Regards
Fred-

So basicly ;
- there's one updatable view object, one of his attribute has a list of value usage (like this : [http://download.oracle.com/docs/cd/E12839_01/web.1111/b31974/bcquerying.htm#CHDHBDDE|http://download.oracle.com/docs/cd/E12839_01/web.1111/b31974/bcquerying.htm#CHDHBDDE] )
- this list of value refers to a read only view objects, with one bind variable and one view criteria
- the first VO is dropped has updata table
and there goes the problem.
Regards
Fred

Similar Messages

  • Strange behaviour when accessing Oracle 8i table from servlet

    Hi there,
    First a little background, I've got a 2 column table in an Oracle 8i DB that holds a very simple code to word map. There are no strange characters. Both columns are varchar.
    From my desktop machine, when I execute the the following:
    <SNIP>
                OracleDataSource ods = new OracleDataSource();
                ods.setDriverType("thin");
                ods.setServerName("DBserver.db");
                ods.setDatabaseName("DB");
                ods.setPortNumber(1527);
                ods.setUser("user");
                ods.setPassword("password");
                Connection connection = ods.getConnection();
                Statement stmt = connection.createStatement();
                ResultSet res = stmt.executeQuery(SQL);
                CachedRowSet crs = new CachedRowSetImpl();
                crs.populate(res);
                while (crs.next()) {
                    System.out.println("ID: " + crs.getString(1) +
                                       ",  Name: " + crs.getString(2));
                }<SNIP>
    Everything works fine, and I get the results I expect (both return values for getString(1) and getString(2) are exactly as they are stored in the table)
    HOWEVER:
    When I execute the same exact code in a servlet sitting on a Tomcat server (I'm using a simple applet servlet model to access the table and return a response to the applet), crs.getString(int) returns strings like: 0x53, 0x54, 0x4E and so on.
    I am unsure what this means, and would be grateful for any assistance. I am wondering where to start to troubleshoot the problem.

    I suggest you use the name of the field in your getString() so you can be sure what field its getting.
    Example:
    from:
    crs.getString(1)
    to:
    crs.getString("first_name");
    Also, I suggest you get a connection, use it, and close it (along with closing the resultSet and statement) all within a try/catch/finally block. You have to close the connection when you are done with it or you may run out of connections.
    Also, I suggest replacing this:
    CachedRowSet crs = new CachedRowSetImpl();
    crs.populate(res);
    while (crs.next()) {
    System.out.println("ID: " + crs.getString(1) +
    ", Name: " + crs.getString(2));
    with something like this:
    while(resultSet.next()){
    System.out.println("ID"
    System.out.println("ID: " + resultSet.getString("first_name") +
    ", Name: " + resultSet.getString("last_name"));
    }

  • Strange behaviour on text insert into a HTML pane

    Hi all,
    I am trying to fix a problem on inserting a span tag into an existing html page (in an EDITABLE JEditorPane).
    The behaviour:
    Assuming the cells in a table (3 rows, 2 columns) are numbered from 1 to 6, with cell one being the top left most, cell 2 top right, cell 3 middle left, etc.
    1. Inserting the text "<span></span>" in cell 4 causes during any attempt to later type into cell 5 the characters to be appended instead into cell 4, directly after the close span tag.
    2. The insertion in the first place behaves strange. If I have the caret positioned for cell 5 so that I can insert there
    (via the function void javax.swing.text.html.HTMLEditorKit.insertHTML(HTML Document doc, int offset, String html, int popDepth, int pushDepth, Tag insertTag) )
    even though the caret position is visible in cell 5, the insertion seems to take place in cell 4.
    I can sort of compensate for this by adding 1 to the offset. However, then when inserting into a line of text, for example, "the quick red fox jumped over the lazy dog"
    I insert directly before the 'j' in 'jumped', the insertion looks like this "the quick red fox j<span>..</span>umped over the lazy dog"
    So that is no solution.
    IMPORTANT! Just to prove it is not the span tag causing the trouble, if this span tag already exists in a cell on 'Load' of the html file, the strange behaviour is not observed.
    Something is going wrong here. It is me? Or is it a bug?
    Please help!!
    Here is a test app, and the test html you can use (place in current directory).
    Please test like this:
    1. run application (the html should be loaded into the pane)
    2. the span tag is programmed to automatically insert at cell 4 (by using the +1 method on the insert)
    3. another span tag was already existing in the html file, at cell 8
    4. Attempt to type into cell 5
    result: the text appears instead at cell 4
    5. Type into cell 9
    result: the text correctly is entered into cell 9
    See the difference!!
    Help!
    The test java app:
    package small.test;
    import java.awt.BorderLayout;
    import java.awt.Container;
    import java.io.File;
    import java.io.FileReader;
    import java.io.IOException;
    import java.io.StringReader;
    import javax.swing.JEditorPane;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    import javax.swing.SwingUtilities;
    import javax.swing.text.JTextComponent;
    import javax.swing.text.html.HTML;
    import javax.swing.text.html.HTMLDocument;
    import javax.swing.text.html.HTMLEditorKit;
    import javax.swing.text.html.parser.ParserDelegator;
    public class HtmlInsertTest extends JEditorPane
         public HtmlInsertTest()
         public static void main(String args[])
              JFrame frame = new JFrame("Loading/Saving Example");
              Container content = frame.getContentPane();
              frame.setSize(600, 600);
              final HtmlInsertTest editorPane = new HtmlInsertTest();
              editorPane.setEditable(true);
              JScrollPane scrollPane = new JScrollPane(editorPane);
              content.add(scrollPane, BorderLayout.CENTER);
              editorPane.setEditorKit(new HTMLEditorKit());
              JPanel panel = new JPanel();
              content.add(panel, BorderLayout.SOUTH);
              frame.setSize(600, 600);
              doLoadCommand(editorPane);
              editorPane.insertHTML("<span>inserted text</span>", 84);
              frame.setVisible(true);
         public static String getHTML()
              return
              "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">"+
              "<HTML>"+     "<HEAD>"+
              "     <META HTTP-EQUIV=\"CONTENT-TYPE\" CONTENT=\"text/html; charset=utf-8\">"+
              "     <TITLE></TITLE>"+          
              "</HEAD>"+
              "<BODY LANG=\"en-AU\" DIR=\"LTR\">"+
              "<P STYLE=\"margin-bottom: 0cm\">This is a test xhtml document. "+
         "     </P>"+
         "     <P STYLE=\"margin-bottom: 0cm\">"+
         "     </P>"+
         "     <P STYLE=\"margin-bottom: 0cm\">Here is a table:</P>"+
         "     <P STYLE=\"margin-bottom: 0cm\">"+
         "     </P>"+
         "     <p></p>"+
               "     <TABLE WIDTH=100% BORDER=1 BORDERCOLOR=\"#000000\" CELLPADDING=4 CELLSPACING=0>"+
         "          <TR VALIGN=TOP>"+
         "               <TD WIDTH=50%>"+
         "                    <P>It has</P>"+
         "               </TD>"+
         "               <TD WIDTH=50%>"+
         "                    <P>2 columns</P>"+
         "               </TD>"+
         "          </TR>"+
         "          <TR VALIGN=TOP>"+
         "               <TD WIDTH=50%><P>And 4 rows</P></TD>"+
         "               <TD WIDTH=50%><P></P></TD>"+
         "          </TR>"+
         "          <TR VALIGN=TOP>"+
         "               <TD WIDTH=50%><P></P></TD>"+
         "               <TD WIDTH=50%><P></P></TD>"+
         "          </TR>"+
         "          <TR VALIGN=TOP>"+
         "               <TD WIDTH=50%><P></P></TD>"+
         "               <TD WIDTH=50%><P><span>existing text</span></P></TD>"+
         "          </TR>"+
         "          <TR VALIGN=TOP>"+
         "               <TD WIDTH=50%><P></P></TD>"+
         "               <TD WIDTH=50%><P></P></TD>"+
         "          </TR>"+
         "     </TABLE>"+
         "     <P STYLE=\"margin-bottom: 0cm\">"+
         "     </P>"+
         "     <P STYLE=\"margin-bottom: 0cm\">"+
         "     </P>"+
         "     <P STYLE=\"margin-bottom: 0cm\">"+
         "     </P>"+
         "     <P STYLE=\"margin-bottom: 0cm\">We will test the drag and drop"+
         "     functionality with this document. "+
         "     </P>"+
         "     <P STYLE=\"margin-bottom: 0cm\">It will be loaded with the hlml editor.</P>"+
         "     <P STYLE=\"margin-bottom: 0cm\">"+
         "     </P>"+
         "     <P STYLE=\"margin-bottom: 0cm\">"+
         "     </P>"+
         "     </BODY>"+
         "     </HTML>";
         public static void doLoadCommand(JTextComponent textComponent)
              StringReader reader = null;
              try
                   System.out.println("Loading");
                   reader = new StringReader(getHTML());
                   // Create empty HTMLDocument to read into
                   HTMLEditorKit htmlKit = new HTMLEditorKit();
                   HTMLDocument htmlDoc = (HTMLDocument)htmlKit.createDefaultDocument();
                   // Create parser (javax.swing.text.html.parser.ParserDelegator)
                   HTMLEditorKit.Parser parser = new ParserDelegator();
                   // Get parser callback from document
                   HTMLEditorKit.ParserCallback callback = htmlDoc.getReader(0);
                   // Load it (true means to ignore character set)
                   parser.parse(reader, callback, true);
                   // Replace document
                   textComponent.setDocument(htmlDoc);
                   System.out.println("Loaded");
              catch (Exception exception)
                   System.out.println("Load oops");
                   exception.printStackTrace();
              finally
                   if (reader != null)
                        reader.close();
         public void insertHTML(String text, int offset)
              SwingUtilities.invokeLater(new insertAction(this, text, offset));
         class insertAction implements Runnable
              String text = "";
              int offset = 0;
              JEditorPane jEditorPane1 = null;
              public insertAction(JEditorPane _jEditorPane1, String _text, int _offset)
                   jEditorPane1 = _jEditorPane1;
                   text = _text;
                   offset = _offset;
              @Override
              public void run()
                   HTMLDocument doc = (HTMLDocument)jEditorPane1.getDocument();
                   HTMLEditorKit kit = (HTMLEditorKit)jEditorPane1.getEditorKit();
                   try
                        System.out.println("reading from string reader");
                        kit.insertHTML(     doc,
                                          offset,//+1
                                          text,
                                          0,//0
                                          0,//0
                                          HTML.Tag.SPAN);
                        System.out.println(jEditorPane1.getText());
                   catch (Exception e)
                        System.out.println("error inserting html: " + e);
    }Edited by: svaens on Jul 16, 2009 6:34 PM
    fix another stuffed up attempt at a SSCCE.

    Well, I know nothing about HTML in JEditorPanes. I have never been able to figure out how insertions work.
    My comment was a warning to others. Some people (like me) avoid answering posting of this type for reasons given in the JavaRanch link. Others will answer anyway. Other might first check the other site to see if they are wasting there time, but they can only do that if a link was posted with the original question.
    The only suggestion I have is to repost the question, (since this posting is now completely off topic) making sure to then respond to this posting stating that a fresh question has been asked so you don't get a discussion going on in two places.

  • How to delete duplicates in oracle 10g ( strange behaviour)

    Recently we migrated from oracel 8i to oralce 10g and we face this problem.
    When we try to delete duplicates using rowid ( analytical functions row_number()/
    or normal delete ) and commit the same , still we find some duplicates to be existing because of which we are not able to enable costriants and resulting in process failure.
    When we run the same delete statement next time it removes more duplicates than the required or sometimes required duplicates resulting in abnormal behaviour.
    I don not understand this strange behaviour after upgrading to oracle 10g.
    It'd be great if some one who has idea on this can throw light on the same.
    thanks

    Gasparotto,
    Thanks a lot for letting me know a new procedure to delete duplicates sing lead function.
    I've tried this code on a temp table and it worked, let me use the same query on the prodn side and test the same.
    Procedure for deletion of duplicates using lead analytical function.
    create table temp ( col1 number(2) , col2 number(2) , col3 number(2));
    insert into temp values ( 1,2,10);
    insert into temp values ( 1,2,20);
    insert into temp values ( 1,2,30);
    insert into temp values ( 3,2,10);
    insert into temp values ( 3,4,12);
    insert into temp values ( 3,4,45);
    commit;
    COL1 COL2 COL3
    1 2 10
    1 2 20
    1 2 30
    3 2 10
    3 4 12
    3 4 45
    select col1,col2 , col3, LEAD(rowid) OVER (PARTITION BY col1,col2 order by null) from temp;
    COL1 COL2 COL3 LEAD(ROWID)OVER(PA
    1 2 10 AAAVBjAApAAAFyGAAB
    1 2 20 AAAVBjAApAAAFyGAAC
    1 2 30
    3 2 10
    3 4 12 AAAVBjAApAAAFyGAAF
    3 4 45
    6 rows selected.
    select rowid , temp.* from temp ;
    ROWID COL1 COL2 COL3
    AAAVBjAApAAAFyGAAA 1 2 10
    AAAVBjAApAAAFyGAAB 1 2 20
    AAAVBjAApAAAFyGAAC 1 2 30
    AAAVBjAApAAAFyGAAD 3 2 10
    AAAVBjAApAAAFyGAAE 3 4 12
    AAAVBjAApAAAFyGAAF 3 4 45
    SQL> DELETE temp
    WHERE rowid IN
    ( SELECT LEAD(rowid) OVER (PARTITION BY col1, col2 ORDER BY null)
    FROM temp ); 2 3 4
    3 rows deleted.
    SQL> select rowid , temp.* from temp ;
    ROWID COL1 COL2 COL3
    AAAVBjAApAAAFyGAAA 1 2 10
    AAAVBjAApAAAFyGAAD 3 2 10
    AAAVBjAApAAAFyGAAE 3 4 12
    Thanks for the reply

  • Strange behaviour on reading procfs

    Hello,
    I have a strange behaviour reading process table from procfs. Some processes have a resident size and image size of 0 (zero). So I wrote a little test program and generated a 32bit binary. It gave me the same result. After I made a 64bit binary and this brought the expected results. Do anyone of you have an idea what i'm making wrong. Below you can find an output example and the code of the program.
    Every answer is appreciated
    erinda
    pfs.s32pid name nlwp %cpu %mem image resident
    1 init 1 0.00 0.03 2368 1184
    7 svc.startd 13 0.01 0.04 8696 1720
    649 snmpd 1 0.00 0.08 0 0
    24151 oracle 11 0.00 7.01 0 0
    pfs.s64pid name nlwp %cpu %mem image resident
    1 init 1 0.00 0.03 2368 1184
    7 svc.startd 13 0.01 0.04 8696 1720
    649 snmpd 1 0.00 0.08 9352 3440
    24151 oracle 11 0.00 7.01 330240 286664
    and here the program
    int main(int ac, char * av[])
    struct dirent * procEntry;
    char prcPath[PRARGSZ];
    psinfo_t prcInfo;
    pid_t pid;
    int rtc;
    DIR * procDir = opendir("/proc");
    if(procDir == NULL)
    printf("opendir(/proc) failed\n");
    return 1;
    printf(" pid name nlwp %%cpu %%mem image resident\n");
    printf("----------------------------------------------------------\n");
    rewinddir(procDir);
    while(procEntry = readdir(procDir))
    if(procEntry->d_name[0] == '.' || // skip "." and ".."
    procEntry->d_name[0] == '\0') // skip empty name
    continue;
    pid = atoi(procEntry->d_name);
    if(pid == 0 || pid == 2 || pid == 3)
    continue;
    size_t size = sizeof(psinfo_t);
    sprintf (prcPath, "/proc/%s/psinfo", procEntry->d_name);
    int pprocfs = open(prcPath, O_RDONLY);
    if (pprocfs < 0)
    return 2;
    else
    ssize_t bytesRead = read(pprocfs, &prcInfo, size);
    if (bytesRead != size)
    return 3;
    close (pprocfs);
    printf(" %5d %-15s %4d %5.2f %5.2f %8lu %8lu\n",
    prcInfo.pr_pid,
    prcInfo.pr_fname,
    prcInfo.pr_nlwp,
    (float)(100.0 * prcInfo.pr_pctcpu / 0x8000),
    (float)(100.0 * prcInfo.pr_pctmem / 0x8000),
    (ulong_t)prcInfo.pr_size,
    (ulong_t)prcInfo.pr_rssize);
    }

    Hello.
    If a 32 bit process reads from /proc different structures are returned as if a 64 bit process reads the same files.
    In the OpenSolaris sources this can be seen in http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/common/fs/proc/prvnops.c#2600 (line 2600).
    Unfortunately a 32 bit task cannot get all information about a 64 bit task - at least not in current Solaris version. I think this is a problem to be solved by Sun...
    Martin
    If anyone from Sun involved in the development of the procfs reads this: My proposal is:
    /proc/xxx/psinfo32 and psinfo64 and a symlink psinfo. The symlink's destination depends on the reading processes data model....
    (The same should be done with all files (lwpinfo...) in /proc).
    Another idea is a special IOCTL that controls if a 32 bit task wants to access the 64 bit structures...

  • Strange behaviour or not?

    Hi all...I'm new in this forum and I have a question to you. I think my curiosity is about the compiler, so I post here.
    I use Java SE 1.5 and 1.6. If I write a simple class like the following
    public class Prova{
    public static void main(String[] args){
    Integer a1=128;
    Integer a2=128;
    /*1*/System.out.println(a1==a2);
    /*2*/System.out.println(a1);
    /*3*/System.out.println(a2);
    I get the following strange result
    /*1*/ prints true if a1 and a2 are both inizialized between -128 and 127 (exactly 256 values, the ones obtainable from a byte) and false for values less then -128 or bigger then 127...
    Is this a strange behaviour or not? Why do I obtain such results?
    please note that /*2*/ and /*3*/ ALWAYS print the declared values (in this case 128).
    thank you!

    Shadow-DK wrote:
    From version 1.5 that declaration began correct and the result was similar to Integer i = new Integer(100);
    No that wouldn't permit caching. Its like Integer i = Integer.valueOf(100);The caching MUST occur for values -128 thru 127, it may occur for other values. I would not rely on caching not occurring outside that range.
    See [the language spec section on boxing conversion|http://java.sun.com/docs/books/jls/third_edition/html/conversions.html#5.1.7]
    If you aren't sure what the compiler is doing, it can be informative to use the javap command with the -c option to view the classfile.
    Usage: javap <options> <classes>...
    where options include:
       -c                        Disassemble the code
       -classpath <pathlist>     Specify where to find user class files
       -extdirs <dirs>           Override location of installed extensions
       -help                     Print this usage message
       -J<flag>                  Pass <flag> directly to the runtime system
       -l                        Print line number and local variable tables
       -public                   Show only public classes and members
       -protected                Show protected/public classes and members
       -package                  Show package/protected/public classes
                                 and members (default)
       -private                  Show all classes and members
       -s                        Print internal type signatures
       -bootclasspath <pathlist> Override location of class files loaded
                                 by the bootstrap class loader
       -verbose                  Print stack size, number of locals and args for met
                                 If verifying, print reasons for failureBruce

  • Strange behaviour of data element  object

    Dear Gurus,
    I have incremented the field length of a z table's field from 5 (type DEC)  to 8 by increasing the corresponding domain length . But the internal tables that refer to this field still refer to the old value 5, though the table is accepting values for this field with 8 length through 'Create Entries' in SE11.
    The problem seems to be in the runtime object of the corresponding data element which shows
    database length = 5 
    abap length = 5
    BUT dictionary length = 8.
    Could anyone pls help diagnose this strange behaviour as even if I create new domains with new data elements for this table field ,it gives the SAME RUNTIME OBJECT STATUS as mentioned above.
    Rewards are awaiting the right answer.
    Thanks in advance.
    Shweta.

    Hi,
    For these kind of problems, you can use the Database utility tool (SE14), give the table name press enter, click Adjust and Activate Database table also select save data radiobutton. After this Re-Run the Program, it works fine, also cross-check in the Debugging screen.
    Cheers...
    Santosh.
    Mark Usefull Answers.

  • Strange behaviour in web cartographic application

    Hi group,
    I have noticed a strange behaviour with the overview tool of my web application with MapInfo data uploaded in Oracle 10g with EasyLoader. When I put the cursor near the limit of some polygons but outside of its surface, the overview tool shows the info of this polygon when it should show the info of the neighbor polygon. It's like if the boundary of the polygon is outside of its limit but visually the borders are looking good.
    After many tests, I think the problem may be related with the tolerance precision and the table bounds in sdo_metadata. The table is in lat/long (8307) and the tolerance setted by Easyloader is X: 7.9013E-6 and Y:1.01201E-5
    In MapInfo I gave this bounds to the table: min x: -82.0483359 min y: 43.2322719 max x: -54.6521931 max y: 64.3415211 but when loaded in Oracle the bounds are automatically set to -180/180 and -90/90
    I tried to change the tolerance and the bounds in Oracle and create a new spatial index without success. Changing the bounds in MapInfo prior uploading to Oracle was unsuccessfull as well.
    Anything else could be tryed?
    Thank you
    Maxime D.

    Maxime,
    Didn't you contact me privately about something like this? No matter.
    the tolerance setted by Easyloader is X: 7.9013E-6 and Y:1.01201E-5These tolerances are not what Oracle says should be set for geodetic (8307) data. From the documentation...
    The tolerance value for geodetic data should not be smaller than 0.05 (5 centimeters)You can do one of two things:
    1. If you have SQL Developer, install GeoRaptor and then right mouse click on the table in the connect pane and select Metadata Manager. Then calculate XY values and if GeoRaptor doesn't set the tolerances to 0.05 do it manually. Then press Update.
    2. Using SQLPlus or SQL Developer's SQL Worksheet, do this:
    update user_sdo_geom_metadata
    set diminfo = SDO_DIM_ARRAY(SDO_DIM_ELEMENT(-82.0483359,-54.6521931,0.05),
                                SDO_DIM_ELEMENT(43.2322719,64.3415211,0.05)),
           SRID = 8307
    where table_name = YOUR TABLE
      and column_name = YOUR SDO_GEOMETRY COLUMN NAME;
    commit;NOTE: It is OK to have ordinate ranges different from -180..180, -90..90.
    Drop your index and rebuild.
    Should now be OK.
    If it starts to misbehave again (and the metadata has been changed) then all one could say is that perhaps the MapInfo software is modifying the metadata some how. Perhaps this is related to the MAPINFO_MAPCATALOG?
    Any MapInfo gurus know?
    regards
    Simon

  • Strange behaviour with nested overflow headers

    Hi there,
    I have a strange behaviour with nested overflow headers. I have a hierarchy with some dynamic tables an several headers for the hierarchy steps. When the table entries lead to an page overflow, I would assume, that all parent headers will be shown. But unfortunatley only the last (the deepest in the hierarchy) defined overflow header will be shown. Here you can see a quick example of it. (http://www.nemonon.de/HeaderProblem.xdp)
    Any help would be very welcome.
    Thanks and greetings,
    Joerg

    That will sure work for some requirements and thanks for the ideas. But this would fail for the second table. Perhaps my example xdp only shows the behaviour of the nested overflow headers and it´s structure is reduced to show that. The real situation is a bit different. The parent containers also contain some other content. The Problem is not the table...I've just chosen it to produce some content and another nested header. Just try to uncheck the overflow header of the table. This will lead to, that the next defined header (in this case "HeaderThree" is shown. When you go on by also disabling that header, the next one will be shown...and so on. This shows, that the headers for their own are functional, but they fail in combination.
    Greetings,
    Joerg

  • URGENT: Strange behaviour! Help!

    Hi All.
    When I run the enclosed program I am getting some strange behaviour. For instance, when I click on the EDIT button nothing happens, but when I click on the DELETE button everything is fine!
    And I can also not run the code in edit() directly after add(). Nothing happens. PLEASE HELP ME. I am going mad because I cannot see what is wrong!
    I want to run the code associated with the buttons to update my JTable. Please tell me if there is something wrong in the code.
    As I say - it works fine when I click the DELETE button, but on the others it doesn't work.
    Please tell me if you need more information!
    HOPE TO HEAR FROM SOMEONE BEFORE I KILL MYSELF OUT OF FRUSTRATION!!!!
    C
    // The "Main" class.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.border.*;
    import javax.swing.event.*;
    import javax.swing.JPanel;
    import javax.swing.JTable;
    import javax.swing.table.AbstractTableModel;
    import javax.swing.JScrollPane;
    import javax.swing.JFrame;
    import javax.swing.SwingUtilities;
    import javax.swing.JOptionPane;
    public class Team
        extends JFrame
        implements ActionListener {
      JLabel LTeamSetup = new JLabel();
      JButton Edit = new JButton();
      Font customFont1 = new Font("SansSerif", Font.BOLD, 18);
      Font customFont2 = new Font("SansSerif", Font.PLAIN, 12);
      JButton Delete = new JButton();
      JButton Close = new JButton();
      JButton Add = new JButton();
      Border border1;
      TitledBorder titledBorder1;
      TeamDataModel myModel = new TeamDataModel();
      JTable Table = new JTable(myModel);
      JScrollPane scrollPane = new JScrollPane(Table);
      public Team() {
        super("Add Team Window");
        setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
        setSize(790, 560);
        setLocation(3,5);
        setVisible(true);
        try {
          new DBTeam();
          jbInit();
        catch (Exception e) {
          e.printStackTrace();
      public void actionPerformed(ActionEvent event) {
        if (event.getActionCommand() == "CLOSE") {
          close();
        if (event.getActionCommand() == "ADD") {
          add();
        if (event.getActionCommand() == "DELETE") {
          delete();
        if (event.getActionCommand() == "EDIT") {
          edit();
      public void close() {
        this.dispose();
      public void add() {
        new TeamAdd();
      public void delete() {
        DBTeam.numRows();
        DBTeam.rows();
        Table.tableChanged(new TableModelEvent(myModel));
        Table.repaint();
      public void edit() {
        DBTeam.numRows();
        DBTeam.rows();
        Table.tableChanged(new TableModelEvent(myModel));
        Table.repaint();
      ///////////////////////////SETUP SWING FRAME////////////////////////
      private void jbInit() throws Exception {
        border1 = BorderFactory.createCompoundBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED,Color.white,Color.white,new Color(124, 124, 124),new Color(178, 178, 178)),BorderFactory.createEmptyBorder(1,1,1,1));
        this.getContentPane().setLayout(null);
        LTeamSetup.setBounds(new Rectangle(23, 4, 203, 50));
        LTeamSetup.setEnabled(true);
        LTeamSetup.setFont(new java.awt.Font("SansSerif", 1, 36));
        LTeamSetup.setForeground(Color.black);
        LTeamSetup.setText("Team Setup");
        LTeamSetup.setBounds(new Rectangle(41, 13, 390, 50));
        Edit.setText("EDIT");
        Edit.setBounds(new Rectangle(647, 157, 94, 45));
        Edit.setActionCommand("EDIT");
        this.setResizable(false);
        this.setTitle("Team Setup");
        Delete.addActionListener(this);
        Delete.setBounds(new Rectangle(647, 214, 94, 45));
        Delete.setText("DELETE");
        Close.setText("CLOSE");
        Close.setBounds(new Rectangle(641, 480, 105, 26));
        Close.addActionListener(this);
        Add.setText("ADD");
        Add.setBounds(new Rectangle(647, 99, 94, 45));
        Add.addActionListener(this);
        scrollPane.setBounds(new Rectangle(40, 96, 567, 412));
        this.getContentPane().add(LTeamSetup, null);
        this.getContentPane().add(Delete, null);
        this.getContentPane().add(Close, null);
        this.getContentPane().add(Add, null);
        this.getContentPane().add(Edit, null);
        this.getContentPane().add(LTeamSetup, null);
        this.getContentPane().add(scrollPane, null);
        scrollPane.getViewport().add(Table, null);
        repaint();
    }

    if (event.getActionCommand() == "CLOSE") {
    if (event.getActionCommand() == "ADD") {
    if (event.getActionCommand() == "DELETE") {
    if (event.getActionCommand() == "EDIT") {And these look highly dubious, too. Shouldn't you be doing
    event.getActionCommand().equals("CLOSE")
    etc.?

  • Strange behaviour concerning JSF phases

    Hi all,
    I have a JSF page that displays two custom JSF tables, ‘A’ and ‘B’ with his correspondent’s pagers.
    <mycustom:table id="A" ... pager="#{tableA.pager}">
    <mycustom:table id="B" ... pager="#{tableB.pager}">I experiment a strange behaviour when I hit ‘tableA.next’ link.
    This is the flow (summarized):
    First-Page-Load (START)
    encodeA
    encodeB
    First-Page-Load (END)
    <User hits TableA.nextPage pager link>
    decodeA
         pagerA.setNext(true)
    decodeB
    encodeA
         pagerA.getNext() returns ‘false’ ¿? (here is the problem! should return ‘true’)
    encodeB
         pagerB.getNext() returns ‘true’ ¿? (should return ‘false’)Any help will be appreciated...

    Self-solved:
    Inside the ‘decode’ method I must get the ‘pager’:
    pager = getPager(table); //This line is essential!!
    String pLink = (String)requestMap.get("pLink" + clientId);
    if ((pLink != null) && (!pLink.equals(""))) {
         if (pLink.equals("next")) { //Siguientes                                         
              pager.setNext(true);
         } else if (pLink.equals("previous")) { //Anteriores
              pager.setPrevious(true);
    }

  • TCD - Peripheral Call Type 9 & 10 Strange Behaviour

    Hi all,
    I'm trying to get to the bottom of what causes ICM/UCCE to label a TCD record with Peripheral Call Type 9 or 10.
    9 = Out
    10 = Agent Inside
    These values are used to populate the interval tables with ExternalOut and InternalOut
    I'm seeing strange behaviour in that external calls are being classified PCT 10. Its worse on 1 pg pair and cucm cluster than the other (both pims agent ext length is 4 if this has any bearing).
    From Europe PG and CUCM, most ExtOut calls are correctly classified as 9 (about 95%), but there are some 10:
    DateTime
    PeripheralCallType
    DigitsDialed
    CallDisposition
    CallDispositionFlag
    18/02/2013 15:10:08
    9
    00415824xxxxx
    10
    4
    18/02/2013 15:10:34
    10
    00415824xxxxx
    10
    4
    But for Asia PG and CUCM, most ExtOut calls are classified as 10 (about 98%), but again there are some with the correct 9:
    DateTime
    PeripheralCallType
    DigitsDialed
    CallDisposition
    CallDispositionFlag
    18/02/2013 11:54:14
    10
    0080346xxxxx
    14
    1
    18/02/2013 12:09:59
    9
    0080302xxxxx
    14
    1
    For info I also see external calls with dispostion 10 and 4 in Asia as Agent Inside so it doesn't seem to tie up with that.
    Any thoughts on what could be the cause, I'm kind of thinking along the lines of CUCM on net/off net or soemthing like that?
    Thanks
    Neil

    Attached the full length TCD record.
    Also found a pdf document id 67988 External Calls Appear as Internal in IPCC Statistics which says:
    CauseThis problem occurs due to a change in Cisco JTAPI version. In earlier versions of Cisco JTAPI, when a
    caller calls an address outside the cluster, Cisco CallManager delivers the CallCtlConnNetworkReachedEv
    and CallCtlConnNetworkAlertingEv events for the far−end address.
    Cisco CallManager version 4.0 and later do not deliver these events. In these versions, the CallCtlConnection
    for the far−end address goes to the ESTABLISHED state from the OFFERED state. The application receives
    the CallCtlConnOfferedEv and CallCtlConnEstablishedEv events for the far−end address. The application
    does not receive the CallCtlConnNetworkReachedEv and CallCtlConnNetworkAlertingEv events.
    In order to receive the network events, you must turn on the "Allow overlap sending" flag on the route pattern
    configured for the gateway. A new jtapi.ini parameter called "AllowNetworkEventsAfterOffered" is
    introduced to allow the application to control the delivery of these events. Applications that need the network
    events but cannot turn on this flag can use this new ini parameter to receive network events for outgoing calls.
    They are having a PG/CUCM upgrade in a few weeks so its quite possible this may sort it.

  • Strange behaviour in a select

    Hi experts,
    i'd like you help to understand a strange behaviour on a 10.2.0.4 db.
    i use a select instruction in a plsql cursor with a where condition like the following:
    select fields
    from table1, table2, table3
    where
    field1 = parameter 1 and
    field2 = parameter 2 and
    field3 = parameter 3 and
    function(field1, field2) = 0
    usually this instruction works without problems.
    Sometimes (i think depending on the parameter) it stucks.
    I have moved the last row of the where condition right after the where instruction:
    select fields
    from table1, table2, table3
    where
    function(field1, field2) = 0 and
    field1 = parameter 1 and
    field2 = parameter 2 and
    field3 = parameter 3
    and it works with the usual performances (with the parameters that does not work on the first select).
    The function returns quickly it's result regardless the parameter used.
    I've compared (by toad) the execuption plan of the two selects and they are the same.
    Could you please explain this behaviour ?
    i can leave on the package the release 2 select but i'm not sure it fixes the problem.
    I'd like to understand something more ?
    thanks in advance
    best regards
    Stefano

    You can verify that the predicates evaluation orders are different in the two queries looking at the "Predicate Information" that follows the execution plan:
    SQL> create function f(a number,b number) return number is
      2  begin
      3  return a+b;
      4  end;
      5  /
    Function created.
    SQL> select * from t;
                       A                    B
                       2                    5
                       3                    7
                       4                    5
                       3                    4
                       6                    6
                       5                    7
                       3                    8
                       5                    9
    8 rows selected.
    SQL> set autot on exp
    SQL> select /*+ ORDERED_PREDICATES */ *
      2    from t
      3  where f(a,b)=7
      4  and a=3
      5  and b=4;
                       A                    B
                       3                    4
    1 row selected.
    Execution Plan
    Plan hash value: 1601196873
    | Id  | Operation         | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT  |      |     1 |    26 |     3   (0)| 00:00:01 |
    |*  1 |  TABLE ACCESS FULL| T    |     1 |    26 |     3   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       1 - filter("F"("A","B")=7 AND "A"=3 AND "B"=4)
    Note
       - dynamic sampling used for this statement
    SQL> select /*+ ORDERED_PREDICATES */ *
      2    from t
      3  where a=3
      4  and b=4
      5  and f(a,b)=7;
                       A                    B
                       3                    4
    1 row selected.
    Execution Plan
    Plan hash value: 1601196873
    | Id  | Operation         | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT  |      |     1 |    26 |     3   (0)| 00:00:01 |
    |*  1 |  TABLE ACCESS FULL| T    |     1 |    26 |     3   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       1 - filter("A"=3 AND "B"=4 AND "F"("A","B")=7)
    Note
       - dynamic sampling used for this statementAs you can see, despite the two plans are identical, the predicate information row shows exacly the predicate evaluation order.
    If toad doesn't show predicate information (I don't use it) run your queries in sqlplus.
    Max
    [My Italian Oracle blog|http://oracleitalia.wordpress.com/2010/01/17/supporto-di-xml-schema-in-oracle-xmldb/]

  • One to many mapping - strange behaviour

    I noticed a strange behaviour which happens when working with 1 to n
    relationships. Maybe the behaviour is intended by the JDO specification or
    maybe I haven't set the proper kodo properties to make it work.
    Here's the problem:
    I have the following two classes wich I map to a database table each (using
    datastore identity):
    class Person
    private String name;
    private Collection cars;
    // setters and getters
    class Car
    private String model;
    private Person owner;
    // setters and getters
    When I have a persistent car object and I assign it to a persistent person
    like this:
    car.setOwner(person);
    and I immediately retrieve all cars of the person by calling:
    Collection c = person.getCars()
    the car ist not in the collection as I would expect it to be. In my opinion
    JDO should make sure the car is added to the collection.
    Even after I commit the whole transaction the car is still not in the
    collection.
    To make the car appear in the collection I have to create a new
    PersistentManager (when using javax.jdo.option.Optimistic=true) and refetch
    the person object again.
    Can anyone enlighten me on this problem?
    Thank you!
    Donat Hauser
    [email protected]
    mapping.jdo
    <class name="Person">
    <extension vendor-name="kodo" key="table" value="PERSON"/>
    <extension vendor-name="kodo" key="pk-column" value="ID"/>
    <extension vendor-name="kodo" key="lock-column" value="none"/>
    <extension vendor-name="kodo" key="class-column" value="none"/>
    <field name="name">
    <extension vendor-name="kodo" key="data-column"
    value="NAME"/>
    </field>
    <field name="cars">
    <collection element-type="Car"/>
    <extension vendor-name="kodo" key="inverse" value="owner"/>
    </field>
    </class>
    <class name="Car">
    <extension vendor-name="kodo" key="table" value="CAR"/>
    <extension vendor-name="kodo" key="pk-column" value="ID"/>
    <extension vendor-name="kodo" key="lock-column" value="none"/>
    <extension vendor-name="kodo" key="class-column" value="none"/>
    <field name="model">
    <extension vendor-name="kodo" key="data-column"
    value="MODEL"/>
    </field>
    <field name="owner">
    <extension vendor-name="kodo" key="data-column"
    value="OWNER"/>
    </field>
    </class>

    Donat,
    This is a bit of a philosophical question. One of the goals of JDO is to
    be as closely aligned to the Java language as possible, and Java has no
    concept of a shared relation. So, we do not perform any work to ensure
    that relations get 'magically' set on both sides. Instead, you must set
    both sides of the business relation yourself in Java code.
    The result of this is that code that you write will behave the same
    regardless of whether or not the objects are persistent. So, you can write
    test cases or non-persistent parts of your application and trust that the
    code will behave the same in both instances.
    -Fred
    In article <[email protected]>, M__ller Alfons wrote:
    >
    I noticed a strange behaviour which happens when working with 1 to n
    relationships. Maybe the behaviour is intended by the JDO specification or
    maybe I haven't set the proper kodo properties to make it work.
    Here's the problem:
    I have the following two classes wich I map to a database table each (using
    datastore identity):
    class Person
    private String name;
    private Collection cars;
    // setters and getters
    class Car
    private String model;
    private Person owner;
    // setters and getters
    When I have a persistent car object and I assign it to a persistent person
    like this:
    car.setOwner(person);
    and I immediately retrieve all cars of the person by calling:
    Collection c = person.getCars()
    the car ist not in the collection as I would expect it to be. In my opinion
    JDO should make sure the car is added to the collection.
    Even after I commit the whole transaction the car is still not in the
    collection.
    To make the car appear in the collection I have to create a new
    PersistentManager (when using javax.jdo.option.Optimistic=true) and refetch
    the person object again.
    Can anyone enlighten me on this problem?
    Thank you!
    Donat Hauser
    [email protected]
    mapping.jdo
    <class name="Person">
    <extension vendor-name="kodo" key="table" value="PERSON"/>
    <extension vendor-name="kodo" key="pk-column" value="ID"/>
    <extension vendor-name="kodo" key="lock-column" value="none"/>
    <extension vendor-name="kodo" key="class-column" value="none"/>
    <field name="name">
    <extension vendor-name="kodo" key="data-column"
    value="NAME"/>
    </field>
    <field name="cars">
    <collection element-type="Car"/>
    <extension vendor-name="kodo" key="inverse" value="owner"/>
    </field>
    </class>
    <class name="Car">
    <extension vendor-name="kodo" key="table" value="CAR"/>
    <extension vendor-name="kodo" key="pk-column" value="ID"/>
    <extension vendor-name="kodo" key="lock-column" value="none"/>
    <extension vendor-name="kodo" key="class-column" value="none"/>
    <field name="model">
    <extension vendor-name="kodo" key="data-column"
    value="MODEL"/>
    </field>
    <field name="owner">
    <extension vendor-name="kodo" key="data-column"
    value="OWNER"/>
    </field>
    </class>
    Fred Lucas
    SolarMetric Inc.
    202-595-2064 x1122
    http://www.solarmetric.com

  • Aliases file - Strange Behaviour

    Greetings all,
    I've been having some strange behaviour with my Postfix installations lately. My logfiles are filled with intermittent entries of:
    Oct 17 18:52:10 xserve1 postfix/smtpd[4117]: table hash:/etc/aliases(0,lock|fold_fix) has changed -- restarting
    Oct 17 18:52:12 xserve1 postfix/local[4129]: table hash:/etc/aliases(0,lock|no_regsub|no_proxy|no_unauth|fold_fix) has changed -- restarting
    This would seem to be a minor nuissance, but unfortunately it seems that mails are arriving in the second or two it takes for Postfix to restart, and are getting rejected or delayed because the service isn't available.
    Looking at the /etc/aliases/postfix file, something seems to be intermittently touching it. I don't see any changes to the file content, but the modification date is updated, and an extended (@) file attribute is added for "com.apple.TextEncoding".
    The only recent changes I have made to my config were to enable SASL with some directives ("smtpd_tls_auth_only = yes" for example) to ensure proper security.
    My servers are running 10.6.5 and 10.6.4. Any suggestions would be appreciated. Thanks.

    Looking at the logs, I'm begining to suspect that the offender is "com.apple.wikid.mailinglists". I don't use group mailing lists so I've disabled this item by adding disabled-true to its plist. Hopefully this solves the problem.

Maybe you are looking for