import org.joget.apps.form.model.*; import org.joget.apps.form.service.*; import java.sql.*; import org.apache.commons.collections.SequencedHashMap; import java.util.*; public FormRowSet test() { FormRowSet f = new FormRowSet(); f.setMultiRow(true); Class.forName("com.mysql.jdbc.Driver").newInstance(); con = DriverManager.getConnection("jdbc:mysql://localhost:3306/jwdb?useUnicode=true&characterEncoding=UTF-8", "joget", "joget"); // declare datasource if(!con.isClosed()){ PreparedStatement stmt = con.prepareStatement("SELECT SzolgaltatasId, SzolgaltatasNev From SzerepkorokEsSzolgaltatasok where SzolgaltatasId NOT IN (SELECT Szolgaltatas From JogosultsagAdas where nev = '#variable.B_azon#') and Felelos LIKE 'szf1'"); ResultSet rs = stmt.executeQuery(); while (rs.next()) { FormRow r1 = new FormRow(); r1.put(FormUtil.PROPERTY_VALUE, rs.getString(1)); r1.put(FormUtil.PROPERTY_LABEL, rs.getString(2)); f.add(r1); } } return f; } return test();