Select CheckGroup with Button instead of CheckGroupSelector

2008-01-23 Thread thomas jaeckle
Hi. I want to select all Checkboxes in a CheckGroup with a Button. Therefore I looked at CheckGroupSelector and came up with this: public class CheckGroupButtonSelectAll extends Button { public CheckGroupButtonSelectAll(String id) { super(id); setDefaultFormProcessing(false);

Re: Select CheckGroup with Button instead of CheckGroupSelector

2008-01-23 Thread thomas jaeckle
Jonas-21 wrote: I think if you add 'return false;' to your javascript, the button's default click action (submitting a form) isn't executed, so your DataTable doesn't get refreshed. That's brilliant and works perfect. Thank you very much. Here the working code: public class

Re: How can I validate required formComponents after page load?

2008-01-11 Thread thomas jaeckle
igor.vaynberg wrote: onbeforerender { textfield.error(RequiredValidator.class.getSimpleName()); } -igor Thanks igor. Now it is working fine with: protected void onBeforeRender() { super.onBeforeRender(); visitChildren(FormComponent.class, new IVisitor() { public Object

How can I validate required formComponents after page load?

2008-01-10 Thread thomas jaeckle
Hello Guys. I am trying to validate my RequiredTextFields directly when/after the Page is loaded so that I can display the required errormessage in my feedbackpanel. Currently I try to do this in the Pages constructor: add(new AjaxEventBehavior(onload) { protected void

AjaxFormValidatingBehavior and caret (cursor) position

2008-01-10 Thread thomas jaeckle
Hi everyone. I found this on the mailing list: http://www.nabble.com/Re%3A-AjaxFormValidatingBehavior-and-focus-p9178324.html And exactly this is my problem now. I registered an onkeyup event on a textfield to validate it after each keypress. In a RequiredTextField following happens: I want to

Re: How can I validate required formComponents after page load?

2008-01-10 Thread thomas jaeckle
igor.vaynberg wrote: how about just page.onbeforerender() { fieldlastname.valdiate(); } -igor Ok, thanks .. But the RequiredTextField validates because it isn't added to the Page yet (input is null and not an empty String) and so checkRequired() from FormComponent returns true: public

Re: How to open a popup in onSubmit() of a Form

2007-12-21 Thread thomas jaeckle
Hi again. I found a solution, but it isn't very nice: First I implemented a AjaxForm like the AjaxButton is implemented (why isn't there a AjaxForm delivered with Wicket?): public abstract class AjaxForm extends Form { public AjaxForm(String id) { super(id); add(new

Re: How to open a popup in onSubmit() of a Form

2007-12-21 Thread thomas jaeckle
Thomas Kappler-2 wrote: Do you know about org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow? It seems to do almost what you want, or at least you can look at the source. Cheers, Thomas Thanks for the tip. But at this place I don't want a ModalWindow, a want a normal

How to open a popup in onSubmit() of a Form

2007-12-20 Thread thomas jaeckle
Hello. I am trying to open a popup in onSubmit() of a form. The form is simple: it has a TextField and a Button. When it is submitted the value from the TextField shall become a PageParameter for the popup and it shall be used in PageMap.forName(...) as identifier (so for equal values the

Re: Problem with JavaScript when using Wicket AJAX Components

2007-12-20 Thread thomas jaeckle
I think I understand now, why the tooltips don't appear. The JavaScript is initialized when the Page is initialized. At this time the DataTable inside the AjaxLazyLoadPanel is not there. The JavaScript iterates over all elements I have specified ('input', 'td', 'tr', 'textarea', 'select', 'span',

Problem with JavaScript when using Wicket AJAX Components

2007-12-19 Thread thomas jaeckle
Hi there. I wanted to implement Tooltips for my DataTable as described in the Wiki: http://cwiki.apache.org/WICKET/how-to-add-tooltips.html So in every page I want to use them I add this in the page constructor: add(HeaderContributor.forCss(AbstractBorder.class, resource/css/sweetTitles.css));

PagingNavigationIncrementLink special behaviour

2007-12-03 Thread thomas jaeckle
Hi there. I implemented a AjaxFallbackDefaultDataTable which has a custom AjaxNavigationToolbar with a custom AjaxPagingNavigator. In this AjaxPagingNavigator I want that when the user clicks on (which is always enabled), more data from a service is loaded: @Override public void

Re: Problems with spring to manage all webpages

2007-11-21 Thread thomas jaeckle
igor.vaynberg wrote: make that bean a prototype? Hm, I don't see the benefit of this. The problem remains: I can't initialize the pages before the WebApplication is initialized (in this case I would become a There is no application attached to current thread main Exception). But when I

Problems with spring to manage all webpages

2007-11-20 Thread thomas jaeckle
Hi everyone. I am trying to manage all of my WebPages via spring. Every page is derived from AbstractIndex which contains the Border (the page layout: header, navigation): public abstract class AbstractIndex extends WebPage { @SpringBean protected Border border;

Re: Problems with spring to manage all webpages

2007-11-20 Thread thomas jaeckle
Timo Rantalaiho wrote: Why are you trying to make Spring create your component instances? What benefit would that give? The benefit would be that inhertitance and reusability is much easier to manage. If I go with straight Java, I have to create lots of more classes and the code becomes

Re: How do I get the current page?

2007-11-06 Thread thomas jaeckle
Al Maw wrote: Just call Component#getPage() Shame on me ... I thought I tried that once and it didn't work back then ... Looks like I did something wrong. Tanks very much, Al Thomas Jaeckle -- View this message in context: http://www.nabble.com/How-do-I-get-the-current-page--tf4758474