You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Luis Antonio Martinez Cuevas <la...@conacyt.mx> on 2004/11/19 21:11:04 UTC

help to changer a code to Struts

hi can some one help me to change this code to Struts pelase :)
 
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>

<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>

<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>

<%@ taglib uri="/WEB-INF/struts-template.tld" prefix="template" %>

<%@page import="java.util.*" %>

<%@page import="com.becas.entfederativas.view.*" %>

<html:html locale="true">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-Dfile.encoding=iso_8859_8" />

<title>Reporte de Becas</title>

</head>

<body>

<p align="center"><strong>DIRECCIÓN ADJUNTA DE FORMACIÓN DE CIENTÍFICOS Y TECNÓLOGOS</strong></p>

<p align="center"><strong>DIRECCIÓN DE INFORMACIÓN, ANÁLISIS Y EVALUACIÓN</strong></p>

<p align="center"><strong>BECAS EN EL EXTRANJERO VIGENTES AL 30 DE JUNIO DEL 2004</strong></p>

<jsp:useBean id="BecasExtranjerasPorPaisForm" class="com.becas.entfederativas.view.BecasExtranjerasPorPaisForm" scope="request" />

<table width="42%" border="1" align="center">

<tr> 

<td width="30%" rowspan="2" ALIGN="center" VALIGN="top"><strong>Pais</strong></td>

<td colspan="32"><div align="center"><strong>Reporte por Entidades Federativas</strong></div></td>

</tr>

<tr> 

<!--encabezado de columnas-->

<logic:iterate id="listaprogramas" name="listaprogramas" scope="request" type="com.becas.entfederativas.view.BecasExtranjerasProgramasForm" > 

<td width="37%" valign="top"><div align="center"><font size="1"><bean:write name="listaprogramas" property="programa" /></font></div></td>

</logic:iterate>

</tr>

<%

ListaPaisForm listapais = new ListaPaisForm();

BecasExtranjerasProgramasForm listaprogramas = new BecasExtranjerasProgramasForm();

BecasExtranjerasPorPaisForm entidadfederativa = new BecasExtranjerasPorPaisForm();

Iterator iterpais = ((Collection) request.getAttribute("listadepaises")).iterator();

Iterator itprogra = ((Collection) request.getAttribute("listaprogramas")).iterator();

while(iterpais.hasNext())

{

listapais = (ListaPaisForm) iterpais.next();

String pais = listapais.getPais();

String idpais = listapais.getIdpais();

Iterator itentfed = ((Collection) request.getAttribute("entidadfederativa")).iterator();

%>

<tr> 

<td width="37%" valign="top"><div align="center">

<font size="1">

<%=pais%>

</td>

<%

while(itentfed.hasNext())

{

entidadfederativa = (BecasExtranjerasPorPaisForm) itentfed.next();

String datos = entidadfederativa.getNumero();

if(idpais.equals(entidadfederativa.getIdpais()))

{

%>

<td width="37%" valign="top">

<%=entidadfederativa.getNumero()%>

<div align="center"><font size="1">

</font></div>

</td>

<%

}

}

%>

</tr>

<%

}

%>

</table>

</div>

<html:link forward="becas_extranjeras">Regresar</html:link>

</body>

</html:html>


Re: help to changer a code to Struts

Posted by Peng Tuck <pe...@bluebottle.com>.
What problems are you facing Luis ?

Luis Antonio Martinez Cuevas wrote:

>hi can some one help me to change this code to Struts pelase :)
> 
><%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
>
><%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
>
><%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
>
><%@ taglib uri="/WEB-INF/struts-template.tld" prefix="template" %>
>
><%@page import="java.util.*" %>
>
><%@page import="com.becas.entfederativas.view.*" %>
>
><html:html locale="true">
>
><head>
>
><meta http-equiv="Content-Type" content="text/html; charset=iso-Dfile.encoding=iso_8859_8" />
>
><title>Reporte de Becas</title>
>
></head>
>
><body>
>
><p align="center"><strong>DIRECCIÓN ADJUNTA DE FORMACIÓN DE CIENTÍFICOS Y TECNÓLOGOS</strong></p>
>
><p align="center"><strong>DIRECCIÓN DE INFORMACIÓN, ANÁLISIS Y EVALUACIÓN</strong></p>
>
><p align="center"><strong>BECAS EN EL EXTRANJERO VIGENTES AL 30 DE JUNIO DEL 2004</strong></p>
>
><jsp:useBean id="BecasExtranjerasPorPaisForm" class="com.becas.entfederativas.view.BecasExtranjerasPorPaisForm" scope="request" />
>
><table width="42%" border="1" align="center">
>
><tr> 
>
><td width="30%" rowspan="2" ALIGN="center" VALIGN="top"><strong>Pais</strong></td>
>
><td colspan="32"><div align="center"><strong>Reporte por Entidades Federativas</strong></div></td>
>
></tr>
>
><tr> 
>
><!--encabezado de columnas-->
>
><logic:iterate id="listaprogramas" name="listaprogramas" scope="request" type="com.becas.entfederativas.view.BecasExtranjerasProgramasForm" > 
>
><td width="37%" valign="top"><div align="center"><font size="1"><bean:write name="listaprogramas" property="programa" /></font></div></td>
>
></logic:iterate>
>
></tr>
>
><%
>
>ListaPaisForm listapais = new ListaPaisForm();
>
>BecasExtranjerasProgramasForm listaprogramas = new BecasExtranjerasProgramasForm();
>
>BecasExtranjerasPorPaisForm entidadfederativa = new BecasExtranjerasPorPaisForm();
>
>Iterator iterpais = ((Collection) request.getAttribute("listadepaises")).iterator();
>
>Iterator itprogra = ((Collection) request.getAttribute("listaprogramas")).iterator();
>
>while(iterpais.hasNext())
>
>{
>
>listapais = (ListaPaisForm) iterpais.next();
>
>String pais = listapais.getPais();
>
>String idpais = listapais.getIdpais();
>
>Iterator itentfed = ((Collection) request.getAttribute("entidadfederativa")).iterator();
>
>%>
>
><tr> 
>
><td width="37%" valign="top"><div align="center">
>
><font size="1">
>
><%=pais%>
>
></td>
>
><%
>
>while(itentfed.hasNext())
>
>{
>
>entidadfederativa = (BecasExtranjerasPorPaisForm) itentfed.next();
>
>String datos = entidadfederativa.getNumero();
>
>if(idpais.equals(entidadfederativa.getIdpais()))
>
>{
>
>%>
>
><td width="37%" valign="top">
>
><%=entidadfederativa.getNumero()%>
>
><div align="center"><font size="1">
>
></font></div>
>
></td>
>
><%
>
>}
>
>}
>
>%>
>
></tr>
>
><%
>
>}
>
>%>
>
></table>
>
></div>
>
><html:link forward="becas_extranjeras">Regresar</html:link>
>
></body>
>
></html:html>
>
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org