You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by "Ames, Tim" <Ti...@ProMedica.org> on 2009/06/09 17:03:42 UTC

AuthorizedWebApplication, Session

I am using the AuthorizedWebApplication and session.  I have used this with success in the past, but now I need to get at the page parameters in my SignIn WebPage. The constructor:   public SP_SignInPage(PageParameters parms)  the parms are all null in the HashMap that shows up in Debug.

Sign-In web page constructor snippet:

public SP_SignInPage(PageParameters parms) {

            super(parms);

            Logger logger = Logger.getRootLogger();
            logger.info("SP_SignInPage facility 1: " + parms.getString("facility") + ", soundID: " + parms.getString("soundID"));




The SP_SignIn page is being called as usual, but the parms are all null
I have tried several things to retrieve the parameters from various objects like RequestCycle.

Once the AuthenticatedWebSession is created, the parameters ARE there in the Request object that is passed.

AuthorizedWebSession snippet:

public class SP_WebSession extends AuthenticatedWebSession {

      public SP_WebSession(Request request)
      {
            super(request);
            Logger.getRootLogger().info("SP_WebSession: " + request.getParameter("facility"));


Everything is fine at the session and the parms all show up within the home page AFTER I log in.

URL looks something like this:
http://myserver:8080/myapp/myapp/?facility=fac01&soundID=play

I am using 1.4-rc4







_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

EMAIL CONFIDENTIALITY NOTICE 

This Email message, and any attachments, may contain confidential 
patient health information that is legally protected. This information 
is intended only for the use of the individual or entity named above. 
The authorized recipient of this information is prohibited from disclosing 
this information to any other party unless required to do so by law 
or regulation and is required to destroy the information after its stated 
need has been fulfilled. If you are not the intended recipient, you are 
hereby notified that any disclosure, copying, distribution, or action 
taken in reliance on the contents of this message is strictly prohibited. 

If you have received this information in error, please notify 
the sender immediately by replying to this message and delete the 
message from your system.

RE: AuthorizedWebApplication, Session

Posted by "Ames, Tim" <Ti...@ProMedica.org>.
I was able to do a work-around to this by saving the Request parameters from the AuthenticatedWebSession into a PageParameters object in the session


Snippet of the AuthenticatedWebSession:



private PageParameters initialPageParameters;

....

public SP_WebSession(Request request) {

        super(request);

        initialPageParameters = new PageParameters();
        Map<String,String[]> parmMap = request.getParameterMap();
        Set<String> parmKeys = parmMap.keySet();

        for (String key : parmKeys) {
                initialPageParameters.put(key, parmMap.get(key)[0]);
        }
....

        public PageParameters getInitialPageParameters() {
                return initialPageParameters;
        }
....


Then in the Sign In page:

        public SP_SignInPage(final PageParameters inParms) {

                super(inParms);

                SP_WebSession session = (SP_WebSession) getSession();
                PageParameters parms = session.getInitialPageParameters();

.....


I think there is another way to get those original page parameters within the Sign-In page, but not sure how.


-----Original Message-----
From: Ames, Tim [mailto:Tim.Ames@ProMedica.org]
Sent: Tuesday, June 09, 2009 11:04 AM
To: users@wicket.apache.org
Subject: AuthorizedWebApplication, Session

I am using the AuthorizedWebApplication and session.  I have used this with success in the past, but now I need to get at the page parameters in my SignIn WebPage. The constructor:   public SP_SignInPage(PageParameters parms)  the parms are all null in the HashMap that shows up in Debug.

Sign-In web page constructor snippet:

public SP_SignInPage(PageParameters parms) {

            super(parms);

            Logger logger = Logger.getRootLogger();
            logger.info("SP_SignInPage facility 1: " + parms.getString("facility") + ", soundID: " + parms.getString("soundID"));




The SP_SignIn page is being called as usual, but the parms are all null
I have tried several things to retrieve the parameters from various objects like RequestCycle.

Once the AuthenticatedWebSession is created, the parameters ARE there in the Request object that is passed.

AuthorizedWebSession snippet:

public class SP_WebSession extends AuthenticatedWebSession {

      public SP_WebSession(Request request)
      {
            super(request);
            Logger.getRootLogger().info("SP_WebSession: " + request.getParameter("facility"));


Everything is fine at the session and the parms all show up within the home page AFTER I log in.

URL looks something like this:
http://myserver:8080/myapp/myapp/?facility=fac01&soundID=play

I am using 1.4-rc4







_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

EMAIL CONFIDENTIALITY NOTICE

This Email message, and any attachments, may contain confidential
patient health information that is legally protected. This information
is intended only for the use of the individual or entity named above.
The authorized recipient of this information is prohibited from disclosing
this information to any other party unless required to do so by law
or regulation and is required to destroy the information after its stated
need has been fulfilled. If you are not the intended recipient, you are
hereby notified that any disclosure, copying, distribution, or action
taken in reliance on the contents of this message is strictly prohibited.

If you have received this information in error, please notify
the sender immediately by replying to this message and delete the
message from your system.
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

EMAIL CONFIDENTIALITY NOTICE 

This Email message, and any attachments, may contain confidential 
patient health information that is legally protected. This information 
is intended only for the use of the individual or entity named above. 
The authorized recipient of this information is prohibited from disclosing 
this information to any other party unless required to do so by law 
or regulation and is required to destroy the information after its stated 
need has been fulfilled. If you are not the intended recipient, you are 
hereby notified that any disclosure, copying, distribution, or action 
taken in reliance on the contents of this message is strictly prohibited. 

If you have received this information in error, please notify 
the sender immediately by replying to this message and delete the 
message from your system.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org