Examples of removeItem()


Examples of com.vaadin.data.util.sqlcontainer.SQLContainer.removeItem()

            throws SQLException {
        TableQuery tQuery = new TableQuery("people", connectionPool,
                SQLTestsConstants.sqlGen);
        SQLContainer container = new SQLContainer(tQuery);
        container.setAutoCommit(false);
        Assert.assertTrue(container.removeItem(container.getItemIds()
                .iterator().next()));

        Assert.assertEquals(4, tQuery.getCount());
        Assert.assertEquals(3, container.size());
        container.commit();
View Full Code Here

Examples of com.vaadin.data.util.sqlcontainer.SQLContainer.removeItem()

        TableQuery tQuery = new TableQuery("people", connectionPool,
                SQLTestsConstants.sqlGen);

        SQLContainer container = new SQLContainer(tQuery);
        container.setAutoCommit(true);
        Assert.assertFalse(container.removeItem("foo"));
    }

    /**********************************************************************
     * TableQuery row adding / modification tests
     **********************************************************************/
 
View Full Code Here

Examples of com.vaadin.data.util.sqlcontainer.SQLContainer.removeItem()

        tQuery.setVersionColumn("VERSION");
        SQLContainer container = new SQLContainer(tQuery);
        RowItem row = (RowItem) container.getItem(container.firstItemId());
        Assert.assertEquals("Junk", row.getItemProperty("TEXT").getValue());

        container.removeItem(container.firstItemId());
        container.commit();

        Connection conn = connectionPool.reserveConnection();
        PreparedStatement stmt = conn
                .prepareStatement("SELECT * FROM VERSIONED WHERE \"TEXT\" = ?");
View Full Code Here

Examples of com.vaadin.data.util.sqlcontainer.SQLContainer.removeItem()

        stmt.executeUpdate();
        stmt.close();
        conn.commit();
        connectionPool.releaseConnection(conn);

        container.removeItem(container.firstItemId());
        container.commit();
    }

    @Test
    public void removeRow_throwsOptimisticLockException_shouldStillWork()
View Full Code Here

Examples of com.vaadin.data.util.sqlcontainer.SQLContainer.removeItem()

        conn.commit();
        connectionPool.releaseConnection(conn);

        Object itemToRemove = container.firstItemId();
        try {
            container.removeItem(itemToRemove);
            container.commit();
        } catch (OptimisticLockException e) {
            // This is expected, refresh and try again.
            container.rollback();
            container.removeItem(itemToRemove);
View Full Code Here

Examples of com.vaadin.data.util.sqlcontainer.SQLContainer.removeItem()

            container.removeItem(itemToRemove);
            container.commit();
        } catch (OptimisticLockException e) {
            // This is expected, refresh and try again.
            container.rollback();
            container.removeItem(itemToRemove);
            container.commit();
        }
        Object id = container.addItem();
        RowItem item = (RowItem) container.getItem(id);
        item.getItemProperty("TEXT").setValue("foo");
View Full Code Here

Examples of com.vaadin.ui.OptionGroup.removeItem()

            @Override
            public void valueChange(ValueChangeEvent event) {
                if (optiongroup.isSelected(2)) {
                    optiongroup.setItemCaption(1, "A+");
                } else if (optiongroup.isSelected(3)) {
                    optiongroup.removeItem(2);
                    optiongroup.addItem(2);
                    optiongroup.setItemCaption(2, "B");
                }
            }
        });
View Full Code Here

Examples of com.vaadin.ui.Table.removeItem()

                        new Notification(
                                "ERROR",
                                "Table value has null in Set of selected items!",
                                Type.ERROR_MESSAGE).show(getPage());
                    }
                    table.removeItem(item);
                }
            }
        });

        layout.addComponent(button);
View Full Code Here

Examples of de.nava.informa.core.ChannelIF.removeItem()

  }

  public void testCreatedItemAddOne() throws MalformedURLException {
    ChannelIF channel = prepare();
    ItemIF firstItem = (ItemIF) channel.getItems().iterator().next();
    channel.removeItem(firstItem);
    assertEquals(7, channel.getItems().size());
    builder.createItem(channel, "another one", "9", new URL("http://9.net/"));
    assertEquals(8, channel.getItems().size());
    Iterator it = channel.getItems().iterator();
    int idx = 2;
View Full Code Here

Examples of de.nava.informa.core.ChannelIF.removeItem()

   * @param item item to delete.
   */
  public final void deleteItem(ItemIF item) {
    if (item instanceof Item) {
      final ChannelIF parent = ((Item) item).getParent();
      parent.removeItem(item);
    }

    items.remove(new Long(item.getId()));
    item.setId(-1);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.