Ver Mensaje Individual
  #3 (permalink)  
Antiguo 26/02/2008, 10:09
Jurupe
 
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&nbsp;</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">&nbsp;</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" >&nbsp;</td>
<td colspan="2">&nbsp;</td>
<td width="178">&nbsp;</td>
<td width="210">&nbsp;</td>
<td width="11">&nbsp;</td>
</tr>

<tr bgcolor="white">
<TD>&nbsp;</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">&nbsp;</td>
<td width="11">&nbsp;</td>
</tr>

<tr bgcolor="white">
<TD>&nbsp;</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">&nbsp;</td>
</tr>

<tr bgcolor="white">
<TD>&nbsp;</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>&nbsp;</td>
</tr>
<tr bgcolor="white">
<TD>&nbsp;</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>&nbsp;</td>
</tr>

<tr bgcolor="white">
<TD>&nbsp;</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>&nbsp;</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>&nbsp;</td>
</tr>

<tr bgcolor="white">
<TD>&nbsp;</TD>
<td height="24" class="Estilo13">
<div align="left"></div>
</td>
<td colspan="2"><div align="left"></div></td>

<td>&nbsp;</td>
</tr>
<tr bgcolor="white">
<TD>&nbsp;</TD>
<td height="24" class="Estilo13">
<div align="left"></div>
</td>
<td colspan="2"><div align="left"></div></td>

<td>&nbsp;</td>
</tr>
<tr bgcolor="white">
<TD>&nbsp;</TD>
<td height="24" class="Estilo13">
<div align="left"></div>
</td>
<td colspan="2">
<div align="left"></div>

</td>
<td>&nbsp;</td>

</tr>

<tr bgcolor="white">
<TD>&nbsp;</TD>
<td height="24" class="Estilo13">
<div align="left"></div>
</td>
<td height="24" colspan="2">
<div align="left"></div>
</td>
<td width="210">&nbsp;</td>
<td width="11">&nbsp;</td>
</tr>
<tr bgcolor="white">
<TD>&nbsp;</TD>
<td height="24" class="Estilo13">&nbsp;</td>
<td height="24" colspan="2">&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr bgcolor="white">
<TD>&nbsp;</TD>

<td height="30" colspan="3">
<CENTER><input type="button" name="Submit" value=" SAVE " onClick="javascript:f_grabar();"> &nbsp;
</CENTER></td>
<td>&nbsp;

</td>

<td width="11">&nbsp;</td>
</tr>
<tr bgcolor="white">
<TD>&nbsp;</TD>
<td height="20" colspan="3">&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr bgcolor="white">
<td height="20" valign="middle" class="Estilo13">&nbsp;</td>
<td height="20" colspan="4">&nbsp;</td>
<td width="11">&nbsp;</td>
</tr>
</table>
</CENTER>

</TD>
</TR>
</TABLE>

</form>
</body>

</html>

------------------------------------------------------