在下面的代码中,我有一个放射组,名为 "Pessoa Politicamente Exposta - Cadastro"
.
当某人点击 radio button
如果回答“是”,则必须出现文本字段。我试着使用
RadioGroup conditionalParentLabel
以及 conditionalParentValue,
但它不起作用。
我怎么在收音机和短信之间打这个电话?
private List<RadioGroup> getRadioGroups(String numProposta, String seq_envelope) throws Exception {
List<RadioGroup> radios = new java.util.LinkedList<RadioGroup>();
String RADIO_GROUPS =
"SELECT DISTINCT ear.cd_radio, er.ds_radio " +
" FROM envelope_assinatura_radio ear " +
" left JOIN envelope_radio er on ear.cd_radio = er.cd_radio " +
"WHERE ear.cd_envelope = ? " +
" AND ear.seq_envelope = ? ";
PreparedStatement ps = connection.getConnection().prepareStatement(RADIO_GROUPS);
ps.setString(1, numProposta);
ps.setString(2, seq_envelope);
ResultSet rs = ps.executeQuery();
String RADIO_GROUP_ITEM =
"SELECT tag, ds_valor " +
" FROM envelope_assinatura_radio " +
" WHERE cd_envelope = ? " +
" AND seq_envelope = ? " +
" AND cd_radio = ? ";
PreparedStatement psItem = connection.getConnection().prepareStatement(RADIO_GROUP_ITEM);
while (rs.next()) {
String cd_radio = rs.getString("cd_radio");
String ds_radio = rs.getString("ds_radio");
psItem.setString(1, numProposta);
psItem.setString(2, seq_envelope);
psItem.setString(3, cd_radio);
ResultSet rsItem = psItem.executeQuery();
RadioGroup group = new RadioGroup();
group.setRecipientId(seq_envelope);
group.setGroupName(ds_radio);
Tabs signerTabs = new Tabs();
while (rsItem.next()) {
Radio r = new Radio();
r.setAnchorString(rsItem.getString("tag"));
r.setValue(rsItem.getString("ds_valor"));
//group.conditionalParentLabel("Pessoa Politicamente Exposta - Cadastro");
//group.conditionalParentValue("Sim_1");
group.addRadiosItem(r);
}
if (group.getRadios().size() > 0) {
radios.add(group);
}
}
return radios;
}
private List<Text> getAssinaturaText(String numProposta, String seq_envelope) throws SQLException {
List<Text> docs = new java.util.LinkedList<Text>();
String GET_ASSTINATURA_TEXT =
" SELECT eac.ds_tag " +
" FROM envelope_assinatura_text eac" +
" WHERE eac.cd_envelope = ? " +
" AND eac.seq_envelope = ? ";
PreparedStatement ps = connection.getConnection().prepareStatement(GET_ASSTINATURA_TEXT);
ps.setString(1, numProposta);
ps.setString(2, seq_envelope);
ResultSet op = ps.executeQuery();
if (op.next()) {
Text text = new Text();
text.anchorString(op.getString("ds_tag"));
docs.add(text);
}
return docs;
}
暂无答案!
目前还没有任何答案,快来回答吧!