25/02/2008, 14:25
|
| | Fecha de Ingreso: mayo-2007
Mensajes: 3
Antigüedad: 17 años, 6 meses Puntos: 0 | |
Ayuda Actualizar Buenas necesito que me digan xq razon no puedo actualizar los datos cuando llamo a un jsp y si cuando abro un popup. necestiot que digan que estoy haciendo mal xfa. Este es codigo del jsp:
------------------------------------------------------------------------------------------
<%@taglib prefix="html" uri="/WEB-INF/tags/struts-html.tld" %>
<%@taglib prefix="bean" uri="/WEB-INF/tags/struts-bean.tld" %>
<%@taglib prefix="logic" uri="/WEB-INF/tags/struts-logic.tld" %>
<%@ taglib uri="http://displaytag.sf.net" prefix="display" %>
<%@ page contentType="text/html; charset=utf-8" language="java" import="java.sql.*" errorPage="" %>
<%@ page import="intranet.handymas.bean.*" %>
<%
String id_Article=request.getParameter("id_Article");
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link href="css/estilos.css" type=text/css rel=stylesheet>
<link href="css/displaytag.css" type=text/css rel=stylesheet>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sin título</title>
<script language="JavaScript" type="text/javascript" src="js/datetimepicker.js"></script>
<script language="JavaScript" type="text/javascript" src="js/datetimepicker.js"></script>
<script language="JavaScript">
function abrirventana(nombre,ancho,alto) {
datos = 'width=' + ancho + ',height=' + alto + ',left=0,top=0,scrollbars=no,resize=no';
window.open(nombre,'',datos)
}
function f_cambiarEstado(cod){
document.articleform.action='article.do';
document.articleform.tipo.value='actualizarEstado' ;
document.forms[0].id_article.value=cod;
document.articleform.submit();
}
function f_actualizar(){
document.articleform.action='article.do';
document.articleform.tipo.value='actualizar';
document.articleform.submit();
}
</script>
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
.Estilo1 {
color: #FF0000;
font-weight: bold;
font-size: 20px;
}
body,td,th {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
color: #FFFFFF;
}
.Estilo2 {
color: #FF0000;
font-weight: bold;
font-size: 20px;
}
body,td,th {
font-family: Arial, Helvetica, sans-serif;
font-size: 17px;
color: #000000;
}
-->
</style></head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td><table width="100%" border="0" align="center" cellpadding="5" cellspacing="5">
<tr>
<td width="30%" align="center" valign="middle" class="Estilo1"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="93" height="33">
<param name="movie" value="flash/button1.swf" />
<param name="quality" value="high" />
<embed src="button1.swf" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="93" height="33" ></embed>
</object>* </td>
<td width="41%" align="center" valign="middle" class="Estilo1">ARTICLES DATABASE*</td>
<td width="29%" align="center" valign="middle" class="Estilo1"> </td>
</tr>
<tr>
<td colspan="3" align="center" valign="middle" class="Estilo1"><%= session.getAttribute("subarea") %></td>
</tr>
<tr>
<td colspan="3" align="center" valign="middle"><table width="100%" border="2" cellpadding="0" cellspacing="0" bordercolor="0066FF">
<tr>
</tr>
<form name="articleform" method="post" action="article.do" >
<input type="hidden" name="id_article" value="<%=id_Article%>">
<input type="hidden" name="tipo" value="actualizarEstado">
<table width="100%" align="center" border="0" cellpadding="0" cellspacing="5" bordercolor="0066FF">
<TBODY>
<TR >
<TD align="center" valign="middle">
<display:table width="100%" align="center" name="listaArticles" border="1" cellpadding="10" cellspacing="0"
requestURI="article.do?tipo=articlelistinstallit"
export="false" pagesize="15"
id="bean" bgcolor="#0066FF" >
<
<display:column property="id_article" title="Id_Article" bgcolor="#D6D6D9" sortable="true"/>
<display:column property="maintitle" title="Main_Title" bgcolor="#D6D6D9" sortable="true"/>
<display:column property="subtitle" title="Sub_Title" bgcolor="#D6D6D9" sortable="true"/>
<display:column property="link1" title="Link_1" bgcolor="#D6D6D9" sortable="true"/>
<display:column property="link2" title="Link_2" bgcolor="#D6D6D9" sortable="true"/>
<display:column property="texto" title="text_article" bgcolor="#D6D6D9" sortable="true"/>
<display:column property="articledate" title="Article Date" bgcolor="#D6D6D9" sortable="true"/>
<display:column property="typearticle" title="Type Article" bgcolor="#D6D6D9" sortable="true"/>
<display:column align="center" title="Edit" bgcolor="#D6D6D9" sortable="true">
<input align="center" type="submit" name="button" id="button" value="P" onClick="f_actualizar ('doit_updatearticle.jsp?tipo=actualizar&id_Articl e=<%= ((ArticleBean)bean).getId_article() %>&main_title=<%= ((ArticleBean)bean).getMaintitle() %>&sub_title=<%= ((ArticleBean)bean).getSubtitle() %>&link_1=<%= ((ArticleBean)bean).getLink1() %>&link_2=<%= ((ArticleBean)bean).getLink2() %>&text_article=<%= ((ArticleBean)bean).getTexto()%>')">
</display:column>
<display:column align="center" title="Delete" bgcolor="#D6D6D9" sortable="true">
<input align="center" type="submit" name="button" id="button" value="D" onClick="f_cambiarEstado(id_Article=<%= ((ArticleBean)bean).getId_article()%>)" >
</display:column>
</display:table>
</TD>
</TR>
</TBODY>
</table>
</form>
</table></td>
</tr>
<tr>
<td colspan="3" align="center" valign="middle"> </td>
</tr>
</table></td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
</body>
</html>
------------------------------------------------------------------------------------------------- |