I have a combo that is filled with a list, which has 29 elements, and each element by selecting it in the combo displays more fields, then I have the following conditions, what it does is validate which document you selected and render the input corresponding to that selected document, but I use many if, and I feel that it is not good practice, how can I improve it or can I implement it?
//Dependiendo el tipo de docuemnto de nacionalidad, se mostraran campos
public void obtenerDocumentosNacionalidad() {
if (systiposprobatorios.getIdSysTipoProbatorio() == 1) {
muestraDetalleDocuemnto = true;
} else {
muestraDetalleDocuemnto = false;
}
if (systiposprobatorios.getIdSysTipoProbatorio() == 2) {
muestraDetalleActa = true;
} else {
muestraDetalleActa = false;
}
if (systiposprobatorios.getIdSysTipoProbatorio() == 3) {
muestraDetalleDeclaratoria = true;
} else {
muestraDetalleDeclaratoria = false;
}
if (systiposprobatorios.getIdSysTipoProbatorio() == 4) {
muestraDetalleCertificado = true;
} else {
muestraDetalleCertificado = false;
}
if (systiposprobatorios.getIdSysTipoProbatorio() == 5) {
muestraDetalleCedula = true;
} else {
muestraDetalleCedula = false;
}
if (systiposprobatorios.getIdSysTipoProbatorio() == 6) {
muestraCertifiMatricula = true;
} else {
muestraCertifiMatricula = false;
}
}