struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Damm, Gary" <ga...@qualcomm.com>
Subject RE: html:link tag
Date Fri, 10 Jan 2003 16:57:07 GMT
I agree, the Map method isn't very straight forward for simply adding
2-3 params to the link.  The only thing to remember with the traditional
method is to encode the parameters.

Thanks,
Gary

-----Original Message-----
From: shirishchandra.sakhare@ubs.com
[mailto:shirishchandra.sakhare@ubs.com] 
Sent: Friday, January 10, 2003 12:24 AM
To: struts-user@jakarta.apache.org
Subject: RE: html:link tag

Easiest way to pass multiple parameters on a html link.


Use the standard anchor tag.


eg:

 	<a href="SomeAction.do?empid=<bean:write 
name="myForm" 
property="<%=\"emp[\"+i+\"].empId\"%>"/>&salary
nce=<bean:write name="myForm" 
property="<%=\"empList[\"+i+\"].salary\"%>"/>">

Here the myForm should have indexed getters for empBean....

Clas MyForm(){
	List empList = new ArrayList();
	getEmp(int index){
	while(empList.size< index){
		empList.add(new EmpBean());
	}
	return (EmpBean)empList.get(index);
	}
}




Very, very ugly but works just fine!

I think the struts way(using map....)is not very easy alwqys...


-----Original Message-----
From: garyd [mailto:garyd@qualcomm.com]
Sent: Friday, January 10, 2003 3:44 AM
To: struts-user
Cc: garyd
Subject: html:link tag


Anyone know if/how to add multiple query parameters using this tag?

ie: www.myserver.com/foo.jsp?id=1&bar=2...

Thanks,
Gary

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



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


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


Mime
View raw message