- changed version to 2.0.42
migrate URL generation in Views and Controllers to UrlGenerator
Currently, almost all Views (JSPs) generate URLs on their own. This shall be migrated to the central class org.bibsonomy.services.UrlGenerator
which already contains methods for some of the required URLs. Similarly, all URLs generated in Controllers should be generated by the UrlGenerator (look at the call hierarchy of the already existing methods to see where this already happens).
Before you can start, you need to solve a crucial challenge: The UrlGenerator shall be configured as a Spring bean but must be made available for the JSPs. Unfortunately, to the best of my knowledge, JSPs can only call static class methods. Hence, it is not trivial to expose the UrlGenerator. IIRC Daniel had some idea how to do this. Thus, please discuss this issue with Daniel and propose a solution.
Comments (18)
-
reporter -
- changed status to open
-
- changed version to 2.0.44
-
Account Deleted As you know, Tomcat 7 supports Servlet 3.0 and EL 2.2. Thus we may invoke methods from JSP files.
The problem is that we are using a dependency called shindig, which provides another implementation of the expression language : JUEL. Currently we are using shindig 2.02 which in return uses JUEL 2.1.3, but EL 2.2 can only be used from JUEL 2.2 onwards.
Hence i suggest updating shindig to support JUEL/EL 2.2. I hope that works.
-
Shindig 2.5.1 has a dependency to JUEL 2.2.5, please update the shindig dependency and adapt our code to the new version.
-
Account Deleted Method invocation works now.
The URLGenerator class has several overloaded methods, which poses a problem: The Expression language does not support method overloading, but will always use the first method from Class#getMethods() whose name and number of arguments match.
The methods returned by getMethods() are in no particular order, so I think renaming the overloaded method is the only solution.
Maybe we could rename methods like 'getUserUrl(String)' to 'getUserUrlByString(String)' or something?
-
- changed version to 2.0.45
-
- changed version to 2.0.46
-
reporter Will/Should the URLGenerator also generate the URLs to external pages (e.g., for bookmarks)? If so, care should be taken to incorporate the nofollow attribute and possible schema.org annotations (@sdoerfel knows more about that).
-
- changed version to 2.0.47
-
-
- changed status to resolved
thanks
-
-
assigned issue to
The following pages are missing:
- search
- popular tags, concepts, posts
- post*
- buttons
- gettingStarted
- join_group
- buttons
- editTags
- import/jabref
- settings
-
assigned issue to
-
- changed status to open
-
- /discussed/user/USER
- /discussed/group/GROUP
-
Issue
#2282was marked as a duplicate of this issue. -
- /documents/-hrefs
-
- removed milestone
- removed responsible
- Log in to comment