26/02/2008, 10:09
|
| | Fecha de Ingreso: mayo-2007
Mensajes: 3
Antigüedad: 17 años, 6 meses Puntos: 0 | |
Re: Ayuda Actualizar para actualizar llamo a este jsp, pero como digo cuando le mando todos los campos aparecen en null y si pongo datos si actualiza en el mysql, pero kiero q aparezca los datos y no null como me muestra el jsp. En cambio, cuando le mando en un popup si me muestra los datos. Espero que me ayuden ps, alaos:
-----------------------------------------
<%@taglib prefix="html" uri="/WEB-INF/tags/struts-html.tld" %>
<%@ page import="intranet.handymas.bean.*" %>
<% String id_Article=request.getParameter("id_Article");
String main_title=request.getParameter("main_title");
String sub_title=request.getParameter("sub_title");
String link_1=request.getParameter("link_1");
String link_2=request.getParameter("link_2");
String text_article=request.getParameter("text_article");
%>
<html>
<head>
<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 f_grabar(){
document.articleform.submit();
}
</script>
<title>UPDATE </title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<%
ArticleBean bean = (ArticleBean) request.getAttribute("bean");
%>
<body bgcolor="white">
<form name="articleform" method="post" action="article.do">
<input type="hidden" name="tipo" value="actualizar">
<BR>
<tr>
<td align="left" valign="middle"> </td>
<td align="center" valign="middle"><a href="doit_database.jsp"> GO BACK </a></td>
</tr>
<TABLE width="550" bgcolor="#0066FF" align="center" >
<TR>
<TD>
<CENTER>
<table width="100%" height="368" border="0" align="center" cellpadding="0" cellspacing="0">
<tr bgcolor="white">
<td width="29" height="24" valign="middle" > </td>
<td colspan="2"> </td>
<td width="178"> </td>
<td width="210"> </td>
<td width="11"> </td>
</tr>
<tr bgcolor="white">
<TD> </TD>
<td width="98" height="24" class="Estilo13">
<div align="left">
<FONT color="#000066" size="2" face="Arial">
Main Title:</FONT> </div></td>
<td colspan="2"><div align="left">
<input type="text" class="Elemento" name="maintitle" value="<%=main_title%>" >
</div></td>
<td width="210" rowspan="7" valign="top"> </td>
<td width="11"> </td>
</tr>
<tr bgcolor="white">
<TD> </TD>
<td height="24" class="Estilo13">
<div align="left">
<FONT color="#000066" size="2" face="Arial">
Sub Title: </FONT> </div></td>
<td colspan="2"><div align="left">
<input type="text" class="Elemneto" name="subtitle" value="<%=sub_title%>">
</div></td>
<td width="4"> </td>
</tr>
<tr bgcolor="white">
<TD> </TD>
<td height="24" class="Estilo13">
<div align="left">
<FONT color="#000066" size="2" face="Arial">
Link1:
</FONT>
</div>
</td>
<td colspan="2" align="left">
<input type="text" class="Elemneto" name="link1" value="<%=link_1%>">
</td>
<td> </td>
</tr>
<tr bgcolor="white">
<TD> </TD>
<td height="24" class="Estilo13">
<div align="left">
<FONT color="#000066" size="2" face="Arial">
Link2:
</FONT>
</div>
</td>
<td colspan="2"><div align="left">
<input type="text" class="Elemento" name="link2" value="<%=link_2%>">
</div></td>
<td> </td>
</tr>
<tr bgcolor="white">
<TD> </TD>
<td height="24" class="Estilo13">
<div align="left">
<FONT color="#000066" size="2" face="Arial">
Text Article:
</FONT>
</div>
</td>
<td colspan="2"><div align="left">
<input type="text" class="Elemento" name="texto" value="<%=text_article%>">
</div></td>
<tr bgcolor="white">
<TD> </TD>
<td width="98" height="24" class="Estilo13">
<div align="left">
<FONT color="#000066" size="2" face="Arial">
Id Article:</FONT> </div></td>
<td colspan="2"><div align="left">
<input type="text" class="Elemento" name="id_article" value="<%=id_Article%>" >
</div></td>
<td> </td>
</tr>
<tr bgcolor="white">
<TD> </TD>
<td height="24" class="Estilo13">
<div align="left"></div>
</td>
<td colspan="2"><div align="left"></div></td>
<td> </td>
</tr>
<tr bgcolor="white">
<TD> </TD>
<td height="24" class="Estilo13">
<div align="left"></div>
</td>
<td colspan="2"><div align="left"></div></td>
<td> </td>
</tr>
<tr bgcolor="white">
<TD> </TD>
<td height="24" class="Estilo13">
<div align="left"></div>
</td>
<td colspan="2">
<div align="left"></div>
</td>
<td> </td>
</tr>
<tr bgcolor="white">
<TD> </TD>
<td height="24" class="Estilo13">
<div align="left"></div>
</td>
<td height="24" colspan="2">
<div align="left"></div>
</td>
<td width="210"> </td>
<td width="11"> </td>
</tr>
<tr bgcolor="white">
<TD> </TD>
<td height="24" class="Estilo13"> </td>
<td height="24" colspan="2"> </td>
<td> </td>
<td> </td>
</tr>
<tr bgcolor="white">
<TD> </TD>
<td height="30" colspan="3">
<CENTER><input type="button" name="Submit" value=" SAVE " onClick="javascript:f_grabar();">
</CENTER></td>
<td>
</td>
<td width="11"> </td>
</tr>
<tr bgcolor="white">
<TD> </TD>
<td height="20" colspan="3"> </td>
<td> </td>
<td> </td>
</tr>
<tr bgcolor="white">
<td height="20" valign="middle" class="Estilo13"> </td>
<td height="20" colspan="4"> </td>
<td width="11"> </td>
</tr>
</table>
</CENTER>
</TD>
</TR>
</TABLE>
</form>
</body>
</html>
------------------------------------------------------ |