users@glassfish.java.net

Re: WHERE CLAUSE NOT WORKING

From: <glassfish_at_javadesktop.org>
Date: Thu, 01 Nov 2007 11:06:43 PST

I am using Toplink's javax.persistence. I have a table which passes to a method when a row is selected. The result is bound to another table displaying two columns. The method code is:

public void getSection(java.lang.Short id){
sectionQuery = entityManager2.createNativeQuery("SELECT * from Section s WHERE s.page_id=?1",Section.class);
        sectionQuery.setParameter(1, id);
        sectionList = (java.util.List<Section>)sectionQuery.getResultList();
        abonding = org.jdesktop.swingbinding.SwingBindings.createJTableBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, sectionList, jTable3);
        org.jdesktop.swingbinding.JTableBinding.ColumnBinding columnBinding;
        columnBinding = abonding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${id}"));
        columnBinding.setColumnName("id");
        columnBinding.setColumnClass(Short.class);
        columnBinding = abonding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${align}"));
        columnBinding.setColumnName("Alignment");
        columnBinding.setColumnClass(String.class);
        abonding.bind();
 }
[Message sent by forum member 'evenden' (evenden)]

http://forums.java.net/jive/thread.jspa?messageID=243348