Joget DX 8 Stable Released
The stable release for Joget DX 8 is now available, with a focus on UX and Governance.
Good day
Do you have any example about how to populate a selectbox from a postgres database?
I've trying this code, but it is not working.
import org.joget.apps.form.model.*;
import org.joget.apps.form.service.*;
import java.sql.*;
import org.apache.commons.collections.SequencedHashMap;
import java.util.*;
Class.forName("org.postgresql.Driver");
Connection connection = null;
connection = DriverManager.getConnection(
"jdbc:postgresql://localhost:5432/jwdb","user", "pwd");
connection.close();
if(!connection.isClosed()){
PreparedStatement stmt = connection.prepareStatement("select id_usuario, mviciv from a_umv_ejemplo");
ResultSet rs = stmt.executeQuery();
FormRowSet f = new FormRowSet();
f.setMultiRow(true);
while (rs.next())
Unknown macro:
f.add(vRow);
}
return f;
}
2 Comments
Hugo
Hi there,
Please see http://dev.joget.org/community/display/FORUM/Dynamic+cascading+drop-down+list%2C+using+Bean+Shell+Form+Binder?focusedCommentId=12978400#comment-12978400
Thanks
Camilo A. García
Thanks for the information, working nice now.
Camilo