[jboss-user] [JBoss Seam] - Re: how to redirecto back to intented page after login

2007-02-23 Thread mgombocz
Hi,

I have following problem: if an inital GET request with parameters is sent to a 
restricted view, 
the redirect to the login page works fine, 
after successful authentication a redirect happens to the captured view, 
but the request parameters are NOT restored.

This can be reproduced with the seamspace example:
- add the following to components.xml
   event type=org.jboss.seam.notLoggedIn
  |   action expression=#{redirect.captureCurrentView} /
  |/event
  |event type=org.jboss.seam.postAuthenticate
  |   action expression=#{redirect.returnToCapturedView} /
  |/event
- change the redirected view in pages.xml (home.xhtml instead of 
register.xhtml) at
exception class=org.jboss.seam.security.NotLoggedInException
  | redirect view-id=/home.xhtml
  | messageYou must be a member to use this feature/message
  | /redirect
  | /exception
- start a browser and enter 
http://localhost:8080/seam-space/comment.seam?name=Mr_SmileyblogId=2
- login with demo/demo
-- no more request parameters in the URL

I debugged Redirect.captureCurrentView() and realized that variable 
parameters gets no request parameters.

Is this possibly a bug?

Thx, Manuel

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4021404#4021404

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4021404
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: how to redirecto back to intented page after login

2007-02-23 Thread [EMAIL PROTECTED]
I *think* this has been fixed in CVS.  Could you try it with 1.1.7RC1?

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4021426#4021426

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4021426
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: how to redirecto back to intented page after login

2007-02-23 Thread [EMAIL PROTECTED]
Nope, this is expected. Declare the parameters as page parameters and they will 
be preserved.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4021431#4021431

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4021431
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: how to redirecto back to intented page after login

2007-02-13 Thread gsegura
I couln't make these feature work until I change its scope from 
ScopeType.CONVERSATION to ScopeType.SESSION

I noticed that it wasn't the same instance of Redirect component which has been 
called in captureCurrentView and returnToCapturedView, so I realized it was 
because of the scope.


I just don't know if will be any undesirable side effects because of the change 
of scope.

Is there other way to make this work?

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4016048#4016048

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4016048
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: how to redirecto back to intented page after login

2007-02-13 Thread [EMAIL PROTECTED]
captureCurrentView() begins a conversation, and returnToCapturedView() ends it, 
only if there is no long-running conversation already active. So you are 
definitely doing something wrong.

Make sure that you have no end-conversation/ tag in the exception handler, or 
@End annotation anywhere.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4016090#4016090

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4016090
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: how to redirecto back to intented page after login

2007-02-13 Thread gsegura
Indeed, I had a end-conversation/ tag.
Thank you very much.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4016113#4016113

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4016113
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: how to redirecto back to intented page after login

2007-02-12 Thread dilator
I believe this is not currently available

+1 :)

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4015499#4015499

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4015499
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: how to redirecto back to intented page after login

2007-02-12 Thread hstang
acegi supports this feature, and I found it to be very useful.  Would also like 
to see it as part of Seam security

+1

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4015508#4015508

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4015508
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: how to redirecto back to intented page after login

2007-02-12 Thread twocoasttb
This would be extremely useful to us as well.   Right now I am embedding our 
logon form in our main template and display it (and the page content) 
conditionally.  The net result is that the user gets the requested page upon 
successful login, but can't reload the page without getting Are you sure you 
want to resend the form? because there's no redirect.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4015516#4015516

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4015516
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: how to redirecto back to intented page after login

2007-02-12 Thread [EMAIL PROTECTED]
Look at components.xml in the seamspace example.  Here's the relevant bits:


  | event type=org.jboss.seam.notLoggedIn
  | action expression=#{redirect.captureCurrentView}/
  | /event
  | 
  | event type=org.jboss.seam.postAuthenticate
  | action expression=#{redirect.returnToCapturedView}/
  | /event  
  | 

This feature is also covered in the Seam documentation, in section 12.2.6 (the 
security chapter).

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4015582#4015582

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4015582
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: how to redirecto back to intented page after login

2007-02-12 Thread saeediqbal1
Good Job @Jboss Team! . Keep up the good work, keep the good stuff coming and 
let us test it for you :)

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4015600#4015600

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4015600
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: how to redirecto back to intented page after login

2007-02-12 Thread spambob
Sorry to hijack this because my problem isn't related to the security stuff but 
more to redirect.captureCurrentView  redirect.returnToCapturedView.

What I'm really missing is the possiblity to start a new pageflow within an 
existing one and to return upon the end of the inner one to the page where one 
has left the outer / started the inner pageflow.

I.e. one has a Buy product pageflow which includes a Register new account 
pageflow if a user doesn't have an account.
AFAIK - please correct me if I'm wrong on this - this is currently only 
possible with some individual hacks / extensions although this is a pretty 
common usecase so it would be _very_ nice to have something like this out of 
the box.

So my question is: could you _please_ extend this redirect.captureCurrentView  
redirect.returnToCapturedView to work with pageflows ?

If I - again - fail to see the forest because of all the trees I would greatly 
appreciate an hint in which example such stuff can be found.

Thanks a bunch :)

PS: Also thanks a lot for the security framework, this is just great !

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4015604#4015604

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4015604
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: how to redirecto back to intented page after login

2007-02-12 Thread saeediqbal1
spambob: did you try the   to see if it actually does what you want ? 
redirection to the middle of a transaction? 

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4015609#4015609

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4015609
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: how to redirecto back to intented page after login

2007-02-12 Thread spambob
I'm not sure if I understood you right (may be my english ;)).

I don't consider a pageflow a transaction but more something like a workflow / 
unit of work - therefore stuff is probably only saved at the end of the 
pageflow when all necessary input is entered (at least this is how I used it 
most times).

What I would like to have is just that Seam memorizes the state / viewid from 
where I start my inner pageflow and then returns upon the end to this viewid 
with its associated state _and_ the new / additional information defined in the 
inner pageflow.

I hope its clearer now ;)

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4015611#4015611

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4015611
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: how to redirecto back to intented page after login

2007-02-12 Thread spambob
^ Reading the above again I wrote I down wrong: actually I consider a pageflow 
a transaction (with a manual flush mode so stuff is saved at the end of the 
pageflow / transaction).

What I mean is that I would expect to get the transaction from the inner 
pageflow merged into the transaction of the outer pageflow (although it could 
succeed independently from the outer one if needed / wished).

I.e. - to stick with my example from above - the Buy product may fail but the 
Register user can still succeed (and get committed).

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4015625#4015625

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4015625
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: how to redirecto back to intented page after login

2007-02-12 Thread twocoasttb
Gavin, thanks for pointing that out.  I'm obviously missing something in my 
configuration because it's not working.  I have the following (deployed to 
4.0.5.GA)

components.xml

  security:identity 
authenticate-method=#{authenticator.authenticate}/
  | 
  |   drools:rule-base name=securityRules
  |  drools:rule-files
  |  value/META-INF/security-rules.drl/value
  |  /drools:rule-files
  |   /drools:rule-base
  | 
  |   event type=org.jboss.seam.notLoggedIn
  |   action expression=#{redirect.captureCurrentView}/
  |   /event
  | 
  |   event type=org.jboss.seam.postAuthenticate
  |   action expression=#{redirect.returnToCapturedView}/
  |   /event

pages.xml

pages no-conversation-view-id=/organizations.xhtml
  | 
  |   page view-id=/organizations.xhtml
  | restrict#{identity.loggedIn}/restrict
  |   /page
  | 
  |   exception class=org.jboss.seam.security.NotLoggedInException
  | end-conversation/
  | redirect view-id=/login.xhtml
  |   messagePlease login/message
  | /redirect
  |   /exception
  | 
  |   exception class=org.jboss.seam.security.AuthorizationException
  | end-conversation/
  | redirect view-id=/security_error.xhtml
  |   messageYou do not have permission to do this/message
  | /redirect
  |   /exception
  | 
  | /pages

I added some debug statements to Redirect.java and see that 
captureCurrentView() does indeed capture the view.  But when 
returnToCapturedView() is called after logging in, viewId is null.  It appears 
that the redirect component has gone out of scope.  Section 12.2.6 of the 
docs state:

It is important to note that login redirection is implemented as a 
conversation-scoped mechanism, meaning that for this feature to work, 
conversation propagation must be enabled until the user is successfully logged 
in.

Isn't conversation propagation enabled by default?  I don't see anything in the 
seamspace configuration that changes anything related to converation 
propagation.

Any suggestions?

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4015631#4015631

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4015631
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: how to redirecto back to intented page after login

2007-02-12 Thread [EMAIL PROTECTED]
anonymous wrote : What I'm really missing is the possiblity to start a new 
pageflow within an existing one and to return upon the end of the inner one to 
the page where one has left the outer / started the inner pageflow.

If I'm understanding you correctly, you are asking for a nested pageflow type 
functionality which is possible by having a nested conversation for the nested 
pageflow. Take a look at the numberguess example which does this.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4015636#4015636

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4015636
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: how to redirecto back to intented page after login

2007-02-12 Thread [EMAIL PROTECTED]
anonymous wrote :  I'm obviously missing something in my configuration because 
it's not working. 

Actually you have something extra. Get rid of end-conversation/ in the  
handler.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4015637#4015637

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4015637
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: how to redirecto back to intented page after login

2007-02-12 Thread twocoasttb
Bingo.  Thanks, Gavin.  pages.xml in seamspace (CVS) uses the 
end-conversation/ tag in the handlers.  Should those be taken out?

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4015638#4015638

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4015638
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: how to redirecto back to intented page after login

2007-02-12 Thread [EMAIL PROTECTED]
Yeah, thats wrong. Now fixed in CVS.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4015644#4015644

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4015644
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: how to redirecto back to intented page after login

2007-02-12 Thread gsegura
Thanks a lot for your reference. It's quite impressive the evolution speed of 
the framework.

By the way, the manual of 1.1.6GA doesn't contain such section (12.2.6) neither 
the seamspace example includes those nice tags.

Regards,


View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4015647#4015647

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4015647
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user