Hello everybody,
I am trying to make sort of a forum with Seam but I am having a problem with the HTML anchor part of the URL, which is being removed when the redirect component intercepts the call if the user is not logged in.
For instance:
If I am not logged in and I request the following URL: localhost:8080/viewTopic.seam?topicId=1#comment20
the org.jboss.seam.security.notLoggedIn event is being raised and the URL is being catched
by the redirect component. Then I am redirected to localhost:8080/login.seam which is the expected behaviour. However, after a successful login the page which I am redirected to is
localhost:8080/viewTopic.seam?topicId=1, removing the #comment20 part.
By what I've seen in the org.jboss.seam.faces.Redirect source code, the problem is that captureCurrentView method is not doing anything to store it. Moreover, the FacesManager.instance().redirect method doesn't expect it either, or I don't see any memory structure for storing it.
So my questions are:
Did I do anything wrong and this isn't supposed to happen?
If not, which are the possible ways to overcome this issue?
Thanks in advance,
JBoss AS 4.2 GA / Seam 2.0.2 SP1 but I checked the 2.2.0 source and I didn't see any relevant change.
Seems I was drowning in a glass of water. After some fighting with Seam and JSF I decided to change the approach and use this using javascript to 'jump to anchor'