different page expired error page?

2012-12-10 Thread Karsten Gaul

Hi,

is there a way to have different page expiry error pages? For my app I 
would like to redirect browsing users (not logged in) to a real error 
page which is plain and simple but logged in users should be redirected 
to the login page on session timeout.


Thanks,
Karsten

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



Re: different page expired error page?

2012-12-10 Thread Karsten Gaul

Hi,

and sorry. Forgot to mention that I'm using wicket 1.4.21 so I was 
trying to override 
AbstractRequestCycleProcessor#respond(RuntimeException e, RequestCycle 
requestCycle) and on second thought I guess overriding 
RequestCycle#onRuntimeException should do the trick. I'll give it a try.


Thanks,
Karsten


Am 10.12.2012 12:14, schrieb Martin Grigorov:

Hi,

See org.apache.wicket.request.cycle.AbstractRequestCycleListener#onException
With this you can return RenderPageRequestHanlder specific for any type of
exception.


On Mon, Dec 10, 2012 at 11:37 AM, Karsten Gaul karsten.g...@exedio.comwrote:


Hi,

is there a way to have different page expiry error pages? For my app I
would like to redirect browsing users (not logged in) to a real error page
which is plain and simple but logged in users should be redirected to the
login page on session timeout.

Thanks,
Karsten

--**--**-
To unsubscribe, e-mail: 
users-unsubscribe@wicket.**apache.orgusers-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org







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



Re: stateless AjaxLazyLoadPanel wicket 1.4.21

2012-12-06 Thread Karsten Gaul

Hi guys,

I still have no clue. Any suggestions? A work-around would also be much 
appreciated. I need to stay stateless but I definetely need this lazy 
loading as I have to wait for a soap response every 10 mins and for user 
experience issues need to display some loading component/icon as 
provided by AjaxLazyLoadPanel.


Thanks,
Karsten

Am 05.12.2012 09:38, schrieb Karsten Gaul:

Hi,

I'm trying to use the functionality of an AjaxLazyLoadPanel in a 
stateless page but this doesn't seem to work as the injected content 
is not a container and the following exception is thrown:


java.lang.IllegalArgumentException: Component is not a container and 
so does not contain the path componentid:containedcomponentid:


[Component id = content]

 at org.apache.wicket.Component.get(Component.java:4500)
 at org.apache.wicket.MarkupContainer.get(MarkupContainer.java:354)


I wrote a StatelessAbstractDefaultAjaxBehavior overriding 
geCallbackUrl which I use in my StatelessAjaxLazyLoadPanel.


This doesn't seem to be the way. Anyone have any hints?

Thanks,
Karsten


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




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



Re: stateless AjaxLazyLoadPanel wicket 1.4.21

2012-12-06 Thread Karsten Gaul

Trying to:

/// StatelessAbstractDefaultAjaxBehavior ///

@Override
public CharSequence getCallbackUrl(final boolean onlyTargetActivePage)
{
final CharSequence url = 
super.getCallbackUrl(onlyTargetActivePage);

final PageParameters params = getPageParameters();
// NOTE: quick hack to remove old and obsolete random 
parameter from request (see wicket-ajax.js)

if (params!=null  params.containsKey(random))
params.remove(random);
return StatelessEncoder.appendParameters(url, params);
}
 StatelessEncoder appends params to WebRequestEncoder

stateless hint - true

In the StatelessAjaxLazyLoadPanel I'm using this Behavior instead of the 
usual AbstractDefaultAjaxBehavior


/// My Page ///

onInitialize()
{
add( new StatelessAjaxLazyLoadPanel(myContent)
{
private static final long serialVersionUID = 1L;

@Override
public Component getLazyLoadComponent( String markupId )
{
return new MyContentPanel( markupId );
}

@Override
public PageParameters getPageParameters()
{
return pageParameters;
}
} );
}

/// MyContentPanel ///

Form form = new Form(myForm);
form.add( new DropDownChoiceEnum(enumChoice));
add(form);

java.lang.IllegalArgumentException: Component is not a container and so 
does not contain the path myForm:enumChoice:

[Component id = content]
at org.apache.wicket.Component.get(Component.java:4500)
at org.apache.wicket.MarkupContainer.get(MarkupContainer.java:354)
at org.apache.wicket.MarkupContainer.get(MarkupContainer.java:354)
at org.apache.wicket.MarkupContainer.get(MarkupContainer.java:354)
at org.apache.wicket.MarkupContainer.get(MarkupContainer.java:354)
at org.apache.wicket.MarkupContainer.get(MarkupContainer.java:354)
at org.apache.wicket.MarkupContainer.get(MarkupContainer.java:354)

Would that be sufficient?

Thanks,
Karsten


Am 06.12.2012 11:30, schrieb Martin Grigorov:

Show us some code and the real exception.


On Thu, Dec 6, 2012 at 11:26 AM, Karsten Gaul karsten.g...@exedio.comwrote:


Hi guys,

I still have no clue. Any suggestions? A work-around would also be much
appreciated. I need to stay stateless but I definetely need this lazy
loading as I have to wait for a soap response every 10 mins and for user
experience issues need to display some loading component/icon as provided
by AjaxLazyLoadPanel.

Thanks,
Karsten

Am 05.12.2012 09:38, schrieb Karsten Gaul:

  Hi,

I'm trying to use the functionality of an AjaxLazyLoadPanel in a
stateless page but this doesn't seem to work as the injected content is not
a container and the following exception is thrown:

java.lang.**IllegalArgumentException: Component is not a container and
so does not contain the path componentid:**containedcomponentid:

[Component id = content]

  at org.apache.wicket.Component.**get(Component.java:4500)
  at org.apache.wicket.**MarkupContainer.get(**
MarkupContainer.java:354)


I wrote a StatelessAbstractDefaultAjaxBe**havior overriding
geCallbackUrl which I use in my StatelessAjaxLazyLoadPanel.

This doesn't seem to be the way. Anyone have any hints?

Thanks,
Karsten


--**--**-
To unsubscribe, e-mail: 
users-unsubscribe@wicket.**apache.orgusers-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



--**--**-
To unsubscribe, e-mail: 
users-unsubscribe@wicket.**apache.orgusers-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org







--
Karsten Gaul
Dipl. Medieninf.
Softwareentwickler

Telefon +49 (351) 4108-135
Fax +49 (351) 4108-5135
karsten.g...@exedio.com
www.exedio.com

exedio GmbH
Buchenstr. 16 B
01097 Dresden
Deutschland

Handelsregister: HRB 22109
Amtsgericht Dresden
Sitz der Gesellschaft: Dresden
Geschäftsführer: Sven-Erik Bornscheuer, Lutz Kirchner, Falk Krause


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



Re: stateless AjaxLazyLoadPanel wicket 1.4.21

2012-12-06 Thread Karsten Gaul

Hi Martin,

myContent is the id of the StatelessAjaxLazyLoadPanel which contains a 
constant


private static final String LAZY_LOAD_COMPONENT_ID = content;

which is used in getLazyLoadComponent(String markupId). 'myContent' 
contains the lazy load component 'content'.


StatelessAjaxLazyLoadComponent is added to a WebMarkupContainer which 
itself is added to MyPage.


If you look at the source of AjaxLazyLoadPanel the 'content' (added in 
onBeforeRender) is replaced in the respond method of the Behavior. Could 
that be the reason why it is not a container?


Regards,
Karsten

Am 06.12.2012 12:37, schrieb Martin Grigorov:

On Thu, Dec 6, 2012 at 11:53 AM, Karsten Gaul karsten.g...@exedio.comwrote:


Trying to:

/// StatelessAbstractDefaultAjaxBe**havior ///

@Override
 public CharSequence getCallbackUrl(final boolean onlyTargetActivePage)
 {
 final CharSequence url = super.getCallbackUrl(**
onlyTargetActivePage);
 final PageParameters params = getPageParameters();
 // NOTE: quick hack to remove old and obsolete random parameter
from request (see wicket-ajax.js)
 if (params!=null  params.containsKey(random))
 params.remove(random);
 return StatelessEncoder.**appendParameters(url, params);
 }

StatelessEncoder appends params to WebRequestEncoder

stateless hint - true

In the StatelessAjaxLazyLoadPanel I'm using this Behavior instead of the
usual AbstractDefaultAjaxBehavior

/// My Page ///

onInitialize()
{
 add( new StatelessAjaxLazyLoadPanel(**myContent)


Here we see myContent id.



 {
 private static final long serialVersionUID = 1L;

 @Override
 public Component getLazyLoadComponent( String markupId )
 {
 return new MyContentPanel( markupId );
 }

 @Override
 public PageParameters getPageParameters()
 {
 return pageParameters;
 }
 } );
}

/// MyContentPanel ///

Form form = new Form(myForm);
form.add( new DropDownChoiceEnum(**enumChoice));
add(form);

java.lang.**IllegalArgumentException: Component is not a container and so
does not contain the path myForm:enumChoice:

[Component id = content]


Here it complains about content. What is the relation between 'myContent'
and 'content'  component ?

Which component adds the StatelessAjaxLazyLoadPanel ?



  at org.apache.wicket.Component.**get(Component.java:4500)


Put a breakpoint here and see what is in the context. What is 'this', what
in its 'children' member field.
'myForm' has children with 'enumChoice' inside, then 'enumChoce' becomes
'this and you need to see how to get to the lazy load panel and its lazy
load component.



  at org.apache.wicket.**MarkupContainer.get(**
MarkupContainer.java:354)
 at org.apache.wicket.**MarkupContainer.get(**MarkupContainer.java:354)
 at org.apache.wicket.**MarkupContainer.get(**MarkupContainer.java:354)
 at org.apache.wicket.**MarkupContainer.get(**MarkupContainer.java:354)
 at org.apache.wicket.**MarkupContainer.get(**MarkupContainer.java:354)
 at org.apache.wicket.**MarkupContainer.get(**MarkupContainer.java:354)

Would that be sufficient?

Thanks,
Karsten


Am 06.12.2012 11:30, schrieb Martin Grigorov:


Show us some code and the real exception.


On Thu, Dec 6, 2012 at 11:26 AM, Karsten Gaul karsten.g...@exedio.com**
wrote:

  Hi guys,

I still have no clue. Any suggestions? A work-around would also be much
appreciated. I need to stay stateless but I definetely need this lazy
loading as I have to wait for a soap response every 10 mins and for user
experience issues need to display some loading component/icon as provided
by AjaxLazyLoadPanel.

Thanks,
Karsten

Am 05.12.2012 09:38, schrieb Karsten Gaul:

   Hi,


I'm trying to use the functionality of an AjaxLazyLoadPanel in a
stateless page but this doesn't seem to work as the injected content is
not
a container and the following exception is thrown:

java.lang.IllegalArgumentException: Component is not a container
and
so does not contain the path componentid:containedcomponentid:

[Component id = content]

   at org.apache.wicket.Component.get(Component.java:4500)
   at org.apache.wicket.MarkupContainer.get(**
MarkupContainer.java:354)


I wrote a StatelessAbstractDefaultAjaxBehavior overriding

geCallbackUrl which I use in my StatelessAjaxLazyLoadPanel.

This doesn't seem to be the way. Anyone have any hints?

Thanks,
Karsten


--**
--**-
To unsubscribe, e-mail: 
users-unsubscribe@wicket.**apa**che.orghttp://apache.org
users-unsubscribe@**wicket.apache.orgusers-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org


  --**

--**-
To unsubscribe, e-mail: 
users-unsubscribe@wicket.**apa**che.orghttp

Re: stateless AjaxLazyLoadPanel wicket 1.4.21

2012-12-06 Thread Karsten Gaul

The exception is thrown when this = content and path = myForm:enumChoice
It seems the content has no other children as it only contains a parent 
member field


I already tested the stateful version and can confirm it works OK which 
made me hope I could write a similar version for stateless pages as well.


Am 06.12.2012 13:00, schrieb Martin Grigorov:

On Thu, Dec 6, 2012 at 12:57 PM, Karsten Gaul karsten.g...@exedio.comwrote:


Hi Martin,

myContent is the id of the StatelessAjaxLazyLoadPanel which contains a
constant

private static final String LAZY_LOAD_COMPONENT_ID = content;

which is used in getLazyLoadComponent(String markupId). 'myContent'
contains the lazy load component 'content'.

StatelessAjaxLazyLoadComponent is added to a WebMarkupContainer which
itself is added to MyPage.

If you look at the source of AjaxLazyLoadPanel the 'content' (added in
onBeforeRender) is replaced in the respond method of the Behavior. Could
that be the reason why it is not a container?


The default (stateful) version works OK, so the problem seems to be that
when the Ajax call is made a new page is created (this is what stateless
means) and when it tries to find the lazy panel or its component (I'm not
sure which one) it fails to find it.
The debugger will tell you what exactly happens.



Regards,
Karsten

Am 06.12.2012 12:37, schrieb Martin Grigorov:


On Thu, Dec 6, 2012 at 11:53 AM, Karsten Gaul karsten.g...@exedio.com**
wrote:

  Trying to:

/// StatelessAbstractDefaultAjaxBehavior ///


@Override
  public CharSequence getCallbackUrl(final boolean
onlyTargetActivePage)
  {
  final CharSequence url = super.getCallbackUrl(**

onlyTargetActivePage);
  final PageParameters params = getPageParameters();
  // NOTE: quick hack to remove old and obsolete random
parameter
from request (see wicket-ajax.js)
  if (params!=null  params.containsKey(random))
  params.remove(random);
  return StatelessEncoder.appendParameters(url, params);

  }


StatelessEncoder appends params to WebRequestEncoder
stateless hint - true

In the StatelessAjaxLazyLoadPanel I'm using this Behavior instead of the
usual AbstractDefaultAjaxBehavior

/// My Page ///

onInitialize()
{
  add( new StatelessAjaxLazyLoadPanel(myContent)

  Here we see myContent id.


   {

  private static final long serialVersionUID = 1L;

  @Override
  public Component getLazyLoadComponent( String markupId )
  {
  return new MyContentPanel( markupId );
  }

  @Override
  public PageParameters getPageParameters()
  {
  return pageParameters;
  }
  } );
}

/// MyContentPanel ///

Form form = new Form(myForm);
form.add( new DropDownChoiceEnum(enumChoice));
add(form);


java.lang.IllegalArgumentException: Component is not a container
and so
does not contain the path myForm:enumChoice:

[Component id = content]

  Here it complains about content. What is the relation between

'myContent'
and 'content'  component ?

Which component adds the StatelessAjaxLazyLoadPanel ?


at org.apache.wicket.Component.get(Component.java:4500)

  Put a breakpoint here and see what is in the context. What is 'this',

what
in its 'children' member field.
'myForm' has children with 'enumChoice' inside, then 'enumChoce' becomes
'this and you need to see how to get to the lazy load panel and its lazy
load component.


at org.apache.wicket.MarkupContainer.get(**

MarkupContainer.java:354)
  at org.apache.wicket.MarkupContainer.get(
MarkupContainer.java:354)
  at org.apache.wicket.MarkupContainer.get(
MarkupContainer.java:354)
  at org.apache.wicket.MarkupContainer.get(
MarkupContainer.java:354)
  at org.apache.wicket.MarkupContainer.get(
MarkupContainer.java:354)
  at org.apache.wicket.MarkupContainer.get(
MarkupContainer.java:354)


Would that be sufficient?

Thanks,
Karsten


Am 06.12.2012 11:30, schrieb Martin Grigorov:

  Show us some code and the real exception.


On Thu, Dec 6, 2012 at 11:26 AM, Karsten Gaul karsten.g...@exedio.com

**

wrote:

   Hi guys,


I still have no clue. Any suggestions? A work-around would also be much
appreciated. I need to stay stateless but I definetely need this lazy
loading as I have to wait for a soap response every 10 mins and for
user
experience issues need to display some loading component/icon as
provided
by AjaxLazyLoadPanel.

Thanks,
Karsten

Am 05.12.2012 09:38, schrieb Karsten Gaul:

Hi,

  I'm trying to use the functionality of an AjaxLazyLoadPanel in a

stateless page but this doesn't seem to work as the injected content
is
not
a container and the following exception is thrown:

java.lang.**IllegalArgumentException: Component is not a
container
and
so does not contain the path componentid:**containedcomponentid

stateless AjaxLazyLoadPanel wicket 1.4.21

2012-12-05 Thread Karsten Gaul

Hi,

I'm trying to use the functionality of an AjaxLazyLoadPanel in a 
stateless page but this doesn't seem to work as the injected content is 
not a container and the following exception is thrown:


java.lang.IllegalArgumentException: Component is not a container and so does 
not contain the path componentid:containedcomponentid:

[Component id = content]

 at org.apache.wicket.Component.get(Component.java:4500)
 at org.apache.wicket.MarkupContainer.get(MarkupContainer.java:354)


I wrote a StatelessAbstractDefaultAjaxBehavior overriding geCallbackUrl which I 
use in my StatelessAjaxLazyLoadPanel.

This doesn't seem to be the way. Anyone have any hints?

Thanks,
Karsten


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



Re: Authorization without redirect

2012-11-29 Thread Karsten Gaul

Hi Ernesto,

Thanks but this isn't really what I was looking for as it is too simple 
to remove the Modal Window from the DOM tree and see the already 
rendered hidden page without entering a PIN.


I'd use normal Modal Windows for every link to the PIN protected page 
but this wouldn't cover bookmarks. A 
RestartResponseWithInterceptComponentException(Component component) 
would be marvellous which re-renders the current page and injects the 
given component but this is just fantasy. So I'll have to give this 
another thought or two.


Cheers,
Karsten

Am 28.11.2012 13:36, schrieb Ernesto Reinaldo Barreiro:

See

https://cwiki.apache.org/confluence/display/WICKET/Modal+Windows

Opening a modal window on page load (no AJAX involved)

You could use one to block the page till pin is typed.


On Wed, Nov 28, 2012 at 1:29 PM, Karsten Gaul karsten.g...@exedio.comwrote:


Hi everyone,

I'm currently building an application using wicket 1.4.21 and what I'm
trying to achieve is the following:

I have a protected area (stage 1) which requires the user to input his
credentials and I'm using an AuthorizationStrategy for this. This Strategy
throws a RestartResponseAtInterceptPage**Exception in it's
onUnauthorizedInstantiation method. (works as is with a redirect to a Login
Page)

However, within stage 1 I have links to another page (stage 2) which
requires a PIN and I want no redirect to the login page again but just show
a pop-up with an input field. Something like a confirmation dialog which on
close still displays the page the link to stage 2 was rendered in.

Any ideas?

Thanks,
Karsten

--**--**-
To unsubscribe, e-mail: 
users-unsubscribe@wicket.**apache.orgusers-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org







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



Authorization without redirect

2012-11-28 Thread Karsten Gaul

Hi everyone,

I'm currently building an application using wicket 1.4.21 and what I'm 
trying to achieve is the following:


I have a protected area (stage 1) which requires the user to input his 
credentials and I'm using an AuthorizationStrategy for this. This 
Strategy throws a RestartResponseAtInterceptPageException in it's 
onUnauthorizedInstantiation method. (works as is with a redirect to a 
Login Page)


However, within stage 1 I have links to another page (stage 2) which 
requires a PIN and I want no redirect to the login page again but just 
show a pop-up with an input field. Something like a confirmation dialog 
which on close still displays the page the link to stage 2 was rendered in.


Any ideas?

Thanks,
Karsten

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