Re: Image based on external url model object

2015-11-22 Thread Maxim Solodovnik
Actually I'm using "hacky" way: if (absolute) { profile.add(new WebMarkupContainer("img").add(AttributeModifier.append("alt", Application.getString(5L)), AttributeModifier.append("src", uri))); } else { profile.add(new Image("img", new ByteArrayResource("image/jpeg") { ..

Re: Image based on external url model object

2015-11-22 Thread Tobias Soloschenko
Hi, maybe we can extend the normal image and add a constructor Image(String id, IModel model, String url) so that the url is used in the src attribute (like in MediaComponents) WDYT? kind regards Tobias > Am 23.11.2015 um 03:45 schrieb Maxim Solodovnik : > > Actually

Re: Image based on external url model object

2015-11-22 Thread Sebastien
Forgot to mention I've read the following wiki, but as it was a little bit old I was wondering if there was nothing newer... https://cwiki.apache.org/confluence/display/WICKET/How+to+load+an+external+image On Sun, Nov 22, 2015 at 11:31 PM, Sebastien wrote: > Hi all, > > I

Image based on external url model object

2015-11-22 Thread Sebastien
Hi all, I cannot find an Image component that could display an image from an *external* url, supplied by the model object. My use-case is that I have a user object, which have a gravatarUrl property, and I would like to do something like "this.add(new ExternalImage("gravatarUrl"));"... Isn't

Testing for an IEvent

2015-11-22 Thread calle sollander
Hello!I have a question about how to test that an IEvent has been sent. Say that I have a Panel with a AjaxLink on it and depending on something or other diffrentevents are sent when the user clicks the link.Is there a way to set up a unit test using the Wickettester that can detect which events

Re: Quetsion to nesting Forms and reflecting states of FormComponents after ajax refreshs

2015-11-22 Thread Sebastien
Hi Andrea, Thanks for this investigation, this is very interesting that nothing breaks! > I don't understand why the onFormSubmitted is called on the root form and not on the actually submitted one The question is "what form is really submitted/posted"? We know that only a real form - the root

Re: Quetsion to nesting Forms and reflecting states of FormComponents after ajax refreshs

2015-11-22 Thread Andrea Del Bene
Hi, playing with the quickstart I've noticed something strange that might help to solve this issue. Before rendering phase both the inner and outer form are marked as submitted (Form#isSubmitted returns true). This is quite strange as I would expect that only the inner form would be marked

Re: Testing for an IEvent

2015-11-22 Thread Sven Meier
Hi, you can override BaseWicketTester#createPage(), returning your own page (might be a subclass of StartComponentInPage) which records all events handed to Component#onEvent(). Regards Sven On 22.11.2015 12:37, calle sollander wrote: Hello!I have a question about how to test that an