Wicket CDI 1.1 and Wicket Tester

2013-11-30 Thread martin.dilger
There are a couple of Posts but none that answers my Question.
How is a Unit Test for a Wicket CDI Application supposed to be written?
For the CDI Module itself there is CDIUnit from JGlue, but this does not
work 
for ApplicationTests as the Classes are not found and some are marked as
Package Private so that you cannot add them manually via @AdditionalClasses.
Is there a working example somewhere how to do that without using something
heavy like Arquillian?
Is this even possible?
Thanks for any hints.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-CDI-1-1-and-Wicket-Tester-tp4662717.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Wicket CDI 1.1 and Wicket Tester

2013-11-30 Thread martin.dilger
I have a very simple testcase running, described here
http://www.effectivetrainings.de/blog/2013/11/30/wicket-und-cdi-1-1-auf-den-richtigen-kontext-kommt-es-an/.
But I´m pretty sure there must be an easier way.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-CDI-1-1-and-Wicket-Tester-tp4662717p4662718.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Injecting proxy services in page.

2013-06-18 Thread martin.dilger
To be honest, I dont understand exactly what the Problem is.
If you work with Spring-Beans, they are normally safe to serialize, as its
only the proxy. 
We´ve done this all the time (even with older wicket versions) without any
problems.
It looks like you have some Classpath-Issue here. The Service-Class you
mentioned, is that an Interface or do you work with the concrete
Implementation. I got similar Issues when working with
Implementation-Classes and CGLib.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Injecting-proxy-services-in-page-tp4659209p4659580.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Form submit without redirection

2013-06-18 Thread martin.dilger
If you work with JQuery and Validation, why dont you use Ajax to Submit your
form? You could attach your errors to the AjaxRequestTarget as JavaScript /
JSON and process it on the client-side, which would be far better that using
PageParameters instead? 



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Form-submit-without-redirection-tp4659496p4659581.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Empy choices durring unit tests with DropDownChoice

2013-06-18 Thread martin.dilger
Dmitriy, Dmitriy...:)

Never ever call getObject() on your LoadableDetachable Model in the
Constructor of your Component (I taught you better!!:)).

Should be:
new DropDownChoice(aWicketId, yourModel,new ChoicesModel(),
myOwnChoicesRenderer) 

Mind the second Parameter, as this is your Model that gets Populated on
Selection, try this.

You should further check whether you service has been called
Mockito.verify(myService).getChoicesList()





--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Empy-choices-durring-unit-tests-with-DropDownChoice-tp4659540p4659583.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: BeanValidation - IllegalStateException: Could not resolve Property from component

2013-01-06 Thread martin.dilger
Your Code does not show where the PropertyValidator is added.
If you work with CompoundPropertyModels, you need to explicitely configure
the Property, since no Model is available to retrieve the Information.

Wicket expects a Model of Type IPropertyReflectionAwareModel to work.

Just do the following (Dummy Code)

...add(new PropertyValidator(new
Property(YourClass.class,AttributeName;



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/BeanValidation-IllegalStateException-Could-not-resolve-Property-from-component-tp4655159p4655170.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: JPA annotations

2012-12-23 Thread martin.dilger
Hi,

I really don't understand your question.

You want to know how to get jpa-annotations to work.
Well, you just need to get hold of an entitymanager.
If you ask me, go with spring, it's easier than jee or even
Guice.

Regards Martin




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/JPA-annotations-tp4655001p4655025.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Wicket in PHP

2012-10-23 Thread martin.dilger
Hi,

I´m a freelance software developer in germany.
I recently got a problem, since my webhoster only provides php. I´m used to
work with wicket, so i didnt want to miss this pleasure for my own website.

So, the only solution was to implement wicket in php and call it (picket):).

This is just a hobby project in pre-alpha state and far from
production-ready, but my site
www.effectivetrainings.de is completely implemented in picket.

If you are interested, just have a look.

http://www.effectivetrainings.de/framework/examples/pages/ExamplesPage.php

Regards

Martin Dilger



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-in-PHP-tp4653237.html
Sent from the Users forum mailing list archive at Nabble.com.

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



SpringComponentInjector and non null fields

2012-02-14 Thread martin.dilger
Hi,

I just realized painfully, that SpringComponentInjector only injects Beans,
when the Fields are non-null.
Is there a reason for this Behavior?
The Reason I ask is, we use the SpringComponentInjector in all our Tests
to inject Mocks with Injector.get().inject(this).
This only works, if we set all Mocks to null in tearDown.
No problem so far, but this is surely not a typical use case, but
nonetheless, I would like to know if this is desired, and if we could
propably allow to configure this behavior (as a flag or whatever?). 
Just for me to understand this  better.
Thanks

Martin

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/SpringComponentInjector-and-non-null-fields-tp4386918p4386918.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: SpringComponentInjector and non null fields

2012-02-14 Thread martin.dilger
Hi,

thanks, this is true, but I dont think this is the Point I refer to, since I
call Injector.get().inject(this) in our Test, so I explicitely request
SpringBean-injection.
The Problem is this Line in Class Injector:

if (field.get(object) == null)
{

Object value = 
factory.getFieldValue(field, object);

if (value != null)
{
field.set(object, value);
}
}

Injection only happens, if the Field is non-null.
I can not think of any use-case why this is?

Any comments?

Thanks in advance!

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/SpringComponentInjector-and-non-null-fields-tp4386918p4387511.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: SpringComponentInjector and non null fields

2012-02-14 Thread martin.dilger
ok,

understood, thanks.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/SpringComponentInjector-and-non-null-fields-tp4386918p4387545.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Hide page version query parameters

2012-01-01 Thread martin.dilger
Yes, thats right, stateless pages do not have version number,  
but normally it is not so easy to make pages stateless, we always had
problems with that.

But if you change your render strategy to redirect to render, the uri in the
browser does not change and you always have clean uris. Thats how we solved
the problem.

Just try this in your Applications init Method:
getRequestCycleSettings().setRenderStrategy(RenderStrategy.REDIRECT_TO_RENDER);

You should be aware of the side effects of different render strategies, just
look in Javadoc of RenderStrategy.

Regards

MArtin

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Hide-page-version-query-parameters-tp4163099p4251018.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Hide page version query parameters

2011-12-30 Thread martin.dilger
hi,
you could try to change your render strategy to redirect to render, that
would dismiss the page
parameters version.

regards

martin dilger

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Hide-page-version-query-parameters-tp4163099p4246959.html
Sent from the Users forum mailing list archive at Nabble.com.

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



~ as separator in urls

2011-10-28 Thread martin.dilger
Hi, 

since https://issues.apache.org/jira/browse/WICKET-4061, we use ~ as
url-separator, this leads to enormous problems and prevents us from
upgrading from 1.5.0 to 1.5.1.

We have an apache which has mod_security enabled, and all Ajax-Requests are
blocked, the same could happen if an apache is active which has mod_userdir
active (http://httpd.apache.org/docs/mod/mod_userdir.html).

I would like to start a discussion, whether this is really a good idea to
use ~ as a separator.
In my mind, it is not since ~ has its own semantics and should not be used
as a separator.

What is your opinion?

Regards 

Martin

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/as-separator-in-urls-tp3947088p3947088.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: ~ as separator in urls

2011-10-28 Thread martin.dilger
Hi Martin,

thanks for your reply.
Well, could be, I´m not sure, what all these apache modules do, 
our problem is, that mod_security in apache denies all request with '~' in
the URL, what we get is 404, which per Default looks like the Application
would not respond on Button clicks, since no failure-handler is active.

I know, that '~' is generally allowed in uris, but I wanted to discuss
whether this is really a good idea.
I wonder, whether we are the only ones with this problem?

Regards

Martin

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/as-separator-in-urls-tp3947088p3947748.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Redirect to External Application

2011-10-17 Thread martin.dilger
Hi,

we have the following use case - we need to redirect to an external
application, that handles authorization for us (cookie creation etc.).

For this, we need to redirect to this application and handle a callback url,
where this external application redirects after succesful login.

I tried the following (very simplified, but worked in 1.4 but not in 1.5):

String url =
((HttpServletRequest)RequestCycle.get().getRequest().getContainerRequest()).getRequestURL().toString();
throw new
RedirectToUrlException(http://someexternalapplication?jumpBackToMyApplicationURL=+url);

In 1.5 I get 404 - since this url looks like this:
http://localhost:8080/wicket/page, which is not a legal url, since the page
identifier is missing.

I would love to hear some thoughts, how to handle this in 1.5, 
thank you very much.

Martin


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Redirect-to-External-Application-tp3913112p3913112.html
Sent from the Users forum mailing list archive at Nabble.com.

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