Re: Ajax based panel replacement

2012-11-25 Thread Sven Meier
Make a copy of AbstractAjaxTimerBehavior and let it be stoppable from onTimer(): diff --git a/wicket-core/src/main/java/org/apache/wicket/ajax/AbstractAjaxTimerBehavior.java b/wicket-core/src/main/java/org/apache/wicket/ajax/AbstractAjaxTimerBehavior.java index 3071875..b982a39 100644 ---

Re: set favicon.ico dynamically in wicket 6

2012-11-25 Thread Rob Schroeder
Hi Tim, I ran into the same question a couple of days ago, and in what maybe constitutes overkill for a simpler solution I didn't see, I looked at CssResourceReference and reused as much of the code as seemed to be necessary to make a FaviconResourceReference:

Re: Deploy on production: optimization tip tricks

2012-11-25 Thread Oscar Besga Arcauz
Thank you ! Some of these improvements are already implemented on my site. I've been looking forward to implement wicket-specific optimizations (althought I'm discovering that wicket alone it's default optimized on deployment mode ) And as you already said, perfomance is an art where no

After/before creation or serialization

2012-11-25 Thread Oscar Besga Arcauz
Hi wickers ! Is there a method on Wicket components that is called before creation/load(f.e. from disk, deserialization) and another method called before destroy/save(to disk, serialization) Would it be methods onInitialize()  and onDetach() of org.apache.wicket.Component ? Thanks !

Re: After/before creation or serialization

2012-11-25 Thread Cedric Gatay
Hi, I don't know if there is a special Wicket thing, but you can use the standard Java way like this : private void writeObject(ObjectOutputStream out) throws IOException { //provide your own logic } private void readObject(ObjectInputStream in) throws IOException,

Re: After/before creation or serialization

2012-11-25 Thread Oscar Besga Arcauz
Thanks Yes, I can use both methos onInitialize + onRead and onDetach + onSave Perhaps I should ask if onInitialize and onDetach are used when component is serialized /deserialized on wicket 6 My plan is to do avoid this     MyPanel(String id){     super(id)        

Re: Deploy on production: optimization tip tricks

2012-11-25 Thread Martin Grigorov
Hi, On Sun, Nov 25, 2012 at 11:54 AM, Oscar Besga Arcauz obe...@isdefe.eswrote: Thank you ! Some of these improvements are already implemented on my site. I've been looking forward to implement wicket-specific optimizations (althought I'm discovering that wicket alone it's default

Re: Ajax based panel replacement

2012-11-25 Thread Martin Grigorov
Hi, On Sun, Nov 25, 2012 at 9:51 AM, Sven Meier s...@meiers.net wrote: Make a copy of AbstractAjaxTimerBehavior and let it be stoppable from onTimer(): diff --git a/wicket-core/src/main/java/**org/apache/wicket/ajax/**AbstractAjaxTimerBehavior.java

Re: set favicon.ico dynamically in wicket 6

2012-11-25 Thread Martin Grigorov
Hi, Is 'resources' folder next to WEB-INF folder in the file system ? If YES then all you need to do is: MyPage.html html head link rel=shortcut icon href=resources/favicon.png type=image/png/ Wicket automatically resolves such relative urls to context relative ones no matter what

Re: WicketTagIdentifier: possible optimization

2012-11-25 Thread Martin Grigorov
Hi, Please file a ticket for this improvement. On Sat, Nov 24, 2012 at 5:25 AM, Chris Colman chr...@stepaheadsoftware.comwrote: Just looking at the Wicket source for an unrelated issue I noticed that WicketTagIdentifier stores a private static collection of wellKnownTagNames as an

Re: Lifecycle debugging setting

2012-11-25 Thread Martin Grigorov
Hi, What are the possible states you mean ? On Fri, Nov 23, 2012 at 11:05 PM, Chris Colman chr...@stepaheadsoftware.com wrote: Is there a debug setting that can turn on debugging of lifecycle states? i.e. when turned on it will dump the component Id and the state it just entered as it

Injector.get() in websession returns null

2012-11-25 Thread Kurt Sys
Hey all, I'm trying to get cdi/injection to work with wicket. So far, everything seems to be allright except for one thing: injecting into a wicket-websession. Seems logical in some way, since a session is not a component, so I tried using 'Injector.get().inject(this)', but apparently,

Re: Injector.get() in websession returns null

2012-11-25 Thread Martin Grigorov
Hi, Wicket is a bit inconsistent with its CDI integration. It doesn't use wicket-ioc Injector at all. You have to use NonContextual.of(...).inject(this) instead. On Sun, Nov 25, 2012 at 4:27 PM, Kurt Sys kurt@gmail.com wrote: Hey all, I'm trying to get cdi/injection to work with wicket.

Re: Injector.get() in websession returns null

2012-11-25 Thread Martin Grigorov
I don't use Wicket-CDI in my applications so I don't have much experience with it but I just took a look at the APIs and here is how I would do it: CdiContainer.get().getNonContextualManager().inject(this); On Sun, Nov 25, 2012 at 4:59 PM, Kurt Sys kurt@gmail.com wrote: Hey Martin,

Re: Injector.get() in websession returns null [SOLVED]

2012-11-25 Thread Kurt Sys
That looks nicer than what I had :). Great, thanks a lot! Kurt 2012/11/25 Martin Grigorov mgrigo...@apache.org: I don't use Wicket-CDI in my applications so I don't have much experience with it but I just took a look at the APIs and here is how I would do it:

Re: Ajax based panel replacement

2012-11-25 Thread Oliver Zemann
As suggested i created the JIRA issue https://issues.apache.org/jira/browse/WICKET-4886 I will test the diff tomorrow. Am 25.11.2012 15:41, schrieb Martin Grigorov: Hi, On Sun, Nov 25, 2012 at 9:51 AM, Sven Meier s...@meiers.net wrote: Make a copy of AbstractAjaxTimerBehavior and let it be

Re: Ajax based panel replacement

2012-11-25 Thread Martin Grigorov
I see now what Sven meant with the second check for isStopped(). But additionally I see that the quickstart is very broken. PanelOne does: form.add(new AbstractAjaxTimerBehavior(Duration.seconds(5)) { @Override protected void onTimer(AjaxRequestTarget target) {

Re: Ajax based panel replacement

2012-11-25 Thread Sven Meier
Of course the component should be added to the ART. But the example already fails when the behavior tries to write out the next timeout after #onTimer(). This is why I think it should re-check #isStopped(), since the user might stop the timer in #onTimer(). I'll take a look at WICKET-4886.

Re: set favicon.ico dynamically in wicket 6

2012-11-25 Thread Tim Van Meerbeeck
Rob, This is a solution if you want to achieve this! I was just looking into the possibility because this is a pretty rare scenario. The favico was designed to have a bookmark to a site and have an icon in your favorites so you can quickly find the right bookmark. So the scenario to load this

Re: Ajax based panel replacement

2012-11-25 Thread Martin Grigorov
diff --git a/wicket-core/src/main/java/org/apache/wicket/ajax/AbstractAjaxTimerBehavior.java b/wicket-core/src/main/java/org/apache/wicket/ajax/AbstractAjaxTimerBehavior.java index 3071875..0651c33 100644 --- a/wicket-core/src/main/java/org/apache/wicket/ajax/AbstractAjaxTimerBehavior.java +++

Re: Ajax based panel replacement

2012-11-25 Thread Martin Grigorov
On Sun, Nov 25, 2012 at 7:14 PM, Martin Grigorov mgrigo...@apache.orgwrote: diff --git a/wicket-core/src/main/java/org/apache/wicket/ajax/AbstractAjaxTimerBehavior.java b/wicket-core/src/main/java/org/apache/wicket/ajax/AbstractAjaxTimerBehavior.java index 3071875..0651c33 100644 ---

Wicket (6) JARs...

2012-11-25 Thread Russell Bateman
I downloaded Wicket 6 and found no JAR files within. I googled around without satisfaction. Is there just one JAR? I'm starting to look through a lot of places. It seems easier just to ask. I do not wish to use Maven. (I know this is probably shocking.) Could someone confirm there is only one

Re: Wicket (6) JARs...

2012-11-25 Thread Martin Grigorov
There is 'binaries' folder in the dist : http://ftp-stud.hs-esslingen.de/pub/Mirrors/ftp.apache.org/dist/wicket/6.3.0/ On Sun, Nov 25, 2012 at 7:22 PM, Russell Bateman r...@windofkeltia.comwrote: I downloaded Wicket 6 and found no JAR files within. I googled around without satisfaction. Is

Re: set favicon.ico dynamically in wicket 6

2012-11-25 Thread Martin Grigorov
You can add components which are in the head. MyPage.html: html head link wicket:id=favicon / ... /head . MyPage.java: add(new Favicon(favicon)); Favicon.java: public class Favicon extends WebComponent { public Favicon(String id){ super(id); } public

Re: Wicket (6) JARs...

2012-11-25 Thread Martin Grigorov
On Sun, Nov 25, 2012 at 7:30 PM, Russell Bateman r...@windofkeltia.comwrote: Martin, I don't know why it is I didn't see or stumble upon this when I was looking at wicket.apache.org to get started. There is a link Download which lists the last versions with links like

Re: Ajax based panel replacement

2012-11-25 Thread Oliver Zemann
Am 25.11.2012 18:58, schrieb Martin Grigorov: I see now what Sven meant with the second check for isStopped(). But additionally I see that the quickstart is very broken. PanelOne does: form.add(new AbstractAjaxTimerBehavior(Duration.seconds(5)) { @Override protected

Re: Ajax based panel replacement

2012-11-25 Thread Sven Meier
Without the 'true ||'. Great :) Sven On 11/25/2012 07:15 PM, Martin Grigorov wrote: On Sun, Nov 25, 2012 at 7:14 PM, Martin Grigorov mgrigo...@apache.orgwrote: diff --git a/wicket-core/src/main/java/org/apache/wicket/ajax/AbstractAjaxTimerBehavior.java

Re: Ajax based panel replacement

2012-11-25 Thread Oliver Zemann
Are the changes pushed to the git repo? Or is this only a solution which will work in my case but will not be pushed because of side effects, no necessity etc.? Thanks in advance. Oli Am 25.11.2012 20:25, schrieb Sven Meier: Without the 'true ||'. Great :) Sven On 11/25/2012 07:15 PM,

Re: Behavior.renderHeader being invoked twice

2012-11-25 Thread Nick Pratt
Any thoughts on why Im seeing two invocations of the renderHead method? On Wed, Nov 21, 2012 at 12:14 PM, Nick Pratt nbpr...@gmail.com wrote: I've created a custom Behavior, and attached it to a DataTable. I'm seeing two invocations per Page load of myBehavior.renderHeader method, stacks

Re: Behavior.renderHeader being invoked twice

2012-11-25 Thread Sven Meier
In development config the headers are validated after rendering: org.apache.wicket.markup.html.WebPage.validateHeaders(WebPage.java:274) Sven On 11/25/2012 09:17 PM, Nick Pratt wrote: Any thoughts on why Im seeing two invocations of the renderHead method? On Wed, Nov 21, 2012 at 12:14 PM,

Is wicket-cdi native to Wicket 6.1 and upwards?

2012-11-25 Thread Yuci Gou
Just read the article - Status of wicket-cdi Module at https://www.42lines.net/2012/09/11/status-of-wicket-cdi-module/. Wonder if wicket-cdi is part of Wicket 6.1 release and upwards. I tried a simple Wicket 6.3 application running in TomEE, but could not get the CDI injection to work. These are

Re: After/before creation or serialization

2012-11-25 Thread Oscar Besga Arcauz
Hi Martin   Yes, I've tried @SpringBean but I don't like it because I noticed a (not very big) performace loss when using it; because the dynamicly-created serializable proxy. Or at least that seems to me. IMHO, the proxy is an overwhelming solution, I prefer a combination of transients and

Re: After/before creation or serialization

2012-11-25 Thread Martin Grigorov
The proxy does effectively the same as your code - it uses a transient bean and if it is not available then it looks it up in the bean repository. I'm not sure what performance loss you experience. On Sun, Nov 25, 2012 at 11:15 PM, Oscar Besga Arcauz obe...@isdefe.eswrote: Hi Martin Yes,

Cloneing Wicket Objects

2012-11-25 Thread Colin Rogers
Wicketeers, I was wondering what the best was to duplicate or clone wicket components. I need guidance as to the best way to do this. I have, on my screen two 'navigation panels' that are identical - one at the top of the page, another at the bottom. They contain dropdown choice fields that,

RE: Cloneing Wicket Objects

2012-11-25 Thread Paul Bors
Can't you crate the navigation panel once and call add() on it twice by passing the same reference to it from within your page hierarchy? On the client side I don't see why you would push this cloning to the client. Just let the page contain the same panel (html/js) via a single reference. You

RE: initial bean validation integration checked into experimental module

2012-11-25 Thread Paul Bors
Looks awesome! One suggestion/question about it (might sound silly at first but keep an open mind). I understand you're implementing the JSR-303, but I was wondering if it would be possible to allow some of the settings be borrowed from other annotation framework like Hibernate or some other 3rd

Re: wicket-6 User friendly form validation with Wicket (stuq)

2012-11-25 Thread James Selvakumar
Hi all, We have been using the examples given in the FormsWithFlair for a while and it has been working very well. However, we recently migrated from wicket 1.5.x to 6.3.0 and the code didn't compile because of some api changes. Here's the code that worked in 1.5.x pre public class

Re: wicket-6 User friendly form validation with Wicket (stuq)

2012-11-25 Thread James Selvakumar
Sorry, Got most of the answers from the mailing list discussion here: http://apache-wicket.1842946.n4.nabble.com/highlight-invalid-fields-with-custom-Validation-Framework-tp4652949p4652978.html On Mon, Nov 26, 2012 at 11:31 AM, James Selvakumar ja...@mcruncher.comwrote: Hi all, We have been

Re: highlight invalid fields with custom Validation Framework?

2012-11-25 Thread James Selvakumar
Martin, Thank you so much. I was exactly in the position where delta458 was and almost got through with it. After following your suggestions, the ValidationMsgBehavior looks like this: pre public class ValidationMsgBehavior extends Behavior { @Override public void onRendered(Component c)

Re: initial bean validation integration checked into experimental module

2012-11-25 Thread Igor Vaynberg
On Sun, Nov 25, 2012 at 4:12 PM, Paul Bors p...@bors.ws wrote: Looks awesome! One suggestion/question about it (might sound silly at first but keep an open mind). I understand you're implementing the JSR-303, but I was wondering if it would be possible to allow some of the settings be

new hierarchical feedback panel added

2012-11-25 Thread Igor Vaynberg
a common question on this list is how to build hierarchical feedback panels. i just checked in my attempt to help solve this problem into master. here is the javadoc that explains what it does. feedback welcome. -igor /** * A specialized feedback panel that only displays messages from inside a

Re: highlight invalid fields with custom Validation Framework?

2012-11-25 Thread Martin Grigorov
On Mon, Nov 26, 2012 at 4:50 AM, James Selvakumar ja...@mcruncher.comwrote: Martin, Thank you so much. I was exactly in the position where delta458 was and almost got through with it. After following your suggestions, the ValidationMsgBehavior looks like this: pre public class

Re: Wicket Editable datagrid with add/edit/delete functionality at once

2012-11-25 Thread rsasanulu
Hi, I am newbie to the wicket. I am looking for the same component for my project. Can you please help me how to build this editable datagrid in wicket6 because lot of changes happened in the wicket from 1.3.5. can you please help me on this? Thanks Rajitha -- View this message in context:

Re: Wicket Editable datagrid with add/edit/delete functionality at once

2012-11-25 Thread Martin Grigorov
Take a look at http://www.wicket-library.com/inmethod-grid Sources at https://github.com/wicketstuff/core/tree/master/jdk-1.6-parent/inmethod-grid-parent On Mon, Nov 26, 2012 at 7:49 AM, rsasanulu srajith...@gmail.com wrote: Hi, I am newbie to the wicket. I am looking for the same component

Re: highlight invalid fields with custom Validation Framework?

2012-11-25 Thread James Selvakumar
Thanks. On Mon, Nov 26, 2012 at 2:11 PM, Martin Grigorov mgrigo...@apache.orgwrote: On Mon, Nov 26, 2012 at 4:50 AM, James Selvakumar ja...@mcruncher.com wrote: Martin, Thank you so much. I was exactly in the position where delta458 was and almost got through with it. After