incubator-empire-db-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin Venditti <benni...@web.de>
Subject re: Uprading struts2 extensions to struts 2.1.6
Date Tue, 07 Jul 2009 21:41:01 GMT
Hi Rainer,

thanks for your response and hints. For the first issue (ItemListTag) your suggestion looks
like the right solution (i also found the comments in the source).
However for the second issue (LinkTag / Anchor) i am not so sure as the "href" property already
existed before and therefore i think its not the appropriate replacement.
Previous struts APIs referred to 'targets' as list of element ids whose content will be updated
with the text returned from request
I couldn't find any similar property that could represent that nature. I also do not really
understand what that means, afaik "target" can have values like "_blank, _parent ...".

I created a patch that affects 12 files and can easily be apply with Eclipse (right click
-> team -> Apply Patch ...). After you have applied the patch you can find my
changes and comments by searching the string "* UPGRADE-struts 2.1.6" in the source code.

I'll have to do further testing, but with the patch you can have a first look.

best regards,
    Benjamin




-----Ursprüngliche Nachricht-----
Von: "Rainer Döbele" <doebele@esteam.de>
Gesendet: 06.07.09 21:01:04
An: <empire-db-dev@incubator.apache.org>
Betreff: re: Uprading struts2 extensions to struts 2.1.6

Hi Benni,

first of all it's certainly a great idea to update our dependencies to the latest struts2
release.
Thanks to Maven changing version is simple, however there seem to be quite a few problems
of which you must have already solved quite a few.

Without doing your work again I cannot compile and run the code, hence your questions are
hard to answer just by looking at the code.
But since this was my only option I gave it a go and this is my conclusion:

1. In the class ItemListTag you should replace getId()/setId() by getVar()/setVar()

2. In the classes LinkTag and AnchorComponent you should replace the property "targets" by
"href" and use setHref() instead of setTargets() respectively. 

That could do the job (as I said this is untested - only concluded from reading the struts2
source code).
But of course you would have to test everything properly.
When you run the sample it should use this peace of code.

The next question is how do we get your changes merged with our code?
How many files did you have to change so far?

Rainer


benniven@web.de wrote:
> re: Uprading struts2 extensions to struts 2.1.6
> 
> Hello EmpireDB developer team,
> 
> i am currently trying to get the empire-db struts extensions running
> with struts 2.1.6.
> Most of the problems could be solved quite easily, but unfortunately i
> have two issues that i can't solve without doubt.
> 
> 1. Class: *ItemListTag:130*
>     Previously the the method "getId()" was called from the class
> "org.apache.struts2.components.Component"
>     but this method does no longer exist. By making the nested class
> "ItemIteratorComponent" non static, i could get rid
>     of the "Cannot make static referenced ..." error, however i am not
> sure if this is a appropriate solution, as thereby the
>     method "javax.servlet.jsp.tagext.TagSupport.getId()" will be
> called.
> 
> 2. Classes: *LinkTag:97, AnchorComponent:101*
>     The Attribute "targets" as well as the method "setTarges(...)" no
> longer exists in *org.apache.struts2.components.Anchor*.
>     My current solution for this issue is to remove all references in
> all other classes and in the tag library.
> 
> I could compile the struts2 extensions and ran the sample application
> on
> tomcat 6.x with the stated changes (and others).
> Could you please help me with the two issues. If you like i can send
> you
> all the changes i made.
> 
> Thanks in advance.
> 
>     Benjamin




________________________________________________________________
Neu: WEB.DE Doppel-FLAT mit Internet-Flatrate + Telefon-Flatrate
für nur 19,99 Euro/mtl.!* http://produkte.web.de/go/02/


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