Re: [Wicket-user] AjaxFormComponentUpdatingBehavior w / RadioChoice
https://issues.apache.org/jira/browse/WICKET-470 And already an implementation attached that works. just need to test that for multiply situations johan On 4/24/07, Eelco Hillenius [EMAIL PROTECTED] wrote: That's a good point. How about opening a feature request for this (though no promise we can fix it, but it's good to think about it). Eelco On 4/13/07, Carlos Pita [EMAIL PROTECTED] wrote: Hi all, how do you catch events triggered by radio choice changes? If you simply add the ajaxformcomponentupdatingbehavior to the radiochoice, the span which is wrapping the radios is instrumented instead of the radios themselves: span id=sex24 event=var wcall=wicketAjaxPost('registration?wicket:interface=:0:registrationForm:sex::IBehaviorListener:0', wicketSerialize(document.getElementById('sex24')), function() { }, function() { }); wicket:id=sex input name=sex type=radio value=0 id=sex_0/ input name=sex type=radio value=1 id=sex_1/ /span Cheers, Carlos - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Help: Creating a Apache-licensed Wysiwyg-Textarea for Wicket
And I also admit that I don't have the same patience as yours, providing code snippets all the time, answering to every question with such accuracy :-) Congratulations, Igor! +1 Igor for president! - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] Replace non-wicket attributed sections of a html document
Hi, I'm currently writing a CMS in wicket. One of the things I'm wanting to do is make it nice and flexible to be able to design new templates for rendering the page. I'm looking at producing an image gallery at the moment. For the moment I'm using dummy.jpg or something similar in the html files, which is fine. image1 would then be replaced by a Static Image of something like /images/gallery/realImage1.jpg or whatever.. The problem is, I'm wanting to be able to make it as flexible as possible for the designers to be able to use what they want re javascript and markup to get the page how they want it. So for example, instead of referencing /images/gallery/realImage1.jpg via the wicket:id of an img tag, the value may want to be put into other parts of the html markup: e.g. # or or anything else really! So is there anyway this could be done? Maybe there is a way to process the HTML and replace data, so for exmaple I could have something like: $image1$ # and replace $image1$ with '/images/gallery/realImage1.jpg' while rendering the page. Anyone any suggestions? Thanks Andrew -- View this message in context: http://www.nabble.com/Replace-non-wicket-attributed-sections-of-a-html-document-tf3636913.html#a10155863 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Which toolkit to use?
Peter, Thank you for sharing your experience with me. I'm beginning to come to the same conclusions, so it's nice to hear the experiences of others. I've looked a little bit into mootools, yui, scriptaculous, and dojo. mootools: unless I'm blind, I can't find any docs. Since I'm not a js guru, I need docs or else I'm pretty useless. scriptaculous: seems to be not so bad. dojo: seems ok to develop with, but the demos don't perform very well. yui: by far the most documentation of all of these, including interactive demos. I think I'm going to give this a shot. Cheers, David On Tue, 2007-04-24 at 11:18 +0530, Peter Thomas wrote: Hi, I had recently tried to decide upon a toolkit to use, and chose Yahoo UI. It is very touch to choose nowadays and I did not do a thorough evaluation but what leaned me towards Yahoo UI is that it appears to have the best documentation. It is modular as well - so the footprint is reasonable. So far my experience has been good. I am already using the calendar (my own instead of using wicket-datetime - Wicket makes rolling your own really easy :), and a non-modal resizable dialog which looks nice. I also plan to use the menu component soon. By the way the wicket-stuff minis project (which is what I think Eelco means by the misc components project) does not allow anonymous browsing, is this intentional? I have submitted a draft of the dialog component in there, you may take a look at that. http://www.wicketstuff.org/jira/browse/WSMINIS Thanks, Peter. On 4/24/07, Eelco Hillenius [EMAIL PROTECTED] wrote: How about that misc components project Igor just started? Eelco On 4/23/07, David Leangen [EMAIL PROTECTED] wrote: Awesome! Thank you for this superbly detailed reply! Mind if I pick your brain some more? For choosing a library it is a matter of taste and priorities. If you want an actively maintained wicket project, then dojo should be your cup of tea, if you want stability, probably prototype + some other library would be a better choice. If you want small footprint, then consider adopting mootools. If you want a huge company backing, YUI would be a good library, with extjs as a nice extra. I think that given the project requirements, a small footprint needs to be a priority. I'm only going to need a small number of widgets anyway. To that end, your suggestion of mootools sounds enticing. However, I noticed that it does not seem to be supported in wicket-stuff... Is it difficult to add support for the widgets I need? Is there any doc about how to do this somewhere? (I wasn't able to find any...) Would it be useful to start a new mootols wicket-stuff project? Thanks! David - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No
Re: [Wicket-user] Replace non-wicket attributed sections of a html document
Hi Andrew, Your use-case is exactly what Wicket is about. In the template file, use wicket:id attributes on the img tag. Place these tags in some kind of container (span or div element) to be able to repeat it. In the code you can attach an instance of Image (or variations, see javadoc). Use a ListView or Repeater to repeat the images. You can find more information in the javadocs and on the Wiki. In particular http://cwiki.apache.org/WICKET/newuserguide.html, http://cwiki.apache.org/WICKET/listview-and-other-repeaters.html and http://cwiki.apache.org/WICKET/how-to-load-an-external-image.html. Regards, Erik Andrew Moore wrote: Hi, I'm currently writing a CMS in wicket. One of the things I'm wanting to do is make it nice and flexible to be able to design new templates for rendering the page. I'm looking at producing an image gallery at the moment. For the moment I'm using dummy.jpg or something similar in the html files, which is fine. image1 would then be replaced by a Static Image of something like /images/gallery/realImage1.jpg or whatever.. The problem is, I'm wanting to be able to make it as flexible as possible for the designers to be able to use what they want re javascript and markup to get the page how they want it. So for example, instead of referencing /images/gallery/realImage1.jpg via the wicket:id of an img tag, the value may want to be put into other parts of the html markup: e.g. # or or anything else really! So is there anyway this could be done? Maybe there is a way to process the HTML and replace data, so for exmaple I could have something like: $image1$ # and replace $image1$ with '/images/gallery/realImage1.jpg' while rendering the page. Anyone any suggestions? Thanks Andrew -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Replace non-wicket attributed sections of a html document
Hi, Thanks for your reply. I'm familiar with wicket (reasonably anyway), that may not have been clear from the post. The admin of the CMS system is all using wicket, and I'm fairly happy with that. The situation is where the CMS content template pages are unknown in structure, but I just want to be able to insert a marker into the page to replace certain values (as I'm not sure which component the references may be in - ie in the src attribute of an img tag, or in a parameter passed to some javascript etc), so I can't map wicket components to the dynamic content. I've noticed the wicket velocity and wicket freemarker contrib projects, would these accomplish what I want? I still want to have the functionality of wicket (which is great), but just want to be able to do effectivley some global replaces on the generated html markup to replace some markers with actual values. Hope that makes it a little clearer. Cheers Andrew Erik van Oosten wrote: Hi Andrew, Your use-case is exactly what Wicket is about. In the template file, use wicket:id attributes on the img tag. Place these tags in some kind of container (span or div element) to be able to repeat it. In the code you can attach an instance of Image (or variations, see javadoc). Use a ListView or Repeater to repeat the images. You can find more information in the javadocs and on the Wiki. In particular http://cwiki.apache.org/WICKET/newuserguide.html, http://cwiki.apache.org/WICKET/listview-and-other-repeaters.html and http://cwiki.apache.org/WICKET/how-to-load-an-external-image.html. Regards, Erik Andrew Moore wrote: Hi, I'm currently writing a CMS in wicket. One of the things I'm wanting to do is make it nice and flexible to be able to design new templates for rendering the page. I'm looking at producing an image gallery at the moment. For the moment I'm using dummy.jpg or something similar in the html files, which is fine. image1 would then be replaced by a Static Image of something like /images/gallery/realImage1.jpg or whatever.. The problem is, I'm wanting to be able to make it as flexible as possible for the designers to be able to use what they want re javascript and markup to get the page how they want it. So for example, instead of referencing /images/gallery/realImage1.jpg via the wicket:id of an img tag, the value may want to be put into other parts of the html markup: e.g. # or or anything else really! So is there anyway this could be done? Maybe there is a way to process the HTML and replace data, so for exmaple I could have something like: $image1$ # and replace $image1$ with '/images/gallery/realImage1.jpg' while rendering the page. Anyone any suggestions? Thanks Andrew -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- View this message in context: http://www.nabble.com/Replace-non-wicket-attributed-sections-of-a-html-document-tf3636913.html#a10157408 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] General question on DetachableModel, edit form for based on set and components
Hello everybody, I'm quite new to Wicket, and to web component framework to. Until now I just try simple examples, which seem to work (really) fine. So now, I want to pass to a little more complexe one, to try to understand how things work in Wicket (version 1.3). I work on LDAP directories, so I play with *entries*, identified by there dn. Each entry has a Set of *attributes*. Attributes are linked to an unique entry, are identified by there name, and have a Set of *values*. A spring managed DAO allows to do CRUD actions on entries. A summary of these object is given at the end of the email. I think I understand that I have to take care that objects are detachable. I succeed in using spring annotation to use a spring proxy to connect to my DAO and retrieve an entry and write his it on screen. Now, I want to see how powerful is wicket, and for that I want to translate this algo to edit an entry * given an entry { print the dn ; for each attribute { select an input method base on the name of the attribute; for each value { add an edit box according to the input method; } } } (I think that the printing of an entry would work on the same model, say : * given an entry { print the dn ; for each attribute { select a formatting method; for each value { print the value formatted according to the selected method; } } } ) If I well understand how works wicket, I need to define a detachable model for the entry object, and a detachable model for each type of attribute. Then, I have to play with repeaters at attribute and value level. Or perhaps I need to define a component for each attribute ? Well, as you see, I don't know where to begin. I look carefully in examples and wiki, but I don't really find how to put concept together. Could you, please, point me some entries or give me some advice in the main line of what I have to do to implement my algo ? Any help would be welcome, Francois - PS : to detail a little bit mare, I have these objects (and I have to deals with them, I cannot change them because I relay upon a framework): SpringEntryDao { Entry get(String dn); ... } Entry { String dn: SetAttribute attributes; Attribute getAttribute(String name) void setAttribute(Attribute attribute) ... } Attribute { String name; SetValue values; Value getValue(); //return next value if one remain, null otherwise SetValue getValues(); //return a set of all value ... } Value { Object value; Object getValue(); ... } - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Update to Using frames page on Wiki
updated On 4/24/07, JulianS [EMAIL PROTECTED] wrote: Update to Using frames on the Wicket Wiki: http://cwiki.apache.org/WICKET/using-frames.html I'm using 1.2.5 and I've found the syntax has changed slightly. Instead of: FRAME src=myapp?pagemap=leftframebookmarkablePage= mypackage.MyNavigationPage The syntax that works is: FRAME src=/myapp?wicket:bookmarkablePage=leftframe: mypackage.MyNavigationPage If this is correct (I'm pretty sure is is, since it works for me), can someone update the wiki page? Julian -- View this message in context: Update to Using frames page on Wikihttp://www.nabble.com/Update-to-%22Using-frames%22-page-on-Wiki-tf3635164.html#a10150716 Sent from the Wicket - User mailing list archivehttp://www.nabble.com/Wicket---User-f13976.htmlat Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Replace non-wicket attributed sections of a html document
Hi Andrew, I see. Yes that makes it quite different. I am not knowledgeable enough on dynamic templates. So other could help you better. There are a few other attempt to write Wicket components for a CMS. Perhaps you can learn from those. http://burgerweeshuis.sourceforge.net/ http://wicket-stuff.svn.sourceforge.net/viewvc/wicket-stuff/branches/WICKET_1_2/wicket-kronos-cms/ Regards, Erik. Andrew Moore wrote: Hi, Thanks for your reply. I'm familiar with wicket (reasonably anyway), that may not have been clear from the post. The admin of the CMS system is all using wicket, and I'm fairly happy with that. The situation is where the CMS content template pages are unknown in structure, but I just want to be able to insert a marker into the page to replace certain values (as I'm not sure which component the references may be in - ie in the src attribute of an img tag, or in a parameter passed to some javascript etc), so I can't map wicket components to the dynamic content. I've noticed the wicket velocity and wicket freemarker contrib projects, would these accomplish what I want? I still want to have the functionality of wicket (which is great), but just want to be able to do effectivley some global replaces on the generated html markup to replace some markers with actual values. Hope that makes it a little clearer. Cheers Andrew Erik van Oosten wrote: Hi Andrew, Your use-case is exactly what Wicket is about. In the template file, use wicket:id attributes on the img tag. Place these tags in some kind of container (span or div element) to be able to repeat it. In the code you can attach an instance of Image (or variations, see javadoc). Use a ListView or Repeater to repeat the images. You can find more information in the javadocs and on the Wiki. In particular http://cwiki.apache.org/WICKET/newuserguide.html, http://cwiki.apache.org/WICKET/listview-and-other-repeaters.html and http://cwiki.apache.org/WICKET/how-to-load-an-external-image.html. Regards, Erik Andrew Moore wrote: Hi, I'm currently writing a CMS in wicket. One of the things I'm wanting to do is make it nice and flexible to be able to design new templates for rendering the page. I'm looking at producing an image gallery at the moment. For the moment I'm using dummy.jpg or something similar in the html files, which is fine. image1 would then be replaced by a Static Image of something like /images/gallery/realImage1.jpg or whatever.. The problem is, I'm wanting to be able to make it as flexible as possible for the designers to be able to use what they want re javascript and markup to get the page how they want it. So for example, instead of referencing /images/gallery/realImage1.jpg via the wicket:id of an img tag, the value may want to be put into other parts of the html markup: e.g. # or or anything else really! So is there anyway this could be done? Maybe there is a way to process the HTML and replace data, so for exmaple I could have something like: $image1$ # and replace $image1$ with '/images/gallery/realImage1.jpg' while rendering the page. Anyone any suggestions? Thanks Andrew -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] why AbstractRestartResponseException is abstract?
I want to start responce step immediately and I have to use the following strange code: throw new AbstractRestartResponseException() { }; Why is this class abstract? -- Andrew Klochkov - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] why AbstractRestartResponseException is abstract?
Because the exception is meant to be abstract. Use RestartResponseException instead. The generated javadoc [1] clearly tells the direct subclasses, and your IDE should also be able to tell which are the subclasses (Eclipse: press f4 on the AbstractRestartResponseException). Martijn [1] http://wicketframework.org/apidocs/wicket/AbstractRestartResponseException.html On 4/24/07, Andrew Klochkov [EMAIL PROTECTED] wrote: I want to start responce step immediately and I have to use the following strange code: throw new AbstractRestartResponseException() { }; Why is this class abstract? -- Andrew Klochkov - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- Learn Wicket at ApacheCon Europe: http://apachecon.com Join the wicket community at irc.freenode.net: ##wicket Wicket 1.2.6 contains a very important fix. Download Wicket now! http://wicketframework.org - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] Getting error java.lang.ClassCastException: wicket.util.tester.WicketTester
Providing the source class and its corresponding Test class package com.bsideinc.bsidecom.wicket.pages.sections; import com.bsideinc.bsidecom.wicket.pages.DefaultBsidePage; /** * User: gutter * Date: Feb 8, 2007 * Time: 1:38:03 PM */ public class DefaultHomePage extends DefaultBsidePage { public static final String HOME = home; public String getSection() { return HOME; } public String getTitle() { return B-Side Home; } } Test Class package com.bsideinc.bsidecom.wicket.pages.sections; import wicket.util.tester.WicketTester; import junit.framework.TestCase; public class TestDefaultHomePage extends TestCase{ //private DefaultHomePage testDeafDefaultHomePage = new DefaultHomePage(); private WicketTester tester; public TestDefaultHomePage(){ super (Test DefaultHomePage class); } protected void setUp(){ tester = new WicketTester(); } public void testgetTitle(){ tester.startPage(DefaultHomePage.class); tester.assertRenderedPage(DefaultHomePage.class); //tester.assertNoErrorMessage(); //System.out.println( + testDeafDefaultHomePage.getTitle() ); } } -- View this message in context: http://www.nabble.com/Getting-error-java.lang.ClassCastException%3A-wicket.util.tester.WicketTester-tf3638328.html#a10159802 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] onGoingBack2Page(+innerForm) = innerForm.fields = empty!?
Dear Sirs, The scenario is the following: - Page1 Form1 (innerClass) input1(String)... inputN(String) - Page2 Link/Button (whatever for going back to Page1 - has a reference object of Page1) ... - PageN Link/Button (idem) It happens that, when flowing-back from Page2, or... PageN, to Page1, then Page1 displays but with all innerClass-Form1 fields empty! The state of other things in Page1 keep there, but all the state of fields in Form1 has desappeared. What's wrong here, any idea? Regards. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] Difficulty with TextFields in ListView
This example renders correctly, but every time I edit one of the values and hit the submit button, the TextFields are reverting to their initial value. The desired behavior is that the 'strings' list will be updated with whatever I enter into the text fields. What am I doing wrong? I am using Wicket 1.2.5. --- ListViewForm.java --- package com.prosc.test; import wicket.markup.html.WebPage; import wicket.markup.html.form.TextField; import wicket.markup.html.form.Form; import wicket.markup.html.list.ListView; import wicket.markup.html.list.ListItem; import wicket.model.Model; import java.util.List; import java.util.LinkedList; import java.util.Arrays; public class ListViewForm extends WebPage { String[] names = {Jesse, Lisa, Sam}; List strings = new LinkedList( Arrays.asList(names) ); public ListViewForm() { Form form = new Form( form ); form.add( new ListView(names, strings) { protected void populateItem( final ListItem item ) { String eachName = item.getModelObjectAsString(); item.add( new TextField(eachName, new Model(eachName) ) ); } } ); add( form ); } } --- ListViewForm.html --- html body form action=# wicket:id=form ul li wicket:id=names input type=text value=Name goes here wicket:id=eachName / /li /ul input type=submit / /form /body /html --Jesse Barnum, President, 360Works http://www.360works.com (770) 234-9293 - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Difficulty with TextFields in ListView
Sorry to make a short note: http://cwiki.apache.org/WICKET/listview-and-other-repeaters.html Basically you need to setReuseItems(true) or use a repeater. Martijn On 4/24/07, Jesse Barnum [EMAIL PROTECTED] wrote: This example renders correctly, but every time I edit one of the values and hit the submit button, the TextFields are reverting to their initial value. The desired behavior is that the 'strings' list will be updated with whatever I enter into the text fields. What am I doing wrong? I am using Wicket 1.2.5. --- ListViewForm.java --- package com.prosc.test; import wicket.markup.html.WebPage; import wicket.markup.html.form.TextField; import wicket.markup.html.form.Form; import wicket.markup.html.list.ListView; import wicket.markup.html.list.ListItem; import wicket.model.Model; import java.util.List; import java.util.LinkedList; import java.util.Arrays; public class ListViewForm extends WebPage { String[] names = {Jesse, Lisa, Sam}; List strings = new LinkedList( Arrays.asList(names) ); public ListViewForm() { Form form = new Form( form ); form.add( new ListView(names, strings) { protected void populateItem( final ListItem item ) { String eachName = item.getModelObjectAsString(); item.add( new TextField(eachName, new Model(eachName) ) ); } } ); add( form ); } } --- ListViewForm.html --- html body form action=# wicket:id=form ul li wicket:id=names input type=text value=Name goes here wicket:id=eachName / /li /ul input type=submit / /form /body /html --Jesse Barnum, President, 360Works http://www.360works.com (770) 234-9293 - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- Learn Wicket at ApacheCon Europe: http://apachecon.com Join the wicket community at irc.freenode.net: ##wicket Wicket 1.2.6 contains a very important fix. Download Wicket now! http://wicketframework.org - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Wicket 1.2.6 has been released
I'm now using Wicket 1.3 but, still, thanks for this release, especially this part : this interim release is provided outside of the ASF, solely as a service to existing Wicket users to resolve existing bugs in the Wicket product. It really shows how great a team you're ! Keep up the good work ! Joseph, aka ZedroS - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] stateless and/ or bookmarkable pages in Wicket 1.3
Thanks for your answers. I've read that one can override the method getStatelessHint() as following : protected boolean getStatelessHint() { return true; } to have a stateless form/component. However, in the SignInForm provided in the example, it's explicitly written: public final class SignInForm extends Form { protected boolean getStatelessHint() { return false; } How comes? This form has two textfields and the remember me option. Is this remember me option blocking the stateless aspect of the form? Thanks in advance ZedroS - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Difficulty with TextFields in ListView
Thanks, that's what I needed. --Jesse Barnum, President, 360Works http://www.360works.com (770) 234-9293 On Apr 24, 2007, at 8:53 AM, Martijn Dashorst wrote: Sorry to make a short note: http://cwiki.apache.org/WICKET/listview-and-other-repeaters.html Basically you need to setReuseItems(true) or use a repeater. Martijn On 4/24/07, Jesse Barnum [EMAIL PROTECTED] wrote: This example renders correctly, but every time I edit one of the values and hit the submit button, the TextFields are reverting to their initial value. The desired behavior is that the 'strings' list will be updated with whatever I enter into the text fields. What am I doing wrong? I am using Wicket 1.2.5. --- ListViewForm.java --- package com.prosc.test; import wicket.markup.html.WebPage; import wicket.markup.html.form.TextField; import wicket.markup.html.form.Form; import wicket.markup.html.list.ListView; import wicket.markup.html.list.ListItem; import wicket.model.Model; import java.util.List; import java.util.LinkedList; import java.util.Arrays; public class ListViewForm extends WebPage { String[] names = {Jesse, Lisa, Sam}; List strings = new LinkedList( Arrays.asList(names) ); public ListViewForm() { Form form = new Form( form ); form.add( new ListView(names, strings) { protected void populateItem( final ListItem item ) { String eachName = item.getModelObjectAsString(); item.add( new TextField (eachName, new Model(eachName) ) ); } } ); add( form ); } } --- ListViewForm.html --- html body form action=# wicket:id=form ul li wicket:id=names input type=text value=Name goes here wicket:id=eachName / /li /ul input type=submit / /form /body /html --Jesse Barnum, President, 360Works http://www.360works.com (770) 234-9293 - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- Learn Wicket at ApacheCon Europe: http://apachecon.com Join the wicket community at irc.freenode.net: ##wicket Wicket 1.2.6 contains a very important fix. Download Wicket now! http://wicketframework.org -- --- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] RadioGroup, not only the radios inside
Hello, I tried to search through the forum, but I couldnt find answer, I hope it is easy. Consider html page where is a filtering form with this possibilities: input type=radio / No filter input type=radio / FiltrSpecific : input type=text / input type=radio / Filtr all In java code, I am only adding the radio id's in to the radioGroup , not the textfield(s)(they are added to the form component) But wicket gives me the exception the I didnt add the the textfield or my hierarchy doesn't match(I guess the hierarchy doesnt match). SO what can I do? I cannot put the textfield after the radio's buttons becouse , I have more than one textfields related to the radios Thanks. -- View this message in context: http://www.nabble.com/RadioGroup%2C-not-only-the-radios-inside-tf3638812.html#a10161427 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] NPE rendering ListView Item in 1.3
Thanks... Where is the best place to keep up to date on the snapshots? Are you versioning them yet and is there a current recommended snapshot or should we plan to keep up to date with the latest? Jamie igor.vaynberg wrote: first start off by showing your code. second, update to the latest 1.3snapshot. in my code listview.java doesnt have line 709. -igor On 4/23/07, jamieballing [EMAIL PROTECTED] wrote: We are trying to migrate to 1.3 and have encountered an issue. We aren't sure if this is related to the way we are using it or if there might be a bug. We are getting a NPE which bubbles up into a message that wicket can't render a component. The stack trace is: Caused by: java.lang.NullPointerException at wicket.markup.html.list.ListView.renderItem(ListView.java:709) at wicket.markup.html.list.ListView.onRender(ListView.java:670) at wicket.Component.render(Component.java:1495) at wicket.MarkupContainer.renderNext(MarkupContainer.java:1159) at wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1329) at wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1264) at wicket.Component.renderComponent(Component.java:1670) One thing of note is that the component ID which wicket is ultimately complaining about doesn't exist anywhere in the application... there is no feedbackul, but is a feedback. I know there are some suffixes that get added now, but I thought these should be numeric. Here is the message: wicket.WicketRuntimeException: Exception in rendering component: [MarkupContainer [Component id = feedbackul, page = test.page.search.SearchResultsPage, path = 6:lpContent:uploadPanel:documentManagementModal:content:panel:for m:urlArea:urlBorder:feedbackIndicator:feedback:feedbackul.FeedbackPanel$2, isVisible = true, isVersioned = false]] Do you have any thoughts or direction on how we should resolve this? We are trying to determine if we should proceed with 1.3 for our app or stick with 1.2. Many thanks, Jamie -- View this message in context: http://www.nabble.com/NPE-rendering-ListView-Item-in-1.3-tf3635715.html#a10152492 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- View this message in context: http://www.nabble.com/NPE-rendering-ListView-Item-in-1.3-tf3635715.html#a10161932 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Replace non-wicket attributed sections of a html document
Hi, Thanks for your reply. I'm familiar with wicket (reasonably anyway), that may not have been clear from the post. The admin of the CMS system is all using wicket, and I'm fairly happy with that. The situation is where the CMS content template pages are unknown in structure, but I just want to be able to insert a marker into the page to replace certain values (as I'm not sure which component the references may be in - ie in the src attribute of an img tag, or in a parameter passed to some javascript etc), so I can't map wicket components to the dynamic content. I've noticed the wicket velocity and wicket freemarker contrib projects, would these accomplish what I want? Yep, I think that's the way to go. Or something similar. You basically expose limited funcionality (e.g. via Velocity tools) and let the users decide what they want to do with it. Eelco - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] Updating items of a Set...
Hi all As I'm new to wicket, I often wonder (especially when I encounter hurdles ;)) if the approach I take is the good one. So, if you don't mind, I will quickly introduce what I try to do, then present the solution I've retained up to now and, finally, the current hurdle ;). Feel free to comment on any of these points! So, the need is basically to browse a set to be able to increase/decrease the value of each element. So, for each element, it should look like this: ElementName ElementValue + - + and – are links that the user can click on. Then I would like a submit button under this to be able to submit the whole stuff. As I'm Ajax curious, I would like the action on the + or – to be done through Ajax. Currently, I'm using a RefreshingView with, for each element of the Set, some Labels (elementName, elementValue) and an action panel with two AjaxLink, one for plus and one for minus. Up to now, I manage to retrieve on which AjaxLink the user has clicked, but I don't manage to refresh the RefreshingView afterwards. I've two issues : how to tell the View to refresh and how to deal with the model, since I want to update it but not to save it to the database…NB : I give to the Panel containing the RefreshingView the model object containing the set. Do you have any comment/question/clue ? Thanks in advance Joseph, aka ZedroS - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Replace non-wicket attributed sections of a html document
I've had a go with the freemarker panel, and can get a simple example going. The thing is, instead of having a panel with a span tag, I'd like to actually parse the whole .html template file that gets generated by wicket. Does anyone know if it's possible to do that? Is there a way of getting at the whole markup response that's been generated and modifying it before it's rendered? Eelco Hillenius wrote: Hi, Thanks for your reply. I'm familiar with wicket (reasonably anyway), that may not have been clear from the post. The admin of the CMS system is all using wicket, and I'm fairly happy with that. The situation is where the CMS content template pages are unknown in structure, but I just want to be able to insert a marker into the page to replace certain values (as I'm not sure which component the references may be in - ie in the src attribute of an img tag, or in a parameter passed to some javascript etc), so I can't map wicket components to the dynamic content. I've noticed the wicket velocity and wicket freemarker contrib projects, would these accomplish what I want? Yep, I think that's the way to go. Or something similar. You basically expose limited funcionality (e.g. via Velocity tools) and let the users decide what they want to do with it. Eelco - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- View this message in context: http://www.nabble.com/Replace-non-wicket-attributed-sections-of-a-html-document-tf3636913.html#a10162589 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] General question on DetachableModel, edit form for based on set and components
On 4/24/07, Francois Armand [EMAIL PROTECTED] wrote:i only have time to help you with one, so here goes (I think that the printing of an entry would work on the same model, say : * given an entry { print the dn ; for each attribute { select a formatting method; for each value { print the value formatted according to the selected method; } } } ) first you only need a top level detachable model class DetachableEntryModel extends LoadableDetachableModel { private final String dn; private final SpringEntryDao dao; public DetacahbleEntryModel(Entry e, SpringEntryDao dao) { super(e); this.dn=e.getDn(); this.dao=dao; } Object load() { return dao.get(dn); } } class PrintPanel extends Panel { public PrintPanel(String id, IModelEntry entry) { // given an entry super(id, new CompoundPropertyModel(entry)); // print the dn ; add(new Label(dn)); add(new PropertyListView(attributes) { populateItem(ListItem item) { // for each attribute { Attribute a=item.getModelObject(); // select a formatting method; final AttributeFormatter f=; item.add(new Label(name)); item.add(new ListView(values) { populateItem(ListItem item) { Object value=item.getModelObject(); String str=f.format(value); add(new Label(value, str)); } }); }); } } } wicket:panel dn: span wicket:id=dnbr/ table tr wicket:id=attributes tdspan wicket:id=name/span/td tdulli wicket:id=valuesspan wicket:id=value/span/li/ul/td /tr /table /wicket:panel -igor - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] onGoingBack2Page(+innerForm) = innerForm.fields = empty!?
you cannot navigate from page1-page2 via a link because that will not submit the form, and so you will lose all your values. try submitlink and make sure there are no form errors - ie all models have been updated with proper values - and then navigate to page2. -igor On 4/24/07, manu [EMAIL PROTECTED] wrote: Dear Sirs, The scenario is the following: - Page1 Form1 (innerClass) input1(String)... inputN(String) - Page2 Link/Button (whatever for going back to Page1 - has a reference object of Page1) ... - PageN Link/Button (idem) It happens that, when flowing-back from Page2, or... PageN, to Page1, then Page1 displays but with all innerClass-Form1 fields empty! The state of other things in Page1 keep there, but all the state of fields in Form1 has desappeared. What's wrong here, any idea? Regards. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] RadioGroup, not only the radios inside
you can put any kind of component into your RadioGroup container, it only exists as a boundary for Radio components inside it. so to make it short add the textfields into the radiogroup. -igor On 4/24/07, kubino [EMAIL PROTECTED] wrote: Hello, I tried to search through the forum, but I couldnt find answer, I hope it is easy. Consider html page where is a filtering form with this possibilities: input type=radio / No filter input type=radio / FiltrSpecific : input type=text / input type=radio / Filtr all In java code, I am only adding the radio id's in to the radioGroup , not the textfield(s)(they are added to the form component) But wicket gives me the exception the I didnt add the the textfield or my hierarchy doesn't match(I guess the hierarchy doesnt match). SO what can I do? I cannot put the textfield after the radio's buttons becouse , I have more than one textfields related to the radios Thanks. -- View this message in context: http://www.nabble.com/RadioGroup%2C-not-only-the-radios-inside-tf3638812.html#a10161427 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] NPE rendering ListView Item in 1.3
you best bet is to stay current via our svn. there is also a maven repo with our stuff, but we make no guarantees about it. http://wicketstuff.org/maven/repository/ -igor On 4/24/07, jamieballing [EMAIL PROTECTED] wrote: Thanks... Where is the best place to keep up to date on the snapshots? Are you versioning them yet and is there a current recommended snapshot or should we plan to keep up to date with the latest? Jamie igor.vaynberg wrote: first start off by showing your code. second, update to the latest 1.3snapshot. in my code listview.java doesnt have line 709. -igor On 4/23/07, jamieballing [EMAIL PROTECTED] wrote: We are trying to migrate to 1.3 and have encountered an issue. We aren't sure if this is related to the way we are using it or if there might be a bug. We are getting a NPE which bubbles up into a message that wicket can't render a component. The stack trace is: Caused by: java.lang.NullPointerException at wicket.markup.html.list.ListView.renderItem(ListView.java :709) at wicket.markup.html.list.ListView.onRender(ListView.java:670) at wicket.Component.render(Component.java:1495) at wicket.MarkupContainer.renderNext(MarkupContainer.java:1159) at wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java :1329) at wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1264) at wicket.Component.renderComponent(Component.java:1670) One thing of note is that the component ID which wicket is ultimately complaining about doesn't exist anywhere in the application... there is no feedbackul, but is a feedback. I know there are some suffixes that get added now, but I thought these should be numeric. Here is the message: wicket.WicketRuntimeException: Exception in rendering component: [MarkupContainer [Component id = feedbackul, page = test.page.search.SearchResultsPage, path = 6:lpContent:uploadPanel:documentManagementModal:content:panel:for m:urlArea:urlBorder:feedbackIndicator:feedback: feedbackul.FeedbackPanel$2, isVisible = true, isVersioned = false]] Do you have any thoughts or direction on how we should resolve this? We are trying to determine if we should proceed with 1.3 for our app or stick with 1.2. Many thanks, Jamie -- View this message in context: http://www.nabble.com/NPE-rendering-ListView-Item-in-1.3-tf3635715.html#a10152492 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- View this message in context: http://www.nabble.com/NPE-rendering-ListView-Item-in-1.3-tf3635715.html#a10161932 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Replace non-wicket attributed sections of a html document
see IResponseFilter, install your own and you are good to go. -igor On 4/24/07, Andrew Moore [EMAIL PROTECTED] wrote: I've had a go with the freemarker panel, and can get a simple example going. The thing is, instead of having a panel with a span tag, I'd like to actually parse the whole .html template file that gets generated by wicket. Does anyone know if it's possible to do that? Is there a way of getting at the whole markup response that's been generated and modifying it before it's rendered? Eelco Hillenius wrote: Hi, Thanks for your reply. I'm familiar with wicket (reasonably anyway), that may not have been clear from the post. The admin of the CMS system is all using wicket, and I'm fairly happy with that. The situation is where the CMS content template pages are unknown in structure, but I just want to be able to insert a marker into the page to replace certain values (as I'm not sure which component the references may be in - ie in the src attribute of an img tag, or in a parameter passed to some javascript etc), so I can't map wicket components to the dynamic content. I've noticed the wicket velocity and wicket freemarker contrib projects, would these accomplish what I want? Yep, I think that's the way to go. Or something similar. You basically expose limited funcionality (e.g. via Velocity tools) and let the users decide what they want to do with it. Eelco - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- View this message in context: http://www.nabble.com/Replace-non-wicket-attributed-sections-of-a-html-document-tf3636913.html#a10162589 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] RadioGroup, not only the radios inside
Shame on me, I didnt try this. Thanks a lot. igor.vaynberg wrote: you can put any kind of component into your RadioGroup container, it only exists as a boundary for Radio components inside it. so to make it short add the textfields into the radiogroup. -igor On 4/24/07, kubino [EMAIL PROTECTED] wrote: Hello, I tried to search through the forum, but I couldnt find answer, I hope it is easy. Consider html page where is a filtering form with this possibilities: input type=radio / No filter input type=radio / FiltrSpecific : input type=text / input type=radio / Filtr all In java code, I am only adding the radio id's in to the radioGroup , not the textfield(s)(they are added to the form component) But wicket gives me the exception the I didnt add the the textfield or my hierarchy doesn't match(I guess the hierarchy doesnt match). SO what can I do? I cannot put the textfield after the radio's buttons becouse , I have more than one textfields related to the radios Thanks. -- View this message in context: http://www.nabble.com/RadioGroup%2C-not-only-the-radios-inside-tf3638812.html#a10161427 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- View this message in context: http://www.nabble.com/RadioGroup%2C-not-only-the-radios-inside-tf3638812.html#a10163415 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] How do I show/hide row
I tried what you suggested i.e. swap a different fragment in but I can't seem to get it to work. I have the following. When I click on the delete link I want fragment1 to be replaced with fragment2. However fragment2 remains and is shifted to the right. What am I missing or doing wrong? Thanks again. tr wicket:id=rows span wicket:id=panel/span /tr /table wicket:fragment wicket:id=fragment1 td wicket:id=userSearchPanel/td tdinput type=checkbox wicket:id=admin//td td wicket:id=deletePanel/td /wicket:fragment wicket:fragment wicket:id=fragment2tdspan wicket:id=label/ span/td/wicket:fragment public class Fragment1 extends Fragment { public Fragment1(String id, String markupId, ...) { super(id, markupId); add(new ModalWindowPanel(userSearchPanel, value)); add(new CheckBox(admin,...); add(new DeletePanel(deletePanel, ..)); } } public class Fragment2 extends Fragment { .. add(new Label(label, Hello, World!)); } } private class DeletePanel extends Panel { deleteItem = new AjaxLink(deleteItem) { public void onClick(AjaxRequestTarget target) { f2 = new Fragment2(panel, fragment2); DeletePanel.this.getParent().getParent().replace(f2); target.addComponent(listContainer);//WebMarkupContainer Igor Vaynberg igor.vaynbTo [EMAIL PROTECTED] wicket-user@lists.sourceforge.net omcc Sent by: wicket-user Subject [EMAIL PROTECTED] Re: [Wicket-user] How do I show/hide row sts.sourcef orge.net 04/23/2007 10:47 AM Please respond to wicket-user @lists.sour ceforge.net what you have below seems pretty reasonable. if it is more then just links changing i would swap a different fragment in, but it looks like overkill for your case. -igor On 4/22/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I have a table which contains a list of users. At the end of each row there is an delete/undo link. When the user clicks delete I want to hide the row and replace it with only the undo link. What would be the best way to do this? Thanks for your time. view = new ListView(rows, data) { public void populateItem(ListItem listItem) { UserType value = (UserType )listItem.getModelObject(); listItem.add(new ModalWindowPanel(userSearchPanel, value)); listItem.add(new CheckBox(admin, new Model(new Boolean(value.isAdmin(); listItem.add(new DeleteUndoPanel(deleteUndoPanel, listItem.getModel())); } }; private class DeleteUndoPanel extends Panel { public DeleteUndoPanel(String id, final IModel model) { super(id, model); setOutputMarkupId(true); final UserType type = (UserType)this.getModelObject(); undoItem = new AjaxLink(undoItem) { @Override public boolean isVisible() { } public void onClick(AjaxRequestTarget target) { type.setDelete(false);
[Wicket-user] Sending Emails Via Wicket?
I DID search in the forums, and couldn't find reference to sending emails from within the framework. I did find a post where someone mentioned writing there own class for doing this. Does that mean there isn't any built-in classes that handle sending of emails from within Wicket? If not, can someone provide a solution or example of how I might accomplish this? I am a newbie to Wicket, and even a little to Java in general, so any help or reference points would be very much appreciated. Specifically, I need to send an email from within Wicket, where the email contains some dynamic data I would insert before sending. Thanks! -- View this message in context: http://www.nabble.com/Sending-Emails-Via-Wicket--tf3639601.html#a10164083 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Sending Emails Via Wicket?
For the actual sending, you need to use Java's normal mail API (http://java.sun.com/products/javamail/) or e.g. Spring's mail module. If you want to create emails based on templates with some variable substibution, I'd recommend you use e.g. Velocity for that. Eelco I DID search in the forums, and couldn't find reference to sending emails from within the framework. I did find a post where someone mentioned writing there own class for doing this. Does that mean there isn't any built-in classes that handle sending of emails from within Wicket? If not, can someone provide a solution or example of how I might accomplish this? I am a newbie to Wicket, and even a little to Java in general, so any help or reference points would be very much appreciated. Specifically, I need to send an email from within Wicket, where the email contains some dynamic data I would insert before sending. Thanks! -- View this message in context: http://www.nabble.com/Sending-Emails-Via-Wicket--tf3639601.html#a10164083 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Sending Emails Via Wicket?
I understand. I'm using the wicket-contrib-velocity package for some page generation, but I am unsure how I would generate a template /just/ for an email. Would you have an example of that? Or be able to point me to a tutorial, etc.? Much appreciated. Eelco Hillenius wrote: For the actual sending, you need to use Java's normal mail API (http://java.sun.com/products/javamail/) or e.g. Spring's mail module. If you want to create emails based on templates with some variable substibution, I'd recommend you use e.g. Velocity for that. Eelco I DID search in the forums, and couldn't find reference to sending emails from within the framework. I did find a post where someone mentioned writing there own class for doing this. Does that mean there isn't any built-in classes that handle sending of emails from within Wicket? If not, can someone provide a solution or example of how I might accomplish this? I am a newbie to Wicket, and even a little to Java in general, so any help or reference points would be very much appreciated. Specifically, I need to send an email from within Wicket, where the email contains some dynamic data I would insert before sending. Thanks! -- View this message in context: http://www.nabble.com/Sending-Emails-Via-Wicket--tf3639601.html#a10164083 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- View this message in context: http://www.nabble.com/Sending-Emails-Via-Wicket--tf3639601.html#a10164511 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] DropDownChoice Ajax to render 1 of 3 forms
I have a page with a DropDownChoice box and 3 Forms. The Forms and DropDownChoice belong to the same Panel. I would like to only show one Form at a time via the selection made on the DropDownChoice box. I have added a AjaxFormComponentUpdatingBehavior onchange to the DropDownChoice and overridden the onUpdate function to set the visibility of each Form appropriate to the DropDownChoice and did a target.addComponent on each Form to ask it to render. I can trace the visibilities being changed but no Form is ever rendered. Thanks In Advance John - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] DropDownChoice Ajax to render 1 of 3 forms
do forms start out as invisible when the page renders first? if so try calling setoutputmarkupplaceholdertag(true) on them, or repaint their common parent. -igor On 4/24/07, John Carlson [EMAIL PROTECTED] wrote: I have a page with a DropDownChoice box and 3 Forms. The Forms and DropDownChoice belong to the same Panel. I would like to only show one Form at a time via the selection made on the DropDownChoice box. I have added a AjaxFormComponentUpdatingBehavior onchange to the DropDownChoice and overridden the onUpdate function to set the visibility of each Form appropriate to the DropDownChoice and did a target.addComponent on each Form to ask it to render. I can trace the visibilities being changed but no Form is ever rendered. Thanks In Advance John - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] What's the easiest way to do a pageable/sortable list screen?
What's the easiest way to do a pageable/sortable list with Wicket? Looking at the following example, there's quite a few files required to replicate the DisplayTag's functionality. http://www.wicket-library.com/wicket-examples/displaytag Is this packaged up as a component I can use? The other example I found was wicket_crud and it seems to require 4 Java files just for a list screen - not example simple in my mind. ;-) Matt -- View this message in context: http://www.nabble.com/What%27s-the-easiest-way-to-do-a-pageable-sortable-list-screen--tf3639929.html#a10165178 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Sending Emails Via Wicket?
This is not a particularly beautiful, finished, or even properly-indented (not sure how that happened) implementation but it does manage to send me text emails with templated contents including URLs going back into Wicket: http://databinder.net/wsvn/Databinder/typeturner/trunk/src/main/java/com/typeturner/service/Notify.java?op=file (The mail() method only. You probably don't need to ping Technorati!) Nathan fattymelt wrote: I understand. I'm using the wicket-contrib-velocity package for some page generation, but I am unsure how I would generate a template /just/ for an email. Would you have an example of that? Or be able to point me to a tutorial, etc.? Much appreciated. Eelco Hillenius wrote: For the actual sending, you need to use Java's normal mail API (http://java.sun.com/products/javamail/) or e.g. Spring's mail module. If you want to create emails based on templates with some variable substibution, I'd recommend you use e.g. Velocity for that. Eelco I DID search in the forums, and couldn't find reference to sending emails from within the framework. I did find a post where someone mentioned writing there own class for doing this. Does that mean there isn't any built-in classes that handle sending of emails from within Wicket? If not, can someone provide a solution or example of how I might accomplish this? I am a newbie to Wicket, and even a little to Java in general, so any help or reference points would be very much appreciated. Specifically, I need to send an email from within Wicket, where the email contains some dynamic data I would insert before sending. Thanks! - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Help: Creating a Apache-licensed Wysiwyg-Textarea for Wicket
On Tuesday 24 April 2007 2:14 am, Johan Compagner escreveu: And I also admit that I don't have the same patience as yours, providing code snippets all the time, answering to every question with such accuracy :-) Congratulations, Igor! +1 Igor for president! +1 Thanks to all of you. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] What's the easiest way to do a pageable/sortable list screen?
see http://wicketstuff.org/wicket13/repeater/ namely the datatable example -igor On 4/24/07, mraible [EMAIL PROTECTED] wrote: What's the easiest way to do a pageable/sortable list with Wicket? Looking at the following example, there's quite a few files required to replicate the DisplayTag's functionality. http://www.wicket-library.com/wicket-examples/displaytag Is this packaged up as a component I can use? The other example I found was wicket_crud and it seems to require 4 Java files just for a list screen - not example simple in my mind. ;-) Matt -- View this message in context: http://www.nabble.com/What%27s-the-easiest-way-to-do-a-pageable-sortable-list-screen--tf3639929.html#a10165178 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] question on localization
You might want to make it so you can dynamically generate a page title where you need to, instead of always requiring a static page title. The trick is to return an IModel from the getPageTitle method in your base page. Here's how I've done it: title wicket:id=pageHeaderTitleFoo/title public class BasePage extends WebPage { public BasePage() { add(new Label(pageHeaderTitle, getPageTitle())); } public IModel getPageTitle() { return new ResourceModel(page.title); } } jk On Tue, Apr 24, 2007 at 10:33:54AM +0900, David Leangen wrote: i tried to use Label() with PropertyModel(pageTitle) but didn't work for me. it rendered Home string all the time, no matter what the locale was. any ideas how to do this? You can do something like this: new Label( componentId, new StringResourceModel( pageTitle, this, new Model() ) ); In your properties file: pageTitle=Home In your html: span wicket:id=componentIdDummy text/span Look for StringResourceModel in ProWicket or in the API docs. HTH Dave - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Sending Emails Via Wicket?
This should get you started: http://www.theserverside.com/tt/blogs/showblog.tss?id=SpringVelocityEmail - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] question on localization
this is bad. getpagetitle() might get called from a partially constructed object it should be public BasePage() { add(new Label(pageHeaderTitle, new pagetitlemodel())); } private class pagetitlemodel extends abstractreadonlymodel { object getobject() { return getpagetitle().getobject(); } void detach() { getpagetitle().detach(); } } -igor On 4/24/07, John Krasnay [EMAIL PROTECTED] wrote: You might want to make it so you can dynamically generate a page title where you need to, instead of always requiring a static page title. The trick is to return an IModel from the getPageTitle method in your base page. Here's how I've done it: title wicket:id=pageHeaderTitleFoo/title public class BasePage extends WebPage { public BasePage() { add(new Label(pageHeaderTitle, getPageTitle())); } public IModel getPageTitle() { return new ResourceModel(page.title); } } jk On Tue, Apr 24, 2007 at 10:33:54AM +0900, David Leangen wrote: i tried to use Label() with PropertyModel(pageTitle) but didn't work for me. it rendered Home string all the time, no matter what the locale was. any ideas how to do this? You can do something like this: new Label( componentId, new StringResourceModel( pageTitle, this, new Model() ) ); In your properties file: pageTitle=Home In your html: span wicket:id=componentIdDummy text/span Look for StringResourceModel in ProWicket or in the API docs. HTH Dave - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] Setting Visible (setVisible) inside onAttach(). Is this Right?
Hi, I have this working code. But I feel I'am mistaking and this is not the most apropiate place for it. Very simple, a logout panel (just a link) that on attached sets itself visible or not. Here is the code. public class LogoutPanel extends BasePanel { /** Creates a new instance of LogoutPanel */ public LogoutPanel(String id) { super(id); //Create logout link Link cLogoutLink = new Link(logoutLink) { //Logout action public void onClick() { //Logout getWicketSession().logout(); setResponsePage(Index.class); } }; //add class attribute. cLogoutLink.add(new AttributeModifier(class, true, new AbstractReadOnlyModel() { public Object getObject(Component component) { return headerWiteLink; } })); //add the logoutLink add(cLogoutLink); } protected void onAttach() { //Verify visible status setVisible(getWicketSession().isUserLoggedIn()); } } This works fine, but is it the correct way of doing this? Some comments on it could really help. f(t) - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Setting Visible (setVisible) inside onAttach(). Is this Right?
Excelent. That means that isVisible is called every page refresh? Thanks On 4/24/07, Igor Vaynberg [EMAIL PROTECTED] wrote: change protected void onAttach() { //Verify visible status setVisible(getWicketSession().isUserLoggedIn()); } to boolean isVisible() { return getWicketSession().isUserLoggedIn(); } imho that is better -igor On 4/24/07, Francisco Diaz Trepat - gmail [EMAIL PROTECTED] wrote: Hi, I have this working code. But I feel I'am mistaking and this is not the most apropiate place for it. Very simple, a logout panel (just a link) that on attached sets itself visible or not. Here is the code. public class LogoutPanel extends BasePanel { /** Creates a new instance of LogoutPanel */ public LogoutPanel(String id) { super(id); //Create logout link Link cLogoutLink = new Link(logoutLink) { //Logout action public void onClick() { //Logout getWicketSession().logout(); setResponsePage(Index.class); } }; //add class attribute. cLogoutLink.add(new AttributeModifier(class, true, new AbstractReadOnlyModel() { public Object getObject(Component component) { return headerWiteLink; } })); //add the logoutLink add(cLogoutLink); } protected void onAttach() { //Verify visible status setVisible(getWicketSession().isUserLoggedIn()); } } This works fine, but is it the correct way of doing this? Some comments on it could really help. f(t) - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Setting Visible (setVisible) inside onAttach(). Is this Right?
yes, any time the component is rendered -igor On 4/24/07, Francisco Diaz Trepat - gmail [EMAIL PROTECTED] wrote: Excelent. That means that isVisible is called every page refresh? Thanks On 4/24/07, Igor Vaynberg [EMAIL PROTECTED] wrote: change protected void onAttach() { //Verify visible status setVisible(getWicketSession().isUserLoggedIn()); } to boolean isVisible() { return getWicketSession().isUserLoggedIn(); } imho that is better -igor On 4/24/07, Francisco Diaz Trepat - gmail [EMAIL PROTECTED] wrote: Hi, I have this working code. But I feel I'am mistaking and this is not the most apropiate place for it. Very simple, a logout panel (just a link) that on attached sets itself visible or not. Here is the code. public class LogoutPanel extends BasePanel { /** Creates a new instance of LogoutPanel */ public LogoutPanel(String id) { super(id); //Create logout link Link cLogoutLink = new Link(logoutLink) { //Logout action public void onClick() { //Logout getWicketSession().logout(); setResponsePage(Index.class); } }; //add class attribute. cLogoutLink.add(new AttributeModifier(class, true, new AbstractReadOnlyModel() { public Object getObject(Component component) { return headerWiteLink; } })); //add the logoutLink add(cLogoutLink); } protected void onAttach() { //Verify visible status setVisible(getWicketSession().isUserLoggedIn()); } } This works fine, but is it the correct way of doing this? Some comments on it could really help. f(t) - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] DropDownChoice Ajax to render 1 of 3 forms
Calling repaint on the entire panel did the job. target.addComponent(dropdown.getParent()) Thanks John From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Igor Vaynberg Sent: Tuesday, April 24, 2007 8:38 AM To: wicket-user@lists.sourceforge.net Subject: Re: [Wicket-user] DropDownChoice Ajax to render 1 of 3 forms do forms start out as invisible when the page renders first? if so try calling setoutputmarkupplaceholdertag(true) on them, or repaint their common parent. -igor On 4/24/07, John Carlson [EMAIL PROTECTED] wrote: I have a page with a DropDownChoice box and 3 Forms. The Forms and DropDownChoice belong to the same Panel. I would like to only show one Form at a time via the selection made on the DropDownChoice box. I have added a AjaxFormComponentUpdatingBehavior onchange to the DropDownChoice and overridden the onUpdate function to set the visibility of each Form appropriate to the DropDownChoice and did a target.addComponent on each Form to ask it to render. I can trace the visibilities being changed but no Form is ever rendered. Thanks In Advance John - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Setting Visible (setVisible) inside onAttach(). Is this Right?
Great, thanks Igor. On 4/24/07, Igor Vaynberg [EMAIL PROTECTED] wrote: yes, any time the component is rendered -igor On 4/24/07, Francisco Diaz Trepat - gmail [EMAIL PROTECTED] wrote: Excelent. That means that isVisible is called every page refresh? Thanks On 4/24/07, Igor Vaynberg [EMAIL PROTECTED] wrote: change protected void onAttach() { //Verify visible status setVisible(getWicketSession().isUserLoggedIn()); } to boolean isVisible() { return getWicketSession().isUserLoggedIn(); } imho that is better -igor On 4/24/07, Francisco Diaz Trepat - gmail [EMAIL PROTECTED] wrote: Hi, I have this working code. But I feel I'am mistaking and this is not the most apropiate place for it. Very simple, a logout panel (just a link) that on attached sets itself visible or not. Here is the code. public class LogoutPanel extends BasePanel { /** Creates a new instance of LogoutPanel */ public LogoutPanel(String id) { super(id); //Create logout link Link cLogoutLink = new Link(logoutLink) { //Logout action public void onClick() { //Logout getWicketSession().logout(); setResponsePage(Index.class); } }; //add class attribute. cLogoutLink.add(new AttributeModifier(class, true, new AbstractReadOnlyModel() { public Object getObject(Component component) { return headerWiteLink; } })); //add the logoutLink add(cLogoutLink); } protected void onAttach() { //Verify visible status setVisible(getWicketSession().isUserLoggedIn()); } } This works fine, but is it the correct way of doing this? Some comments on it could really help. f(t) - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] Validation of Date Range with DateValidator.
Hi again group, I have the following problem. I use a DateValidator.range(min, max) to add a validation to a text field. Everything works fine, but as soon as I change the locale to german, french, or italian, it does not validate again. It keeps validating wether or not is required but not the range. What could it be? Is it because I don't have the proper message under the german and french locales but the messages are there for the default locale (in this case english) ? could this be? Here is the code: ... //Create date of birth label, text field, and date picker WebMarkupContainer dateOfBirthLabel = new WebMarkupContainer(dateOfBirthLabel); //add label form.add(dateOfBirthLabel); //create textfield - validate it with the Date type TextField dateOfBirth = new TextField(dateOfBirth, Date.class); //add a validator for range between a person born a maximum of 100 years ago and today dateOfBirth.add(DateValidator.range(getMinimumDateAllowedForDateOfBirth(), getMaximumDateAllowedForDateOfBirth())); //set also as required dateOfBirth.setRequired(true); //add the textfield form.add(dateOfBirth); //Create DatePicker DatePicker datePicker = new DatePicker(datePicker, dateOfBirthLabel, dateOfBirth); //create date converter DateConverter dateConverter = new DateConverter(); //Set the DateFormat and Locales dateConverter.setDateFormat(getWicketSession().getLocale(), new SimpleDateFormat(dd.MM.)); //asign the converter to the date picker datePicker.setDateConverter(dateConverter); //Add the datepicker form.add(datePicker); private Date getMinimumDateAllowedForDateOfBirth(){ Calendar now = Calendar.getInstance(); now.add(Calendar.YEAR, -MAXIMUM_LIFE_EXPECTANCY); //MAXIMUM_LIFE_EXPECTANCY=100 return now.getTime(); } private Date getMaximumDateAllowedForDateOfBirth(){ Calendar now = Calendar.getInstance(); return now.getTime(); } f(t) - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] How do I show/hide row
Ok figured it out. I set ListView.setReuseItems(true); and it works. Thanks again for all your help john.mattuc [EMAIL PROTECTED] Sent by: To wicket-user wicket-user@lists.sourceforge.net [EMAIL PROTECTED] cc sts.sourcef orge.net Subject Re: [Wicket-user] How do I show/hide row 04/24/2007 11:30 AM Please respond to wicket-user @lists.sour ceforge.net I tried what you suggested i.e. swap a different fragment in but I can't seem to get it to work. I have the following. When I click on the delete link I want fragment1 to be replaced with fragment2. However fragment2 remains and is shifted to the right. What am I missing or doing wrong? Thanks again. tr wicket:id=rows span wicket:id=panel/span /tr /table wicket:fragment wicket:id=fragment1 td wicket:id=userSearchPanel/td tdinput type=checkbox wicket:id=admin//td td wicket:id=deletePanel/td /wicket:fragment wicket:fragment wicket:id=fragment2tdspan wicket:id=label/ span/td/wicket:fragment public class Fragment1 extends Fragment { public Fragment1(String id, String markupId, ...) { super(id, markupId); add(new ModalWindowPanel(userSearchPanel, value)); add(new CheckBox(admin,...); add(new DeletePanel(deletePanel, ..)); } } public class Fragment2 extends Fragment { .. add(new Label(label, Hello, World!)); } } private class DeletePanel extends Panel { deleteItem = new AjaxLink(deleteItem) { public void onClick(AjaxRequestTarget target) { f2 = new Fragment2(panel, fragment2); DeletePanel.this.getParent().getParent().replace(f2); target.addComponent(listContainer);//WebMarkupContainer Igor Vaynberg igor.vaynbTo [EMAIL PROTECTED] wicket-user@lists.sourceforge.net omcc Sent by: wicket-user Subject [EMAIL PROTECTED] Re: [Wicket-user] How do I show/hide row sts.sourcef orge.net 04/23/2007 10:47 AM Please respond to wicket-user @lists.sour ceforge.net what you have below seems pretty reasonable. if it is more then just links changing i would swap a different fragment in, but it looks like overkill for your case. -igor On 4/22/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I have a table which contains a list of users. At the end of each row there is an delete/undo link. When the user clicks delete I want to hide the row and replace it with only the undo link. What would be the best way to do this? Thanks for your time. view = new ListView(rows, data) { public void populateItem(ListItem listItem) { UserType value = (UserType )listItem.getModelObject(); listItem.add(new ModalWindowPanel(userSearchPanel, value)); listItem.add(new CheckBox(admin, new Model(new Boolean(value.isAdmin(); listItem.add(new DeleteUndoPanel(deleteUndoPanel, listItem.getModel())); } }; private class DeleteUndoPanel extends Panel { public DeleteUndoPanel(String id, final IModel model) {
[Wicket-user] Logging Out (What to do with the session)
Hello everyone, I was wondering for a proper way to handle sessions and logging in and out of a wicket application in general. The thing is as follows. I have a Session called WicketSession, inside of which I use a CORBA BUISINESS object labeled m_cSession to do a Login. WicketSession has the following two methods: /** * Terminates the logged user for this Session. */ public void logout() { //Verify user isn't logged out already if (!m_bUserLoggedIn) { return; } //Execute a logout try { m_cSession.logout(); m_bUserLoggedIn = false; m_cSessionLocale = Locale.getDefault(); } catch (Exception xException) { m_bUserLoggedIn = false; m_cSessionLocale = Locale.getDefault(); } } /** * Initiates logged user for this Session. */ public void login(String sUserId, String sUserPassword) { //Verify input data and that the user isn't logged in already if (m_bUserLoggedIn || sUserId == null || sUserPassword == null) { m_bUserLoggedIn = false; return; } //Execute a login try { //create a session m_cSession = new ch.logismata.serverwrapper.Session(); //set user and password m_cSession.setId(sUserId); m_cSession.setPassword(sUserPassword); //Execute and verify login if (m_cSession.login() != null) { m_bUserLoggedIn = true; } } catch (Exception xException) { m_bUserLoggedIn = false; } } ... Very plain. The thing is this, Session also maintains certain state already in wicket, and a question was: Should I invalidate the session? If I do, can I redirect the user to a Home Page where he would get a new session going-on? Is this a proper approach? Usually when I close the Tab on my Firefox and I Call to the site, the Session is also remembered as the Locale is maintain as that of the last state (before I close the tab). Why is this? Sorry if my questions may feel sordid. f(t) - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Logging Out (What to do with the session)
yes i would invalidate the session: onclick() { final string url=urlfor(HomePage.class); getsession().invalidate(); getrequestcycle().pushTarget(new RedirectRequestTarget(url)); } something like that -igor On 4/24/07, Francisco Diaz Trepat - gmail [EMAIL PROTECTED] wrote: Hello everyone, I was wondering for a proper way to handle sessions and logging in and out of a wicket application in general. The thing is as follows. I have a Session called WicketSession, inside of which I use a CORBA BUISINESS object labeled m_cSession to do a Login. WicketSession has the following two methods: /** * Terminates the logged user for this Session. */ public void logout() { //Verify user isn't logged out already if (!m_bUserLoggedIn) { return; } //Execute a logout try { m_cSession.logout(); m_bUserLoggedIn = false; m_cSessionLocale = Locale.getDefault(); } catch (Exception xException) { m_bUserLoggedIn = false; m_cSessionLocale = Locale.getDefault(); } } /** * Initiates logged user for this Session. */ public void login(String sUserId, String sUserPassword) { //Verify input data and that the user isn't logged in already if (m_bUserLoggedIn || sUserId == null || sUserPassword == null) { m_bUserLoggedIn = false; return; } //Execute a login try { //create a session m_cSession = new ch.logismata.serverwrapper.Session(); //set user and password m_cSession.setId(sUserId); m_cSession.setPassword(sUserPassword); //Execute and verify login if (m_cSession.login() != null) { m_bUserLoggedIn = true; } } catch (Exception xException) { m_bUserLoggedIn = false; } } ... Very plain. The thing is this, Session also maintains certain state already in wicket, and a question was: Should I invalidate the session? If I do, can I redirect the user to a Home Page where he would get a new session going-on? Is this a proper approach? Usually when I close the Tab on my Firefox and I Call to the site, the Session is also remembered as the Locale is maintain as that of the last state (before I close the tab). Why is this? Sorry if my questions may feel sordid. f(t) - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Logging Out (What to do with the session)
Off the top of your head again? ¬_¬ (me needs that head). Great thanks. On 4/24/07, Igor Vaynberg [EMAIL PROTECTED] wrote: yes i would invalidate the session: onclick() { final string url=urlfor(HomePage.class); getsession().invalidate(); getrequestcycle().pushTarget(new RedirectRequestTarget(url)); } something like that -igor On 4/24/07, Francisco Diaz Trepat - gmail [EMAIL PROTECTED] wrote: Hello everyone, I was wondering for a proper way to handle sessions and logging in and out of a wicket application in general. The thing is as follows. I have a Session called WicketSession, inside of which I use a CORBA BUISINESS object labeled m_cSession to do a Login. WicketSession has the following two methods: /** * Terminates the logged user for this Session. */ public void logout() { //Verify user isn't logged out already if (!m_bUserLoggedIn) { return; } //Execute a logout try { m_cSession.logout(); m_bUserLoggedIn = false; m_cSessionLocale = Locale.getDefault(); } catch (Exception xException) { m_bUserLoggedIn = false; m_cSessionLocale = Locale.getDefault(); } } /** * Initiates logged user for this Session. */ public void login(String sUserId, String sUserPassword) { //Verify input data and that the user isn't logged in already if (m_bUserLoggedIn || sUserId == null || sUserPassword == null) { m_bUserLoggedIn = false; return; } //Execute a login try { //create a session m_cSession = new ch.logismata.serverwrapper.Session(); //set user and password m_cSession.setId(sUserId); m_cSession.setPassword(sUserPassword); //Execute and verify login if (m_cSession.login() != null) { m_bUserLoggedIn = true; } } catch (Exception xException) { m_bUserLoggedIn = false; } } ... Very plain. The thing is this, Session also maintains certain state already in wicket, and a question was: Should I invalidate the session? If I do, can I redirect the user to a Home Page where he would get a new session going-on? Is this a proper approach? Usually when I close the Tab on my Firefox and I Call to the site, the Session is also remembered as the Locale is maintain as that of the last state (before I close the tab). Why is this? Sorry if my questions may feel sordid. f(t) - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Logging Out (What to do with the session)
onclick() { final string url=urlfor(HomePage.class); getsession().invalidate(); getrequestcycle().pushTarget(new RedirectRequestTarget(url)); } Or just onClick() { Session.get().invalidate(); // invalidated after the request is handled setResponsePage(Home.class); } This works for sure when your home page is stateless (and bookmarkable of course). And I think it should work in other cases as well. If not, you can try Session.get().invalidateNow(); Eelco - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Logging Out (What to do with the session)
Great, both of them worked. Only this: getRequestCycle().setRequestTarget(new RedirectRequestTarget(url)); On 4/24/07, Eelco Hillenius [EMAIL PROTECTED] wrote: onclick() { final string url=urlfor(HomePage.class); getsession().invalidate(); getrequestcycle().pushTarget(new RedirectRequestTarget(url)); } Or just onClick() { Session.get().invalidate(); // invalidated after the request is handled setResponsePage(Home.class); } This works for sure when your home page is stateless (and bookmarkable of course). And I think it should work in other cases as well. If not, you can try Session.get().invalidateNow(); Eelco - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Logging Out (What to do with the session)
Great, both of them worked. Only this: getRequestCycle().setRequestTarget(new RedirectRequestTarget(url)); What do you mean? Eelco - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Logging Out (What to do with the session)
In the message that I sent I am sure that the text that Igor sent was included. if not here it is: Igor Vaynberg wrote:: onclick() { final string url=urlfor(HomePage.class); getsession().invalidate(); getrequestcycle().pushTarget(new RedirectRequestTarget(url)); } Only this: getRequestCycle().setRequestTarget(new RedirectRequestTarget(url)); Instead of this: getrequestcycle().pushTarget That is what I meant. On 4/24/07, Eelco Hillenius [EMAIL PROTECTED] wrote: Great, both of them worked. Only this: getRequestCycle().setRequestTarget(new RedirectRequestTarget(url)); What do you mean? Eelco - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] What's the easiest way to do a pageable/sortable list screen?
That site has a way to view the source of the templates, but not the Java code. Anywhere I can download that? What's the least amount of required classes to do a sortable/pageable grid with i18n? Compared to all the other web frameworks I've used, Wicket seems to make this the most difficult. Stripes is 30 lines of Java code and 20 lines of JSP. ;-) I know, I know - Wicket gives you a much more powerful way to do grids - but does it offer a simplistic grid as well? Thanks, Matt igor.vaynberg wrote: see http://wicketstuff.org/wicket13/repeater/ namely the datatable example -igor On 4/24/07, mraible [EMAIL PROTECTED] wrote: What's the easiest way to do a pageable/sortable list with Wicket? Looking at the following example, there's quite a few files required to replicate the DisplayTag's functionality. http://www.wicket-library.com/wicket-examples/displaytag Is this packaged up as a component I can use? The other example I found was wicket_crud and it seems to require 4 Java files just for a list screen - not example simple in my mind. ;-) Matt -- View this message in context: http://www.nabble.com/What%27s-the-easiest-way-to-do-a-pageable-sortable-list-screen--tf3639929.html#a10165178 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- View this message in context: http://www.nabble.com/What%27s-the-easiest-way-to-do-a-pageable-sortable-list-screen--tf3639929.html#a10171203 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] What's the easiest way to do a pageable/sortable list screen?
You can check out the wicket-examples code from svn at https://svn.apache.org/repos/asf/incubator/wicket/trunk/jdk-1.5/wicket-examples (or download it, but where's the fun in that) and then check out package org.apache.wicket.examples.repeater or org.apache.wicket.examples.guestbook etc. Eelco On 4/24/07, mraible [EMAIL PROTECTED] wrote: That site has a way to view the source of the templates, but not the Java code. Anywhere I can download that? What's the least amount of required classes to do a sortable/pageable grid with i18n? Compared to all the other web frameworks I've used, Wicket seems to make this the most difficult. Stripes is 30 lines of Java code and 20 lines of JSP. ;-) I know, I know - Wicket gives you a much more powerful way to do grids - but does it offer a simplistic grid as well? Thanks, Matt igor.vaynberg wrote: see http://wicketstuff.org/wicket13/repeater/ namely the datatable example -igor On 4/24/07, mraible [EMAIL PROTECTED] wrote: What's the easiest way to do a pageable/sortable list with Wicket? Looking at the following example, there's quite a few files required to replicate the DisplayTag's functionality. http://www.wicket-library.com/wicket-examples/displaytag Is this packaged up as a component I can use? The other example I found was wicket_crud and it seems to require 4 Java files just for a list screen - not example simple in my mind. ;-) Matt -- View this message in context: http://www.nabble.com/What%27s-the-easiest-way-to-do-a-pageable-sortable-list-screen--tf3639929.html#a10165178 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- View this message in context: http://www.nabble.com/What%27s-the-easiest-way-to-do-a-pageable-sortable-list-screen--tf3639929.html#a10171203 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] What's the easiest way to do a pageable/sortable list screen?
Hi, the code for sortable pageable list can look like this: public class SortingPage extends BasePage { public SortingPage() { SortableContactDataProvider dp = new SortableContactDataProvider(); final DataView dataView = new DataView(sorting, dp) { protected void populateItem(final Item item) { Contact contact = (Contact)item.getModelObject(); item.add(new ActionPanel(actions, item.getModel())); item.add(new Label(contactid, String.valueOf(contact.getId(; item.add(new Label(firstname, contact.getFirstName())); item.add(new Label(lastname, contact.getLastName())); item.add(new Label(homephone, contact.getHomePhone())); item.add(new Label(cellphone, contact.getCellPhone())); item.add(new AttributeModifier(class, true, new AbstractReadOnlyModel() { public Object getObject() { return (item.getIndex() % 2 == 1) ? even : odd; } })); } }; dataView.setItemsPerPage(8); add(new OrderByBorder(orderByFirstName, firstName, dp)); add(new OrderByBorder(orderByLastName, lastName, dp)); add(dataView); add(new PagingNavigator(navigator, dataView)); } } -Matej On 4/25/07, mraible [EMAIL PROTECTED] wrote: That site has a way to view the source of the templates, but not the Java code. Anywhere I can download that? What's the least amount of required classes to do a sortable/pageable grid with i18n? Compared to all the other web frameworks I've used, Wicket seems to make this the most difficult. Stripes is 30 lines of Java code and 20 lines of JSP. ;-) I know, I know - Wicket gives you a much more powerful way to do grids - but does it offer a simplistic grid as well? Thanks, Matt igor.vaynberg wrote: see http://wicketstuff.org/wicket13/repeater/ namely the datatable example -igor On 4/24/07, mraible [EMAIL PROTECTED] wrote: What's the easiest way to do a pageable/sortable list with Wicket? Looking at the following example, there's quite a few files required to replicate the DisplayTag's functionality. http://www.wicket-library.com/wicket-examples/displaytag Is this packaged up as a component I can use? The other example I found was wicket_crud and it seems to require 4 Java files just for a list screen - not example simple in my mind. ;-) Matt -- View this message in context: http://www.nabble.com/What%27s-the-easiest-way-to-do-a-pageable-sortable-list-screen--tf3639929.html#a10165178 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- View this message in context: http://www.nabble.com/What%27s-the-easiest-way-to-do-a-pageable-sortable-list-screen--tf3639929.html#a10171203 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of
Re: [Wicket-user] What's the easiest way to do a pageable/sortable list screen?
On 4/24/07, mraible [EMAIL PROTECTED] wrote: That site has a way to view the source of the templates, but not the Java code. Anywhere I can download that? what i pointed to is the wicket-examples project. the source code is available in our svn. the link to that is available on our site. What's the least amount of required classes to do a sortable/pageable grid with i18n? Compared to all the other web frameworks I've used, Wicket seems to make this the most difficult. Stripes is 30 lines of Java code and 20 lines of JSP. ;-) let me paste the code and we can count together, the snippet is from DataTablePage.java 1List columns = new ArrayList(); 2 columns.add(new AbstractColumn(new Model(Actions)) { 3 public void populateItem(Item cellItem, String componentId, IModel model) { 4 cellItem.add(new ActionPanel(componentId, model)); } }); 5columns.add(new PropertyColumn(new Model(ID), id)); 6columns.add(new PropertyColumn(new Model(First Name), firstName, firstName)); 7columns.add(new PropertyColumn(new Model(Last Name), lastName, lastName)); 8columns.add(new PropertyColumn(new Model(Home Phone), homePhone)); 9columns.add(new PropertyColumn(new Model(Cell Phone), cellPhone)); 10add(new DefaultDataTable(table, columns, new SortableContactDataProvider(), 8)); DataTablePage.html 1 table class=dataview cellspacing=0 wicket:id=table[table]/table I know, I know - Wicket gives you a much more powerful way to do grids - but does it offer a simplistic grid as well? so for a quickndirty pageable/sortable grid you get 10 lines of java and 1 line of markup. -igor Thanks, Matt igor.vaynberg wrote: see http://wicketstuff.org/wicket13/repeater/ namely the datatable example -igor On 4/24/07, mraible [EMAIL PROTECTED] wrote: What's the easiest way to do a pageable/sortable list with Wicket? Looking at the following example, there's quite a few files required to replicate the DisplayTag's functionality. http://www.wicket-library.com/wicket-examples/displaytag Is this packaged up as a component I can use? The other example I found was wicket_crud and it seems to require 4 Java files just for a list screen - not example simple in my mind. ;-) Matt -- View this message in context: http://www.nabble.com/What%27s-the-easiest-way-to-do-a-pageable-sortable-list-screen--tf3639929.html#a10165178 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- View this message in context: http://www.nabble.com/What%27s-the-easiest-way-to-do-a-pageable-sortable-list-screen--tf3639929.html#a10171203 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] question on localization
Ah, yes, this is much better. It bothered me enough to put a warning in the Javadoc, but that's a poor substitute for something that just works. I'll be fixing our code in the morning. Thanks Igor. jk On Tue, Apr 24, 2007 at 11:00:05AM -0700, Igor Vaynberg wrote: this is bad. getpagetitle() might get called from a partially constructed object it should be public BasePage() { add(new Label(pageHeaderTitle, new pagetitlemodel())); } private class pagetitlemodel extends abstractreadonlymodel { object getobject() { return getpagetitle().getobject(); } void detach() { getpagetitle().detach(); } } -igor On 4/24/07, John Krasnay [EMAIL PROTECTED] wrote: You might want to make it so you can dynamically generate a page title where you need to, instead of always requiring a static page title. The trick is to return an IModel from the getPageTitle method in your base page. Here's how I've done it: title wicket:id=pageHeaderTitleFoo/title public class BasePage extends WebPage { public BasePage() { add(new Label(pageHeaderTitle, getPageTitle())); } public IModel getPageTitle() { return new ResourceModel(page.title); } } jk On Tue, Apr 24, 2007 at 10:33:54AM +0900, David Leangen wrote: i tried to use Label() with PropertyModel(pageTitle) but didn't work for me. it rendered Home string all the time, no matter what the locale was. any ideas how to do this? You can do something like this: new Label( componentId, new StringResourceModel( pageTitle, this, new Model() ) ); In your properties file: pageTitle=Home In your html: span wicket:id=componentIdDummy text/span Look for StringResourceModel in ProWicket or in the API docs. HTH Dave - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] What's the easiest way to do a pageable/sortable list screen?
Thanks guys - I appreciate all your help. I've decided to go with DataView over DefaultDataTable because I couldn't get the click on column value for link[1] to work. Unfortunately, the following doesn't work with Wicket 1.2.6: item.add(new AttributeModifier(class, true, new AbstractReadOnlyModel() { public Object getObject() { return (item.getIndex() % 2 == 1) ? even : odd; } })); I tried the following (I'm a complete newbie, so sorry if this is dumb), but it doesn't work: public Object getObject(Component component) { Item item = (Item) component; return (item.getIndex() % 2 == 1) ? even : odd; } Matt [1] http://tinyurl.com/yw3e5l Matej Knopp-2 wrote: Hi, the code for sortable pageable list can look like this: public class SortingPage extends BasePage { public SortingPage() { SortableContactDataProvider dp = new SortableContactDataProvider(); final DataView dataView = new DataView(sorting, dp) { protected void populateItem(final Item item) { Contact contact = (Contact)item.getModelObject(); item.add(new ActionPanel(actions, item.getModel())); item.add(new Label(contactid, String.valueOf(contact.getId(; item.add(new Label(firstname, contact.getFirstName())); item.add(new Label(lastname, contact.getLastName())); item.add(new Label(homephone, contact.getHomePhone())); item.add(new Label(cellphone, contact.getCellPhone())); item.add(new AttributeModifier(class, true, new AbstractReadOnlyModel() { public Object getObject() { return (item.getIndex() % 2 == 1) ? even : odd; } })); } }; dataView.setItemsPerPage(8); add(new OrderByBorder(orderByFirstName, firstName, dp)); add(new OrderByBorder(orderByLastName, lastName, dp)); add(dataView); add(new PagingNavigator(navigator, dataView)); } } -Matej On 4/25/07, mraible [EMAIL PROTECTED] wrote: That site has a way to view the source of the templates, but not the Java code. Anywhere I can download that? What's the least amount of required classes to do a sortable/pageable grid with i18n? Compared to all the other web frameworks I've used, Wicket seems to make this the most difficult. Stripes is 30 lines of Java code and 20 lines of JSP. ;-) I know, I know - Wicket gives you a much more powerful way to do grids - but does it offer a simplistic grid as well? Thanks, Matt igor.vaynberg wrote: see http://wicketstuff.org/wicket13/repeater/ namely the datatable example -igor On 4/24/07, mraible [EMAIL PROTECTED] wrote: What's the easiest way to do a pageable/sortable list with Wicket? Looking at the following example, there's quite a few files required to replicate the DisplayTag's functionality. http://www.wicket-library.com/wicket-examples/displaytag Is this packaged up as a component I can use? The other example I found was wicket_crud and it seems to require 4 Java files just for a list screen - not example simple in my mind. ;-) Matt -- View this message in context: http://www.nabble.com/What%27s-the-easiest-way-to-do-a-pageable-sortable-list-screen--tf3639929.html#a10165178 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
Re: [Wicket-user] What's the easiest way to do a pageable/sortable list screen?
Thanks guys - I appreciate all your help. I've decided to go with DataView over DefaultDataTable because I couldn't get the click on column value for link[1] to work. Unfortunately, the following doesn't work with Wicket 1.2.6: item.add(new AttributeModifier(class, true, new AbstractReadOnlyModel() { public Object getObject() { return (item.getIndex() % 2 == 1) ? even : odd; } })); That's correct. IModel#getObject() is Wicket 1.3 code; in Wicket 1.2 we had getObject(Component). There are quite a few differences between 1.3 and 1.2 (more than initially planned, but you can read about that in the archives and on ). A migration document from 1.2 to 1.3 can be found here http://cwiki.apache.org/WICKET/migrate-13.html If you're starting out, I'd strongly encourage you to use 1.3. There are many improvements in it, and we're getting very close to doing a release (which at this stage will also be used to propose graduation with Apache, or at least get a step further in that). I tried the following (I'm a complete newbie, so sorry if this is dumb), but it doesn't work: public Object getObject(Component component) { Item item = (Item) component; return (item.getIndex() % 2 == 1) ? even : odd; } Like I said, I think it is better if you use 1.3, but in 1.2 you the component argument would be the component the behavior is added to. I'm not sure whether that is the Item? If it is, what doesn't work? Is the CSS availalbe etc? Or do you get an exception? Eelco - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] Is there a success message example?
I'm trying to success messages working. In my Detail.java page, I have: protected void onSaveUser(User user) { userManager.saveUser(user); getSession().info(It worked!); setRedirect(true); setResponsePage(backPage); } First of all, is this the proper way to put messages in flash scope? On my backPage, I have the following code, but it never seems to find anything. // check for success messages if (!getSession().getFeedbackMessages().isEmpty()) { // just display first message for now add(new Label(success-messages, String.valueOf(getSession().getFeedbackMessages().iterator().next(; } else { add(new Label(success-messages, )); } Thanks, Matt -- View this message in context: http://www.nabble.com/Is-there-a-success-message-example--tf3642922.html#a10173842 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] What's the easiest way to do a pageable/sortable list screen?
The stack trace I was getting turned out to be caused by something else - the code I posted actually does work. As far as moving to 1.3, I'll be happy to do that if there's a beta (or snapshot) release in a public Maven repo. Thanks, Matt Eelco Hillenius wrote: Thanks guys - I appreciate all your help. I've decided to go with DataView over DefaultDataTable because I couldn't get the click on column value for link[1] to work. Unfortunately, the following doesn't work with Wicket 1.2.6: item.add(new AttributeModifier(class, true, new AbstractReadOnlyModel() { public Object getObject() { return (item.getIndex() % 2 == 1) ? even : odd; } })); That's correct. IModel#getObject() is Wicket 1.3 code; in Wicket 1.2 we had getObject(Component). There are quite a few differences between 1.3 and 1.2 (more than initially planned, but you can read about that in the archives and on ). A migration document from 1.2 to 1.3 can be found here http://cwiki.apache.org/WICKET/migrate-13.html If you're starting out, I'd strongly encourage you to use 1.3. There are many improvements in it, and we're getting very close to doing a release (which at this stage will also be used to propose graduation with Apache, or at least get a step further in that). I tried the following (I'm a complete newbie, so sorry if this is dumb), but it doesn't work: public Object getObject(Component component) { Item item = (Item) component; return (item.getIndex() % 2 == 1) ? even : odd; } Like I said, I think it is better if you use 1.3, but in 1.2 you the component argument would be the component the behavior is added to. I'm not sure whether that is the Item? If it is, what doesn't work? Is the CSS availalbe etc? Or do you get an exception? Eelco - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- View this message in context: http://www.nabble.com/What%27s-the-easiest-way-to-do-a-pageable-sortable-list-screen--tf3639929.html#a10173898 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] What's the easiest way to do a pageable/sortable list screen?
Fresh snapshots are deployed on our maven repository[1] by bamboo[2] . So including: repository repository idwicket-stuff.org/id urlhttp://wicketstuff.org/maven/repository//url snapshots enabledtrue/enabled /snapshots /repository /repositories and: dependency groupIdorg.apache.wicket/groupId artifactIdwicket/artifactId version1.3.0-incubating-SNAPSHOT/version /dependency should do the trick. There could still be a problem with our snapshot meta data, so you might want to delete any existing jars when you're looking for an update[3] Eelco [1] http://wicketstuff.org/maven/repository/ (e.g. http://wicketstuff.org/maven/repository/org/apache/wicket/wicket/1.3.0-incubating-SNAPSHOT/) [2] http://wicketstuff.org/bamboo/ [3] find ~/.m2/repository/org/apache/wicket -name 1.3.0-incubating-SNAPSHOT | xargs rm -rf On 4/24/07, mraible [EMAIL PROTECTED] wrote: The stack trace I was getting turned out to be caused by something else - the code I posted actually does work. As far as moving to 1.3, I'll be happy to do that if there's a beta (or snapshot) release in a public Maven repo. Thanks, Matt Eelco Hillenius wrote: Thanks guys - I appreciate all your help. I've decided to go with DataView over DefaultDataTable because I couldn't get the click on column value for link[1] to work. Unfortunately, the following doesn't work with Wicket 1.2.6: item.add(new AttributeModifier(class, true, new AbstractReadOnlyModel() { public Object getObject() { return (item.getIndex() % 2 == 1) ? even : odd; } })); That's correct. IModel#getObject() is Wicket 1.3 code; in Wicket 1.2 we had getObject(Component). There are quite a few differences between 1.3 and 1.2 (more than initially planned, but you can read about that in the archives and on ). A migration document from 1.2 to 1.3 can be found here http://cwiki.apache.org/WICKET/migrate-13.html If you're starting out, I'd strongly encourage you to use 1.3. There are many improvements in it, and we're getting very close to doing a release (which at this stage will also be used to propose graduation with Apache, or at least get a step further in that). I tried the following (I'm a complete newbie, so sorry if this is dumb), but it doesn't work: public Object getObject(Component component) { Item item = (Item) component; return (item.getIndex() % 2 == 1) ? even : odd; } Like I said, I think it is better if you use 1.3, but in 1.2 you the component argument would be the component the behavior is added to. I'm not sure whether that is the Item? If it is, what doesn't work? Is the CSS availalbe etc? Or do you get an exception? Eelco - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- View this message in context: http://www.nabble.com/What%27s-the-easiest-way-to-do-a-pageable-sortable-list-screen--tf3639929.html#a10173898 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Is there a success message example?
You can just add a FeedbackPanel to the Page: add(new FeedbackPanel(feedback)); span wicket:id=feedback/span Then call your info(...), error(...) or whatever method: info(It Worked!); I haven't worked with 1.3 yet, so I don't know if anything has changed there. On 4/24/07, mraible [EMAIL PROTECTED] wrote: I'm trying to success messages working. In my Detail.java page, I have: protected void onSaveUser(User user) { userManager.saveUser(user); getSession().info(It worked!); setRedirect(true); setResponsePage(backPage); } First of all, is this the proper way to put messages in flash scope? On my backPage, I have the following code, but it never seems to find anything. // check for success messages if (!getSession().getFeedbackMessages().isEmpty()) { // just display first message for now add(new Label(success-messages, String.valueOf(getSession().getFeedbackMessages().iterator().next(; } else { add(new Label(success-messages, )); } Thanks, Matt -- View this message in context: http://www.nabble.com/Is-there-a-success-message-example--tf3642922.html#a10173842 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- Nick Heudecker Professional Wicket Training Consulting http://www.systemmobile.com Eventful - Intelligent Event Management http://www.eventfulhq.com - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Is there a success message example?
I'm trying to success messages working. In my Detail.java page, I have: protected void onSaveUser(User user) { userManager.saveUser(user); getSession().info(It worked!); setRedirect(true); setResponsePage(backPage); } First of all, is this the proper way to put messages in flash scope? Yep. You typically don't need to call setRedirect yourself though. Was there any reason for doing that? Also, flash message works good here, but if you already know the page you are going to display it on, you might as well set it on there. On my backPage, I have the following code, but it never seems to find anything. // check for success messages if (!getSession().getFeedbackMessages().isEmpty()) { // just display first message for now add(new Label(success-messages, String.valueOf(getSession().getFeedbackMessages().iterator().next(; } else { add(new Label(success-messages, )); } That's definitively not the way to do it :) First of all, that code - if it would work - would obviously only take the first message. If you want to display an arbitrary list of things, you should use ListViews or Repeaters. But more importantly, you should just use a FeedbackPanel. Typically, add(new FeedbackPanel(feedback)); does the trick. If you need more fine grained control over which messages to display, you can create it with a IFeedbackMessageFilter. Also, not relevant for this case, but take a look at FormComponentFeedbackBorder as well. Another note is that the way you do labels in your example is rather static. Typically you should try to use models that work in a 'pull' way (gets the results just in time/ when rendering). Take this code (which is comparable to what you did): SomeObject foo = ... if (foo != null) { add(new Label(foo, foo.toString)); } else { add(new Label(foo, )); } rather you should do: SomeObject foo = bar.getFoo(); add(new Label(foo, new Model(foo))); or more dynamic (evaluated on every request) add(new Label(foo, new PropertyModel(bar, foo))); or even add(new Label(foo, new AbstractReadOnlyModel(){ public Object getObject() { return bar.getFoo(); } }); for complete control. Hope that helps, Eelco - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] problem with browser back-button and links after ajax replace
Hi, I'm having this problem when I back-button to a page with a panel that replaced itself with another panel containing a link - and re-try the link: WicketMessage: Method onLinkClicked of interface org.apache.wicket.markup.html.link.ILinkListener targeted at component [MarkupContainer [Component id = link, page = test.HomePage, path = 0:panel: link.FirstPanel$1, isVisible = true, isVersioned = true]] threw an exception Root cause: java.lang.IllegalArgumentException: object is not an instance of declaring class at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke ( NativeMethodAccessorImpl.java:39) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.wicket.RequestListenerInterface.invoke( RequestListenerInterface.java:186) at org.apache.wicket.request.target.component.listener.ListenerInterfaceRequestTarget.processEvents( ListenerInterfaceRequestTarget.java:73) at org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents( AbstractRequestCycleProcessor.java:90) at org.apache.wicket.RequestCycle.processEventsAndRespond (RequestCycle.java:975) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1048) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1127) at org.apache.wicket.RequestCycle.request(RequestCycle.java :489) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:248) I have a quickstart. I think attachments are not allowed on the mailing list, so I created a JIRA and uploaded an attachment. Do let me know if there is a better way to send a quickstart to the mailing list. I'm using wicket 1.3.0-SNAPSHOT https://issues.apache.org/jira/browse/WICKET-491 Thanks, Peter. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Is there a success message example?
for a full crud app wicket+spring+hibernate/ibatis/shades see wicket-phonebook project in wicket-stuff.sf.net it has the feedback messages and grids you want. also for models you can read here http://cwiki.apache.org/confluence/display/WICKET/Working+with+Wicket+models -igor On 4/24/07, mraible [EMAIL PROTECTED] wrote: I'm trying to success messages working. In my Detail.java page, I have: protected void onSaveUser(User user) { userManager.saveUser(user); getSession().info(It worked!); setRedirect(true); setResponsePage(backPage); } First of all, is this the proper way to put messages in flash scope? On my backPage, I have the following code, but it never seems to find anything. // check for success messages if (!getSession().getFeedbackMessages().isEmpty()) { // just display first message for now add(new Label(success-messages, String.valueOf(getSession().getFeedbackMessages().iterator().next(; } else { add(new Label(success-messages, )); } Thanks, Matt -- View this message in context: http://www.nabble.com/Is-there-a-success-message-example--tf3642922.html#a10173842 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Is there a success message example?
Eelco Hillenius wrote: I'm trying to success messages working. In my Detail.java page, I have: protected void onSaveUser(User user) { userManager.saveUser(user); getSession().info(It worked!); setRedirect(true); setResponsePage(backPage); } First of all, is this the proper way to put messages in flash scope? Yep. You typically don't need to call setRedirect yourself though. Was there any reason for doing that? Also, flash message works good here, but if you already know the page you are going to display it on, you might as well set it on there. I'm using setRedirect(true) in order to do redirect-after-post so clicking refresh on the browser doesn't prompt the user. Eelco Hillenius wrote: On my backPage, I have the following code, but it never seems to find anything. // check for success messages if (!getSession().getFeedbackMessages().isEmpty()) { // just display first message for now add(new Label(success-messages, String.valueOf(getSession().getFeedbackMessages().iterator().next(; } else { add(new Label(success-messages, )); } That's definitively not the way to do it :) First of all, that code - if it would work - would obviously only take the first message. If you want to display an arbitrary list of things, you should use ListViews or Repeaters. But more importantly, you should just use a FeedbackPanel. Typically, add(new FeedbackPanel(feedback)); does the trick. If you need more fine grained control over which messages to display, you can create it with a IFeedbackMessageFilter. Also, not relevant for this case, but take a look at FormComponentFeedbackBorder as well. I tried adding that in the page I'm routing to, but not dice - the span shows up, but there's nothing it in: public UserList() { setPageTitle(TITLE); add(new FeedbackPanel(feedback)); ... It really is strange because it seems like it should work. Thanks, Matt Eelco Hillenius wrote: Another note is that the way you do labels in your example is rather static. Typically you should try to use models that work in a 'pull' way (gets the results just in time/ when rendering). Take this code (which is comparable to what you did): SomeObject foo = ... if (foo != null) { add(new Label(foo, foo.toString)); } else { add(new Label(foo, )); } rather you should do: SomeObject foo = bar.getFoo(); add(new Label(foo, new Model(foo))); or more dynamic (evaluated on every request) add(new Label(foo, new PropertyModel(bar, foo))); or even add(new Label(foo, new AbstractReadOnlyModel(){ public Object getObject() { return bar.getFoo(); } }); for complete control. Hope that helps, Eelco - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- View this message in context: http://www.nabble.com/Is-there-a-success-message-example--tf3642922.html#a10174556 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Is there a success message example?
Got it - I needed getSession().info() instead of info(). Thanks guys - I really appreciate the excellent support. Matt mraible wrote: Eelco Hillenius wrote: I'm trying to success messages working. In my Detail.java page, I have: protected void onSaveUser(User user) { userManager.saveUser(user); getSession().info(It worked!); setRedirect(true); setResponsePage(backPage); } First of all, is this the proper way to put messages in flash scope? Yep. You typically don't need to call setRedirect yourself though. Was there any reason for doing that? Also, flash message works good here, but if you already know the page you are going to display it on, you might as well set it on there. I'm using setRedirect(true) in order to do redirect-after-post so clicking refresh on the browser doesn't prompt the user. Eelco Hillenius wrote: On my backPage, I have the following code, but it never seems to find anything. // check for success messages if (!getSession().getFeedbackMessages().isEmpty()) { // just display first message for now add(new Label(success-messages, String.valueOf(getSession().getFeedbackMessages().iterator().next(; } else { add(new Label(success-messages, )); } That's definitively not the way to do it :) First of all, that code - if it would work - would obviously only take the first message. If you want to display an arbitrary list of things, you should use ListViews or Repeaters. But more importantly, you should just use a FeedbackPanel. Typically, add(new FeedbackPanel(feedback)); does the trick. If you need more fine grained control over which messages to display, you can create it with a IFeedbackMessageFilter. Also, not relevant for this case, but take a look at FormComponentFeedbackBorder as well. I tried adding that in the page I'm routing to, but not dice - the span shows up, but there's nothing it in: public UserList() { setPageTitle(TITLE); add(new FeedbackPanel(feedback)); ... It really is strange because it seems like it should work. Thanks, Matt Eelco Hillenius wrote: Another note is that the way you do labels in your example is rather static. Typically you should try to use models that work in a 'pull' way (gets the results just in time/ when rendering). Take this code (which is comparable to what you did): SomeObject foo = ... if (foo != null) { add(new Label(foo, foo.toString)); } else { add(new Label(foo, )); } rather you should do: SomeObject foo = bar.getFoo(); add(new Label(foo, new Model(foo))); or more dynamic (evaluated on every request) add(new Label(foo, new PropertyModel(bar, foo))); or even add(new Label(foo, new AbstractReadOnlyModel(){ public Object getObject() { return bar.getFoo(); } }); for complete control. Hope that helps, Eelco - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- View this message in context: http://www.nabble.com/Is-there-a-success-message-example--tf3642922.html#a10174595 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Is there a success message example?
On 4/24/07, mraible [EMAIL PROTECTED] wrote: You typically don't need to call setRedirect yourself though. Was there any reason for doing that? Also, flash message works good here, but if you already know the page you are going to display it on, you might as well set it on there. I'm using setRedirect(true) in order to do redirect-after-post so clicking refresh on the browser doesn't prompt the user. what eelco meant to say is that wicket does redirect-after-post for you by default, thus no need for you to bother with it. -igor - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Getting error java.lang.ClassCastException: wicket.util.tester.WicketTester
Can you give us the stack trace you get? Eelco On 4/24/07, Akshat [EMAIL PROTECTED] wrote: Providing the source class and its corresponding Test class package com.bsideinc.bsidecom.wicket.pages.sections; import com.bsideinc.bsidecom.wicket.pages.DefaultBsidePage; /** * User: gutter * Date: Feb 8, 2007 * Time: 1:38:03 PM */ public class DefaultHomePage extends DefaultBsidePage { public static final String HOME = home; public String getSection() { return HOME; } public String getTitle() { return B-Side Home; } } Test Class package com.bsideinc.bsidecom.wicket.pages.sections; import wicket.util.tester.WicketTester; import junit.framework.TestCase; public class TestDefaultHomePage extends TestCase{ //private DefaultHomePage testDeafDefaultHomePage = new DefaultHomePage(); private WicketTester tester; public TestDefaultHomePage(){ super (Test DefaultHomePage class); } protected void setUp(){ tester = new WicketTester(); } public void testgetTitle(){ tester.startPage(DefaultHomePage.class); tester.assertRenderedPage(DefaultHomePage.class); //tester.assertNoErrorMessage(); //System.out.println( + testDeafDefaultHomePage.getTitle() ); } } -- View this message in context: http://www.nabble.com/Getting-error-java.lang.ClassCastException%3A-wicket.util.tester.WicketTester-tf3638328.html#a10159802 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user