if you use html-el taglib and the JSTL taglibs, you can set a variable from the formbean like this, where sectionForm is the name of my formbean in struts-config.xml:
<c:set value="${sectionForm.url}" var="url"/> <c:set value="${sectionForm.title}" var="title"/>
and then reference it with EL in the link and combine your parameter with the querystring:
<html-el:link href="${url}?page=viewcontactlist"> <c:out value="${title}" default="error"/> </html-el:link>
If you used the JSTL link taglib then you could use nested parameters which is even funkier, but there are unfortunately other normal HTML attributes to <a> that <c:link> won't let you use.
HTH Adam
On 09/09/2003 05:20 PM Mehran Zonouzi wrote:
Hi,
Does anyone know how to use the html:link taglibs to call an ActionForm bean from a link? I also want to pass a param called 'page' to the link and set it's value to be 'viewcontactlist'.
This is my ActionForm bean:
import javax.servlet.http.HttpServletRequest; import org.apache.strus.action.*;
public final class ContactForm extends ActionForm {
// page parameter from the CDS menu
private String pageName =null; public String getPageName(){ return (this.pageName); }
public void setPageName(String pageName){ this.pageName = pageName; } }
I have done the below in my JSP page but it does not seem to be working...
<html:link href="/ContactForm" paramId="page" paramName="ContactForm" paramProperty="viewcontactlist"> </html:link>
--
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-- struts 1.1 + tomcat 4.1.27 + java 1.4.2 Linux 2.4.20 RH9
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]