Joe you're assessment is correct. There is usually a 1 to 1 mapping
between JSP tag and UI component. Right now the form tag and url tag
duplicate several pieces of key url building logic. I spent some time
abstracting away url building this weekend. I'm not far enough along to
actually submit a patch, but I think this would greatly reduce the
duplication of code. This is an issue for me because one of the project
that I lead, tabletags, also does a lot with building up url's. Let me
know if your interested in seeing some of this and I'll post the basic
API and default implementations of this new urlbuilding functionality.
The other option would be to add this functionality to the existing
<s:a/> tag. I'm not sure if this makes sense from an API
perspective--it may get a little weird if you allow <s:param/> tags to
be nested within, and also allow the body content of the <s:a/> to be
the text within the html anchor tag. From that perspective, a seperate
<s:actionurl/> tag makes more sense. It would also depend on how
similar the ftl templates are and whether the differences are enough to
warrant a seperate template.
Tom
Joe Germuska wrote:
There's an open ticket for this issue
https://issues.apache.org/struts/browse/WW-1517
I assigned it to myself, since I, too, am interested in such
functionality,
but I'm looking for some suggestions from someone, anyone with more
familiarity with the architectural model for the S2 tags because I don't
quite see how to maximize reuse (because it's essentially a hybrid of the
<s:a> and <s:url> tags and I'm not sure how to blend them while
holding to
what seems to be the model of a single component object per tag.
Maybe we
could make a completely new component object, but then the question is
how
to not have duplicate code with the Anchor and Url components.
Joe
On 2/4/07, Gonçalo Luiz <[EMAIL PROTECTED]> wrote:
Hello,
Even though the method I'm using to produce links is working, I think
of it like a little bit awkward.
An example of what I'm saying is:
<a href="<s:url action="preferences_prepare"/>">
<s:text name="preferences" />
</a>
Is there a more "elegant" way of producing links that does not involve
this "sub-tag" schema ?
Thank you.
Best Regards,
--
Gonçalo Luiz
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]