commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mick Knutson <mknut...@baselogic.com>
Subject Re: Adapting legacy request parameters into new POJO?
Date Mon, 12 Apr 2010 18:33:51 GMT
Morph seems to have what I think I want, but I have spent the past few hours
trying to get a simple example working, and the docs are wrong. It referes
to many classes that doe not exist in the jar.

I also can not seem to find any other good examples. Can you point any out
for me?

---
Thank You…

Mick Knutson, President

BASE Logic, Inc.
Enterprise Architecture, Design, Mentoring & Agile Consulting
p. (866) BLiNC-411: (254-6241-1)
f. (415) 685-4233

Website: http://www.baselogic.com
Blog: http://www.baselogic.com/blog/
Linked IN: http://linkedin.com/in/mickknutson
Twitter: http://twitter.com/mickknutson
Vacation Rental: http://tahoe.baselogic.com
---



On Mon, Apr 12, 2010 at 10:34 AM, Matt Benson <gudnabrsam@gmail.com> wrote:

>
> On Apr 11, 2010, at 5:28 PM, Mick Knutson wrote:
>
>  I have an interesting issue I am trying to solve in a manageable way.
>>
>> I have a few dozen legacy JSP's that I am phasing out. But I have to do
>> them
>> 1by1. Each page create a POST of ~12 named request parameters that are ALL
>> named different. VERY frustrating as there is no good convention.
>>
>> So, My thought is trying to create a Map for mapping the old names to the
>> new names for each POST:
>> Map reqParam = {"newName", "oldName"}
>>
>> Where I have a new POJO that has set/getNewName(..)
>>
>>
>> Then, somehow copying from these old request properties from my request
>> properties Map to the new one's in my new POJO.
>>
>> Once Mapped, I have no further use for the old names.
>>
>> Can someone help point me in the right direction to be able to use common
>> Lang if possible?
>>
>>
> Nothing comes to mind from [lang].  [beanutils] would probably allow you to
> roll your own solution to this.  You might also want to look into
> morph.sourceforge.net, whose PropertyNameMappingCopier would probably work
> for you out of the box.
>
> HTH,
> Matt
>
>
>
>> ---
>> Thank You…
>>
>> Mick Knutson, President
>>
>> BASE Logic, Inc.
>> Enterprise Architecture, Design, Mentoring & Agile Consulting
>> p. (866) BLiNC-411: (254-6241-1)
>> f. (415) 685-4233
>>
>> Website: http://www.baselogic.com
>> Blog: http://www.baselogic.com/blog/
>> Linked IN: http://linkedin.com/in/mickknutson
>> Twitter: http://twitter.com/mickknutson
>> Vacation Rental: http://tahoe.baselogic.com
>> ---
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message