Re: Configuration of AbstractCalendar

2010-11-09 Thread Jan Ferko
The problem is that i am using only AbstractCalendar object, because I need to use YUI CalendarGroup object and show multiple page calendar in page, every page has only a few available cells for users to pick date of event. 2010/11/9 Igor Vaynberg igor.vaynb...@gmail.com the value should be

Re: Free wicket from component hierarchy hell

2010-11-09 Thread Martin Makundi
Again, the point is (regardless of unit tests) that you can unknowingly do something that allows stuff to break later quite easily. I wouldn't call it unknowingly if you are stating it now before the feature has been implemented. ** Martin

Re: Free wicket from component hierarchy hell

2010-11-09 Thread Sebastian
On the other hand if you only have to do component nesting programmatically in case of functional reasons (like security) your code will probably much cleaner and you'll realize issues like using the wrong parent faster. Instead of: myComponent.add(child1) child1.add(child2)

Re: Free wicket from component hierarchy hell

2010-11-09 Thread Martin Makundi
On the other hand if you only have to do component nesting programmatically in case of functional reasons (like security) your code will probably much cleaner and you'll realize issues like using the wrong parent faster. +1 Very good point: cleaner code! Finally complex wicket pages will

Re: Free wicket from component hierarchy hell

2010-11-09 Thread James Carman
On Tue, Nov 9, 2010 at 12:29 PM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: I wouldn't call it unknowingly if you are stating it now before the feature has been implemented. The user can queue stuff to the wrong component unknowingly because they won't get an exception. Then

Re: Free wicket from component hierarchy hell

2010-11-09 Thread James Carman
On Tue, Nov 9, 2010 at 12:33 PM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: Very  good point: cleaner code! Finally complex wicket pages will look like their hello-world counterparts. You're becoming a bit irrational here, Martin. Let's try to stay on point. He brings up a

Re: Free wicket from component hierarchy hell

2010-11-09 Thread Martin Makundi
The user can queue stuff to the wrong component unknowingly because they won't get an exception. You will get an exception if you queue explicitly to the wrong component. If you don't care about the parent component, it 's their choie (good or bad) ;) Then later a markup change could

Re: Free wicket from component hierarchy hell

2010-11-09 Thread James Carman
On Tue, Nov 9, 2010 at 12:38 PM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: You will get an exception if you queue explicitly to the wrong component. If you don't care about the parent component, it 's their choie (good or bad) ;) You're not understanding what I'm saying. I'm

Re: Free wicket from component hierarchy hell

2010-11-09 Thread Martin Makundi
You're not understanding what I'm saying.  I'm saying they're not consciously making a *choice*; they're queueing the component to the wrong parent on accident, but they aren't getting an exception.  This can lead to problems later on. So you mean that if a manufacturer manufactures a gun

Re: Free wicket from component hierarchy hell

2010-11-09 Thread James Carman
On Tue, Nov 9, 2010 at 12:43 PM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: So you mean that if a manufacturer manufactures a gun they are not conciously making the decision that somebody is getting shot? Ok, I'm officially done with this conversation. I've voiced my opinion.

Re: Free wicket from component hierarchy hell

2010-11-09 Thread Martin Makundi
Very  good point: cleaner code! Finally complex wicket pages will look like their hello-world counterparts. You're becoming a bit irrational here, Martin.  Let's try to stay on point.  He brings up a valid point and we should respect his opinion, much like we're respecting yours.  Remember,

Re: Free wicket from component hierarchy hell

2010-11-09 Thread Johan Compagner
Why are we discussing here already that works in wicket 1.4 if you really need it? public class HelloWorld extends WebPage implements IComponentResolver { public HelloWorld() { add(new WebMarkupContainer(body)); add(new Label(label,my label));

Re: Free wicket from component hierarchy hell

2010-11-09 Thread Martin Makundi
This does not really nest the components logically, does it? If you set get(body).setVisible(false) will the label remain visible? ** Martin 2010/11/9 Johan Compagner jcompag...@gmail.com: Why are we discussing here already that works in wicket 1.4 if you really need it? public class

Re: Cannot get current page from AjaxPagingNavigator

2010-11-09 Thread vp143
Thank you both for your responses- I totally forgot about it being dynamic. However, I have tried both code snippets above but still no luck. I printed the current page within the load() method which prints 0 only on first load. No message is printed when the page numbers from

Re: Cannot get current page from AjaxPagingNavigator

2010-11-09 Thread Pedro Santos
I think you need to implement the AjaxPagingNavigator#onAjaxEvent method and add the currentPage component on target. On Tue, Nov 9, 2010 at 4:20 PM, vp143 vishal.po...@cipriati.co.uk wrote: Thank you both for your responses- I totally forgot about it being dynamic. However, I have tried

Re: Free wicket from component hierarchy hell

2010-11-09 Thread Johan Compagner
no ofcourse not The label will then be gone because the body is gone. so the output will be this html /html when the body container is not visible if the label is not visible: html body /body /html this solution you just can throw everything in the panel or webpage that is the

Re: Free wicket from component hierarchy hell

2010-11-09 Thread Martin Makundi
How will it work if I call get(body).setEnabled(false); and if label was a textfield? Would the textfield be still enabled? ** Martin 2010/11/9 Johan Compagner jcompag...@gmail.com: no ofcourse not The label will then be gone because the body is gone. so the output will be this html /html

Re: Free wicket from component hierarchy hell

2010-11-09 Thread Johan Compagner
textfield.isEnabledInHierachy() will then ofcourse not get to the parent it is on. because its parent is the webpage not the body markupcontainer. So no this will not resolver from the child to the parent, only the parent to the child. On Tue, Nov 9, 2010 at 19:30, Martin Makundi

Re: Free wicket from component hierarchy hell

2010-11-09 Thread Igor Vaynberg
the queue() method is there in addition to add(), so you dont have to use it. yes, it is riskier to use under some circumstances because it is more forgiving then add() - but thats the point i think. -igor On Tue, Nov 9, 2010 at 9:41 AM, James Carman ja...@carmanconsulting.com wrote: On Tue,

Re: Free wicket from component hierarchy hell

2010-11-09 Thread Igor Vaynberg
On Tue, Nov 9, 2010 at 9:38 AM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: The user can queue stuff to the wrong component unknowingly because they won't get an exception. You will get an exception if you queue explicitly to the wrong component. If you don't care about the

Re: Free wicket from component hierarchy hell

2010-11-09 Thread Martin Makundi
Ok, I think one the main point in Igor's proposal was to overcome this particular problem in addition to few others: https://github.com/ivaynberg/wicket/tree/component-queuing ** Martin 2010/11/9 Johan Compagner jcompag...@gmail.com: textfield.isEnabledInHierachy() will then ofcourse not get to

Re: Free wicket from component hierarchy hell

2010-11-09 Thread Johan Compagner
ok a sample that it also works in with the right parent: public class HelloWorld extends WebPage implements IComponentResolver { final Label label; public HelloWorld() { label = new Label(label, new ModelString() {

Re: Free wicket from component hierarchy hell

2010-11-09 Thread Igor Vaynberg
it still wont work for a lot of usecases that require proper hierarchy. like a form trying to find form submitting component, etc -igor On Tue, Nov 9, 2010 at 10:59 AM, Johan Compagner jcompag...@gmail.com wrote: ok a sample that it also works in with the right parent: public class HelloWorld

Re: Free wicket from component hierarchy hell

2010-11-09 Thread Igor Vaynberg
On Tue, Nov 9, 2010 at 12:20 AM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: I frankly don't see any way to have this auto-hierarchy stuff without getting lots of unnecessary ambiguity and sources of bugs. I totally agree with what Eelco wrote below, and what someone else said

Re: Free wicket from component hierarchy hell

2010-11-09 Thread Johan Compagner
and that is only because i cant do component.setAuto(false) right after i call autoAdd() else it would just stay there :) and this is then only done to resolve it once with the first render... On Tue, Nov 9, 2010 at 20:03, Igor Vaynberg igor.vaynb...@gmail.com wrote: it still wont work for

Re: Free wicket from component hierarchy hell

2010-11-09 Thread Michael Brinkman
I hate to jump into this, but I wanted to pose an assumption and a solution assuming my assumption is correct ;) My assumption is that the key issue with the page objects self assembling into the correct hierarchy based on the HTML is that multiple objects may use the same wicket ID. If that's

Re: Free wicket from component hierarchy hell

2010-11-09 Thread Sven Meier
Hi, an easy example is: tr wicket:id=repeatertdspan wicket:id=first/ span wicket:id=last//td/tr now the designer wants tds to have a css class based on some condition. you now have to add a webmarkupcontainer to represent the td and renest first and last labels into it. the container is

Re: Free wicket from component hierarchy hell

2010-11-09 Thread Igor Vaynberg
On Tue, Nov 9, 2010 at 12:03 PM, Sven Meier s...@meiers.net wrote: Hi, an easy example is: tr wicket:id=repeatertdspan wicket:id=first/ span wicket:id=last//td/tr now the designer wants tds to have a css class based on some condition. you now have to add a webmarkupcontainer to represent

Re: Free wicket from component hierarchy hell

2010-11-09 Thread Igor Vaynberg
i wonder if queuing can actually replace icomponentresolver and auto-adding. i wonder if after onbeforerender we can do what unqueing does now, parse the markup, find any missing components, and insert them. autocomponents and autoadd() is something ive always disliked because it doesnt work for

Re: Free wicket from component hierarchy hell

2010-11-09 Thread Igor Vaynberg
wtf is with all the stupid and, more importantly, broken analogies? if you wouldve kept quiet instead of spouting all this garbage i bet a lot more people wouldve been receptive to the idea. you are digging your own hole. id like to think we are all practical people, so stick to practical points.

Re: Updating model object on AjaxFallbackDefaultDataTable page change

2010-11-09 Thread Igor Vaynberg
use AjaxFormChoiceComponentUpdatingBehavior, that one works with Check. also you can use CheckBox with the ajax behavior instead of CheckGroup/Check or replace links used by navigator with submit links, there are factory methods on the navigator. -igor On Tue, Nov 9, 2010 at 8:41 AM, Matt

Re: Free wicket from component hierarchy hell

2010-11-09 Thread Sven Meier
+1 on rethinking the auto* stuff together with the proposed queueing. Sven Am 09.11.2010 um 21:17 schrieb Igor Vaynberg: i wonder if queuing can actually replace icomponentresolver and auto-adding. i wonder if after onbeforerender we can do what unqueing does now, parse the markup, find any

Re: Free wicket from component hierarchy hell

2010-11-09 Thread James Carman
Could we introduce the concept of an AutoComponentSource or something, perhaps? A page/component could potentially have multiple? On Tue, Nov 9, 2010 at 3:43 PM, Sven Meier s...@meiers.net wrote: +1 on rethinking the auto* stuff together with the proposed queueing. Sven Am 09.11.2010 um

Re: Free wicket from component hierarchy hell

2010-11-09 Thread Igor Vaynberg
can we fork this into another thread? -igor On Tue, Nov 9, 2010 at 12:46 PM, James Carman ja...@carmanconsulting.com wrote: Could we introduce the concept of an AutoComponentSource or something, perhaps?  A page/component could potentially have multiple? On Tue, Nov 9, 2010 at 3:43 PM, Sven

Re: Free wicket from component hierarchy hell

2010-11-09 Thread James Carman
on dev list? You wanna start it? On Tue, Nov 9, 2010 at 3:57 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote: can we fork this into another thread? -igor On Tue, Nov 9, 2010 at 12:46 PM, James Carman ja...@carmanconsulting.com wrote: Could we introduce the concept of an

Re: Updating model object on AjaxFallbackDefaultDataTable page change

2010-11-09 Thread Matt Schmidt
Yes that works for the first page - only on that page are the javascript behaviors rendered. Basically, we are looking for a way to NOT do an ajax request every time we check a box - The model object of the check group should be updated when we a) click the submit button or b) change the page of

Re: Updating model object on AjaxFallbackDefaultDataTable page change

2010-11-09 Thread Igor Vaynberg
see my last suggestion and replace navigator's links with submitlinks -igor On Tue, Nov 9, 2010 at 1:02 PM, Matt Schmidt mschmid...@gmail.com wrote: Yes that works for the first page - only on that page are the javascript behaviors rendered. Basically, we are looking for a way to NOT do an

Re: Free wicket from component hierarchy hell

2010-11-09 Thread Igor Vaynberg
nah. you go ahead. the AutoComponentSource sounds vary vague, you will need to elaborate it. -igor On Tue, Nov 9, 2010 at 12:58 PM, James Carman ja...@carmanconsulting.com wrote: on dev list?  You wanna start it? On Tue, Nov 9, 2010 at 3:57 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote:

RestartResponseAtInterceptPageException issue

2010-11-09 Thread Henrique
Hello, I'll try to make this simple. User fills in some data, clicks submit to persist it but since he has to login first, he is redirected to a login page (via throw new RestartResponseAtInterceptPageException(Login.class); ). He logs in and is redirected back to the original page (via

Re: RestartResponseAtInterceptPageException issue

2010-11-09 Thread Igor Vaynberg
On Tue, Nov 9, 2010 at 4:07 PM, Henrique quiqu...@gmail.com wrote: Hello, I'll try to make this simple. User fills in some data, clicks submit to persist it but since he has to login first, he is redirected to a login page (via throw new RestartResponseAtInterceptPageException(Login.class); ).

Re: Updating model object on AjaxFallbackDefaultDataTable page change

2010-11-09 Thread Matt Schmidt
Are you suggesting to override AjaxPagingNavigator.newPagingNavigationIncrementLink() and AjaxPagingNavigator.newPagingNavigationLink() and implement our own navigation links similar to AjaxPagingNavigationIncrementLink and AjaxPagingNavigationLink that do the same thing except extends SubmitLink 

onSubmit method and validators

2010-11-09 Thread Henrique
Hello, I have a simple form with some RequiredTextFields. When the user leaves some of them blank, the corresponding messages show up in the feedback panel telling them they are required. The issue I am having is that once this happens, the onSubmit() method is no longer called and wicket starts

Are there any cases when I can rearrange component tree?

2010-11-09 Thread Dmitry Grigoriev
Hello all, I'm new to Wicket. Just wonder about subj (theoretical interest). On one hand, stateful component model has no architectural limitations on its own preventing me from reattaching component to different parent, just like I can do with desktop applications or with any self-contained tree

Re: Are there any cases when I can rearrange component tree?

2010-11-09 Thread Brian Topping
This isn't a big limitation, all you have to do is store the state in an object separate from the component hierarchy. Then have the components access that shared state. Keep MVC principles in mind: The model is your state, the component is the controller. On Nov 9, 2010, at 10:41 PM,

RE: Wicket JQuery drag and drop behaviors

2010-11-09 Thread Stefan Lindner
Did you take a look at jWicket (http://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-core/jdk-1.5-parent/jwicket-parent/jwicket-ui/jwicket-ui-dragdrop)? -Ursprüngliche Nachricht- Von: armandoxxx [mailto:armando@dropchop.com] Gesendet: Dienstag, 9. November

RE: Wicket JQuery drag and drop behaviors

2010-11-09 Thread armandoxxx
Hey ... No I haven't. Regards Armando -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-JQuery-drag-and-drop-behaviors-tp3033676p3035602.html Sent from the Users forum mailing list archive at Nabble.com.

RE: Wicket JQuery drag and drop behaviors

2010-11-09 Thread armandoxxx
Just a thought for all you posters that provided wicket + jquery project links. These links should also be available on wicket pages .. I googled for wicket + jquery implementations before I started to implement my own tiny little DnD behaviors, but found only wicket + other JS libs pages, so

<    1   2