Re: Feedbacks contaminated
yes it is normal. feedback panels show any feedback available. if you want to filter by a container see ContainerFeedbackMessageFilter -igor On 8/9/07, David Leangen [EMAIL PROTECTED] wrote: I have a few forms on one page, and more than one form has a feedback. When a user submits one form with errors, the feedbacks from the other forms are contaminated by the validation error messges from the other forms. Is this normal? Do I need to use something other than feedback to accomplish what I'm trying to do? Thanks! Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Feedbacks contaminated
Nice ! Thank you! And here's the wiki page (which I didn't notice before): http://cwiki.apache.org/WICKET/using-more-than-one-feedbackpanel-per-page. html Cheers, Dave -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: 9 August 2007 16:13 To: users@wicket.apache.org; [EMAIL PROTECTED] Subject: Re: Feedbacks contaminated yes it is normal. feedback panels show any feedback available. if you want to filter by a container see ContainerFeedbackMessageFilter -igor On 8/9/07, David Leangen [EMAIL PROTECTED] wrote: I have a few forms on one page, and more than one form has a feedback. When a user submits one form with errors, the feedbacks from the other forms are contaminated by the validation error messges from the other forms. Is this normal? Do I need to use something other than feedback to accomplish what I'm trying to do? Thanks! Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Uploading files without page reload
Hi all, I have problem with uploading files. My uploading file form is placed in modal window and after submitting comunicate appears that modal window will be closed. What I want is situation when after submitting modal window is still visible. The best solution would be not reloading page but i read somewhere that it is impossible to upload file via ajax. I tried to do something with PageParameters but to show modal window AjaxRequstTarget. Pls help. -- View this message in context: http://www.nabble.com/Uploading-files-without-page-reload-tf4241610.html#a12069395 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Uploading files without page reload
legol wrote: Hi all, I have problem with uploading files. My uploading file form is placed in modal window and after submitting comunicate appears that modal window will be closed. What I want is situation when after submitting modal window is still visible. The best solution would be not reloading page but i read somewhere that it is impossible to upload file via ajax. I tried to do something with PageParameters but to show modal window AjaxRequstTarget. Pls help. The only way to do this, I think, is to embed your file upload inside an iframe. That way, you're doing a proper page submit. Regards, Al -- Alastair Maw Wicket-biased blog at http://herebebeasties.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Uploading files without page reload
I've done that having the upload form specifying an hidden iframe as target and - above all - having the following code in the Form#onSubmit() method // Tell Wicket we're going to do the redirect ourselves. getRequestCycle().setRedirect(false); // Make sure no output for the current cycle is ever sent. getRequestCycle().setRequestTarget( EmptyRequestTarget.getInstance()); Paolo On 8/9/07, Al Maw [EMAIL PROTECTED] wrote: legol wrote: Hi all, I have problem with uploading files. My uploading file form is placed in modal window and after submitting comunicate appears that modal window will be closed. What I want is situation when after submitting modal window is still visible. The best solution would be not reloading page but i read somewhere that it is impossible to upload file via ajax. I tried to do something with PageParameters but to show modal window AjaxRequstTarget. Pls help. The only way to do this, I think, is to embed your file upload inside an iframe. That way, you're doing a proper page submit. Regards, Al -- Alastair Maw Wicket-biased blog at http://herebebeasties.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: wicket:link has no effect
In Java using the default package has a lot of drawbacks for anything other than the simple Hello World stuff. Given this and other reported problems I suggest never to use it. Martijn On 8/9/07, soulspirit [EMAIL PROTECTED] wrote: I was able to solve the problen on my own. The error was that i didnt specify any package. I put all the files in the default-package. After creating a package and putting all the files into it the example worked immediately. Quote from the wicket-hp: In all the Wicket examples, you have to put all files in the same package directory. This means putting the markup files and the java files next to one another. i thought the default package would also be enough.. Eelco Hillenius wrote: the whole thing compiles and works (the first page is displayed correctly with the border) unless i click one of the links. instead of replacing the wicket:body of the id bodyBorder with the content of the pages, the browser displays only those pages. its like the wicket:link has no effect at all. Links embedded in wicket:link tags are to bookmarkable pages (or resources). So when you click them, the whole page is replaced. If you want to replace only parts of the page, you'll have to use regular Wicket components (like Link). Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/wicket%3Alink-has-no-effect-tf4237816.html#a12069466 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Wicket joins the Apache Software Foundation as Apache Wicket Apache Wicket 1.3.0-beta2 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta2/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Authentication in Webapp and Wicket documentation...
I'll let one of the developers go into more detail about the documentation issue :) Regarding security there are several sub projects for you to choose. and i would like to refer to this page for an overview of the differences http://wicketstuff.org/confluence/display/STUFFWIKI/Security+Framework+Comparison From there you should be able to find more information although a good place to look is also the old sourceforge mailinglist. Maurice On 8/9/07, Alexander Schatten [EMAIL PROTECTED] wrote: Greetings to all Wicket experts I try to get Wicket running for some rather simple web-application. First (no offense, but have to say that), Wicket has the worst documentation of an apparently good open source project I have seen in a long time; and this is really a pity, because it seems, that if one would know how to do it, many things can be performed quite easily. Now to my current issue: I want to add a loginpage to my project and protect some of the pages. My first thought was to make a base class (worked) and somehow hook into the lifecycle, check if the user is checked in (MySessio works) but this is not running at all. lot of redirection errors, incoherent documentation and so on. e.g.: Javadoc 1.3 of Page talks about checkAccess() method... however, this methdod can be found nowhere. Now I check the mailing list archive, only useful thing I find is a posting from 9.2.2006 suggesting: protected void init() { getSecuritySettings().setAuthorizationStrategy(new IAuthorizationStrategy() { public boolean authorizeAction(...) ... public boolean authorizeInstantiation(...) ... } starting with 1.2. Well, this interface is still here, but these methods are not available any longer. There is no documentation about this strategy I could find and the Javadoc (which is btw. not linked from the wicket website, and just this made me search for an hour) is very unconclusive. btw. another thing: when the documentation of a project is so bad, at least the javadoc should be accessible: I tried to build mvn site with wicket and got the error that you use a special template or somthing and it does not build, and this template is apparently not in the repository ARRRGGHHH. sorry, but Wicket experience was far away from beeing pleasent. I am quite willing to check several sources, but this here is really bad. outdated information is not easy to distinguish from actual documentation, the reference to the component doc is nice, but component doc very incomplete and so on... Wicket seems to be a quite productive and powerful framework (one of the best I have seen so far, at least so it seems), but getting into it is a damn frustrating experience, I can tell you... (I did not even know where to start. happyily there is a maven archetype at the Jetty website which was helpful.) So, sorry for that outburst, but I was so frustrated... best greetings Alex - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Reacting to DateField change
Hi everyone! I'd like to add an AJAX behavior to a DateField, so that when the value of the textfield changes an event gets fired.. I went with something like field.get(date).add(new Mybehavior(onchange)) to attach the event to the textfield, but (comprehensibly) it doesn't get fired when I change the date via the calendar.. Any hint? ^^; Many thanks for your attention - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Reacting to DateField change
On Thu, 9 Aug 2007 14:10:58 +0100 Dipu Seminlal [EMAIL PROTECTED] wrote: Did you add onchange in the markup as well, you need to add it in the markup as well input wicket:id=yourDate id=yourDate type=text name=yourDate onchange=blah / I'm sorry, do you mean that Wicket replaces the blah on the fly? I thought that behaviors don't need modification to the markup.. Or maybe it's needed just for DateFields? I'll try with your suggestion though, many thanks :) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Authentication in Webapp and Wicket documentation...
http://cwiki.apache.org/WICKET/framework-documentation.html On 8/9/07, Alexander Schatten [EMAIL PROTECTED] wrote: I completly agree; just one addition: best-practices are completly missing in the introduction. at least a list what is available!! how should I know, that there is apparently an authentication framework? how do I access DAOs properly? there is support for working with databases (is there?) there is apparently a validation framework. I cam so far to understand (by browsing javadocs and a lot of trial and error, as again, documentation is not coherent, wiki, javadoc) that I can add validation rules to form elements, like this field should be min 5 max 10 chars and the like. ok, I have it running so far, that no other entries are excepted in this field, but I have no idea how I can react within the application for wrong entries, missing entries (you would want to give the user feedback that an entry was wrong). so where is the hook? how is the lifecycle of objects? where do I hook in to do special things? always in the constructor? somewhere else...? (there was a similar posting on this list recently) these are just examples: accidentally you stumble over a feature, that you were just on implementing yourself, and then it takes hours or days to figure out how to use it properly. again: extremly frustrating. Johan Maasing wrote: I have been playing with wicket for the last week. I must agree with what Alexander says. The documentation is rather lacking and quite frustrating. To bad because wicket is cool. So +1 for better docs. As a newbie to wicket I can't help in writing it but I can tell you what I find frustrating: The javadocs is not linked from the wicket site, it was hard to find even using google. The component reference is not complete. The examples have a link to 'view source' but it does not say which files to look at for a given example. It would be helpful if the component reference said which component belonged in which jar-file (wicket or wicket-extension). Personally I think that tapestrys component reference is helpful (http://tapestry.apache.org/tapestry4.1/components/index.html) Perhaps there could evolve some kind of javadoc convention or other documentation-convention for components that describes the component, the parameters, the css-classes the component renders and so on. Oh yeah, the component reference app is stateful so I constantly get session expired when looking at the examples, I can't for the life of me figure out why :-) It was a bit hard to find a reference to the wicket-tags, at least it is linked from wiki, but a schema-file would be helpful to get command completion in the HTML-editor. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Wicket joins the Apache Software Foundation as Apache Wicket Apache Wicket 1.3.0-beta2 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta2/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Reacting to DateField change
Don't you need to setOutputMarkupId(true) as well on the component? On 8/9/07, Federico Fanton [EMAIL PROTECTED] wrote: On Thu, 9 Aug 2007 14:10:58 +0100 Dipu Seminlal [EMAIL PROTECTED] wrote: Did you add onchange in the markup as well, you need to add it in the markup as well input wicket:id=yourDate id=yourDate type=text name=yourDate onchange=blah / I'm sorry, do you mean that Wicket replaces the blah on the fly? I thought that behaviors don't need modification to the markup.. Or maybe it's needed just for DateFields? I'll try with your suggestion though, many thanks :) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Reacting to DateField change
yes i am almost certain, we need to have the event in the markup. if you add an onchange behaviour then you must add onchange in the markup. On 8/9/07, Federico Fanton [EMAIL PROTECTED] wrote: On Thu, 9 Aug 2007 14:10:58 +0100 Dipu Seminlal [EMAIL PROTECTED] wrote: Did you add onchange in the markup as well, you need to add it in the markup as well input wicket:id=yourDate id=yourDate type=text name=yourDate onchange=blah / I'm sorry, do you mean that Wicket replaces the blah on the fly? I thought that behaviors don't need modification to the markup.. Or maybe it's needed just for DateFields? I'll try with your suggestion though, many thanks :) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Reacting to DateField change
oh yes you need to set the outputMakupId to true, here you go TextField dateField = new TextField(dateField); add(dateField); final TextField updatedField = new TextField(updatedField); updatedField.setOutputMarkupId(true); add(updatedField); AjaxFormComponentUpdatingBehavior behavior = new AjaxFormComponentUpdatingBehavior(onchange) { protected void onUpdate(AjaxRequestTarget target) { testModel.setUpdatedField(newValue); // set the new value to the backing model repaint the component target.addComponent(updatedField); } }; dateField.add(behavior); input wicket:id=dateField type=text value= text onchange=blah/ input wicket:id=updatedField type=text value= text / On 8/9/07, Dipu Seminlal [EMAIL PROTECTED] wrote: yes i am almost certain, we need to have the event in the markup. if you add an onchange behaviour then you must add onchange in the markup. On 8/9/07, Federico Fanton [EMAIL PROTECTED] wrote: On Thu, 9 Aug 2007 14:10:58 +0100 Dipu Seminlal [EMAIL PROTECTED] wrote: Did you add onchange in the markup as well, you need to add it in the markup as well input wicket:id=yourDate id=yourDate type=text name=yourDate onchange=blah / I'm sorry, do you mean that Wicket replaces the blah on the fly? I thought that behaviors don't need modification to the markup.. Or maybe it's needed just for DateFields? I'll try with your suggestion though, many thanks :) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Reacting to DateField change
On Thu, 9 Aug 2007 15:34:03 +0100 Dipu Seminlal [EMAIL PROTECTED] wrote: oh yes you need to set the outputMakupId to true, here you go TextField dateField = new TextField(dateField); D'oh! I'm sorry, I fear I didn't explain myself properly :( The DateField I'm using is the date picker widget used by Wicket 1.3.. It's a FormComponentPanel made of a textfield and an icon which - when clicked - pops up a calendar.. So, I attached my behavior to the textfield and it works when I change the textfield directly, but I don't know how to intercept when _the calendar_ changes the textfield.. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Reacting to DateField change
i just tried with the date picker on 1.2.6 and it works, don't know if anything has changed drastically in 1.3 see the code below DatePickerSettings datePickerSettings = new DatePickerSettings(); datePickerSettings.setIfFormat(%d/%m/%Y); datePickerSettings.setStyle(datePickerSettings.newStyleAqua()); TextField dateField = new TextField(dateField); add(dateField); add(new DatePicker (datePicker,dateField)); final TextField updatedField = new TextField(updatedField); updatedField.setOutputMarkupId(true); add(updatedField); AjaxFormComponentUpdatingBehavior behavior = new AjaxFormComponentUpdatingBehavior(onchange) { private static final long serialVersionUID = 1L; protected void onUpdate(AjaxRequestTarget target) { testModel.setUpdatedField(testModel.getDateField()); target.addComponent(updatedField); } }; dateField.add(behavior); input wicket:id=dateField type=text value= text onchange=blah/span wicket:id=datePicker/span input wicket:id=updatedField type=text value= text / On 8/9/07, Federico Fanton [EMAIL PROTECTED] wrote: On Thu, 9 Aug 2007 15:34:03 +0100 Dipu Seminlal [EMAIL PROTECTED] wrote: oh yes you need to set the outputMakupId to true, here you go TextField dateField = new TextField(dateField); D'oh! I'm sorry, I fear I didn't explain myself properly :( The DateField I'm using is the date picker widget used by Wicket 1.3.. It's a FormComponentPanel made of a textfield and an icon which - when clicked - pops up a calendar.. So, I attached my behavior to the textfield and it works when I change the textfield directly, but I don't know how to intercept when _the calendar_ changes the textfield.. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Authentication in Webapp and Wicket documentation...
On 8/8/07, Alexander Schatten [EMAIL PROTECTED] wrote: Greetings to all Wicket experts I try to get Wicket running for some rather simple web-application. First (no offense, but have to say that), Wicket has the worst documentation of an apparently good open source project I have seen in a long time; and this is really a pity, because it seems, that if one would know how to do it, many things can be performed quite easily. have you seen the wiki? Now to my current issue: I want to add a loginpage to my project and protect some of the pages. My first thought was to make a base class (worked) and somehow hook into the lifecycle, check if the user is checked in (MySessio works) but this is not running at all. lot of redirection errors, incoherent documentation and so on. e.g.: have you started by checking out Signin, Signin2, Authentication, Authorization examples in wicket-examples? Javadoc 1.3 of Page talks about checkAccess() method... however, this methdod can be found nowhere. yes the javadoc is outdated, fixed Now I check the mailing list archive, only useful thing I find is a posting from 9.2.2006 suggesting: protected void init() { getSecuritySettings().setAuthorizationStrategy(new IAuthorizationStrategy() { public boolean authorizeAction(...) ... public boolean authorizeInstantiation(...) ... } starting with 1.2. Well, this interface is still here, but these methods are not available any longer. There is no documentation about this strategy I could find and the Javadoc (which is btw. not linked from the wicket website, and just this made me search for an hour) is very unconclusive. we are working on linking the javadoc...you do know wicket is a maven project right? so there is of course javadoc in the maven repo: http://repo1.maven.org/maven2/org/apache/wicket/wicket/1.3.0-beta2/ further, since it is open source simply attach the sources to your ide and you are set. if you are using maven2 and eclipse add the wicket dep to your pom and do mvn eclipse:eclipse -DdownloadSources=true - and you are all set. now that you have found IAuthorizationStrategy have you even looked at it? for example have you pulled up its class hieararchy to see an example implementation? for example when i do it it leads me directly to SimplePageAuthorizationStrategy - which will probably get you started - even if you havent looked at the 4 examples i have mentioned. btw. another thing: when the documentation of a project is so bad, at least the javadoc should be accessible: I tried to build mvn site with wicket and got the error that you use a special template or somthing and it does not build, and this template is apparently not in the repository ARRRGGHHH. yes working on that too. maven2 site generation is a pita and eats up a lot of time to get working. sorry, but Wicket experience was far away from beeing pleasent. I am quite willing to check several sources, but this here is really bad. have you gotten the Pro Wicket book? outdated information is not easy to distinguish from actual documentation, the reference to the component doc is nice, but component doc very incomplete and so on... you are more then welcome to help out. Wicket seems to be a quite productive and powerful framework (one of the best I have seen so far, at least so it seems), but getting into it is a damn frustrating experience, I can tell you... you are meant to look at examples first. they cover all the basic usecases. learn-by-example has been our philosophy so far. (I did not even know where to start. happyily there is a maven archetype at the Jetty website which was helpful.) So, sorry for that outburst, but I was so frustrated... no problem -igor best greetings Alex - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Reacting to DateField change
On 8/9/07, Dipu Seminlal [EMAIL PROTECTED] wrote: yes i am almost certain, we need to have the event in the markup. if you add an onchange behaviour then you must add onchange in the markup. no, you do not -igor On 8/9/07, Federico Fanton [EMAIL PROTECTED] wrote: On Thu, 9 Aug 2007 14:10:58 +0100 Dipu Seminlal [EMAIL PROTECTED] wrote: Did you add onchange in the markup as well, you need to add it in the markup as well input wicket:id=yourDate id=yourDate type=text name=yourDate onchange=blah / I'm sorry, do you mean that Wicket replaces the blah on the fly? I thought that behaviors don't need modification to the markup.. Or maybe it's needed just for DateFields? I'll try with your suggestion though, many thanks :) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Reacting to DateField change
i checked and i agree with Igor :) On 8/9/07, Igor Vaynberg [EMAIL PROTECTED] wrote: On 8/9/07, Dipu Seminlal [EMAIL PROTECTED] wrote: yes i am almost certain, we need to have the event in the markup. if you add an onchange behaviour then you must add onchange in the markup. no, you do not -igor On 8/9/07, Federico Fanton [EMAIL PROTECTED] wrote: On Thu, 9 Aug 2007 14:10:58 +0100 Dipu Seminlal [EMAIL PROTECTED] wrote: Did you add onchange in the markup as well, you need to add it in the markup as well input wicket:id=yourDate id=yourDate type=text name=yourDate onchange=blah / I'm sorry, do you mean that Wicket replaces the blah on the fly? I thought that behaviors don't need modification to the markup.. Or maybe it's needed just for DateFields? I'll try with your suggestion though, many thanks :) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Compare JSP Vs Wicket?
Please send me all your suggestions. including the below question In jsp, I can pass the values using query string for eg. form action=actionJSP.jsp?userName=edipassword=edi using request.getParameter(userName); I can get the userName. using request.getParameter(password); I can get the password. In wicket, how can we do that? Look at the examples, read the WIKI, buy a book... I'm sure you can figure it out. Probably in less than an hour. Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Reacting to DateField change
On Thu, 9 Aug 2007 16:43:45 +0100 Dipu Seminlal [EMAIL PROTECTED] wrote: i checked and i agree with Igor :) Ok, thanks anyway :) So.. Markup modification isn't needed, but if I'm not mistaken attaching the behavior directly to the DateField doesn't yield what I'm looking for..? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Reacting to DateField change
On 8/9/07, Federico Fanton [EMAIL PROTECTED] wrote: On Thu, 9 Aug 2007 16:00:24 +0100 Dipu Seminlal [EMAIL PROTECTED] wrote: i just tried with the date picker on 1.2.6 and it works, don't know if anything has changed drastically in 1.3 In 1.3 DatePicker was replaced with DateField, they are completely different components.. I will try with your suggestion ASAP though, thanks again :) DateField is mainly a convenience implementation of a text field + date picker. It is trivial to just use the date picker directly though: myDateTextField.add(new DatePicker()); Regarding receiving those events, this is in 1.3's DatePicker component: /** * Whether to notify the associated component when a date is selected. * Notifying is done by calling the associated component's onchange * Javascript event handler. You can for instance attach an * [EMAIL PROTECTED] AjaxEventBehavior} to that component to get a call back to the * server. The default is true. * * @return if true, notifies the associated component when a date is * selected */ protected boolean notifyComponentOnDateSelected() { return true; } Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Reacting to DateField change
Ok, thanks anyway :) So.. Markup modification isn't needed, but if I'm not mistaken attaching the behavior directly to the DateField doesn't yield what I'm looking for..? Nope. That is because the DateField itself is a panel, while you need to attach it to the text field it embeds. In your case, just do: TextField t = new TextField(... t.add(new DatePicker()); t.add(myAjaxBehavior) Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Authentication in Webapp and Wicket documentation...
Martijn Dashorst wrote: http://cwiki.apache.org/WICKET/framework-documentation.html thank you; but you see, this is again one of the things I mentioned!! when you follow the link (wiki) from the main Wicket page, you come here: http://cwiki.apache.org/WICKET/reference-library.html the link you suggested (thanks for that one) is: - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Authentication in Webapp and Wicket documentation...
Martijn Dashorst wrote: http://cwiki.apache.org/WICKET/framework-documentation.html sorry, I sent the last email to quick, was a Mistake; what I wanted to point out is this: http://cwiki.apache.org/WICKET/framework-documentation.html this is your link, and it apparently has interesting information, whereas when you search (as probably every newbie would) starting from the wicket website, you go to the wiki and reference info, you come to: http://cwiki.apache.org/WICKET/reference-library.html now: this is what I meant before with very confusing documentation: these two pages apparently cover similar topics, but are different in details. then there is the confusing component reference plus the javadoc which is also misleading sometimes (see the authentication stuff with reference to non-existing methods). don't you think this information base should be consolidated? thank you very much Alex - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Authentication in Webapp and Wicket documentation...
so how do you propose we consolidate it? instead of javadoc have links to the wiki? /** * see wicket.apache.org/wiki/authstrat */ public interface IAuthorizationStrategy {...} that would really really suck. -igor On 8/9/07, Alexander Schatten [EMAIL PROTECTED] wrote: Martijn Dashorst wrote: http://cwiki.apache.org/WICKET/framework-documentation.html sorry, I sent the last email to quick, was a Mistake; what I wanted to point out is this: http://cwiki.apache.org/WICKET/framework-documentation.html this is your link, and it apparently has interesting information, whereas when you search (as probably every newbie would) starting from the wicket website, you go to the wiki and reference info, you come to: http://cwiki.apache.org/WICKET/reference-library.html now: this is what I meant before with very confusing documentation: these two pages apparently cover similar topics, but are different in details. then there is the confusing component reference plus the javadoc which is also misleading sometimes (see the authentication stuff with reference to non-existing methods). don't you think this information base should be consolidated? thank you very much Alex - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Authentication in Webapp and Wicket documentation...
I am sorry I do completly understand your last mail. See, you pointed me to the interesting page http://cwiki.apache.org/WICKET/framework-documentation.html (1) now, from the wicket website the reference link (was changed I think?) points to the other page, with the similar information. It might be a first start to figure out (you as experts) which of the two pages is the relevant one and link the right one. (2) plus at the moment, there is still no link at all to the javadoc from the main website: I only found this one by accident. this might be a second very helpful step. (3) a third one would be best-practice guide on the main website listing typical issues like: -- database connection / DAOs -- Ajax -- authentication -- build management (Maven) -- logging ... ... and make references to the existing documentation, examples plus javadoc (4) bring a conclusive list of examples; it seems, that there are several sets of examples distributed on the website, the wiki, the distribution... also confusing. at least a conclusive list with examples and where to find them would be very helpful thank you Alex Igor Vaynberg wrote: so how do you propose we consolidate it? instead of javadoc have links to the wiki? /** * see wicket.apache.org/wiki/authstrat */ public interface IAuthorizationStrategy {...} that would really really suck. -igor On 8/9/07, Alexander Schatten [EMAIL PROTECTED] wrote: Martijn Dashorst wrote: http://cwiki.apache.org/WICKET/framework-documentation.html sorry, I sent the last email to quick, was a Mistake; what I wanted to point out is this: http://cwiki.apache.org/WICKET/framework-documentation.html this is your link, and it apparently has interesting information, whereas when you search (as probably every newbie would) starting from the wicket website, you go to the wiki and reference info, you come to: http://cwiki.apache.org/WICKET/reference-library.html now: this is what I meant before with very confusing documentation: these two pages apparently cover similar topics, but are different in details. then there is the confusing component reference plus the javadoc which is also misleading sometimes (see the authentication stuff with reference to non-existing methods). don't you think this information base should be consolidated? thank you very much Alex - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Authentication in Webapp and Wicket documentation...
honestly spoken, this is not the best strategy for everyone... Obviously. But we have limited resources (no-one is paid for working on Wicket), so it is hard to cater to everyone. We have tried to attract writers (for a reference guide) from the very early start (even offered some money) but it just doesn't seem to be a task many people seem to be interested in doing. moreover, I think you are speaking of examples coming with the download; this dowload was again rather confusing (see my site problem); I am looking first at the exampleson the website, and there I could not find any of the examples you were mentioning. What I don't get - as a regular user of open source software - what is so difficult about just getting it from source control or creating a quick maven based project for that? I typically dive into several projects I didn't know before a month, and I just start with getting it from the repo, looking at the test cases and examples and Javadocs (which unfortunately is something most open source projects do a lot worse at than Wicket). btw. this is I see now one of the real issues with the wicket docs; it seems, that there is actually lot available, but very cluttered, not properly linked and partly redundant in different versions... We really depend on our users helping us out with that (and they have been quite a help already). The framework is in constant development, so this is something that needs constant attention. Help is very welcome. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Authentication in Webapp and Wicket documentation...
No, actually I was not aware of that, was waiting for the Wicket in Action book... http://manning.com/dashorst/ You can get the first chapters now. Two more chapters will be released early next week. maybe one should also start writing some proper articles as a starting point; I might do that when I see clearer. There are quite a few articles you can find if you google for it. Many of them are for 1.2, so a bit stale if you plan to use 1.3 (which we recommend). So keep http://cwiki.apache.org/WICKET/migrate-13.html next to them. It's often more about the idea than that it is important that the examples are still completely recent. Eelco Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DateTimeField w/ a CompoundPopertyModel
Hi all, I am trying to use the DateTimeField from the org.apache.wicket.extensions.yui.calendar package, and i have run into a snafu that I can't figure out. When I submit the form, my feedback panel reacts as if I had not filled it in when I have. I can't figure out why this happens. Here is what my code looks like: // package and import statments... public class MyPage extends BasePage { // some fields public MyPage() { super(); MyModelObj pojo = new MyModelObj(); CompoundPropertyModel model = new CompoundPropertyModel(pojo); Form regForm = new RegisterForm(registerForm, model); FeedbackPanel feedback = new FeedbackPanel(feedback); TextField name = new TextField(name); name.setRequired(true); DateTimeField startTime = new DateTimeField(startTime); startTime.setRequired(true); regForm.add(name); regForm.add(startTime); add(regForm); add(feedback); } class RegisterForm extends Form { private static final long serialVersionUID = 1L; public ExperimentRegisterForm(String id, CompoundPropertyModel model) { super(id, model); } @Override protected void onSubmit() { RecruitSession session = getRecruitSession(); Experimenter experimenter = (Experimenter) session.getUser(); MyModelObj pojo = (MyModelObj) session.getPojo(); Experiment experiment = (Experiment) getModelObject(); experiment.setExperimenter(experimenter); experiment.setValid(true); experimenter.addExperiment(experiment); /** * make a detachable model so that the user can use the back * button without losing everything in the form. */ expModel = new DetachableExperimentModel(experiment, experimentDAO); log.info(Attempting to persist newly created experiment: + experiment); experimentDAO.persistExperiment(experiment); setResponsePage(new ExperimenterHome()); } } }
I Need SubmitLink Help
Hello all, first time post. I used Wicket 0.9 for a large project awhile back. We have continued to upgrade Wicket with every new release, and we currently sit at 1.2.6. I haven't done much maintenance on my project because every Wicket upgrade has been smooth. One feature Wicket didn't have back then was a SubmitLink, so I built my own. Now with Wicket 1.2.6, my SubmitLink doesn't work but Wicket's SubmitLink works. Let me explain; I have a dynamic page which contains a form which may contain listviews with listviews with listviews (up to 3 deep). Users can add and delete listviews at any depth and modify data in the listviews. The add and delete links in each listview are SubmitLinks so data isn't lost when the page reloads. Here is the problem; Say I have listviews 1, 2 and 3. When I delete listview 1 with my SubmitLink and the page returns, listview 1 and 2 are still present, listview 3 is gone. The database says listview 1 is deleted. If I leave the page and come back (the model is reloaded), listview 1 is deleted and listview 2 and 3 are displayed. When I delete listview 1 with Wicket's SubmitLink and the page returns, listview 1 is gone and listview 2 and 3 are present. So, to test I coppied the source of Wicket's SubmitLink into my own SubmitLink class and tried it out. The same problem explained above occurs, even though the onclick output of my SubmitLink is exactly the same as the onclick output of Wicket's submit link (the rest of the html is exactly the same too). Strange. I would use Wicket's SubmitLink, except I need a confirmation dialog to popup to confirm a user's delete request. So, does anyone know how to easily modify Wicket's SubmitLink javascript so I can have my confirmation dialog? I could override getOnClickScript() and pass in a bunch of javascript, but I would rather somehow grab the onclick javascript from SubmitLink and append the confirm. Or..., any other ideas? Thanks for any help, Darren H. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DateTimeField w/ a CompoundPopertyModel
Sorry, I accidently pressed send somehow before I finished writing down the relevant code. Here is what I meant to write: // package and import statments... public class MyPage extends BasePage { // some fields public MyPage() { super(); MyModelObj pojo = new MyModelObj(); CompoundPropertyModel model = new CompoundPropertyModel(pojo); Form regForm = new RegisterForm(registerForm, model); FeedbackPanel feedback = new FeedbackPanel(feedback); TextField name = new TextField(name); name.setRequired(true); DateTimeField startTime = new DateTimeField(startTime); startTime.setRequired(true); regForm.add(name); regForm.add(startTime); add(regForm); add(feedback); } class RegisterForm extends Form { private static final long serialVersionUID = 1L; public ExperimentRegisterForm(String id, CompoundPropertyModel model) { super(id, model); } @Override protected void onSubmit() { RecruitSession session = getRecruitSession(); MyModelObj pojo = (MyModelObj) getModelObject(); //Then persist the pojo object with a hibernate DAO etc etc... } } } Here is the model object code: public class MyModelObj implements Serializable { private String name; private Date startTime; public Experiment() { } //The getters and setters } And then last but not least the html: wicket:extend span wicket:id=feedback Feedback messages go here /span form class=RegisterForm wicket:id=registerForm action= fieldsetlegendRegistration/legend ol liName input wicket:id=name //li liStart Time span wicket:id=startTime//li /ol input type=submit value=Register //fieldset /form /wicket:extend So why doesn't the datetimefield bind to the Date obj in MyModelObj? Why does the feedback panel tell me it was never filled in? Thanks for any help you can give. -Alex Pine [EMAIL PROTECTED] On 8/9/07, Alex Pine [EMAIL PROTECTED] wrote: Hi all, I am trying to use the DateTimeField from the org.apache.wicket.extensions.yui.calendar package, and i have run into a snafu that I can't figure out. When I submit the form, my feedback panel reacts as if I had not filled it in when I have. I can't figure out why this happens. Here is what my code looks like: // package and import statments... public class MyPage extends BasePage { // some fields public MyPage() { super(); MyModelObj pojo = new MyModelObj(); CompoundPropertyModel model = new CompoundPropertyModel(pojo); Form regForm = new RegisterForm(registerForm, model); FeedbackPanel feedback = new FeedbackPanel(feedback); TextField name = new TextField(name); name.setRequired(true); DateTimeField startTime = new DateTimeField(startTime); startTime.setRequired(true); regForm.add(name); regForm.add(startTime); add(regForm); add(feedback); } class RegisterForm extends Form { private static final long serialVersionUID = 1L; public ExperimentRegisterForm(String id, CompoundPropertyModel model) { super(id, model); } @Override protected void onSubmit() { RecruitSession session = getRecruitSession(); Experimenter experimenter = (Experimenter) session.getUser(); MyModelObj pojo = (MyModelObj) session.getPojo(); Experiment experiment = (Experiment) getModelObject(); experiment.setExperimenter(experimenter); experiment.setValid (true); experimenter.addExperiment(experiment); /** * make a detachable model so that the user can use the back * button without losing everything in the form. */ expModel = new DetachableExperimentModel(experiment, experimentDAO); log.info(Attempting to persist newly created experiment: + experiment); experimentDAO.persistExperiment(experiment); setResponsePage(new ExperimenterHome()); } } }
Re: I Need SubmitLink Help
this is for 1.3, but it might work for 1.2.x also package com.tbs.webapp.util; import org.apache.wicket.Component; import org.apache.wicket.behavior.AbstractBehavior; import org.apache.wicket.markup.ComponentTag; import org.apache.wicket.model.IComponentAssignedModel; import org.apache.wicket.model.IModel; import org.apache.wicket.model.Model; public class LinkConfirmation extends AbstractBehavior { private final IModel msg; public LinkConfirmation(String msg) { this(new Model(msg)); } public LinkConfirmation(IModel msg) { this.msg = msg; } @Override public void onComponentTag(Component component, ComponentTag tag) { super.onComponentTag(component, tag); String onclick = tag.getAttributes().getString(onclick); IModel model = msg; if (model instanceof IComponentAssignedModel) { model = ((IComponentAssignedModel) model).wrapOnAssignment(component); } onclick = if (!confirm(' + model.getObject().toString() + ')) return false; + onclick; tag.getAttributes().put(onclick, onclick); model.detach(); msg.detach(); } } -igor On 8/9/07, Darren Houston [EMAIL PROTECTED] wrote: Hello all, first time post. I used Wicket 0.9 for a large project awhile back. We have continued to upgrade Wicket with every new release, and we currently sit at 1.2.6. I haven't done much maintenance on my project because every Wicket upgrade has been smooth. One feature Wicket didn't have back then was a SubmitLink, so I built my own. Now with Wicket 1.2.6, my SubmitLink doesn't work but Wicket's SubmitLink works. Let me explain; I have a dynamic page which contains a form which may contain listviews with listviews with listviews (up to 3 deep). Users can add and delete listviews at any depth and modify data in the listviews. The add and delete links in each listview are SubmitLinks so data isn't lost when the page reloads. Here is the problem; Say I have listviews 1, 2 and 3. When I delete listview 1 with my SubmitLink and the page returns, listview 1 and 2 are still present, listview 3 is gone. The database says listview 1 is deleted. If I leave the page and come back (the model is reloaded), listview 1 is deleted and listview 2 and 3 are displayed. When I delete listview 1 with Wicket's SubmitLink and the page returns, listview 1 is gone and listview 2 and 3 are present. So, to test I coppied the source of Wicket's SubmitLink into my own SubmitLink class and tried it out. The same problem explained above occurs, even though the onclick output of my SubmitLink is exactly the same as the onclick output of Wicket's submit link (the rest of the html is exactly the same too). Strange. I would use Wicket's SubmitLink, except I need a confirmation dialog to popup to confirm a user's delete request. So, does anyone know how to easily modify Wicket's SubmitLink javascript so I can have my confirmation dialog? I could override getOnClickScript() and pass in a bunch of javascript, but I would rather somehow grab the onclick javascript from SubmitLink and append the confirm. Or..., any other ideas? Thanks for any help, Darren H. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]