You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@empire-db.apache.org by Benjamin Venditti <be...@web.de> on 2009/07/06 12:25:36 UTC

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


re: Uprading struts2 extensions to struts 2.1.6

Posted by Rainer Döbele <do...@esteam.de>.
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