You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Christopher Bare <ch...@yahoo.com> on 2003/07/03 22:02:51 UTC

request for feedback on proposed parameter tag

Is there any interest in a ParameterTag that would
allow parameters to be added to the URL generated by
LinkTag? Something that would allow you to do create
links like so:

<ul>
<logic:iterate id="product" name="product-list">
<li><html:link page="/myaction.do">
        <html:parameter id="id" name="product"
property="id"/>
        <html:parameter id="category" name="product"
property="category"/>
        <bean:write name="product" property="name"/>
    </html:link>
</logic:iterate>
</ul>

-or-

<html:link page="/myaction.do"
  <html:parameter id="param1" name="mybean"
property="myproperty"/>
  <html:parameter id="param2" name="mybean"
property="myotherproperty"/>
  <html:parameter id="param3" value="literal-value"/>
  Link Display Text
</html:link>

-or even-

<html:link>
  <html:parameter
id="wombatId"><foo:wombat/></html:parameter>
  Go to a Wombat
</html:link>

This would give you the ability to append an arbitrary
number of parameters to a URL while remaining purely
tag based. Also, you can specify the value of the
parameter using an application specific custom tag,
such as my wombat tag above.

It is kind-of verbose, and requires some
re-arrangement of LinkTag, but no code changes
otherwise.

Does this seem worthwhile? Is it not very useful in
light of JSTL? Speaking of that, are the struts tags
going to be deprecated at some point? Any feedback
would be appreciated.

Thanks,

-Chris

p.s. Thanks for making an extremely useful framework
available and popular.




__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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


Re: request for feedback on proposed parameter tag

Posted by Christopher Bare <ch...@yahoo.com>.
I've put together what I consider a preliminary
implementation of ParameterTag, which seems to be
working. At the moment, I'm not familiar enough with
the JSTL tags to feel comfortable trying to integrate
with the <c:url> tag, as David and Ted suggested.

Given that limitation, the potential for introducing
bugs, and struts team's priorities, it may or may not
be worth a committer's time to have a look at my
current implementation. If not, that's OK, but if so
please let me know. Otherwise, maybe I can revisit
this idea, once I've had a chance to mess around with
the JSTL, if it still seems to be needed.

Thanks,

-J. Christopher Bare



__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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


Re: request for feedback on proposed parameter tag

Posted by Ted Husted <hu...@apache.org>.
Christopher Bare wrote:
> Speaking of that, are the struts tags
> going to be deprecated at some point? 

I imagine that the original tags will be supported through the 1.x 
release series, since those are targeted for JSP 1.1.

It seems unlikely that anyone will want to make whatever changes might 
be needed for the tags to support Struts "Next Generation" (whatever 
that might turn out to be), and so my guess is that they will pass away 
gracefully at that point. But, that could be quite some time yet.

The reason for the hedging it that everything depends on what the 
volunteers choose to do at the time. If someone suddenly decides that 
they want to keep the original taglibs alive, then they would be kept 
alive so long as that someone (who won't be me!) continues to work on 
them. But, right now, the people doing most of the work around here, 
seem interested in either JSTL or JSF (or something else entirely).

So, as David and Steve pointed out, but a JSTL spin on your proposal, 
and then you've got something!

-Ted.



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


Re: request for feedback on proposed parameter tag

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Thu, 3 Jul 2003, Christopher Bare wrote:

> Date: Thu, 3 Jul 2003 13:02:51 -0700 (PDT)
> From: Christopher Bare <ch...@yahoo.com>
> Reply-To: Struts Developers List <st...@jakarta.apache.org>
> To: struts-dev@jakarta.apache.org
> Subject: request for feedback on proposed parameter tag
>
> Is there any interest in a ParameterTag that would
> allow parameters to be added to the URL generated by
> LinkTag? Something that would allow you to do create
> links like so:
>
> <ul>
> <logic:iterate id="product" name="product-list">
> <li><html:link page="/myaction.do">
>         <html:parameter id="id" name="product"
> property="id"/>
>         <html:parameter id="category" name="product"
> property="category"/>
>         <bean:write name="product" property="name"/>
>     </html:link>
> </logic:iterate>
> </ul>
>
> -or-
>
> <html:link page="/myaction.do"
>   <html:parameter id="param1" name="mybean"
> property="myproperty"/>
>   <html:parameter id="param2" name="mybean"
> property="myotherproperty"/>
>   <html:parameter id="param3" value="literal-value"/>
>   Link Display Text
> </html:link>
>
> -or even-
>
> <html:link>
>   <html:parameter
> id="wombatId"><foo:wombat/></html:parameter>
>   Go to a Wombat
> </html:link>
>
> This would give you the ability to append an arbitrary
> number of parameters to a URL while remaining purely
> tag based. Also, you can specify the value of the
> parameter using an application specific custom tag,
> such as my wombat tag above.
>

I think this is the sort of incremental improvement in existing technology
that would make sense in a 1.x time frame.

> It is kind-of verbose, and requires some
> re-arrangement of LinkTag, but no code changes
> otherwise.
>
> Does this seem worthwhile? Is it not very useful in
> light of JSTL? Speaking of that, are the struts tags
> going to be deprecated at some point? Any feedback
> would be appreciated.
>

Because <html:link> does some things that <c:url> does not, it probably
makes sense to do this.

> Thanks,
>
> -Chris
>
> p.s. Thanks for making an extremely useful framework
> available and popular.
>

Craig

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


RE: request for feedback on proposed parameter tag

Posted by Steve Raeburn <st...@ninsky.com>.
I like the idea. Could we not have an html *and* an html-el version?

Steve

> -----Original Message-----
> From: David Graham [mailto:grahamdavid1980@yahoo.com]
> Sent: July 3, 2003 1:06 PM
> To: Struts Developers List
> Subject: Re: request for feedback on proposed parameter tag
> 
> 
> The JSTL provides this exact functionality except it doesn't have the
> ability to point to Struts actions.  If we were to add this feature, I'd
> like to see it as a new tag subclassing the JSTL's <c:url> tag that just
> provides the extra Struts features.
> 
> David
> 
> 
> --- Christopher Bare <ch...@yahoo.com> wrote:
> > Is there any interest in a ParameterTag that would
> > allow parameters to be added to the URL generated by
> > LinkTag? Something that would allow you to do create
> > links like so:
> > 
> > <ul>
> > <logic:iterate id="product" name="product-list">
> > <li><html:link page="/myaction.do">
> >         <html:parameter id="id" name="product"
> > property="id"/>
> >         <html:parameter id="category" name="product"
> > property="category"/>
> >         <bean:write name="product" property="name"/>
> >     </html:link>
> > </logic:iterate>
> > </ul>
> > 
> > -or-
> > 
> > <html:link page="/myaction.do"
> >   <html:parameter id="param1" name="mybean"
> > property="myproperty"/>
> >   <html:parameter id="param2" name="mybean"
> > property="myotherproperty"/>
> >   <html:parameter id="param3" value="literal-value"/>
> >   Link Display Text
> > </html:link>
> > 
> > -or even-
> > 
> > <html:link>
> >   <html:parameter
> > id="wombatId"><foo:wombat/></html:parameter>
> >   Go to a Wombat
> > </html:link>
> > 
> > This would give you the ability to append an arbitrary
> > number of parameters to a URL while remaining purely
> > tag based. Also, you can specify the value of the
> > parameter using an application specific custom tag,
> > such as my wombat tag above.
> > 
> > It is kind-of verbose, and requires some
> > re-arrangement of LinkTag, but no code changes
> > otherwise.
> > 
> > Does this seem worthwhile? Is it not very useful in
> > light of JSTL? Speaking of that, are the struts tags
> > going to be deprecated at some point? Any feedback
> > would be appreciated.
> > 
> > Thanks,
> > 
> > -Chris
> > 
> > p.s. Thanks for making an extremely useful framework
> > available and popular.
> > 
> > 
> > 
> > 
> > __________________________________
> > Do you Yahoo!?
> > SBC Yahoo! DSL - Now only $29.95 per month!
> > http://sbc.yahoo.com
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: struts-dev-help@jakarta.apache.org
> > 
> 
> 
> __________________________________
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month!
> http://sbc.yahoo.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-dev-help@jakarta.apache.org
> 
> 
> 


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


Re: request for feedback on proposed parameter tag

Posted by David Graham <gr...@yahoo.com>.
The JSTL provides this exact functionality except it doesn't have the
ability to point to Struts actions.  If we were to add this feature, I'd
like to see it as a new tag subclassing the JSTL's <c:url> tag that just
provides the extra Struts features.

David


--- Christopher Bare <ch...@yahoo.com> wrote:
> Is there any interest in a ParameterTag that would
> allow parameters to be added to the URL generated by
> LinkTag? Something that would allow you to do create
> links like so:
> 
> <ul>
> <logic:iterate id="product" name="product-list">
> <li><html:link page="/myaction.do">
>         <html:parameter id="id" name="product"
> property="id"/>
>         <html:parameter id="category" name="product"
> property="category"/>
>         <bean:write name="product" property="name"/>
>     </html:link>
> </logic:iterate>
> </ul>
> 
> -or-
> 
> <html:link page="/myaction.do"
>   <html:parameter id="param1" name="mybean"
> property="myproperty"/>
>   <html:parameter id="param2" name="mybean"
> property="myotherproperty"/>
>   <html:parameter id="param3" value="literal-value"/>
>   Link Display Text
> </html:link>
> 
> -or even-
> 
> <html:link>
>   <html:parameter
> id="wombatId"><foo:wombat/></html:parameter>
>   Go to a Wombat
> </html:link>
> 
> This would give you the ability to append an arbitrary
> number of parameters to a URL while remaining purely
> tag based. Also, you can specify the value of the
> parameter using an application specific custom tag,
> such as my wombat tag above.
> 
> It is kind-of verbose, and requires some
> re-arrangement of LinkTag, but no code changes
> otherwise.
> 
> Does this seem worthwhile? Is it not very useful in
> light of JSTL? Speaking of that, are the struts tags
> going to be deprecated at some point? Any feedback
> would be appreciated.
> 
> Thanks,
> 
> -Chris
> 
> p.s. Thanks for making an extremely useful framework
> available and popular.
> 
> 
> 
> 
> __________________________________
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month!
> http://sbc.yahoo.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-dev-help@jakarta.apache.org
> 


__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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