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: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] 
Sent: Friday, January 10, 2003 12:24 AM
To: [EMAIL PROTECTED]
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:[EMAIL PROTECTED]]
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:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>



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


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

Reply via email to