html:link problem

2004-03-02 Thread mucus snot
Hi list,

Just wondering if anyone has any bright ideas. Things that you can do 
easily with an a ... tag, are not (easily) acheivable with a html:link. 
For instance in the following code:

nested:iterate id=title name=%= Constants.TITLES_COLLECTION % 
scope=request indexId=counter
html:link page=/findtitles.do 
onmouseover=MM_swapImage('details%= counter %,...)...
/nested:iterate

counter will not resolve, although it will if the tag is an ordinary anchor.

Does anyone know a way around this? I have been resorting to using ordinary 
a... tags but have just realised that there is no session control if 
cookies are disabled. I have to use html:link...

thanks, al 

Re: html:link problem

2004-03-02 Thread Mark Lowe
When i have the misfortune of porting the mother of all abominations 
known as dreamweaver generated code I tend to use c:url instead

a href=c:url value=/findtitle.do /

this will do what i think you want.

On 2 Mar 2004, at 23:19, mucus snot wrote:

Hi list,

Just wondering if anyone has any bright ideas. Things that you can do 
easily with an a ... tag, are not (easily) acheivable with a 
html:link. For instance in the following code:

nested:iterate id=title name=%= Constants.TITLES_COLLECTION % 
scope=request indexId=counter
html:link page=/findtitles.do 
onmouseover=MM_swapImage('details%= counter %,...)...
/nested:iterate

counter will not resolve, although it will if the tag is an ordinary 
anchor.

Does anyone know a way around this? I have been resorting to using 
ordinary a... tags but have just realised that there is no session 
control if cookies are disabled. I have to use html:link...

thanks, al 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: html:link problem

2004-03-02 Thread Nick Wesselman
Make your entire onmouseover attribute an expression.

onmouseover=%=MM_swapImage('details+counter+, ... %

You can have plain text or a run-time expression as an attribute, but 
not both. Hope this helps.

Nick

mucus snot wrote:

Hi list,

Just wondering if anyone has any bright ideas. Things that you can do 
easily with an a ... tag, are not (easily) acheivable with a 
html:link. For instance in the following code:

nested:iterate id=title name=%= Constants.TITLES_COLLECTION % 
scope=request indexId=counter
html:link page=/findtitles.do 
onmouseover=MM_swapImage('details%= counter %,...)...
/nested:iterate

counter will not resolve, although it will if the tag is an ordinary 
anchor.

Does anyone know a way around this? I have been resorting to using 
ordinary a... tags but have just realised that there is no session 
control if cookies are disabled. I have to use html:link...

thanks, al 




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


[Struts 1.1b] html:link problem in sub-application...

2002-10-22 Thread Marcus Edwards
Hi,

I am using Struts 1.1b and Tomcat 4.1.12 on JDK1.4.0  Windows 2000.

I have an application that has been divided into a number of
sub-applications (called apply, enrol  track). On one of the
sub-application pages for 'track' I have the following:

html:base/
...html:link page=/editApplication.doEdit/html:link

which are rendered as:
base href=http://localhost:8080/test/track/applications.jsp; (correctly
identifies the application-relative path) and
...a href=/test/editApplication.doEdit/a (i.e. it hasn't correctly
identified the application-relative path).

I've ensured that accessing this page is done through an action in the
'track' sub-application so that the context information can be set by the
controller servlet. And this must be working correctly as the html:base/
tag renders correctly.

The completely bizarre thing is that one of the other sub-applications is
working correctly, so what the heck is going on. I've tried restarting the
server, emptying the browser and server cache etc.

The only potential problem I can think of is that I have the same action
name (editApplication) in one of the other sub-applications, but I
understood that the action names were not required to be unique across
applications.

I've trawled the mail archive and haven't found anything helpful. Any ideas?

Thanks

Marcus Edwards

--Disclaimer--
This e-mail and any attachments may be confidential and/or legally
privileged. If you have received this email and you are not a named
addressee, please inform the sender at Digital Steps Ltd by phone on
+44 (0)1483 469 480 or by reply email and then delete the email from
your system. If you are not a named addressee you must not use,
disclose, distribute, copy, print or rely on this email. Although
Digital Steps Ltd routinely screens for viruses, addressees should
check this email and any attachments for viruses. Digital Steps Ltd
makes no representation or warranty as to the absence of viruses in this
email or any attachments.


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




Re: [Struts 1.1b] html:link problem in sub-application...

2002-10-22 Thread Marcus Edwards
No problem -- finally work it out.

I have 'redirect=true' in the definition of the forward for the action
leading to this page, which is why it didn't pick up the right context.



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




Urgent html:link problem!!

2001-09-03 Thread baris.guzelordu

Hello there,
I have a jsp including the lines below;

html:errors/
html:form action="/mainMenu" 
lihtml:link href="#"
onclick="document.forms[0].submit()"click/html:link/li
/html:form
...

When I first click the link, I get an error from weblogic;
Pzt Eyl 03 15:44:43 GMT+03:00 2001:I WebAppServletContext-uhp
action:   Validation error(s), redirecting to: /mainMenu.jsp
Pzt Eyl 03 15:44:43 GMT+03:00 2001:E HTTP Connection failure
java.net.SocketException: socket closed (code=0)
java.lang.Throwable(java.lang.String)
java.lang.Exception(java.lang.String)
java.io.IOException(java.lang.String)
java.net.SocketException(java.lang.String)
int java.net.SocketInputStream.socketRead(byte [], int, int,
java.net.SocketImpl, java.io.FileDescriptor)
int java.net.SocketInputStream.read(byte [], int, int)
void weblogic.socket.JavaSocketMuxer.processSockets()
void
weblogic.socket.SocketReaderRequest.execute(weblogic.kernel.ExecuteThrea
d)
void weblogic.kernel.ExecuteThread.run()

When I click again, I get correct jsp messages in mainmenu.jsp without
any error like above...Is there a bug in onclick=form.submit();..

Thanks for any suggestions.


Baris Gzelordu
IT-Customer Services
* +90 212 449 23 35
* +90 532 210 19 57
* [EMAIL PROTECTED]



***

This e-mail and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed.
If you are not the intended recipient you are hereby notified that any
dissemination, forwarding, copying or use of any of the information is
prohibited.

The opinions expressed in this message belong to sender alone. There is no
implied endorsement by TURKCELL.

This e-mail has been scanned for all known computer viruses.

***



RE: html:link problem

2001-07-07 Thread Niall Pemberton

No it just does a single parameter, for multiple params you need to use name
or name and property which points to a HashMap of parameters.

Niall

 -Original Message-
 From: Rama Krishna [mailto:[EMAIL PROTECTED]]
 Sent: 06 July 2001 01:40
 To: [EMAIL PROTECTED]
 Subject: Re: html:link problem


 Niall ,

 does it work for multiple param's??? or if not how do i tackle multiple
 params??

 thanks,
 rama.

 - Original Message -
 From: Niall Pemberton [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Thursday, July 05, 2001 4:39 PM
 Subject: RE: html:link problem


  Rama,
 
  Cant you use paramProperty?
 
  html:link page=/target.cm paramId=value
 paramName=myCollectionElement
  paramProperty=idclick here/html:link
 
 
  Niall
 
  -Original Message-
  From: Rama Krishna [mailto:[EMAIL PROTECTED]]
  Sent: 05 July 2001 20:10
  To: [EMAIL PROTECTED]
  Subject: html:link problem
 
 
  is this correct
 
  html:link page=/target.cm paramId=value paramName=bean:write
  name='myCollectionElement' property='id'/click here/html:link
 
  where myCollectionElement is a  collection
  id is a property in the collection
 
  and i want  http:///target.cm?value=2 (value of id)
 
  i get null when i say
 
  req.getParameter(value); in my action class??
 
  any help???
 
  thanks,
  rama
 
 





RE: html:link problem

2001-07-05 Thread Greg Reddin

 I need to
 use one of forward, href or page. So now my problems are:

Try setting up the href attribute to read

href=javascript:performAction(...)

and see if that works.



Re: html:link problem

2001-07-05 Thread Mark Kettner

Think you mailed it to the wrong guy.

Greg Reddin wrote:

 I need to
 use one of forward, href or page. So now my problems are:
 
 
 Try setting up the href attribute to read
 
 href=javascript:performAction(...)
 
 and see if that works.
 
 

-- 
--o-o--
Mark Kettner
http://www.fredhopper.com
Amsterdam, The Netherlands
Phone:  +31 20 3206203 Mobile: +31 620 609 817
fax:+31 20 8848747
E-mail: [EMAIL PROTECTED], [EMAIL PROTECTED]





RE: html:link problem

2001-07-05 Thread Steve A Drake

On Thu, 5 Jul 2001, Greg Reddin wrote:

  I need to
  use one of forward, href or page. So now my problems are:

 Try setting up the href attribute to read

 href=javascript:performAction(...)

 and see if that works.


 Good idea. Unfortunately, it didn't work. I tried:

html:link href=javascript:performAction(form, 'simpleQuery.do')
   paramId=offset
   paramName=resultNavigator
   paramProperty=startIndex

but got:


Exception Report:

javax.servlet.ServletException: javascript:performAction(form, 
'simpleQuery.do')?offset=0
at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:481)
at
_0002fsimpleQuery_0002ejspsimpleQuery_jsp_6._jspService(_0002fsimpleQuery_0002ejspsimpleQuery_jsp_6.java:1844)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

...




Root Cause:

java.lang.IllegalArgumentException: javascript:performAction(form, 
'simpleQuery.do')?offset=0
at
org.apache.catalina.connector.HttpResponseBase.toAbsolute(HttpResponseBase.java:639)
at
org.apache.catalina.connector.HttpResponseBase.encodeURL(HttpResponseBase.java:918)
at
org.apache.struts.util.RequestUtils.computeURL(RequestUtils.java:418)
at
org.apache.struts.taglib.html.LinkTag.doStartTag(LinkTag.java:338)
at
_0002fsimpleQuery_0002ejspsimpleQuery_jsp_6._jspService(_0002fsimpleQuery_0002ejspsimpleQuery_jsp_6.java:1044)
...


I also tried:

html:link href=javascript:performAction(form,
'simpleQuery.do?offset=%= 10*i %')

but got an IllegalArgumentException.





html:link problem

2001-07-05 Thread Rama Krishna



is this correct

html:link page="/target.cm" paramId="value" 
paramName="bean:write name='myCollectionElement' 
property='id'/"click here/html:link

where myCollectionElement is a 
collection
  
 id is a property in the collection

and i want http:///target.cm?value=2 (value of 
id)

i get null when i say

req.getParameter("value"); in my action 
class??

any help???

thanks,
rama







RE: html:link problem

2001-07-05 Thread Greg Reddin

Since I am not using the JSP tags right now, I'm really speculating.  It
looks as if the link tag is attempting to build a URL based on the stuff
you put in the href, paramId, paramName, and paramProperty
attributes.  It may be that the tag is not designed to work with
JavaScript-style URL's in the href.

You could deal with this in a couple of ways:
1) Try using just href without the param attributes.  Build your URL
and place it in a variable:

%
 String jsUrl = javascript:performAction(form,
'simpleQuery.do?offset=' + i + );;
%

html:link href=%= jsUrl %/

I don't even know if that would compile; it's just a hunch, and it uses
the scriptlet, which may or may not be an option for you.

2) Use the HTML a tag instead of html:link.  Again I may be showing
some ignorance to the use of the link tag, but you could probably
accomplish the result using a like so:

a href=javascript:performAction(form, 'simpleQuery.do?offset=%= 10 *
i %');/

Also, note the use of the semicolon in the JavaScript calls.  For some
reason that I don't understand, that sometimes makes a difference.

Does anyone else have ideas on the use of html:link?  Is it possible
to use javascript calls in the href attribute?

Later,
Greg

  Good idea. Unfortunately, it didn't work. I tried:

 html:link href=javascript:performAction(form,
 'simpleQuery.do')
paramId=offset
paramName=resultNavigator
paramProperty=startIndex

 but got:


 Exception Report:

 javax.servlet.ServletException:



Re: html:link problem

2001-07-05 Thread troy hart



To the best of knowledge, you can't use the 
bean:write tag that way. I believe it would be:

html:link page="/target.cm" paramId="value" 
paramName="%= myCollectionElement.getId() %"click 
here/html:link


Hope this helps...

  - Original Message - 
  From: 
  Rama 
  Krishna 
  To: [EMAIL PROTECTED] 
  
  Sent: Thursday, July 05, 2001 1:09 
  PM
  Subject: html:link problem
  
  is this correct
  
  html:link page="/target.cm" paramId="value" 
  paramName="bean:write name='myCollectionElement' 
  property='id'/"click here/html:link
  
  where myCollectionElement is a 
  collection

   id is a property in the collection
  
  and i want http:///target.cm?value=2 (value 
  of id)
  
  i get null when i say
  
  req.getParameter("value"); in my action 
  class??
  
  any help???
  
  thanks,
  rama
  
  
  
  
  


Re: html:link problem

2001-07-05 Thread Rama Krishna



yeah, i guess that's the way to do it. i wanted 
to know if there is a way to do it without using jsp.

thanks much,
rama.

  - Original Message - 
  From: 
  troy hart 
  To: [EMAIL PROTECTED] 
  Sent: Thursday, July 05, 2001 1:08 
  PM
  Subject: Re: html:link problem
  
  To the best of knowledge, you can't use the 
  bean:write tag that way. I believe it would be:
  
  html:link page="/target.cm" paramId="value" 
  paramName="%= myCollectionElement.getId() %"click 
  here/html:link
  
  
  Hope this helps...
  
- Original Message - 
From: 
Rama 
Krishna 
To: [EMAIL PROTECTED] 

Sent: Thursday, July 05, 2001 1:09 
PM
Subject: html:link problem

is this correct

html:link page="/target.cm" 
paramId="value" paramName="bean:write name='myCollectionElement' 
property='id'/"click here/html:link

where myCollectionElement is a 
collection
  
 id is a property in the collection

and i want http:///target.cm?value=2 
(value of id)

i get null when i say

req.getParameter("value"); in my action 
class??

any help???

thanks,
rama







Re: html:link problem

2001-07-05 Thread troy hart



What doesn't work with that???

  - Original Message - 
  From: 
  Rama 
  Krishna 
  To: [EMAIL PROTECTED] 
  
  Sent: Thursday, July 05, 2001 2:25 
  PM
  Subject: Re: html:link problem
  
  no. this doesn't work. then i'll have to use 
  jsp bean tag and do this.
  
  is there anyother way???
  
  
  
- Original Message - 
From: 
troy hart 
To: [EMAIL PROTECTED] 

Sent: Thursday, July 05, 2001 1:08 
PM
Subject: Re: html:link problem

To the best of knowledge, you can't use the 
bean:write tag that way. I believe it would be:

html:link page="/target.cm" paramId="value" 
paramName="%= myCollectionElement.getId() %"click 
here/html:link


Hope this helps...

  - Original Message - 
  From: 
  Rama 
  Krishna 
  To: [EMAIL PROTECTED] 
  
  Sent: Thursday, July 05, 2001 1:09 
      PM
  Subject: html:link problem
  
  is this correct
  
  html:link page="/target.cm" 
  paramId="value" paramName="bean:write name='myCollectionElement' 
  property='id'/"click here/html:link
  
  where myCollectionElement is a 
  collection

   id is a property in the collection
  
  and i want http:///target.cm?value=2 
  (value of id)
  
  i get null when i say
  
  req.getParameter("value"); in my action 
  class??
  
  any help???
  
  thanks,
  rama
  
  
  
  
  


Re: html:link problem

2001-07-05 Thread Rama Krishna



cause it assumes myCollectionElement as a normal 
java Object and says no method getId() in java.lang.Object




  - Original Message - 
  From: 
  troy hart 
  To: [EMAIL PROTECTED] 
  Sent: Thursday, July 05, 2001 1:36 
  PM
  Subject: Re: html:link problem
  
  What doesn't work with that???
  
- Original Message - 
From: 
Rama 
Krishna 
To: [EMAIL PROTECTED] 

Sent: Thursday, July 05, 2001 2:25 
PM
Subject: Re: html:link problem

no. this doesn't work. then i'll have to use 
jsp bean tag and do this.

is there anyother way???



  - Original Message - 
  From: 
  troy hart 
  To: [EMAIL PROTECTED] 
  
  Sent: Thursday, July 05, 2001 1:08 
  PM
  Subject: Re: html:link problem
  
  To the best of knowledge, you can't use the 
  bean:write tag that way. I believe it would be:
  
  html:link page="/target.cm" 
  paramId="value" paramName="%= myCollectionElement.getId() 
  %"click here/html:link
  
  
  Hope this helps...
  
- Original Message - 
From: 
Rama Krishna 
To: [EMAIL PROTECTED] 

Sent: Thursday, July 05, 2001 1:09 
    PM
Subject: html:link problem

is this correct

html:link page="/target.cm" 
paramId="value" paramName="bean:write name='myCollectionElement' 
property='id'/"click here/html:link

where myCollectionElement is a 
collection
  
 id is a property in the collection

and i want http:///target.cm?value=2 
(value of id)

i get null when i say

req.getParameter("value"); in my action 
class??

any help???

thanks,
rama







Re: html:link problem

2001-07-05 Thread troy hart



Well, there are a few different ways to handle 
this. One possible scenario is this:

bean:define id="myId" 
name="myCollectionElement" property="id"/
html:link page="/target.cm" paramId="value" 
paramName="%= myId %"click here/html:link



  - Original Message - 
  From: 
  Rama 
  Krishna 
  To: [EMAIL PROTECTED] 
  
  Sent: Thursday, July 05, 2001 2:40 
  PM
  Subject: Re: html:link problem
  
  cause it assumes myCollectionElement as a 
  normal java Object and says no method getId() in java.lang.Object
  
  
  
  
- Original Message - 
From: 
troy hart 
To: [EMAIL PROTECTED] 

Sent: Thursday, July 05, 2001 1:36 
PM
Subject: Re: html:link problem

What doesn't work with that???

  - Original Message - 
  From: 
  Rama 
  Krishna 
  To: [EMAIL PROTECTED] 
  
  Sent: Thursday, July 05, 2001 2:25 
  PM
  Subject: Re: html:link problem
  
  no. this doesn't work. then i'll have to 
  use jsp bean tag and do this.
  
  is there anyother way???
  
  
  
- Original Message - 
From: 
troy hart 

To: [EMAIL PROTECTED] 

Sent: Thursday, July 05, 2001 1:08 
PM
Subject: Re: html:link 
problem

To the best of knowledge, you can't use the 
bean:write tag that way. I believe it would be:

html:link page="/target.cm" 
paramId="value" paramName="%= myCollectionElement.getId() 
%"click here/html:link


Hope this helps...

  - Original Message - 
  From: 
  Rama Krishna 
  To: [EMAIL PROTECTED] 
  
  Sent: Thursday, July 05, 2001 
  1:09 PM
  Subject: html:link problem
  
  is this correct
  
  html:link page="/target.cm" 
  paramId="value" paramName="bean:write name='myCollectionElement' 
  property='id'/"click here/html:link
  
  where myCollectionElement is a 
  collection

   id is a property in the collection
  
  and i want http:///target.cm?value=2 
  (value of id)
  
  i get null when i say
  
  req.getParameter("value"); in my action 
  class??
  
  any help???
  
  thanks,
  rama
  
  
  
  
  


Re: html:link problem

2001-07-05 Thread troy hart



Additionally, you can always use the type property 
to in effect "cast" a bean that you define, so you could do this:

bean:define id="myCollectionElement" 
name="someBean" property="collectionElement" 
type="com.abc.struts.MyCollectionElementType"
html:link page="/target.cm" paramId="value" 
paramName="%= myCollectionElement.getId() %"click 
here/html:link

This way your referece to myCollectionElement will 
be of the correct type, so getId() will be valid...

Hope this helps,

Troy

  - Original Message - 
  From: 
  troy hart 
  To: [EMAIL PROTECTED] 
  
  Sent: Thursday, July 05, 2001 2:44 
  PM
  Subject: Re: html:link problem
  
  Well, there are a few different ways to handle 
  this. One possible scenario is this:
  
  bean:define id="myId" 
  name="myCollectionElement" property="id"/
  html:link page="/target.cm" paramId="value" 
  paramName="%= myId %"click here/html:link
  
  
  
- Original Message - 
From: 
Rama 
Krishna 
To: [EMAIL PROTECTED] 

Sent: Thursday, July 05, 2001 2:40 
PM
Subject: Re: html:link problem

cause it assumes myCollectionElement as a 
normal java Object and says no method getId() in 
java.lang.Object




  - Original Message ----- 
  From: 
  troy hart 
  To: [EMAIL PROTECTED] 
  
  Sent: Thursday, July 05, 2001 1:36 
  PM
  Subject: Re: html:link problem
  
  What doesn't work with that???
  
- Original Message - 
From: 
    Rama Krishna 
To: [EMAIL PROTECTED] 

Sent: Thursday, July 05, 2001 2:25 
PM
Subject: Re: html:link 
problem

no. this doesn't work. then i'll have to 
use jsp bean tag and do this.

is there anyother way???



  - Original Message - 
  From: 
  troy hart 
  
      To: [EMAIL PROTECTED] 
  
  Sent: Thursday, July 05, 2001 
  1:08 PM
  Subject: Re: html:link 
  problem
  
  To the best of knowledge, you can't use 
  the bean:write tag that way. I believe it would 
  be:
  
  html:link page="/target.cm" 
  paramId="value" paramName="%= myCollectionElement.getId() 
  %"click here/html:link
  
  
  Hope this helps...
  
- Original Message - 
    From: 
    Rama Krishna 
To: [EMAIL PROTECTED] 

Sent: Thursday, July 05, 2001 
1:09 PM
Subject: html:link 
problem

is this correct

html:link page="/target.cm" 
paramId="value" paramName="bean:write name='myCollectionElement' 
property='id'/"click here/html:link

where myCollectionElement is a 
collection
  
 id is a property in the collection

and i want http:///target.cm?value=2 
(value of id)

i get null when i say

req.getParameter("value"); in my 
action class??

any help???

thanks,
rama







Re: html:link problem

2001-07-05 Thread Rama Krishna



well, it works. 

thanks 

:))
rama

  - Original Message - 
  From: 
  troy hart 
  To: [EMAIL PROTECTED] 
  Sent: Thursday, July 05, 2001 1:44 
  PM
  Subject: Re: html:link problem
  
  Well, there are a few different ways to handle 
  this. One possible scenario is this:
  
  bean:define id="myId" 
  name="myCollectionElement" property="id"/
  html:link page="/target.cm" paramId="value" 
  paramName="%= myId %"click here/html:link
  
  
  
- Original Message - 
From: 
Rama 
Krishna 
To: [EMAIL PROTECTED] 

Sent: Thursday, July 05, 2001 2:40 
PM
Subject: Re: html:link problem

cause it assumes myCollectionElement as a 
normal java Object and says no method getId() in 
java.lang.Object




  - Original Message - 
  From: 
  troy hart 
  To: [EMAIL PROTECTED] 
  
  Sent: Thursday, July 05, 2001 1:36 
  PM
  Subject: Re: html:link problem
  
  What doesn't work with that???
  
- Original Message - 
From: 
Rama Krishna 
To: [EMAIL PROTECTED] 

Sent: Thursday, July 05, 2001 2:25 
PM
Subject: Re: html:link 
problem

no. this doesn't work. then i'll have to 
use jsp bean tag and do this.

is there anyother way???



  - Original Message - 
  From: 
  troy hart 
  
  To: [EMAIL PROTECTED] 
  
  Sent: Thursday, July 05, 2001 
      1:08 PM
  Subject: Re: html:link 
  problem
  
  To the best of knowledge, you can't use 
  the bean:write tag that way. I believe it would 
  be:
  
  html:link page="/target.cm" 
  paramId="value" paramName="%= myCollectionElement.getId() 
  %"click here/html:link
  
  
  Hope this helps...
  
- Original Message - 
From: 
Rama Krishna 
To: [EMAIL PROTECTED] 
    
        Sent: Thursday, July 05, 2001 
1:09 PM
Subject: html:link 
problem

is this correct

html:link page="/target.cm" 
paramId="value" paramName="bean:write name='myCollectionElement' 
property='id'/"click here/html:link

where myCollectionElement is a 
collection
  
 id is a property in the collection

and i want http:///target.cm?value=2 
(value of id)

i get null when i say

req.getParameter("value"); in my 
action class??

any help???

thanks,
rama







RE: html:link problem

2001-07-05 Thread Niall Pemberton

Rama,

Cant you use paramProperty?

html:link page=/target.cm paramId=value paramName=myCollectionElement
paramProperty=idclick here/html:link


Niall

-Original Message-
From: Rama Krishna [mailto:[EMAIL PROTECTED]]
Sent: 05 July 2001 20:10
To: [EMAIL PROTECTED]
Subject: html:link problem


is this correct

html:link page=/target.cm paramId=value paramName=bean:write
name='myCollectionElement' property='id'/click here/html:link

where myCollectionElement is a  collection
id is a property in the collection

and i want  http:///target.cm?value=2 (value of id)

i get null when i say

req.getParameter(value); in my action class??

any help???

thanks,
rama




Re: html:link problem

2001-07-05 Thread Rama Krishna

Niall ,

does it work for multiple param's??? or if not how do i tackle multiple
params??

thanks,
rama.

- Original Message -
From: Niall Pemberton [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, July 05, 2001 4:39 PM
Subject: RE: html:link problem


 Rama,

 Cant you use paramProperty?

 html:link page=/target.cm paramId=value
paramName=myCollectionElement
 paramProperty=idclick here/html:link


 Niall

 -Original Message-
 From: Rama Krishna [mailto:[EMAIL PROTECTED]]
 Sent: 05 July 2001 20:10
 To: [EMAIL PROTECTED]
 Subject: html:link problem


 is this correct

 html:link page=/target.cm paramId=value paramName=bean:write
 name='myCollectionElement' property='id'/click here/html:link

 where myCollectionElement is a  collection
 id is a property in the collection

 and i want  http:///target.cm?value=2 (value of id)

 i get null when i say

 req.getParameter(value); in my action class??

 any help???

 thanks,
 rama





html:link problem

2001-07-03 Thread Steve A Drake

 Hello. I'm trying to use html:link to submit the contents of a form.
The problem is that when I submit the form using html:link, the
ActionForm bean is not populated. My form looks like:


  html:form action=simpleQuery.do

...

html:link forward=simpleQuery
   paramId=offset
   paramName=resultNavigator
   paramProperty=startIndex 
{Stuff here}
/html:link

...
  /html:form

In struts-config.xml, I've defined a global forward mapping from
simpleQuery to /simpleQuery.do . The parameter offset passes as a
request parameter to the Action class okay.

The only difference in the processing within Struts that I see is that,
for a form submission with the Submit button, Struts sees a POST
whereas for the html:link it sees a GET operation. For example,

output when using html:submit:

2001-07-03 16:30:07 action: Processing a POST for /simpleQuery
2001-07-03 16:30:07 action:  Looking for ActionForm bean under attribute
'simpleQueryForm'
2001-07-03 16:30:07 action:  Creating new ActionForm instance of class
'edu.ucar.comet.struts.SimpleQueryForm'
2001-07-03 16:30:07 action:  Storing instance under attribute
'simpleQueryForm' in scope 'request'
2001-07-03 16:30:07 action:  Populating bean properties from this request
2001-07-03 16:30:07 action:  Validating input form properties
2001-07-03 16:30:07 action:   No errors detected, accepting input
2001-07-03 16:30:07 action:  Looking for Action instance for class
edu.ucar.comet.struts.SimpleQueryAction


output when using html:link:

2001-07-03 16:30:24 action: Processing a GET for /simpleQuery
2001-07-03 16:30:24 action:  Looking for ActionForm bean under attribute
'simpleQueryForm'
2001-07-03 16:30:24 action:  Creating new ActionForm instance of class
'edu.ucar.comet.struts.SimpleQueryForm'
2001-07-03 16:30:24 action:  Storing instance under attribute
'simpleQueryForm' in scope 'request'
2001-07-03 16:30:24 action:  Populating bean properties from this request
2001-07-03 16:30:24 action:  Validating input form properties
2001-07-03 16:30:24 action:   No errors detected, accepting input
2001-07-03 16:30:24 action:  Looking for Action instance for class
edu.ucar.comet.struts.SimpleQueryAction





Re: html:link problem

2001-07-03 Thread Matt Raible

You cannot use a link to submit a form, unless you
call a javascript function from the link.  The link
will only submit its parameters to the form bean.

Hope this helps,

Matt

--- Steve A Drake [EMAIL PROTECTED] wrote:
  Hello. I'm trying to use html:link to submit the
 contents of a form.
 The problem is that when I submit the form using
 html:link, the
 ActionForm bean is not populated. My form looks
 like:
 
 
   html:form action=simpleQuery.do
 
 ...
 
 html:link forward=simpleQuery
paramId=offset
paramName=resultNavigator
paramProperty=startIndex 
 {Stuff here}
 /html:link
 
 ...
   /html:form
 
 In struts-config.xml, I've defined a global forward
 mapping from
 simpleQuery to /simpleQuery.do . The parameter
 offset passes as a
 request parameter to the Action class okay.
 
 The only difference in the processing within Struts
 that I see is that,
 for a form submission with the Submit button,
 Struts sees a POST
 whereas for the html:link it sees a GET
 operation. For example,
 
 output when using html:submit:
 
 2001-07-03 16:30:07 action: Processing a POST for
 /simpleQuery
 2001-07-03 16:30:07 action:  Looking for ActionForm
 bean under attribute
 'simpleQueryForm'
 2001-07-03 16:30:07 action:  Creating new ActionForm
 instance of class
 'edu.ucar.comet.struts.SimpleQueryForm'
 2001-07-03 16:30:07 action:  Storing instance under
 attribute
 'simpleQueryForm' in scope 'request'
 2001-07-03 16:30:07 action:  Populating bean
 properties from this request
 2001-07-03 16:30:07 action:  Validating input form
 properties
 2001-07-03 16:30:07 action:   No errors detected,
 accepting input
 2001-07-03 16:30:07 action:  Looking for Action
 instance for class
 edu.ucar.comet.struts.SimpleQueryAction
 
 
 output when using html:link:
 
 2001-07-03 16:30:24 action: Processing a GET for
 /simpleQuery
 2001-07-03 16:30:24 action:  Looking for ActionForm
 bean under attribute
 'simpleQueryForm'
 2001-07-03 16:30:24 action:  Creating new ActionForm
 instance of class
 'edu.ucar.comet.struts.SimpleQueryForm'
 2001-07-03 16:30:24 action:  Storing instance under
 attribute
 'simpleQueryForm' in scope 'request'
 2001-07-03 16:30:24 action:  Populating bean
 properties from this request
 2001-07-03 16:30:24 action:  Validating input form
 properties
 2001-07-03 16:30:24 action:   No errors detected,
 accepting input
 2001-07-03 16:30:24 action:  Looking for Action
 instance for class
 edu.ucar.comet.struts.SimpleQueryAction
 
 


__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/



Re: html:link problem

2001-07-03 Thread Steve A Drake

 Thanks for your reply Matt.

 I tried invoking a Javascript function to perform the form submission,
e.g.:

 html:link onclick=performAction(form, 'simpleQuery.do')
forward=simpleQuery
paramId=offset
paramName=resultNavigator
paramProperty=startIndex 
 {Stuff here}
 /html:link

but the forward attribute overrides the onclick. If I leave out the
forward attribute, the JSP doesn't compile complaining that I need to
use one of forward, href or page. So now my problems are:

 1) How can I invoke the Javascript function (and ignore the hyperlink
attribute)
 2) How do I pass the request parameter (can I still use paramId, etc.)

Thanks in advance.


On Tue, 3 Jul 2001, Matt Raible wrote:

 You cannot use a link to submit a form, unless you
 call a javascript function from the link.  The link
 will only submit its parameters to the form bean.

 Hope this helps,

 Matt

 --- Steve A Drake [EMAIL PROTECTED] wrote:
   Hello. I'm trying to use html:link to submit the
  contents of a form.
  The problem is that when I submit the form using
  html:link, the
  ActionForm bean is not populated. My form looks
  like:
 
 
html:form action=simpleQuery.do
 
  ...
 
  html:link forward=simpleQuery
 paramId=offset
 paramName=resultNavigator
 paramProperty=startIndex 
  {Stuff here}
  /html:link
 
  ...
/html:form
 
  In struts-config.xml, I've defined a global forward
  mapping from
  simpleQuery to /simpleQuery.do . The parameter
  offset passes as a
  request parameter to the Action class okay.
 
  The only difference in the processing within Struts
  that I see is that,
  for a form submission with the Submit button,
  Struts sees a POST
  whereas for the html:link it sees a GET
  operation. For example,
 
  output when using html:submit:
 
  2001-07-03 16:30:07 action: Processing a POST for
  /simpleQuery
  2001-07-03 16:30:07 action:  Looking for ActionForm
  bean under attribute
  'simpleQueryForm'
  2001-07-03 16:30:07 action:  Creating new ActionForm
  instance of class
  'edu.ucar.comet.struts.SimpleQueryForm'
  2001-07-03 16:30:07 action:  Storing instance under
  attribute
  'simpleQueryForm' in scope 'request'
  2001-07-03 16:30:07 action:  Populating bean
  properties from this request
  2001-07-03 16:30:07 action:  Validating input form
  properties
  2001-07-03 16:30:07 action:   No errors detected,
  accepting input
  2001-07-03 16:30:07 action:  Looking for Action
  instance for class
  edu.ucar.comet.struts.SimpleQueryAction
 
 
  output when using html:link:
 
  2001-07-03 16:30:24 action: Processing a GET for
  /simpleQuery
  2001-07-03 16:30:24 action:  Looking for ActionForm
  bean under attribute
  'simpleQueryForm'
  2001-07-03 16:30:24 action:  Creating new ActionForm
  instance of class
  'edu.ucar.comet.struts.SimpleQueryForm'
  2001-07-03 16:30:24 action:  Storing instance under
  attribute
  'simpleQueryForm' in scope 'request'
  2001-07-03 16:30:24 action:  Populating bean
  properties from this request
  2001-07-03 16:30:24 action:  Validating input form
  properties
  2001-07-03 16:30:24 action:   No errors detected,
  accepting input
  2001-07-03 16:30:24 action:  Looking for Action
  instance for class
  edu.ucar.comet.struts.SimpleQueryAction
 
 


 __
 Do You Yahoo!?
 Get personalized email addresses from Yahoo! Mail
 http://personal.mail.yahoo.com/


---
Steve Drake[EMAIL PROTECTED]
UCAR / COMET   (303) 497 - 8496
PO Box 3000
Boulder, CO  80307-3000