Re: Antibot Form Submission Composite Behavior

2015-08-13 Thread Tom Eicher (von unterwegs)
BTW I have found I can recognize many spambots by adding a form field with a 
common name like "message" and make that invisible using css display none. If 
the field is filled in, its no regular user...
Cheers, Tom.

-- 
Gesendet vom Mobiltelefon - Bitte Tippfehler, fehlende Umlaute und Kürze 
gegebenenfalls zu entschuldigen.

Link not working after upgrade from 6.8.0 to 6.20.0

2015-08-13 Thread Tom Eicher

Hello,

I was thinking, I'd just upgrade to 6.latest before
planning the big move to Wicket 7, but I experience
some very strange behaviour:

All throughout my app. I am using Links like this:

Link l = new Link("NavBarAppLink") {
@Override
public void onClick() {
setResponsePage(page);
}
};
l.setBody(Model.of(someText));
return l;

In Wicket 6.8.0 this produced like:

href="../page?4-1.ILinkListener-PortalBody-PortalNavBar-NavBarItems-2-NavBarItem-NavBarAppItem-NavBarItems-0-NavBarItem-NavBarAppItem-NavBarAppLink" 
wicketpath="PortalBody_PortalNavBar_NavBarItems_2_NavBarItem_NavBarAppItem_NavBarItems_0_NavBarItem_NavBarAppItem_NavBarAppLink">TheApp


and the click works.

In Wicket 6.20.0 this just produces

wicketpath="PortalBody_PortalNavBar_NavBarItems_1_NavBarItem_NavBarAppItem_NavBarAppLink">TheApp


Where "Home" ist the mount path of the current page, not the intended
target. So basically all links just go to themselves.

I have no idea what could be causing this.
Just changing the wicket project libraries makes the app work again.

-rw-r--r--  1 teicher  staff35284 30 Jul 16:31 wicket-cdi-6.20.0.jar
-rw-r--r--  1 teicher  staff35496 30 Jul 17:20 wicket-cdi-6.8.0.jar
-rw-r--r--  1 teicher  staff  2115670 30 Jul 16:31 wicket-core-6.20.0.jar
-rw-r--r--  1 teicher  staff  1910550 30 Jul 17:20 wicket-core-6.8.0.jar
-rw-r--r--  1 teicher  staff   113012 30 Jul 16:31 
wicket-devutils-6.20.0.jar

-rw-r--r--  1 teicher  staff   113231 30 Jul 17:20 wicket-devutils-6.8.0.jar
-rw-r--r--  1 teicher  staff  1381884 30 Jul 16:31 
wicket-extensions-6.20.0.jar
-rw-r--r--  1 teicher  staff  1371703 30 Jul 17:20 
wicket-extensions-6.8.0.jar

-rw-r--r--  1 teicher  staff86597 30 Jul 16:32 wicket-request-6.20.0.jar
-rw-r--r--  1 teicher  staff86496 30 Jul 17:20 wicket-request-6.8.0.jar
-rw-r--r--  1 teicher  staff   426848 30 Jul 16:32 wicket-util-6.20.0.jar
-rw-r--r--  1 teicher  staff   415481 30 Jul 17:20 wicket-util-6.8.0.jar

Any hints appreciated.

Thanks, Tom.


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



Link to static image from packaged css

2013-08-05 Thread Tom Eicher

Hello,

there seems to be some difficulty linking between static and
packages resources, or at least a lot of confusion in forums ;-)

If I refer to a static css from a wicket:link or wicket:head,
the link will be "relativized" automatically, right ?

However, I do have a CSS that is specific to a special page,
and thus I have page .html, .css and .js for this special
page side-by-side packed and included via
CssResourceReference and JavaScriptResourceReference.

Now, inside my .css, I have a
  background: url('img/formbg.png') no-repeat;

but the resource is not found.

using "/" prefix will tie me to a context prefix
using several "../" will work but certainly isn't very
professional or stable.

What's the best idea here ?

Cheers, Tom.





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



Re2: file upload in nested form with CPM needs dummy model

2013-08-05 Thread Tom Eicher

Hello Martin & List,


Would it not be much more straightforward to just instantiate one of the
existing models, like
new FileUploadField("**UploadFileField", new Model>()));
or some Model.of() variant ?



You mean Wicket automatically to do this for you ?

In current Wicket if a component has no model then its parent is asked.
If the parent's model
implements org.apache.wicket.model.IComponentInheritedModel then Wicket
asks it for a model for the child. This is how CompoundPropertyModel works.

If there is no IComponentInheritedModel up in the hierarchy then the
component just has model == null.

For your use case we can introduce Component#newDefaultModel() that can
return a sane default model per component. And this method should be called
only when org.apache.wicket.Component#initModel returns null.

I don't like much such automatic/automagic behaviors. I prefer to see an
exception message telling me what I forgot to do. But some people may like
this solution.


No, that would be too much.

How about making FileUpload Serializable ?
Then I could just Model.of(new FileUpload()) couldn't I ?


Cheers, Tom.


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



Re: file upload in nested form with CPM needs dummy model

2013-08-01 Thread Tom Eicher

Hello Martin & List,

Yes, okay, but is it really necessary for me to define an own model class?
Would it not be much more straightforward to just instantiate one of the 
existing models, like

new FileUploadField("UploadFileField", new Model>()));
or some Model.of() variant ?

However, new Model() does not work, as FileUpload is not Serializable...

(and sorry for the delayed "bump" post today, sync issues with the 
mobile ;-)


Any ideas what better to use ?

Thanks & Cheers, Tom.

On Wed, Jul 24, 2013 at 3:55 PM, Tom Eicher  wrote:


Hello,

I have an outer form, with a CPM for a business entity.

An inner form
Form uploadImageForm = new Form<>("UploadImageForm");

has a
FileUploadField uploadImageField =
  new FileUploadField("**UploadImageField");

and when I submit the inner form, wicket tries to find
getters/setters for UploadImageField in my business entity,
which obviously are not there:

WicketRuntimeException: No get method defined for class: class
XXXBusinessEntity expression: UploadImageField

I tried many things to work around this problem, including
Form uploadImageForm = new Form<>("UploadImageForm", null);
and
uploadImageField = new FileUploadField("**UploadImageField", null);
and
setModel(null)
and some more, however the only way to really get rid of this
I found is:

FileUploadField uploadImageField = new

FileUploadField("**UploadImageField",

new UploadFieldModel());

static class UploadFieldModel implements

IModel> {

List f;
@Override
public List getObject() {
return f;
}
@Override
public void setObject(List object) {
f=object;
}
@Override
public void detach() {
}
}

That doesn't sound too reasonable, does it ?
I do not need or want the value to be put to any model, is there any
more sensible way to do this ? (wicket 6.8.0 - will update soon)



Actually this is the correct way.
Wicket needs to store the data somewhere. Usually 'somewhere' is the form
component's model.

By using 'null' or by not setting anything the component tries to use its
parent's model.



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



AW: file upload in nested form with CPM needs dummy model

2013-08-01 Thread Tom Eicher - von Unterwegs
Any idea where I'm thinking wrong ?
Thanks, Tom.


Tom Eicher  schrieb:

>Hello,
>
>I have an outer form, with a CPM for a business entity.
>
>An inner form
>Form uploadImageForm = new Form<>("UploadImageForm");
>
>has a
>FileUploadField uploadImageField =
>   new FileUploadField("UploadImageField");
>
>and when I submit the inner form, wicket tries to find
>getters/setters for UploadImageField in my business entity,
>which obviously are not there:
>
>WicketRuntimeException: No get method defined for class: class 
>XXXBusinessEntity expression: UploadImageField
>
>I tried many things to work around this problem, including
>Form uploadImageForm = new Form<>("UploadImageForm", null);
>and
>uploadImageField = new FileUploadField("UploadImageField", null);
>and
>setModel(null)
>and some more, however the only way to really get rid of this
>I found is:
>
>FileUploadField uploadImageField = new 
>FileUploadField("UploadImageField", new UploadFieldModel());
>
>   static class UploadFieldModel implements IModel> {
>   List f;
>   @Override
>   public List getObject() {
>   return f;
>   }
>   @Override
>   public void setObject(List object) {
>   f=object;
>   }
>   @Override
>   public void detach() {
>   }
>   }
>
>That doesn't sound too reasonable, does it ?
>I do not need or want the value to be put to any model, is there any
>more sensible way to do this ? (wicket 6.8.0 - will update soon)
>
>Cheers, Tom.
>

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



file upload in nested form with CPM needs dummy model

2013-07-24 Thread Tom Eicher

Hello,

I have an outer form, with a CPM for a business entity.

An inner form
Form uploadImageForm = new Form<>("UploadImageForm");

has a
FileUploadField uploadImageField =
  new FileUploadField("UploadImageField");

and when I submit the inner form, wicket tries to find
getters/setters for UploadImageField in my business entity,
which obviously are not there:

WicketRuntimeException: No get method defined for class: class 
XXXBusinessEntity expression: UploadImageField


I tried many things to work around this problem, including
Form uploadImageForm = new Form<>("UploadImageForm", null);
and
uploadImageField = new FileUploadField("UploadImageField", null);
and
setModel(null)
and some more, however the only way to really get rid of this
I found is:

FileUploadField uploadImageField = new 
FileUploadField("UploadImageField", new UploadFieldModel());


static class UploadFieldModel implements IModel> {
List f;
@Override
public List getObject() {
return f;
}
@Override
public void setObject(List object) {
f=object;
}
@Override
public void detach() {
}
}

That doesn't sound too reasonable, does it ?
I do not need or want the value to be put to any model, is there any
more sensible way to do this ? (wicket 6.8.0 - will update soon)

Cheers, Tom.

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



Re: WicketTester against real EJB backend

2013-04-23 Thread Tom Eicher

Just to let you people know,


The idea I have, is to use WicketTester against a real EJB
deployment.
The benefits would be:
- a lot faster than Selenium tests
- using WicketTester API
- testing EJB calls as they are really used from wicket
   actions (especially with regards to lazy loading as I
   am not using Open-Session-In-View)
- testing against deployed EAR as produced by build
   script, therefore testing build and EAR deploybility


This works rather nicely, but you need Arquillian so you
can really run the Test within the server deployment.
(No way with remote lookups or CDI emulations...)

But then WicketTester is a great tool to automate
use case testing.

Cheers, Tom.

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



WicketTester against real EJB backend

2013-04-17 Thread Tom Eicher

Hello good Wicket People,

I now have a cool Wicket+CDI/Weld+EJB EAR running in JBoss AS7.
Before it progresses further, I should start adding some
automated integration tests, I think ;-)

The idea I have, is to use WicketTester against a real EJB
deployment.
The benefits would be:
- a lot faster than Selenium tests
- using WicketTester API
- testing EJB calls as they are really used from wicket
  actions (especially with regards to lazy loading as I
  am not using Open-Session-In-View)
- testing against deployed EAR as produced by build
  script, therefore testing build and EAR deploybility

Does that sound like a good or like a stupid idea to you ?

Do you have other/better ideas other than solo plain EJB unit
tests (do not test usage from Wicket), solo WicketTester
(does not test calls to EJB layer) and Selenium (too slow
and complicated to use for all tests)

I'm a bit lost at the moment, using WicketTester from JUnit
test case is easy, but when I try to lookup the BeanManager
to setup CDI, it does not work, as the "remote" WicketTester
is not allowed to remotely lookuop "java:comp/env/BeanManager"...
Maybe I need to start WicketTester within the Arquillian-started
(or Cargo-started) JBoss...

Somebody having a remotely similar setup working ?
(There are several examples for Spring, but not easily adapted
to an EJB layer running in an un-embedded server...)

Any input appreciated...

Thanks, Cheers, Tom.

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



Re: how to setup call context for every request

2013-03-14 Thread Tom Eicher

Reposting to the list (sorry Martin ;-) in hope for
feedback on @RequestScoped Wicket-CDI vs EJB... :


[...about seeting up stuff to propagate user/session/JAAS
info from the wicket web layer to a JBoss AS7 EJB...]

You can use IRequestCycleListener#onBeginRequest().


Thanks for the suggestion - but I just put the whole JAAS idea in
the bin, it's just too much crappy and proprietary code for what
it's worth.

Now, I just built my own @SessionScoped "call context" in the
web layer (Wicket WebPage constructor), and check it with a standard
default EJB interceptor at the ejb layer (which @Inject's the "call
context").

Since I used SessionScoped, not RequestScoped, all calls in-between
the page class (which sets the "call context") like AJAX, onClick()s
etc still have the instance from the previous "full page request"
available.

Is there anything fundamentally wrong with my approach ?
Any security issues, race conditions, threadsafety, ... ?

There is not too much current info about using Wicket with the
lesser known CDI/Weld scope stuff around ...
...@RequestScoped is supposed to work for
Wicket6/wicket-cdi-6.4/Tomcat7, right ?

(And looks ok, but not heavily concurrently tested of course...)

Cheers, Tom.



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



how to setup call context for every request

2013-03-12 Thread Tom Eicher

Hello,

I am using JAAS to secure my EJB layer in JBoss AS7,
which is called from wicket 6, by adding a 
org.jboss.security.ClientLoginModule for every request.


This works nicely for page requests, I have built a setupJAAS()
method that is called from my BasePage.

However the wicket callbacks, onClick() et all, do of
course not go through the basepage constructor, and thus
fail the JAAS check.

What would be the best place to plug my setupJAAS()
into EVERY request, be it a page request, callback or
AJAX request (and what else there might be ;-) ?

I tried
@Override
public WebRequest newWebRequest(HttpServletRequest servletRequest, final 
String filterPath)

but at that point, the Session is not yet set up, and my
Session.get() complains
org.apache.wicket.util.lang.Args.notNull(Args.java:41)
org.apache.wicket.Application.fetchCreateAndSetSession(Application.java:1552)
org.apache.wicket.Session.get(Session.java:152)

I do however need the Session() to retrieve the user and his/her
roles, so I can set up the JAAS.

There must be many ways to do this, most of them probably wrong, so
I thought I'd better ask here. ;-)
Please note that I want to setup JAAS only once per request, since I 
need to perform a lookup and a database query for it...


Input mostly appreciated...

Cheers, Tom.




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



Re: Re: Page ... is not stateless ... but the stateless hint is set to true!

2013-02-12 Thread Tom Eicher

So ... would this be a bug ?

Tom Eicher wrote:


Hello Martin,

 > Put a breakpoint at Page#setStatelessHint() and see where it is called
 > with value == true.

It is not being called. That is, not before the warn message appears
in the log. statelesshint=true must be the deafult...?

My "BasePage" ist just
...
public class BasePage extends WebPage {

 @Inject Logger log;

 public BasePage() { //this is line 31 from the stack trace below
 YYSession session = (YYSession)getSession();
...

so I feel rather innocent about the message...

Cheers, Tom.





Hello,

I am receiving this message in the log

01:27:01,006 WARN  [org.apache.wicket.Page] Page '[Page class =
com.x.yy.components.__editor.Editor$EditorPage, id = 5,
render count = 0]' is not stateless because it is not bookmarkable,
but the stateless hint is set to true!


and I have no idea why ;-) Actually, I never intended to be
stateless (so far), so I thought I'd just give that stateless hint
as false. But:

setStatelessHint() cannot be called, since the warning is thrown
directly from my page constructor's super()...

And getStatelessHint() is final in Page and cannot be overridden...

Stack (see: all my "x" calls are just super()s cascading up...)

org.apache.wicket.Page.__isPageStateless(Page.java:445)

org.apache.wicket.page.__AbstractPageManager.touchPage(__AbstractPageManager.java:130)


org.apache.wicket.page.__PageManagerDecorator.__touchPage(__PageManagerDecorator.java:59)


org.apache.wicket.page.__PageAccessSynchronizer$2.__touchPage(__PageAccessSynchronizer.java:__273)

org.apache.wicket.Page.dirty(__Page.java:293)
org.apache.wicket.markup.html.__WebPage.dirty(WebPage.java:__324)
org.apache.wicket.Page.dirty(__Page.java:255)
org.apache.wicket.Page.__componentStateChanging(Page.__java:934)
org.apache.wicket.Component.__addStateChange(Component.java:__3518)
org.apache.wicket.Behaviors.__add(Behaviors.java:61)
org.apache.wicket.Component.__add(Component.java:4502)

org.apache.wicket.devutils.__inspector.__RenderPerformanceListener.__onInstantiation(__RenderPerformanceListener.__java:52)


org.apache.wicket.application.__ComponentInstantiationListener__Collection$1.notify(__ComponentInstantiationListener__Collection.java:38)


org.apache.wicket.application.__ComponentInstantiationListener__Collection$1.notify(__ComponentInstantiationListener__Collection.java:34)


org.apache.wicket.util.__listener.ListenerCollection.__notify(ListenerCollection.__java:80)


org.apache.wicket.application.__ComponentInstantiationListener__Collection.onInstantiation(__ComponentInstantiationListener__Collection.java:33)

org.apache.wicket.Component.<__init>(Component.java:683)

org.apache.wicket.__MarkupContainer.(__MarkupContainer.java:120)
org.apache.wicket.Page.(__Page.java:172)
org.apache.wicket.Page.(__Page.java:136)
org.apache.wicket.markup.html.__WebPage.(WebPage.java:__76)
com.x.yy.base.__BasePage.(BasePage.java:__31)

com.x.yy.components.__editor.Editor$EditorPage.<__init>(Editor.java:97)


com.x.yy.components.__editor.Editor$EditButtonPlain.__onClick(Editor.java:153)


org.apache.wicket.markup.html.__link.Link.onLinkClicked(Link.__java:190)

sun.reflect.__NativeMethodAccessorImpl.__invoke0(__NativeMethodAccessorImpl.java)


sun.reflect.__NativeMethodAccessorImpl.__invoke(__NativeMethodAccessorImpl.java:__57)


sun.reflect.__DelegatingMethodAccessorImpl.__invoke(__DelegatingMethodAccessorImpl.__java:43)

java.lang.reflect.Method.__invoke(Method.java:601)

org.apache.wicket.__RequestListenerInterface.__internalInvoke(__RequestListenerInterface.java:__258)


org.apache.wicket.__RequestListenerInterface.__invoke(__RequestListenerInterface.java:__216)


org.apache.wicket.core.__request.handler.__ListenerInterfaceRequestHandle__r.invokeListener(__ListenerInterfaceRequestHandle__r.java:240)


org.apache.wicket.core.__request.handler.__ListenerInterfaceRequestHandle__r.respond(__ListenerInterfaceRequestHandle__r.java:226)


org.apache.wicket.request.__cycle.RequestCycle$__HandlerExecutor.respond(__RequestCycle.java:840)


org.apache.wicket.request.__RequestHandlerStack.execute(__RequestHandlerStack.java:64)


org.apache.wicket.request.__cycle.RequestCycle.execute(__RequestCycle.java:254)


org.apache.wicket.request.__cycle.RequestCycle.__processRequest(RequestCycle.__java:211)


org.apache.wicket.request.__cycle.RequestCycle.__processRequestAndDetach(__RequestCycle.java:282)


org.apache.wicket.protocol.__http.WicketFilter.__processRequestCycle(__WicketFilter.java:244)


org.apache.wicket.protocol.__http.WicketFilter.__processRequest(WicketFilter.__java:188)


org.apache.wicket.protocol.__http.WicketFilter.doFilter(__WicketFilter.java:267)


org.apache.catalina.core.__ApplicationFilterChain.__internalDoFilter(__App

Re: Page ... is not stateless ... but the stateless hint is set to true!

2013-02-11 Thread Tom Eicher


Hello Martin,

> Put a breakpoint at Page#setStatelessHint() and see where it is called
> with value == true.

It is not being called. That is, not before the warn message appears
in the log. statelesshint=true must be the deafult...?

My "BasePage" ist just
...
public class BasePage extends WebPage {

@Inject Logger log;

public BasePage() { //this is line 31 from the stack trace below
YYSession session = (YYSession)getSession();
...

so I feel rather innocent about the message...

Cheers, Tom.





Hello,

I am receiving this message in the log

01:27:01,006 WARN  [org.apache.wicket.Page] Page '[Page class =
com.x.yy.components.__editor.Editor$EditorPage, id = 5,
render count = 0]' is not stateless because it is not bookmarkable,
but the stateless hint is set to true!


and I have no idea why ;-) Actually, I never intended to be
stateless (so far), so I thought I'd just give that stateless hint
as false. But:

setStatelessHint() cannot be called, since the warning is thrown
directly from my page constructor's super()...

And getStatelessHint() is final in Page and cannot be overridden...

Stack (see: all my "x" calls are just super()s cascading up...)

org.apache.wicket.Page.__isPageStateless(Page.java:445)

org.apache.wicket.page.__AbstractPageManager.touchPage(__AbstractPageManager.java:130)

org.apache.wicket.page.__PageManagerDecorator.__touchPage(__PageManagerDecorator.java:59)

org.apache.wicket.page.__PageAccessSynchronizer$2.__touchPage(__PageAccessSynchronizer.java:__273)
org.apache.wicket.Page.dirty(__Page.java:293)
org.apache.wicket.markup.html.__WebPage.dirty(WebPage.java:__324)
org.apache.wicket.Page.dirty(__Page.java:255)
org.apache.wicket.Page.__componentStateChanging(Page.__java:934)
org.apache.wicket.Component.__addStateChange(Component.java:__3518)
org.apache.wicket.Behaviors.__add(Behaviors.java:61)
org.apache.wicket.Component.__add(Component.java:4502)

org.apache.wicket.devutils.__inspector.__RenderPerformanceListener.__onInstantiation(__RenderPerformanceListener.__java:52)

org.apache.wicket.application.__ComponentInstantiationListener__Collection$1.notify(__ComponentInstantiationListener__Collection.java:38)

org.apache.wicket.application.__ComponentInstantiationListener__Collection$1.notify(__ComponentInstantiationListener__Collection.java:34)

org.apache.wicket.util.__listener.ListenerCollection.__notify(ListenerCollection.__java:80)

org.apache.wicket.application.__ComponentInstantiationListener__Collection.onInstantiation(__ComponentInstantiationListener__Collection.java:33)
org.apache.wicket.Component.<__init>(Component.java:683)
org.apache.wicket.__MarkupContainer.(__MarkupContainer.java:120)
org.apache.wicket.Page.(__Page.java:172)
org.apache.wicket.Page.(__Page.java:136)
org.apache.wicket.markup.html.__WebPage.(WebPage.java:__76)
com.x.yy.base.__BasePage.(BasePage.java:__31)

com.x.yy.components.__editor.Editor$EditorPage.<__init>(Editor.java:97)

com.x.yy.components.__editor.Editor$EditButtonPlain.__onClick(Editor.java:153)
org.apache.wicket.markup.html.__link.Link.onLinkClicked(Link.__java:190)

sun.reflect.__NativeMethodAccessorImpl.__invoke0(__NativeMethodAccessorImpl.java)

sun.reflect.__NativeMethodAccessorImpl.__invoke(__NativeMethodAccessorImpl.java:__57)

sun.reflect.__DelegatingMethodAccessorImpl.__invoke(__DelegatingMethodAccessorImpl.__java:43)
java.lang.reflect.Method.__invoke(Method.java:601)

org.apache.wicket.__RequestListenerInterface.__internalInvoke(__RequestListenerInterface.java:__258)

org.apache.wicket.__RequestListenerInterface.__invoke(__RequestListenerInterface.java:__216)

org.apache.wicket.core.__request.handler.__ListenerInterfaceRequestHandle__r.invokeListener(__ListenerInterfaceRequestHandle__r.java:240)

org.apache.wicket.core.__request.handler.__ListenerInterfaceRequestHandle__r.respond(__ListenerInterfaceRequestHandle__r.java:226)

org.apache.wicket.request.__cycle.RequestCycle$__HandlerExecutor.respond(__RequestCycle.java:840)

org.apache.wicket.request.__RequestHandlerStack.execute(__RequestHandlerStack.java:64)

org.apache.wicket.request.__cycle.RequestCycle.execute(__RequestCycle.java:254)

org.apache.wicket.request.__cycle.RequestCycle.__processRequest(RequestCycle.__java:211)

org.apache.wicket.request.__cycle.RequestCycle.__processRequestAndDetach(__RequestCycle.java:282)

org.apache.wicket.protocol.__http.WicketFilter.__processRequestCycle(__WicketFilter.java:244)

org.apache.wicket.protocol.__http.WicketFilter.__processRequest(WicketFilter.__java:188)

org.apache.wicket.protocol.__http.WicketFilter.doFilter(__WicketFilter.java:267)

org.apache.catalina.core.__ApplicationFilterChain.__internalDoFilter(__ApplicationFilterChain.java:__280)
  

Page ... is not stateless ... but the stateless hint is set to true!

2013-02-10 Thread Tom Eicher


Hello,

I am receiving this message in the log

01:27:01,006 WARN  [org.apache.wicket.Page] Page '[Page class = 
com.x.yy.components.editor.Editor$EditorPage, id = 5, render 
count = 0]' is not stateless because it is not bookmarkable, but the 
stateless hint is set to true!



and I have no idea why ;-) Actually, I never intended to be
stateless (so far), so I thought I'd just give that stateless hint
as false. But:

setStatelessHint() cannot be called, since the warning is thrown
directly from my page constructor's super()...

And getStatelessHint() is final in Page and cannot be overridden...

Stack (see: all my "x" calls are just super()s cascading up...)

org.apache.wicket.Page.isPageStateless(Page.java:445)
org.apache.wicket.page.AbstractPageManager.touchPage(AbstractPageManager.java:130)
org.apache.wicket.page.PageManagerDecorator.touchPage(PageManagerDecorator.java:59)
org.apache.wicket.page.PageAccessSynchronizer$2.touchPage(PageAccessSynchronizer.java:273)
org.apache.wicket.Page.dirty(Page.java:293)
org.apache.wicket.markup.html.WebPage.dirty(WebPage.java:324)
org.apache.wicket.Page.dirty(Page.java:255)
org.apache.wicket.Page.componentStateChanging(Page.java:934)
org.apache.wicket.Component.addStateChange(Component.java:3518)
org.apache.wicket.Behaviors.add(Behaviors.java:61)
org.apache.wicket.Component.add(Component.java:4502)
org.apache.wicket.devutils.inspector.RenderPerformanceListener.onInstantiation(RenderPerformanceListener.java:52)
org.apache.wicket.application.ComponentInstantiationListenerCollection$1.notify(ComponentInstantiationListenerCollection.java:38)
org.apache.wicket.application.ComponentInstantiationListenerCollection$1.notify(ComponentInstantiationListenerCollection.java:34)
org.apache.wicket.util.listener.ListenerCollection.notify(ListenerCollection.java:80)
org.apache.wicket.application.ComponentInstantiationListenerCollection.onInstantiation(ComponentInstantiationListenerCollection.java:33)
org.apache.wicket.Component.(Component.java:683)
org.apache.wicket.MarkupContainer.(MarkupContainer.java:120)
org.apache.wicket.Page.(Page.java:172)
org.apache.wicket.Page.(Page.java:136)
org.apache.wicket.markup.html.WebPage.(WebPage.java:76)
com.x.yy.base.BasePage.(BasePage.java:31)
com.x.yy.components.editor.Editor$EditorPage.(Editor.java:97)
com.x.yy.components.editor.Editor$EditButtonPlain.onClick(Editor.java:153)
org.apache.wicket.markup.html.link.Link.onLinkClicked(Link.java:190)
sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethodAccessorImpl.java)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:601)
org.apache.wicket.RequestListenerInterface.internalInvoke(RequestListenerInterface.java:258)
org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:216)
org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.invokeListener(ListenerInterfaceRequestHandler.java:240)
org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:226)
org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:840)
org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:254)
org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:211)
org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:282)
org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:244)
org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:188)
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:267)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50)
org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)
java.lang.Th

Re: Re: Page load without version redirect for Bootstrap Modal

2013-02-08 Thread Tom Eicher

Thanks Igor, that worked.

As a hint to future bootstrapping wicketeers:

remove the all data-toggle, href, data-target etc attributes
and the $('#myModal').modal(); call.
put the modal's body in a container div.

then render the dialog content using AJAX like

new AjaxLink("EditAjax") {
  @Override
  public void onClick(AjaxRequestTarget target) {
... newEditPanel = new 
 editPanel.replaceWith(newEditPanel);
editPanel=newEditPanel;
target.add(editPanel);
target.appendJavaScript("$('#myModal').modal();");
}
}

Cheers, Tom.

Igor Vaynberg wrote:

instead of doing it that way have the ajax operation that opens the
dialog render the content into some div in the markup and call the
dialog on that div.

-igor

On Thu, Feb 7, 2013 at 4:38 PM, Tom Eicher  wrote:

Hello,

with Bootstrap's modal functionality, I can make very cool modal
popups.

http://twitter.github.com/bootstrap/javascript.html#modals

The problems start when I want to provide the popup's content
dynamically via Wicket, because I need to provide a href that will be
loaded by JQuerys "load" method, which apparently does not respect
redirects.
In other words, I need to provide a PageLink (Bookmarkable or other...)
that will load the page directly, without redirecting to include the
page version. But I do not want ONE_PASS_RENDER for the whole of
the application.

Previous questions about such things pointed to the "restart
exception", but I guess that's a different use case...

Maybe if I already included a page version in the link, would the
page still redirect ? Can I switch off redirecting for one
page only ? Or even better, for one page constructor only ?

Anybody successfully doing Bootstrap modals with "remote content"
(using "href" or data-remote") ?

Cheers, Tom.


-
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



Page load without version redirect for Bootstrap Modal

2013-02-07 Thread Tom Eicher

Hello,

with Bootstrap's modal functionality, I can make very cool modal
popups.

http://twitter.github.com/bootstrap/javascript.html#modals

The problems start when I want to provide the popup's content
dynamically via Wicket, because I need to provide a href that will be
loaded by JQuerys "load" method, which apparently does not respect
redirects.
In other words, I need to provide a PageLink (Bookmarkable or other...)
that will load the page directly, without redirecting to include the
page version. But I do not want ONE_PASS_RENDER for the whole of
the application.

Previous questions about such things pointed to the "restart
exception", but I guess that's a different use case...

Maybe if I already included a page version in the link, would the
page still redirect ? Can I switch off redirecting for one
page only ? Or even better, for one page constructor only ?

Anybody successfully doing Bootstrap modals with "remote content"
(using "href" or data-remote") ?

Cheers, Tom.


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



Wicketstuff datatables no 6.4.0 release

2013-01-30 Thread Tom Eicher

Hello,

while all other wicketstuff components I checked do have
a 6.4.0 release, the datatables stops at 1.5-rc2.1 :
http://repo1.maven.org/maven2/org/wicketstuff/datatables/

I was able to locate a jar in WEB-INF/lib/ of
http://repo1.maven.org/maven2/org/wicketstuff/datatables-examples/6.4.0/datatables-examples-6.4.0.war
;-) but even if this works (I'll see...)
... sources and javadoc would also be nice.

(Same problem in other repos all over the web)

Automated build hanging somewhere ?

Cheers, Tom.

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



Form Submit components

2011-11-29 Thread Tom Eicher

Hello,

I have a data table with a checkbox column, and I dont
want to loose the checks when a navigation link is clicked.

Since I'm not using AJAX here, all I would need is for the
navigation buttons to sumit the form.
("SubmittingNavigationToolbar", not"AjaxNavigationToolbar")

I just rediscovered a really old posting where it was
recommended to "change all under wicket.markup.html.navigation.paging
to use SubmitLink instead of Link".

While this would work, I was thinking if in 2011 we do not have
a better solution. Does anyone have a working "SubmittingBehavior"
to just attach to the links or anything ?

Using wicket-1.4.12, but also welcoming 1.5 solutions,
which I would put on our "TODO for migration" list ;-)

Thanks, Cheers, Tom.

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



Re: Re: DataTable and FilterToolbar

2011-05-17 Thread Tom Eicher



there is a GoAndClearFilter which can submit the search form afair


Yes, but that ons is meant for use within a form, as you write,
but not within a FilterToolbar embedded in a DataTable.

Or how would you use it / where would you put in a FilterToolbar ?
(The FilterToolbar is below the column headers, and potentially has
a filter component (text input, dropdown, ...) per column, so there
is no room for a clear and go filter)...

Thanks, Tom.

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



DataTable and FilterToolbar

2011-05-16 Thread Tom Eicher


Hi, I guess no reply means it's not a simple FAQ ;-)

So to start it easy:

If I have a DataTable, with a FilterToolbar, and
a TextFilteredPropertyColumn, how is the
TextFilteredPropertyColumn supposed to submit, i.e.
apply it's input for filtering.

Pressing ENTER will only work if there is not other
text input on the form / on the page.

Cheers, Tom.


Tom Eicher schrieb:

Hello,

(I have been unable to locate a current and working
wicketstuff mailing list, so I am sending to
wicket mailing list instead. I searched for quite
some time. This is really confusing with the old
SF list still accepting subscribe requests etc etc)

We are using wicket, wicketstuff and a colletion of
wicket best pratices found on the net. Thus, we use
DataTable with sorting and filtering.

This works great, but I noticed a few days ago, that as
soon as you have 2 or more TextFilteredPropertyColumn
in your FilterToolbar, the browser will not submit the
form upon pressing enter.

Of course this is standard behaviour for a browser, but
there must be a solution for this situation, must it not ?

I found the Form.setDefaultButton(), but this requires an
explicit (and visible) defaultSubmittingComponent, which I
don't have or want.

I also found the GoFilter / GoAndClearFilter, but these seem
to me to be for usage within a form, but not within a DataTable
FilterToolbar. (potentially, every column is occupied by a
filter - where would I put the GoFilter ?)

To submit the filters, probably some JavaScript magic is
required, BUT - the Javascript is (already) in the
Form.appendDefaultButtonField() / .onComponentTagBody(),
at least partially, is it not ?

To make it worse, we have a SubmittingOrderByLink as found
on the net, which has another "funky javascript submit
magic" like

protected final String getTriggerJavaScript() {
if (getForm() != null) {
// find the root form - the one we are really going to submit
Form root = getForm().getRootForm();
StringBuffer sb = new StringBuffer(100);
sb.append("var e=document.getElementById('");
sb.append(root.getHiddenFieldId());
sb.append("'); e.name=\'");
sb.append(getInputName());
sb.append("'; e.value='x';");
sb.append("var f=document.getElementById('");
sb.append(root.getMarkupId());
sb.append("');");
if (getForm() != root) {
sb.append("var ff=document.getElementById('");
sb.append(getForm().getMarkupId());
sb.append("');");
} else {
sb.append("var ff=f;");
}
sb.append("if (ff.onsubmit != undefined) { if (ff.onsubmit()==false)
return false; }");
sb.append("f.submit();e.value='';e.name='';return false;");
return sb.toString();
} else {
return null;
}
}

Actually, I should not add a 3rd magic submit solution to the page,
should I ? I'm not happy with all that, and very confused.
I hope you can point me in the right direction.

Thanks in advance,
Cheers, Tom.


PS: I could not find a single place of Documentation for DataTable
& related. If there were a definite correct place in the wiki, I would
add some findings and examples later...



-
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



DataTable: Multiple Filter, and OrderSubmittingLink

2011-05-13 Thread Tom Eicher

Hello,

(I have been unable to locate a current and working
wicketstuff mailing list, so I am sending to
wicket mailing list instead. I searched for quite
some time. This is really confusing with the old
SF list still accepting subscribe requests etc etc)

We are using wicket, wicketstuff and a colletion of
wicket best pratices found on the net. Thus, we use
DataTable with sorting and filtering.

This works great, but I noticed a few days ago, that as
soon as you have 2 or more TextFilteredPropertyColumn
in your FilterToolbar, the browser will not submit the
form upon pressing enter.

Of course this is standard behaviour for a browser, but
there must be a solution for this situation, must it not ?

I found the Form.setDefaultButton(), but this requires an
explicit (and visible) defaultSubmittingComponent, which I
don't have or want.

I also found the GoFilter / GoAndClearFilter, but these seem
to me to be for usage within a form, but not within a DataTable
FilterToolbar. (potentially, every column is occupied by a
filter - where would I put the GoFilter ?)

To submit the filters, probably some JavaScript magic is
required, BUT - the Javascript is (already) in the
Form.appendDefaultButtonField() / .onComponentTagBody(),
at least partially, is it not ?

To make it worse, we have a SubmittingOrderByLink as found
on the net, which has another "funky javascript submit
magic" like

protected final String getTriggerJavaScript() {
if (getForm() != null) {
// find the root form - the one we are really going to submit
Form root = getForm().getRootForm();
StringBuffer sb = new StringBuffer(100);
sb.append("var e=document.getElementById('");
sb.append(root.getHiddenFieldId());
sb.append("'); e.name=\'");
sb.append(getInputName());
sb.append("'; e.value='x';");
sb.append("var f=document.getElementById('");
sb.append(root.getMarkupId());
sb.append("');");
if (getForm() != root) {
sb.append("var ff=document.getElementById('");
sb.append(getForm().getMarkupId());
sb.append("');");
} else {
sb.append("var ff=f;");
}
sb.append("if (ff.onsubmit != undefined) { if 
(ff.onsubmit()==false) return false; }");

sb.append("f.submit();e.value='';e.name='';return false;");
return sb.toString();
} else {
return null;
}
}

Actually, I should not add a 3rd magic submit solution to the page,
should I ? I'm not happy with all that, and very confused.
I hope you can point me in the right direction.

Thanks in advance,
Cheers, Tom.


PS: I could not find a single place of Documentation for DataTable
& related. If there were a definite correct place in the wiki, I would
add some findings and examples later...



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