[Wicket-user] getSession().invalidate() and Wicket 1.2

2006-07-03 Thread Mark George
Hi there. I am struggling with using getSession().invalidate() when logging out a user. I have a reduced my test case to a simple logout page: public class LogoutPage extends WebPage { @Override protected void onEndRequest() { getSession().invalidate(); }

Re: [Wicket-user] about base path

2006-07-03 Thread R.A
Hi Johan. I override newWebRequest in my WebApplication class as follows and works fine. protected WebRequest newWebRequest(HttpServletRequest request) { String path = request.getRequestURL().toString(); getApplicationSettings().setContextPath(path); return super.newWebRe

Re: [Wicket-user] RequiredTextField not validated and RadioGroup onSelectionChanged method not called

2006-07-03 Thread Eelco Hillenius
Btw, it turns out it *was* a bug in Jetty 6. It recently got fixed (svn only now). Anyway, Wicket should now work regardless of that bug or not. Eelco On 7/3/06, Eelco Hillenius <[EMAIL PROTECTED]> wrote: > I just checked in the fix for the problem I found with Jetty 6 (and > which might be an i

Re: [Wicket-user] Allow nested components in VelocityPanel

2006-07-03 Thread Jean-Baptiste Quenot
* Johan Compagner: > so the older one doesn't need to be applied? No, it doesn't. -- Jean-Baptiste Quenot aka John Banana Qwerty http://caraldi.com/jbq/ Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make

Re: [Wicket-user] Allow nested components in VelocityPanel

2006-07-03 Thread Johan Compagner
so the older one doesn't need to be applied?On 7/3/06, Jean-Baptiste Quenot <[EMAIL PROTECTED]> wrote: * Johan Compagner:> is this path an append on the previous one or one by itself? It's a brand new patch against 1.2-rc1.  I just tested, it appliesOK on 1.2 release.-- Jean-Baptiste Quenotaka 

Re: [Wicket-user] Disabling FormComponents

2006-07-03 Thread Eelco Hillenius
That all works only for validation - it doesn't prevent components' models from being updated, and it is quite a lot of work. An easier and better way is to override isEnabled (or isVisible, but isEnabled seems better here) and return false if they shouldn't be validated and updated. The only catch

Re: [Wicket-user] Question about OutputMarkupId

2006-07-03 Thread Igor Vaynberg
the difference between wicket and echo2 is that echo2 is only ajax, wicket supports regular requests as the primary mode. so, ajax in wicket will never probably be as easy as it is in echo2. if you are looking for a totally ajax based application you are probably better off sticking with echo2 or o

Re: [Wicket-user] Allow nested components in VelocityPanel

2006-07-03 Thread Jean-Baptiste Quenot
* Johan Compagner: > is this path an append on the previous one or one by itself? It's a brand new patch against 1.2-rc1. I just tested, it applies OK on 1.2 release. -- Jean-Baptiste Quenot aka John Banana Qwerty http://caraldi.com/jbq/ Using Tomcat but need to do more? Need to support

Re: [Wicket-user] about base path

2006-07-03 Thread Johan Compagner
that should work fineBut you can only do that when a request is comming in not in construction time of the webapp.johanOn 7/3/06, R.A < [EMAIL PROTECTED]> wrote: Hi Johan.I remove base tag and set "getApplicationSettings().setContextPath(path)" inmy webapplication class's init method, work fine.Tha

Re: [Wicket-user] Question about OutputMarkupId

2006-07-03 Thread Alex Objelean
First of all, thank you for your feedback, appreciate it very much! I am new to Wicket. Before starting with Wicket I had some experience with Echo2, where I do not have to worry about how to make a component being ajaxified. This is why I am a little bit frustrated about this in Wicket.. Hope the

Re: [Wicket-user] Disabling FormComponents

2006-07-03 Thread Martijn Dashorst
Why not something like: class MyCustomValidator extends AbstractFormValidator { private List validators; private CheckBox checkbox; private FormComponent formComponent; public MyCustomValidator(cb, fc, StringValidator... vs) { this.checkbox = cb; this.formComponent

Re: [Wicket-user] Question about OutputMarkupId

2006-07-03 Thread Martijn Dashorst
This is because the 'ajax' ID (the id Wicket uses in rendering) has to be known before it knows the markup tag. This is a limitation of 1.2 that we have solved in 2.0 with the constructor change. Simply put: in order to generate a unique identifier, a component needs its parent. During constructio

Re: [Wicket-user] Disabling FormComponents

2006-07-03 Thread Joni Freeman
The problem with FormValidator is that the individual components (checkbox + textfields) are still validated with validators (FormComponent.validateValidators()). My client wants the form to work so that if the checkbox is not checked, the textfields can contain invalid data. One way to implement

Re: [Wicket-user] Question about OutputMarkupId

2006-07-03 Thread Alex Objelean
Indeed, it seems that the old value is overriden with the generated value... In this case, why the markupId do not care about the old value? Wouldn't it be much better if it would be the same as the original id? Alex Objelean wrote: > > In this case, the designer efforts will be disabled anytim

Re: [Wicket-user] Question about OutputMarkupId

2006-07-03 Thread Alex Objelean
In this case, the designer efforts will be disabled anytime I use an ajaxified component, isn't it? For instance I have : in CSS: div#idForDesigner { float: left; border: solid red 1px; } in JAVA: Component component = new MyComponent("idForWicket"); component.setOutputMarkupId(true);

Re: [Wicket-user] Disabling FormComponents

2006-07-03 Thread Martijn Dashorst
You can add form level validation, creating composite validators, and add both the checkbox and the field, and the validators for the field to your composite validator. See EqualInputValidator for an example implementation. Martijn On 7/3/06, Joni Freeman <[EMAIL PROTECTED]> wrote: > I have a cu

Re: [Wicket-user] Question about OutputMarkupId

2006-07-03 Thread Martijn Dashorst
it will add "id='dlfjldfj'" to each component, which adds to the amount of data sent, it can overwrite existing 'id' attributes, disabling efforts done by your designer, ajax is hot, but not everyone wants to use it, so enabling it by default is not something we as a framework supplier want to push

[Wicket-user] Question about OutputMarkupId

2006-07-03 Thread Alex Objelean
Why I should always call setOutputMarkupId(true) when I want to ajaxify the component, couldn't it by default be true? -- View this message in context: http://www.nabble.com/Question-about-OutputMarkupId-tf1883868.html#a5149915 Sent from the Wicket - User forum at Nabble.com. Using Tomcat but

[Wicket-user] Disabling FormComponents

2006-07-03 Thread Joni Freeman
I have a curious requirement for a form. When a user submits a form, some of the FormComponents should not be processed at all (for example, validation should not be done). Each FormComponent has an accompanying checkbox control which determines whether the actual control is activated or not. [ ]

Re: [Wicket-user] about base path

2006-07-03 Thread R.A
Hi Johan. I remove base tag and set "getApplicationSettings().setContextPath(path)" in my webapplication class's init method, work fine. Thank you! But...I don't know how do I "path" dynamically, so I set direct path, String path = "http://localhost:9080/myapp/pc";, this time. How do I get HttpSe

Re: [Wicket-user] about base path

2006-07-03 Thread Johan Compagner
yes we are prepending the context and servlet paths to your html files so that they map ok.See the PrependContextPathHandler So if everything works out you shouldn't need to set the basetag, because we are preparsing the source for you. johanOn 7/3/06, R.A <[EMAIL PROTECTED]> wrote: Hi Frank.I succ

Re: [Wicket-user] about base path

2006-07-03 Thread R.A
Hi Frank. I succeeded at setting base tag, thank you! But images is unshown. I write img src="image/abc.jpg" in html file, but as looking at source file on browser, img src="myapp/image/abc.jpg". It seems like to be added "myapp" to img tag by Wicket. "myapp" is context root. I set "http://localh

Re: [Wicket-user] RequiredTextField not validated and RadioGroup onSelectionChanged method not called

2006-07-03 Thread Eelco Hillenius
I just checked in the fix for the problem I found with Jetty 6 (and which might be an issue in other containers). From the change log: 'Implemented a workaround for an inconsistency between different servlet containers and a bug in the servlet spec which does not seem to state what should happen w

Re: [Wicket-user] about base path

2006-07-03 Thread Frank Bille Jensen
On Mon, 2006-07-03 at 00:46 -0700, R.A wrote: > How do I set this "path" in base tag? In html: In java: WebComponent baseTag = new WebComponent("baseTag"); baseTag.add(new SimpleAttributeModifier("href", path)); add(baseTag); Frank Using Tomcat but need to do more? Need to support web serv

Re: [Wicket-user] RequiredTextField not validated and RadioGroup onSelectionChanged method not called

2006-07-03 Thread Alban Duval
I have the same problem with 1.2 final Matej Knopp a écrit : Current released version is 1.2 final, can you check if it works with that version? -Matej Alban Duval wrote: Hi all. I have two problems with Form in wicket 1,2-rc4 (it worked wit rc3 :-/ ) * The first is R

Re: [Wicket-user] RequiredTextField not validated and RadioGroup onSelectionChanged method not called

2006-07-03 Thread Eelco Hillenius
What servlet container are you testing with? I'm right now making a workingaround for a bug in Jetty 6 (or rather the specification), that results in the required check failing. Eelco On 7/3/06, Alban Duval <[EMAIL PROTECTED]> wrote: > > Hi all. > > I have two problems with Form in wicket 1,2-

Re: [Wicket-user] about base path

2006-07-03 Thread R.A
Hi. Let me ask another question. I'd like to change absolute path in base tag dynamically. I get absolute path in page class as follows. HttpServletRequest request = ((WebRequest) getRequest()).getHttpServletRequest(); String path = request.getRequestURL().toString(); How do I set this "path" i

Re: [Wicket-user] RequiredTextField not validated and RadioGroup onSelectionChanged method not called

2006-07-03 Thread Matej Knopp
Current released version is 1.2 final, can you check if it works with that version? -Matej Alban Duval wrote: > Hi all. > > I have two problems with Form in wicket 1,2-rc4 (it worked wit rc3 :-/ ) > > * The first is RequiredTextField that is not required when > executing. The user ca

[Wicket-user] RequiredTextField not validated and RadioGroup onSelectionChanged method not called

2006-07-03 Thread Alban Duval
Hi all. I have two problems with Form in wicket 1,2-rc4 (it worked wit rc3 :-/ ) The first is RequiredTextField that is not required when executing. The user can go to the next page without filling the text field. The RequiredTextField is added in a form like this :     public