You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Ra...@lazard.com on 2003/03/07 18:10:03 UTC

crazy error

Hi,

 I have a action calls which populates the formbean and forward to JSP where I
can see the values but when I submit the jsp back to the same action the values
or lost.

 the jsp code is ( from the javasript I can see the values I print in the
alerts) and I get the value I set to "actionstr" in the action servlet but none
of the other values like "product_id" or "period_end_date".  What is wrong??

Regards
Rajesh J
function cancelr()
{
  allo.actionstr.value="cancel";
  alert(allo.period_end_date.value);
  alert(allo.product_id.value);
  allo.submit();
}

</script>
</head>

<body topmargin="0" leftmargin="0">
<html:form action="allocationAction"
               name="allocationActionForm"
               type="lam.mffs.form.AllocationActionForm"
               styleId="allo"
               scope="session">
<html:hidden property="actionstr" styleId="actionstr"/>
<table border="0" width="100%" height="922" cellspacing="0" cellpadding="0">
  <tr>
    <td width="100%" height="72" bgcolor="#000066" style="color: #FFFFFF">
&nbsp;<strong><font size="8" face="ATSackLightRomNoBalls"><html:img width="61"
height="45" src="images/top.bmp" border="0"/>MFFS</font></strong></td>
  </tr>
  <tr>
    <td width="100%" height="20" bgcolor="#E3FFFF" style="color: #FFFFFF">
&nbsp;</td>
  </tr>
  <tr>
    <td width="100%" height="823" style="color: #FFFFFF" valign="middle" align
="center">&nbsp;
      <table border="1" width="652" cellpadding="0" cellspacing="1" bordercolor
="#000000" bordercolorlight="#000000" bordercolordark="#000000">
        <tr>
        <td style="BACKGROUND-color: #e0ebf5" width="312" bordercolor="#FFFFFF"
bordercolorlight="#FFFFFF" bordercolordark="#FFFFFF" align="right" nowrap>
          Period End Date&nbsp;&nbsp;</td>
          <td style="BACKGROUND-color: #e0ebf5" width="324" bordercolor="
#FFFFFF" bordercolorlight="#FFFFFF" bordercolordark="#FFFFFF">
              <html:text tabindex="1" property="period_end_date" styleId
="period_end_date" size="10"/>
          </td>
        </tr>
        <tr>
        <td style="BACKGROUND-color: #e0ebf5" width="312" bordercolor="#FFFFFF"
bordercolorlight="#FFFFFF" bordercolordark="#FFFFFF" align="right" nowrap>
          Product ID&nbsp;&nbsp;</td>
          <td style="BACKGROUND-color: #e0ebf5" width="324" bordercolor="
#FFFFFF" bordercolorlight="#FFFFFF" bordercolordark="#FFFFFF">
              <html:text tabindex="2" property="product_id" styleId="product_id"
size="10"/>
          </td>





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


Re: crazy error

Posted by Ashish Kulkarni <ku...@yahoo.com>.
Hi,
How do u pass the bean to jsp from Action, do u pass
it through request, if yes then u will loose the bean
when u submit it back from jsp as it is a new request,

and so loose all the values
I hope this makes sense, 
Ashish
--- Rajesh.Jayabalan@lazard.com wrote:
> Hi,
> 
>  I have a action calls which populates the formbean
> and forward to JSP where I
> can see the values but when I submit the jsp back to
> the same action the values
> or lost.
> 
>  the jsp code is ( from the javasript I can see the
> values I print in the
> alerts) and I get the value I set to "actionstr" in
> the action servlet but none
> of the other values like "product_id" or
> "period_end_date".  What is wrong??
> 
> Regards
> Rajesh J
> function cancelr()
> {
>   allo.actionstr.value="cancel";
>   alert(allo.period_end_date.value);
>   alert(allo.product_id.value);
>   allo.submit();
> }
> 
> </script>
> </head>
> 
> <body topmargin="0" leftmargin="0">
> <html:form action="allocationAction"
>                name="allocationActionForm"
>               
> type="lam.mffs.form.AllocationActionForm"
>                styleId="allo"
>                scope="session">
> <html:hidden property="actionstr"
> styleId="actionstr"/>
> <table border="0" width="100%" height="922"
> cellspacing="0" cellpadding="0">
>   <tr>
>     <td width="100%" height="72" bgcolor="#000066"
> style="color: #FFFFFF">
> &nbsp;<strong><font size="8"
> face="ATSackLightRomNoBalls"><html:img width="61"
> height="45" src="images/top.bmp"
> border="0"/>MFFS</font></strong></td>
>   </tr>
>   <tr>
>     <td width="100%" height="20" bgcolor="#E3FFFF"
> style="color: #FFFFFF">
> &nbsp;</td>
>   </tr>
>   <tr>
>     <td width="100%" height="823" style="color:
> #FFFFFF" valign="middle" align
> ="center">&nbsp;
>       <table border="1" width="652" cellpadding="0"
> cellspacing="1" bordercolor
> ="#000000" bordercolorlight="#000000"
> bordercolordark="#000000">
>         <tr>
>         <td style="BACKGROUND-color: #e0ebf5"
> width="312" bordercolor="#FFFFFF"
> bordercolorlight="#FFFFFF" bordercolordark="#FFFFFF"
> align="right" nowrap>
>           Period End Date&nbsp;&nbsp;</td>
>           <td style="BACKGROUND-color: #e0ebf5"
> width="324" bordercolor="
> #FFFFFF" bordercolorlight="#FFFFFF"
> bordercolordark="#FFFFFF">
>               <html:text tabindex="1"
> property="period_end_date" styleId
> ="period_end_date" size="10"/>
>           </td>
>         </tr>
>         <tr>
>         <td style="BACKGROUND-color: #e0ebf5"
> width="312" bordercolor="#FFFFFF"
> bordercolorlight="#FFFFFF" bordercolordark="#FFFFFF"
> align="right" nowrap>
>           Product ID&nbsp;&nbsp;</td>
>           <td style="BACKGROUND-color: #e0ebf5"
> width="324" bordercolor="
> #FFFFFF" bordercolorlight="#FFFFFF"
> bordercolordark="#FFFFFF">
>               <html:text tabindex="2"
> property="product_id" styleId="product_id"
> size="10"/>
>           </td>
> 
> 
> 
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> struts-user-help@jakarta.apache.org
> 


=====
A$HI$H

__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/

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