• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Q 4 author: extending struts for local needs

 
Gian Franco
blacksmith
Ranch Hand
Posts: 979
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear author,

How should one introduce an extension to struts
if some specification can't be realized with the
given set of struts-possibilities? Are there some
fixed rules that should be followed in these
cases, in order not to break struts'design?

Cheers,

Gian
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What kind of needs/extensions are you talking about?
 
Gian Franco
blacksmith
Ranch Hand
Posts: 979
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

An example, the only one really since I've just
been exposed to struts, comes from the following:
I've got a set of custom tags that do their thing,
and often they include a body with struts components.
This combination is so recurrent that I would like
to wrap the whole thing into a single custom tag.
Therefore the need for some hooks for an elegant
solution to this problem.

Cheers,

Gian
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hmm. In theory, you could write a custom tag that uses the Struts tag classes directly, i.e. doing something like

I doubt that this would make your situation much better, though.
 
Gian Franco
blacksmith
Ranch Hand
Posts: 979
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

This is indeed how it has been solved now
but I'm not really pleased with the solution
it 'smells' a bit.

Cheers,

Gian
[ January 12, 2005: Message edited by: Gian Franco Casula ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic