Jsp - formulario de alteraÇÃo

0 respostas
W

Ola Pessoal

Trabalho com desenvolvimento Web, mas precisamente com servlets.

Estou querendo usar Struts e estou com uma dúvida. Em formulários de alteração, por exemplo se eu quiser carregar um radio button com um dados extraídos do banco devo usar scriplet na JSP? Ou existe alguma outra forma.

com servlet faço assim:

"					<table border='0' width='100%' cellspacing='0' cellpadding='0' height='41'>" + LINE_SEP +
                            "						<tr>" + LINE_SEP +
                            "							<td width='100%' height='22'>" + LINE_SEP +
                            "								<font face='Arial' size='1'>&nbsp;HOUVE IMPEDIMENTO PARA INSPEÇÃO COMPLETA?" + LINE_SEP ;
                if(rec.getString("IMPEDIMENTO") == null || rec.getString("IMPEDIMENTO") == ""){
                    pagina+="									<input type='radio' value='S' name='impedimento' onclick='javascript:ocultaBlocos()'>SIM" + LINE_SEP +
                            "									<input type='radio' value='N' name='impedimento' onclick='javascript:mostraBlocos()'>NÃO" + LINE_SEP ;
                }
                else if(rec.getString("IMPEDIMENTO").equals("S")){
                    pagina+="									<input type='radio' value='S' name='impedimento' onclick='javascript:ocultaBlocos()' checked>SIM" + LINE_SEP +
                            "									<input type='radio' value='N' name='impedimento' onclick='javascript:mostraBlocos()'>NÃO" + LINE_SEP ;
                }
                else{
                    pagina+="									<input type='radio' value='S' name='impedimento' onclick='javascript:ocultaBlocos()' disabled>SIM" + LINE_SEP +
                            "									<input type='radio' value='N' name='impedimento' onclick='javascript:mostraBlocos()' checked>NÃO" + LINE_SEP ;
                }
                    pagina+="								</font>" + LINE_SEP +
                            "							</td>" + LINE_SEP +
                            "						</tr>" + LINE_SEP +
                            "					</table>" + LINE_SEP +
Criado 3 de agosto de 2010
Respostas 0
Participantes 1