--- Dave Newton wrote:
Why?
I'll try to explain. The main problem is, that i would not to expose a
single getter-method in the action for each property I want to decode. I'm
searching for a more generic method.
I thought on some possibile solution, one was to return, in each action, the
entire decode set (roughly speaking, a series of tuples name-value-decode).
That way, I could handle it with <s:iterator and <s:if tag each time I need
a decode. In addition, if the decoded value I'm searching is the last in the
list, the list is entirely scrolled before finding result. So I tend to
discard that.
Maybe it is only a matter of wrong architectural design: we are returning to
the views some objects mapped from the database layer "as they are". It is
possible we need an additional level between, to provide decoded values for
each property, but the temptation to use a scriplet <%=Decode(name, value)%>
with a generic, singleton Decoder class is still strong :).
I've never had to do that, but if I did, I'd be most
likely to do it in the action or, more likely, a
service object in the action.
d.
Yes, I'd be most likely to do, too. But I have to find a way to NOT write
hundreds of methods, one for each decode-set.
Well, I'll continue thinking on it, BTW thanks for reply.
P.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]