struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niall Pemberton" <niall.pember...@blueyonder.co.uk>
Subject Re: The html:link Tag
Date Sat, 12 Jun 2004 22:08:13 GMT
Using a forward..

<html:link forward="viewthread"
                 paramId="thread"
                 paramName="threadBean"
                 paramProperty="threadID">Click Here</html:link>

you also know you can specify an action, rather than doing stuff with global
forwards...

<html:link action="/viewthread.do"
                 paramId="thread"
                 paramName="threadBean"
                 paramProperty="threadID">Click Here</html:link>

or an actual href....

<html:link href="myapp/viewthread.do"
                 paramId="thread"
                 paramName="threadBean"
                 paramProperty="threadID">Click Here</html:link>


Niall

----- Original Message ----- 
From: "Caroline Jen" <jiapei_jen@yahoo.com>
To: "Struts Users Mailing List" <user@struts.apache.org>
Sent: Saturday, June 12, 2004 10:56 PM
Subject: Re: The html:link Tag


> Thanks for the reply.  If I use the html:link tag and
> I have one parameter, how do I use the
> paramId/paramName/paramProperty?
>
> For example, I have:
> <a
> href="viewthread?thread=<%=threadBean.getThreadID()%>">
>
> what should I do when I convert it to html:link
>
> <html:link forward="viewthread" paramName="thread"
> ????????????>
>
> Caroline
> --- Niall Pemberton <niall.pemberton@blueyonder.co.uk>
> wrote:
> > With the LinkTag you have two options for parameters
> > - you can add one
> > parameter using the paramId/paramName/paramProperty
> > attributes or you can
> > specify a bean property using the name/property
> > attributes which contain a
> > Map of parameters.
> >
> > So in your case if you put your sort, order and
> > offset parameters into a Map
> > and store that Map in a bean property then you would
> > do....
> >
> > <html:link forward="listthreads" name="myBean"
> > property="myParams">Click
> > Here</html:link>
> >
> > I'n not sure what you mean by "verify the equivalent
> > of the <a
> > href="listthreads"> part of the html:link tag".
> > <html:link
> > forward="listthreads"....> should be fine if
> > "listthreads" is set up as a
> > global ActionForward in your struts-config
> >
> >
> http://jakarta.apache.org/struts/userGuide/struts-html.html#link
> >
> > Niall
> >
> > ----- Original Message ----- 
> > From: "Caroline Jen" <jiapei_jen@yahoo.com>
> > To: <struts-user@jakarta.apache.org>
> > Sent: Saturday, June 12, 2004 1:29 PM
> > Subject: The html:link Tag
> >
> >
> > > What is the html:link equivalent of
> > >
> > > <a
> > >
> >
>
href="listthreads?sort=<%=sort%>&order=<%=order%>&offset=<%=previousOffset%>
> > ">
> > >
> > > How do I pass those parameters (sort, order, and
> > > offset)?  And please verify the equivalent of the
> > <a
> > > href="listthreads"> part of the html:link tag:
> > >
> > > <html:link forward="listthreads" .....>
> > > </html:link>
> > >
> > > and in my struts-config.xml, I can
> > >
> > >      <forward
> > >         name="listthreads"
> > >         path="/do/threads/List"/>
> > >
> > > then
> > >
> > >     <action
> > >         path="/threads/List"
> > >         type="org.myOrg.myProj.message.ListThread"
> > >         name="threadForm"
> > >         scope="request"
> > >         validate="false">
> > >        <forward
> > >             name="success"
> > >             path=".xxx.YYY"/>
> > >
> > > Thank you.
> > >
> > >
> > >
> > >
> > > __________________________________
> > > Do you Yahoo!?
> > > Friends.  Fun.  Try the all-new Yahoo! Messenger.
> > > http://messenger.yahoo.com/
> > >
> > >
> >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > user-unsubscribe@struts.apache.org
> > > For additional commands, e-mail:
> > user-help@struts.apache.org
> > >
> > >
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > user-unsubscribe@struts.apache.org
> > For additional commands, e-mail:
> > user-help@struts.apache.org
> >
> >
>
>
>
>
>
> __________________________________
> Do you Yahoo!?
> Friends.  Fun.  Try the all-new Yahoo! Messenger.
> http://messenger.yahoo.com/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


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


Mime
View raw message