You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Ted Husted <hu...@apache.org> on 2003/09/27 13:24:38 UTC

Re: Bugzilla Item #14183

Late in 1.1, we added an action property to html:link, so that the 
generated href could refer to a page, forward, or action. I believe that 
anywhere we offer one of these options (as with page on img and image), 
we should offer all three.

The page property cando double-duty as an action reference, but that 
means embedding the prefix or suffix into the reference (/action.do 
versus /action), which, IMHO, is something we should avoid.

-Ted.

Chris Gastin wrote:
> In Bugzilla item #14183 (
> http://issues.apache.org/bugzilla/show_bug.cgi?id=14183 ) I have already
> coded it up for a forward attribute and it corresponding test.
> 
> Ted has the following comment attached to this bugzilla item - "Tagged for
> 1.2 (might as well add action while we're at it)."
> 
> I don't quite understand the implementation of the action attribute. Could
> some explain to me the expectation, so I can code up action as well.
> 
> Thanks,
> Chris Gastin
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-dev-help@jakarta.apache.org
> 
> 

-- 
Ted Husted,
   Junit in Action  - <http://www.manning.com/massol/>,
   Struts in Action - <http://husted.com/struts/book.html>,
   JSP Site Design  - <http://www.amazon.com/exec/obidos/ISBN=1861005512>.

"Get Ready, We're Moving Out!!" - <http://www.clark04.com>



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


Re: Bugzilla Item #14183

Posted by David Graham <gr...@yahoo.com>.
--- Chris Gastin <ch...@gastin.com> wrote:
> Thanks Ted!
> 
> Originally I was thinking I would modify the ImgTag.src() method to add
> action, and forward, but after you pointed me to LinkTag as an example I
> see
> that it is calling TagUtil.computeURL(). Should I just refactor
> TagUtil.computeURL() to handle src too.

I think that's the single ugliest method in Struts.  It's 168 lines long
and takes 9 parameters (many of which are optional)!  Refactoring is
certainly needed but *not* adding a 10th parameter.

David

> 
> Chris Gastin
> 
> ----- Original Message ----- 
> From: "Ted Husted" <hu...@apache.org>
> To: "Struts Developers List" <st...@jakarta.apache.org>
> Sent: Saturday, September 27, 2003 6:24 AM
> Subject: Re: Bugzilla Item #14183
> 
> 
> > Late in 1.1, we added an action property to html:link, so that the
> > generated href could refer to a page, forward, or action. I believe
> that
> > anywhere we offer one of these options (as with page on img and
> image),
> > we should offer all three.
> >
> > The page property cando double-duty as an action reference, but that
> > means embedding the prefix or suffix into the reference (/action.do
> > versus /action), which, IMHO, is something we should avoid.
> >
> > -Ted.
> >
> > Chris Gastin wrote:
> > > In Bugzilla item #14183 (
> > > http://issues.apache.org/bugzilla/show_bug.cgi?id=14183 ) I have
> already
> > > coded it up for a forward attribute and it corresponding test.
> > >
> > > Ted has the following comment attached to this bugzilla item -
> "Tagged
> for
> > > 1.2 (might as well add action while we're at it)."
> > >
> > > I don't quite understand the implementation of the action attribute.
> Could
> > > some explain to me the expectation, so I can code up action as well.
> > >
> > > Thanks,
> > > Chris Gastin
> > >
> > >
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: struts-dev-help@jakarta.apache.org
> > >
> > >
> >
> > -- 
> > Ted Husted,
> >    Junit in Action  - <http://www.manning.com/massol/>,
> >    Struts in Action - <http://husted.com/struts/book.html>,
> >    JSP Site Design  -
> <http://www.amazon.com/exec/obidos/ISBN=1861005512>.
> >
> > "Get Ready, We're Moving Out!!" - <http://www.clark04.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
> 


__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

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


Re: Bugzilla Item #14183

Posted by Chris Gastin <ch...@gastin.com>.
Thanks Ted!

Originally I was thinking I would modify the ImgTag.src() method to add
action, and forward, but after you pointed me to LinkTag as an example I see
that it is calling TagUtil.computeURL(). Should I just refactor
TagUtil.computeURL() to handle src too.

Chris Gastin

----- Original Message ----- 
From: "Ted Husted" <hu...@apache.org>
To: "Struts Developers List" <st...@jakarta.apache.org>
Sent: Saturday, September 27, 2003 6:24 AM
Subject: Re: Bugzilla Item #14183


> Late in 1.1, we added an action property to html:link, so that the
> generated href could refer to a page, forward, or action. I believe that
> anywhere we offer one of these options (as with page on img and image),
> we should offer all three.
>
> The page property cando double-duty as an action reference, but that
> means embedding the prefix or suffix into the reference (/action.do
> versus /action), which, IMHO, is something we should avoid.
>
> -Ted.
>
> Chris Gastin wrote:
> > In Bugzilla item #14183 (
> > http://issues.apache.org/bugzilla/show_bug.cgi?id=14183 ) I have already
> > coded it up for a forward attribute and it corresponding test.
> >
> > Ted has the following comment attached to this bugzilla item - "Tagged
for
> > 1.2 (might as well add action while we're at it)."
> >
> > I don't quite understand the implementation of the action attribute.
Could
> > some explain to me the expectation, so I can code up action as well.
> >
> > Thanks,
> > Chris Gastin
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: struts-dev-help@jakarta.apache.org
> >
> >
>
> -- 
> Ted Husted,
>    Junit in Action  - <http://www.manning.com/massol/>,
>    Struts in Action - <http://husted.com/struts/book.html>,
>    JSP Site Design  - <http://www.amazon.com/exec/obidos/ISBN=1861005512>.
>
> "Get Ready, We're Moving Out!!" - <http://www.clark04.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