Hi,
I am passing Json string UI to Struts action layer and convert back to UI. I
am using JsonInterceptor which intercepts the request and converts Json
String to BeanMap suitable for parametersInterceptor. 
In the backend i have a Party.java which is extended by Person.java and
Company.java. So from the UI i always send a party which can have either all
person attributes or company attributes. and i use PrepareInterceptor to set
create the suitable party (mean new Person() or new Company()).Here i am
using paramsPrepareParams interceptor stack. 

This was working fine with struts-2.0.6, and when i upgrade to 2.1.6 a new
issue popped up. 
Issue is, when second time ParameterInterceptor called It is not setting the
values to the party(Person/company) created by the PrepareInterceptor,
rather a new object is being created with  only Party attributes(no person
attributes)

Party {
partyId;
partyType; #values can be either person /company
versionNumber;
}

Person  extends Party{
address;
name;
...
}
Company extends Party{
taxId;
dateOfincorporation;
address;
....
}
 
Root object is AccountOwners which has List of Parties,

AccountOwners{

List<Party> parties;
}

Let's say i have ony one Person json string beign passed in AccountOwners,
but after ParametersInterceptor called second time i am having two elements
in list of Parties, one having party with actual person and second only just
party (may be needs to call prepare again for this. :( )

I was debugging a lot and could not find why this new Struts-2.1.6 is
behaving differently and also i donno how to fix.
-- 
View this message in context: 
http://www.nabble.com/struts-2.1.6-Json-conversion-issue-with-inhertance-objects.-tp24877791p24877791.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to