wicketstuff shiro

2014-08-08 Thread Thibault Kruse
Hi all, I suggest a breaking change to wicketstuff-shiro here: https://github.com/wicketstuff/core/issues/328 In brief: wicketstuffshiro allows to use @ShiroSecurityConstraint or @ShiroSecurityConstraints (with s at the end) annotations on Component classes to trigger security checks at

Variant Change Behavior

2014-09-03 Thread Thibault Kruse
Hi, playing around with Variants for Components, I am wondering whether there is an elegant way to steer Variant markup loading via a Behavior. In our case we want to use a different markup layout based on the width of the container the component is going to be used in, visually. So if we

Re: Variant Change Behavior

2014-09-05 Thread Thibault Kruse
Wicket Training and Consulting https://twitter.com/mtgrigorov On Wed, Sep 3, 2014 at 1:09 PM, Thibault Kruse tibokr...@googlemail.com wrote: Hi, playing around with Variants for Components, I am wondering whether there is an elegant way to steer Variant markup loading via a Behavior

Re: Variant Change Behavior

2014-09-08 Thread Thibault Kruse
in a file. Or you can use org.apache.wicket.util.tester.WicketTester#assertContains() to check that a specific String (actually a Regex) is in the response. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Fri, Sep 5, 2014 at 4:30 PM, Thibault Kruse tibokr

Re: Variant Change Behavior

2014-09-08 Thread Thibault Kruse
, Thibault Kruse tibokr...@googlemail.com wrote: Both solutions are not ideal, since we do not want our tests to become brittle. We want to functionally test components in multiple variants, but where the variants vary in mere layout (css classes), we do not want to have tests break just because

Re: Variant Change Behavior

2014-09-09 Thread Thibault Kruse
at 10:45 AM, Thibault Kruse tibokr...@googlemail.com wrote: Hm, thinking some more, the general solution would be to fail if a variant is requested, and it is among a set of whitelisted variants, and the markup is not found. For other variants, using the default would probably be fine

respond with 404 page while keeping original URL

2014-09-10 Thread Thibault Kruse
Hi, we have a page for some resource mounted at /resource/id When users enter an invalid ID, we want to render a 404 page. However, we would like the resulting page not have the original url with the invalid id (but http status 404). Is there any obvious easy way to achieve this? Because it

Programmatic Markup with fallback

2014-09-15 Thread Thibault Kruse
Hi, I am trying to create a wicket panel that renders markup from some remote source, but if fetching fails, renders some fallback markup. I want to achieve this with minimal code. I tried two approaches one based on overriding getMarkup(), one based on

Re: Programmatic Markup with fallback

2014-09-15 Thread Thibault Kruse
to a MarkupException here with Wicket 1.6.x. Regards Sven On 09/15/2014 07:37 PM, Thibault Kruse wrote: Hi, I am trying to create a wicket panel that renders markup from some remote source, but if fetching fails, renders some fallback markup. I want to achieve this with minimal code. I tried two

Re: Programmatic Markup with fallback

2014-09-16 Thread Thibault Kruse
? On Mon, Sep 15, 2014 at 8:01 PM, Thibault Kruse tibokr...@googlemail.com wrote: Sorry, this was wicket 1.6.16 and 1.6.17. Here is a quickstart, to reproduce both cases some comments have to be switched: https://github.com/tkruse/custommarkup On Mon, Sep 15, 2014 at 7:50 PM, Sven Meier s

Re: Programmatic Markup with fallback

2014-09-16 Thread Thibault Kruse
, Thibault Kruse tibokr...@googlemail.com wrote: Regarding the markupException, the example I posted was flawed, must be: return Markup.of(wicket:panelit works/wicket:panel); But that is not relevant to my report. The example on github had this fixed. Any other ideas / somewhat clean workaround

Re: Programmatic Markup with fallback

2014-09-16 Thread Thibault Kruse
the result is being discarded. That seems like design smell. If users override getMarkup() with some expensive operation, they should be able to rely on this being called just once, and this only if the result is actually being used. On Tue, Sep 16, 2014 at 11:24 AM, Thibault Kruse tibokr

Re: Programmatic Markup with fallback

2014-09-16 Thread Thibault Kruse
; body wicket:panel Fallback works! /wicket:panel /body /html So I guess I am still doing something wrong here. On Tue, Sep 16, 2014 at 12:28 PM, Thibault Kruse tibokr...@googlemail.com wrote: So, I have a working solution like this: public class CustomMarkupFallbackMarkupContainer

Re: Programmatic Markup with fallback

2014-09-16 Thread Thibault Kruse
) { return null; } } On Tue, Sep 16, 2014 at 2:28 PM, Thibault Kruse tibokr...@googlemail.com wrote: I forgot to mention, for my solution to work, the associated markup file must not have tags outside the wicket:panel tags: wicket:panel Fallback works! /wicket:panel as opposed

MarkupContainer rendering without children

2014-09-16 Thread Thibault Kruse
Hi, is it intentional that if a class directly extends MarkupContainer, but does not have any children, then its associated markup is not rendered? When using public class FooMarkupContainer extends MarkupContainer implements IMarkupCacheKeyProvider { public FooMarkupContainer(String id)

Re: MarkupContainer rendering without children

2014-09-19 Thread Thibault Kruse
bump, any opinion? Should I open a JIRA? On Tue, Sep 16, 2014 at 4:02 PM, Thibault Kruse tibokr...@googlemail.com wrote: Hi, is it intentional that if a class directly extends MarkupContainer, but does not have any children, then its associated markup is not rendered? When using public

Re: turning off page versioning

2014-09-23 Thread Thibault Kruse
It is an interesting question whether other web frameworks (also outside JVM world) use any similar page versioning scheme to wicket. I am not aware of any. In any case I guess most projects using wicket would have to make design decisions based on whether the page version is acceptable in the

Re: turning off page versioning

2014-09-24 Thread Thibault Kruse
On Wed, Sep 24, 2014 at 2:13 AM, Garret Wilson gar...@globalmentor.com wrote: I'm not denying that versioned pages may be a useful concept for some use cases (even though I can't think of any offhand). I'm just saying it's not my use case, and I had assumed throughout development on our project

Re: turning off page versioning

2014-09-24 Thread Thibault Kruse
versions of pages) becomes relevant. On Wed, Sep 24, 2014 at 11:34 AM, Martin Grigorov mgrigo...@apache.org wrote: Thibault, On Wed, Sep 24, 2014 at 11:23 AM, Thibault Kruse tibokr...@googlemail.com wrote: On Wed, Sep 24, 2014 at 2:13 AM, Garret Wilson gar...@globalmentor.com wrote: I'm

Re: turning off page versioning

2014-09-24 Thread Thibault Kruse
You could generally tune down on telling the world about your emotional state on technical mailing lists, your emotional state is of no significant interest to the people who registered to this mailing list, at least no in the amount you provide. We got it the first time. And e.g. your phrasing

Re: respond with 404 page while keeping original URL

2014-09-26 Thread Thibault Kruse
Training and Consulting https://twitter.com/mtgrigorov On Wed, Sep 10, 2014 at 3:43 PM, Thibault Kruse tibokr...@googlemail.com wrote: Hi, we have a page for some resource mounted at /resource/id When users enter an invalid ID, we want to render a 404 page. However, we would like the resulting

Re: respond with 404 page while keeping original URL

2014-09-26 Thread Thibault Kruse
On Fri, Sep 26, 2014 at 1:29 PM, Thibault Kruse tibokr...@googlemail.com wrote: As a follow-up: How can the Http Error code then be checked using WicketTester? Currently, after your suggested change, the browser shows my 404 page and status is 404, but in WicketTester, I get In MyPage.java

Re: respond with 404 page while keeping original URL

2014-09-26 Thread Thibault Kruse
. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Fri, Sep 26, 2014 at 1:29 PM, Thibault Kruse tibokr...@googlemail.com wrote: As a follow-up: How can the Http Error code then be checked using WicketTester? Currently, after your suggested change

Re: respond with 404 page while keeping original URL

2014-09-26 Thread Thibault Kruse
Training and Consulting https://twitter.com/mtgrigorov On Fri, Sep 26, 2014 at 2:04 PM, Thibault Kruse tibokr...@googlemail.com wrote: Sorry I just realized I pasted something wrong in my last message. My current workaround would be: assertThat(TESTER_SCOPE.getTester().getPreviousResponses

Component error handler

2014-11-18 Thread Thibault Kruse
Hi, we have a page with several components (after logging in, the user sees a dashboard page with panels offering information from diverse sources). We would like to achieve that if one of the component fails to render, this does not take down the whole page. So the failing component should

Plans for further wicket classes with generics

2015-02-02 Thread Thibault Kruse
Hi, Already in Wicket there is GenericPanel, GenericWebPage, GenericFragment, IGenericComponent, and IModel of course is already generic. But there is still IBehavior without Generics and several standard components which do not implement IGenericComponent such a Label. Are there plans to

Re: Plans for further wicket classes with generics

2015-02-02 Thread Thibault Kruse
). The main stopper is that using generics makes the code even more verbose. And many people don't like this. So there are few Generic*** versions of the most used components. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Mon, Feb 2, 2015 at 3:21 PM, Thibault Kruse

core devs cannot close PRs on github?

2015-03-12 Thread Thibault Kruse
Hi, I notice that the core devs have to ask PR submitters to close their PRs on github: https://github.com/apache/wicket/pull/101 I am curious: Why is that so? Looking here: https://help.github.com/articles/permission-levels-for-an-organization-repository/ I assume the wicket core devs are