You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Strachan, Paul" <Pa...@det.nsw.edu.au> on 2007/02/26 08:50:26 UTC

html:button

Hi,

I realise this is probably not a struts problem and I feel a bit silly posting this question but here goes:

I'm using html:button with EventDispatchAction but my button properties do not appear in the request - the html source fragment goes something like:

<script type="text/javascript">
  function doEdit(id) {
    document.TeachingMethodForm.teachingMethodId.value=id;
    document.TeachingMethodForm.submit();
  }
</script>
<form name="TeachingMethodForm" method="post" action="/eat3/admin/teachingMethods.do">
  <input type="hidden" name="applicationId" value="486">
  <input type="hidden" name="teachingMethodId" value="">
...
 <td>
   <input type="button" name="edit" value="Edit" onclick="javascript:doEdit('100');">
 </td>
...
</form>
 
Using Firefox the request header looks like:         
 
http://xxx.xxx.43.6:8988/eat3/admin/teachingMethods.do
POST /eat3/admin/teachingMethods.do HTTP/1.1
Host: xxx.xxx.43.6:8988
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.2) Gecko/20070219 Firefox/2.0.0.2
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Proxy-Connection: keep-alive
Referer: http://xxx.xxx.43.6:8988/eat3/admin/teachingMethods.do
Cookie: JSESSIONID=996b2b06231c8176feb489f64b56816acb4b73a11148
Content-Type: application/x-www-form-urlencoded
Content-Length: 144
applicationId=486&teachingMethodId=100
HTTP/1.x 200 OK
Transfer-Encoding: chunked
Date: Mon, 26 Feb 2007 07:40:07 GMT
Content-Type: text/html;charset=windows-1252
Server: Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)
Content-Location: http://xxx.xxx.43.6:8988/eat3/WEB-INF/jsps/set_layout/layout.jsp
Via: 1.1 ugcpx03 (NetCache NetApp/6.0.5)
 
I am expecting to see "edit=Edit" in the request and I dont understand why its not there.  This is contrary to the taglib documentation.
 
Any hints?
 
Thanks,
Paul
 
 
 
**********************************************************************
This message is intended for the addressee named and may contain
privileged information or confidential information or both. If you
are not the intended recipient please delete it and notify the sender.
**********************************************************************

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


Re: html:button

Posted by Romu <ro...@gmail.com>.
try with html tag may be ?

<html:button property="ok" value="Ok" onclick="validateSomething()" />





2007/2/27, Romu <ro...@gmail.com>:
>
> <html:button property="ok" value="Ok" onclick="validateSomething()" />
>
>
>
>
> 2007/2/26, Michael Jouravlev <jm...@gmail.com>:
> >
> > I have no idea, but does it work without Javascript assigned to the
> > button?
> >
> > On 2/25/07, Strachan, Paul <Pa...@det.nsw.edu.au> wrote:
> > > Hi,
> > >
> > > I realise this is probably not a struts problem and I feel a bit silly
> > posting this question but here goes:
> > >
> > > I'm using html:button with EventDispatchAction but my button
> > properties do not appear in the request - the html source fragment goes
> > something like:
> > >
> > > <script type="text/javascript">
> > >   function doEdit(id) {
> > >     document.TeachingMethodForm.teachingMethodId.value=id;
> > >     document.TeachingMethodForm.submit();
> > >   }
> > > </script>
> > > <form name="TeachingMethodForm" method="post"
> > action="/eat3/admin/teachingMethods.do">
> > >   <input type="hidden" name="applicationId" value="486">
> > >   <input type="hidden" name="teachingMethodId" value="">
> > > ...
> > >  <td>
> > >    <input type="button" name="edit" value="Edit"
> > onclick="javascript:doEdit('100');">
> > >  </td>
> > > ...
> > > </form>
> > >
> > > Using Firefox the request header looks like:
> > >
> > > http://xxx.xxx.43.6:8988/eat3/admin/teachingMethods.do
> > > POST /eat3/admin/teachingMethods.do HTTP/1.1
> > > Host: xxx.xxx.43.6:8988
> > > User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.2)
> > Gecko/20070219 Firefox/2.0.0.2
> > > Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9
> > ,text/plain;q=0.8,image/png,*/*;q=0.5
> > > Accept-Language: en-us,en;q=0.5
> > > Accept-Encoding: gzip,deflate
> > > Accept-Charset: ISO-8859-1,utf-8;q= 0.7,*;q=0.7
> > > Keep-Alive: 300
> > > Proxy-Connection: keep-alive
> > > Referer: http://xxx.xxx.43.6:8988/eat3/admin/teachingMethods.do
> > > Cookie: JSESSIONID=996b2b06231c8176feb489f64b56816acb4b73a11148
> > > Content-Type: application/x-www-form-urlencoded
> > > Content-Length: 144
> > > applicationId=486&teachingMethodId=100
> > > HTTP/1.x 200 OK
> > > Transfer-Encoding: chunked
> > > Date: Mon, 26 Feb 2007 07:40:07 GMT
> > > Content-Type: text/html;charset=windows-1252
> > > Server: Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)
> > > Content-Location:
> > http://xxx.xxx.43.6:8988/eat3/WEB-INF/jsps/set_layout/layout.jsp
> > > Via: 1.1 ugcpx03 (NetCache NetApp/6.0.5)
> > >
> > > I am expecting to see "edit=Edit" in the request and I dont understand
> > why its not there.  This is contrary to the taglib documentation.
> > >
> > > Any hints?
> > >
> > > Thanks,
> > > Paul
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
>

Re: html:button

Posted by Romu <ro...@gmail.com>.
<html:button property="ok" value="Ok" onclick="validateSomething()" />

n


2007/2/26, Michael Jouravlev <jm...@gmail.com>:
>
> I have no idea, but does it work without Javascript assigned to the
> button?
>
> On 2/25/07, Strachan, Paul <Pa...@det.nsw.edu.au> wrote:
> > Hi,
> >
> > I realise this is probably not a struts problem and I feel a bit silly
> posting this question but here goes:
> >
> > I'm using html:button with EventDispatchAction but my button properties
> do not appear in the request - the html source fragment goes something like:
> >
> > <script type="text/javascript">
> >   function doEdit(id) {
> >     document.TeachingMethodForm.teachingMethodId.value=id;
> >     document.TeachingMethodForm.submit();
> >   }
> > </script>
> > <form name="TeachingMethodForm" method="post"
> action="/eat3/admin/teachingMethods.do">
> >   <input type="hidden" name="applicationId" value="486">
> >   <input type="hidden" name="teachingMethodId" value="">
> > ...
> >  <td>
> >    <input type="button" name="edit" value="Edit"
> onclick="javascript:doEdit('100');">
> >  </td>
> > ...
> > </form>
> >
> > Using Firefox the request header looks like:
> >
> > http://xxx.xxx.43.6:8988/eat3/admin/teachingMethods.do
> > POST /eat3/admin/teachingMethods.do HTTP/1.1
> > Host: xxx.xxx.43.6:8988
> > User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.2)
> Gecko/20070219 Firefox/2.0.0.2
> > Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9
> ,text/plain;q=0.8,image/png,*/*;q=0.5
> > Accept-Language: en-us,en;q=0.5
> > Accept-Encoding: gzip,deflate
> > Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
> > Keep-Alive: 300
> > Proxy-Connection: keep-alive
> > Referer: http://xxx.xxx.43.6:8988/eat3/admin/teachingMethods.do
> > Cookie: JSESSIONID=996b2b06231c8176feb489f64b56816acb4b73a11148
> > Content-Type: application/x-www-form-urlencoded
> > Content-Length: 144
> > applicationId=486&teachingMethodId=100
> > HTTP/1.x 200 OK
> > Transfer-Encoding: chunked
> > Date: Mon, 26 Feb 2007 07:40:07 GMT
> > Content-Type: text/html;charset=windows-1252
> > Server: Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)
> > Content-Location:
> http://xxx.xxx.43.6:8988/eat3/WEB-INF/jsps/set_layout/layout.jsp
> > Via: 1.1 ugcpx03 (NetCache NetApp/6.0.5)
> >
> > I am expecting to see "edit=Edit" in the request and I dont understand
> why its not there.  This is contrary to the taglib documentation.
> >
> > Any hints?
> >
> > Thanks,
> > Paul
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: html:button

Posted by Michael Jouravlev <jm...@gmail.com>.
I have no idea, but does it work without Javascript assigned to the button?

On 2/25/07, Strachan, Paul <Pa...@det.nsw.edu.au> wrote:
> Hi,
>
> I realise this is probably not a struts problem and I feel a bit silly posting this question but here goes:
>
> I'm using html:button with EventDispatchAction but my button properties do not appear in the request - the html source fragment goes something like:
>
> <script type="text/javascript">
>   function doEdit(id) {
>     document.TeachingMethodForm.teachingMethodId.value=id;
>     document.TeachingMethodForm.submit();
>   }
> </script>
> <form name="TeachingMethodForm" method="post" action="/eat3/admin/teachingMethods.do">
>   <input type="hidden" name="applicationId" value="486">
>   <input type="hidden" name="teachingMethodId" value="">
> ...
>  <td>
>    <input type="button" name="edit" value="Edit" onclick="javascript:doEdit('100');">
>  </td>
> ...
> </form>
>
> Using Firefox the request header looks like:
>
> http://xxx.xxx.43.6:8988/eat3/admin/teachingMethods.do
> POST /eat3/admin/teachingMethods.do HTTP/1.1
> Host: xxx.xxx.43.6:8988
> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.2) Gecko/20070219 Firefox/2.0.0.2
> Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
> Accept-Language: en-us,en;q=0.5
> Accept-Encoding: gzip,deflate
> Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
> Keep-Alive: 300
> Proxy-Connection: keep-alive
> Referer: http://xxx.xxx.43.6:8988/eat3/admin/teachingMethods.do
> Cookie: JSESSIONID=996b2b06231c8176feb489f64b56816acb4b73a11148
> Content-Type: application/x-www-form-urlencoded
> Content-Length: 144
> applicationId=486&teachingMethodId=100
> HTTP/1.x 200 OK
> Transfer-Encoding: chunked
> Date: Mon, 26 Feb 2007 07:40:07 GMT
> Content-Type: text/html;charset=windows-1252
> Server: Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)
> Content-Location: http://xxx.xxx.43.6:8988/eat3/WEB-INF/jsps/set_layout/layout.jsp
> Via: 1.1 ugcpx03 (NetCache NetApp/6.0.5)
>
> I am expecting to see "edit=Edit" in the request and I dont understand why its not there.  This is contrary to the taglib documentation.
>
> Any hints?
>
> Thanks,
> Paul

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


Re: html:button

Posted by Romu <ro...@gmail.com>.
the name of your form is not correct :

TeachingMethodForm --> should be teachingMethodForm.

it could be annoying.

could u post the place ( struts-config) where u declare your form?
<form-bean
            name="teachingMethodForm"
            type="packagename etc.TeachingMethodForm"
        />



2007/2/26, Strachan, Paul <Pa...@det.nsw.edu.au>:
>
> Hi,
>
> I realise this is probably not a struts problem and I feel a bit silly
> posting this question but here goes:
>
> I'm using html:button with EventDispatchAction but my button properties do
> not appear in the request - the html source fragment goes something like:
>
> <script type="text/javascript">
>   function doEdit(id) {
>     document.TeachingMethodForm.teachingMethodId.value=id;
>     document.TeachingMethodForm.submit();
>   }
> </script>
> <form name="TeachingMethodForm" method="post"
> action="/eat3/admin/teachingMethods.do">
>   <input type="hidden" name="applicationId" value="486">
>   <input type="hidden" name="teachingMethodId" value="">
> ...
> <td>
>    <input type="button" name="edit" value="Edit"
> onclick="javascript:doEdit('100');">
> </td>
> ...
> </form>
>
> Using Firefox the request header looks like:
>
> http://xxx.xxx.43.6:8988/eat3/admin/teachingMethods.do
> POST /eat3/admin/teachingMethods.do HTTP/1.1
> Host: xxx.xxx.43.6:8988
> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.2)
> Gecko/20070219 Firefox/2.0.0.2
> Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9
> ,text/plain;q=0.8,image/png,*/*;q=0.5
> Accept-Language: en-us,en;q=0.5
> Accept-Encoding: gzip,deflate
> Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
> Keep-Alive: 300
> Proxy-Connection: keep-alive
> Referer: http://xxx.xxx.43.6:8988/eat3/admin/teachingMethods.do
> Cookie: JSESSIONID=996b2b06231c8176feb489f64b56816acb4b73a11148
> Content-Type: application/x-www-form-urlencoded
> Content-Length: 144
> applicationId=486&teachingMethodId=100
> HTTP/1.x 200 OK
> Transfer-Encoding: chunked
> Date: Mon, 26 Feb 2007 07:40:07 GMT
> Content-Type: text/html;charset=windows-1252
> Server: Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)
> Content-Location:
> http://xxx.xxx.43.6:8988/eat3/WEB-INF/jsps/set_layout/layout.jsp
> Via: 1.1 ugcpx03 (NetCache NetApp/6.0.5)
>
> I am expecting to see "edit=Edit" in the request and I dont understand why
> its not there.  This is contrary to the taglib documentation.
>
> Any hints?
>
> Thanks,
> Paul
>
>
>
> **********************************************************************
> This message is intended for the addressee named and may contain
> privileged information or confidential information or both. If you
> are not the intended recipient please delete it and notify the sender.
> **********************************************************************
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>