You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Sigmar Muuga <me...@gmail.com> on 2010/08/29 22:22:34 UTC

Expire session

Hello!

Does anybody know, which is the best way to expire wicket session?

I have these lines in web.xml and they seem to affecft nothing:

	 	<session-config>
			<session-timeout>10</session-timeout>
		</session-config>

Best regards,
Sigmar

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


Re: Expire session

Posted by Wilhelmsen Tor Iver <To...@arrive.no>.
> Still wondering, how to disable concurrent logins with wicket-auth-
> roles...

Can't you cache the sessions and return the cached one from Application.newSession() if the same user logs in again? Or invalidate the old session?

- Tor Iver

Re: Expire session

Posted by Sigmar Muuga <me...@gmail.com>.
Got problem solved. Also made it configurable per-user:
http://www.weask.us/entry/page-expiration-wicket

Still wondering, how to disable concurrent logins with wicket-auth-roles...

On Sun, Aug 29, 2010 at 11:22 PM, Sigmar Muuga <me...@gmail.com> wrote:
> Hello!
>
> Does anybody know, which is the best way to expire wicket session?
>
> I have these lines in web.xml and they seem to affecft nothing:
>
>                <session-config>
>                        <session-timeout>10</session-timeout>
>                </session-config>
>
> Best regards,
> Sigmar
>

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


Re: floating div?

Posted by Kurt Heston <kh...@hestonsystems.com>.
I was over-engineering this.  The answer was in wicket-ajax-debug.js:

style="position:fixed; right: 100px; bottom: 100px;...

No ajax required.

On 08/30/2010 05:34 PM, Kurt Heston wrote:
> The following seems to work until the page refreshes and scrolls to 
> the top:
>
> //-------------------------------------------------------------------------------- 
>
>     Label lbl = new Label("floatDiv", "floaty text") {
>       @Override
>       protected void onComponentTag(ComponentTag tag) {
>         tag.put("style", "position: absolute; left: 610px; top: "
>             + (80 + scrollValue)
>             + "px; height: 400px; width: 100px; padding: 1em;");
>       }
>
>     };
>
>     AbstractAjaxBehavior beh = new AbstractAjaxBehavior() {
>       @Override
>       public void onRequest() {
>         scrollValue = 
> Integer.parseInt(getRequest().getParameter("scrollPos"));
>       }
>     };
>     lbl.add(beh);
>     add(lbl);
>
>     WebMarkupContainer body = new WebMarkupContainer("theBody") {
>
>       @Override
>       public boolean isTransparentResolver() {
>         return true;
>       }
>     };
>     body.add(new SimpleAttributeModifier("onscroll",
>         "var wcall=wicketAjaxPost('" + beh.getCallbackUrl(true)
>             + "&scrollPos='+window.pageYOffset)"));
>     add(body);
> //-------------------------------------------------------------------------------- 
>
>
> Not sure yet how to keep the page from scrolling to the top each time 
> the callback is made.  Still at it.  Suggestions?
>
> On 08/30/2010 10:51 AM, Kurt Heston wrote:
>> I have a really long table with qty values in one of the columns.  
>> Instead of having a total at the bottom of the page (and requiring 
>> the user to scroll to see it), I'd like to float a div in the bottom 
>> right that I can update on the fly as the user changes qty values.
>>
>> The wicketstuff dojo package had a way to do it, but I don't believe 
>> it's compatible with 1.4.  Any ideas?
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org


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


Re: floating div?

Posted by Kurt Heston <kh...@hestonsystems.com>.
The following seems to work until the page refreshes and scrolls to the top:

//--------------------------------------------------------------------------------
     Label lbl = new Label("floatDiv", "floaty text") {
       @Override
       protected void onComponentTag(ComponentTag tag) {
         tag.put("style", "position: absolute; left: 610px; top: "
             + (80 + scrollValue)
             + "px; height: 400px; width: 100px; padding: 1em;");
       }

     };

     AbstractAjaxBehavior beh = new AbstractAjaxBehavior() {
       @Override
       public void onRequest() {
         scrollValue = 
Integer.parseInt(getRequest().getParameter("scrollPos"));
       }
     };
     lbl.add(beh);
     add(lbl);

     WebMarkupContainer body = new WebMarkupContainer("theBody") {

       @Override
       public boolean isTransparentResolver() {
         return true;
       }
     };
     body.add(new SimpleAttributeModifier("onscroll",
         "var wcall=wicketAjaxPost('" + beh.getCallbackUrl(true)
             + "&scrollPos='+window.pageYOffset)"));
     add(body);
//--------------------------------------------------------------------------------

Not sure yet how to keep the page from scrolling to the top each time 
the callback is made.  Still at it.  Suggestions?

On 08/30/2010 10:51 AM, Kurt Heston wrote:
> I have a really long table with qty values in one of the columns.  
> Instead of having a total at the bottom of the page (and requiring the 
> user to scroll to see it), I'd like to float a div in the bottom right 
> that I can update on the fly as the user changes qty values.
>
> The wicketstuff dojo package had a way to do it, but I don't believe 
> it's compatible with 1.4.  Any ideas?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org


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


floating div?

Posted by Kurt Heston <kh...@hestonsystems.com>.
I have a really long table with qty values in one of the columns.  
Instead of having a total at the bottom of the page (and requiring the 
user to scroll to see it), I'd like to float a div in the bottom right 
that I can update on the fly as the user changes qty values.

The wicketstuff dojo package had a way to do it, but I don't believe 
it's compatible with 1.4.  Any ideas?

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