Re: Stateless form submission
Igor, How to use captcha on stateless form then? Is there a way I can detect construction of page was either due to page reference or form submission? Thank you! shumbola igor.vaynberg wrote: yes, that is what stateless pages work. when you submit the whole page is recreated from scractch and the old state is applied. -igor On 9/30/07, shumbola [EMAIL PROTECTED] wrote: I've got a class Register mounted at /app/register and a class RegisterForm extended from StatelessForm. I put on this form two input fields, and a captcha from extensions. If I submit then it calls constructor of Register class before onSubmit of RegisterForm. Is that a normal behaviour? If I change my form to be statefull, i.e., extend from Form class, submit directly goes to onSubmit method. -- View this message in context: http://www.nabble.com/Stateless-form-submission-tf4543115.html#a12965003 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Stateless-form-submission-tf4543115.html#a12974326 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Setting up ComponentTags for user submitted youtube links
Create a YouTubePanel: class YouTubePanel extends Panel { private int width; private int height; public YouTubePanel(String id, IModel src) { super(src); add(new AttributeModifier(width, true, new PropertyModel(this, width))); add(new AttributeModifier(height, true, new PropertyModel(this, height))); add(new WebMarkupContainer(movie).add(new AttributeModifier(value, true, src))); add(new WebMarkupContainer(embed).add(new AttributeModifier(src, true, src))); } /* add component tag check for object */ } html body wicket:panel param name=movie wicket:id=movie/param param name=wmode wicket:id=movie/param embed wicket:id=embed/embed /wicket:panel On 10/1/07, Ballist1c [EMAIL PROTECTED] wrote: Hey guys, Right now I am attempting to setup a mechanism which allows users to submit there own youtube video links and getting them to display in an embedded fashion. e.g. (ignore the dashes in HTML) obj-ect width=425 height=350 par-am name=movie value=http://www.youtube.com/v/Z3ClCwcCvdQ;/pa-ram par-am name=wmode value=transparent/pa-ram emb-ed src=http://www.youtube.com/v/Z3ClCwcCvdQ; type=application/x-shockwave-flash wmode=transparent width=425 height=350/em-bed /obj-ect There are some non-standard HTML tags and attributes in use and from what I can tell, it looks like I would have to write my own wicket component. The bit that throws me off, is the HTML to embed youtube videos is nested with multiple levels... Any advice on this matter would be appreciated, i am stuck for a starting point on how to tackle nested HTML and there respective components Thanks guys, Have a great day :) -- View this message in context: http://www.nabble.com/Setting-up-ComponentTags-for-user-submitted-youtube-links-tf4546357.html#a12973665 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.0-beta3 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta3/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Wicket menu with submenu dialog window
lizz wrote: Has anyone made a menu (with menu items and submenus) in wicket? I would like a menu that looks more or less like the Swing JMenu. I saw a reference to http://wicket-stuff.svn.sourceforge.net/viewvc/wicket-stuff/trunk/wicket-extensions-menubar/ but didn’t find that project. I need a menu that contains menu items and submenus. The menu items are easy to make but I dont know how to make the submenu. As a way to learn YUI, I've made a wicket YUI menu component. You can download and adapt it for your needs (no warranty of any kind). http://www.nabble.com/file/p12974699/yui-menu.zip yui-menu.zip -- View this message in context: http://www.nabble.com/Wicket-menu-with-submenu-%22dialog-window%22-tf4543964.html#a12974699 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Setting up ComponentTags for user submitted youtube links
Thanks mate, thats PERFECT! haha.. i just found attributeModifier setup!!! lol rad!!! Martijn Dashorst wrote: Create a YouTubePanel: class YouTubePanel extends Panel { private int width; private int height; public YouTubePanel(String id, IModel src) { super(src); add(new AttributeModifier(width, true, new PropertyModel(this, width))); add(new AttributeModifier(height, true, new PropertyModel(this, height))); add(new WebMarkupContainer(movie).add(new AttributeModifier(value, true, src))); add(new WebMarkupContainer(embed).add(new AttributeModifier(src, true, src))); } /* add component tag check for object */ } html body wicket:panel /wicket:panel On 10/1/07, Ballist1c [EMAIL PROTECTED] wrote: Hey guys, Right now I am attempting to setup a mechanism which allows users to submit there own youtube video links and getting them to display in an embedded fashion. e.g. (ignore the dashes in HTML) obj-ect width=425 height=350 par-am name=movie value=http://www.youtube.com/v/Z3ClCwcCvdQ;/pa-ram par-am name=wmode value=transparent/pa-ram emb-ed src=http://www.youtube.com/v/Z3ClCwcCvdQ; type=application/x-shockwave-flash wmode=transparent width=425 height=350/em-bed /obj-ect There are some non-standard HTML tags and attributes in use and from what I can tell, it looks like I would have to write my own wicket component. The bit that throws me off, is the HTML to embed youtube videos is nested with multiple levels... Any advice on this matter would be appreciated, i am stuck for a starting point on how to tackle nested HTML and there respective components Thanks guys, Have a great day :) -- View this message in context: http://www.nabble.com/Setting-up-ComponentTags-for-user-submitted-youtube-links-tf4546357.html#a12973665 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.0-beta3 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta3/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Setting-up-ComponentTags-for-user-submitted-youtube-links-tf4546357.html#a12974702 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Using WicketTester with a custom WebSession
Hello I'm fairly new to Wicket so forgive me if the answer is obvious and I've missed something. When I use WicketTester to test my Wicket application it always complains about casting the session, I understand this to be because the WicketTester uses a MockSession. Is there any way I can change the WicketTester to handle my custom session so I can run my unit tests? Regards Jonathan Franklin -- View this message in context: http://www.nabble.com/Using-WicketTester-with-a-custom-WebSession-tf4546811.html#a12974932 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Disabling of Wizard Cancel button
Hi, I am using wizard, its dynamic variant with DynamicWizardModel, DynamicWizardStep and IDynamicWizardStep. Would it be possible to add to wizard the possibility to also disable the cancel button? Or if I can do it somehow myself and get it to trunk, I will do, just tell me. I use wizard for importing many files into database and last step of wizard is just summary, both buttons - Cancel and Finish - do the same and there is no possibility to go back, so I would like to make availiable only Finish button. Thank you. Vitek Ballist1c wrote: Thanks mate, thats PERFECT! haha.. i just found attributeModifier setup!!! lol rad!!! Martijn Dashorst wrote: Create a YouTubePanel: class YouTubePanel extends Panel { private int width; private int height; public YouTubePanel(String id, IModel src) { super(src); add(new AttributeModifier(width, true, new PropertyModel(this, width))); add(new AttributeModifier(height, true, new PropertyModel(this, height))); add(new WebMarkupContainer(movie).add(new AttributeModifier(value, true, src))); add(new WebMarkupContainer(embed).add(new AttributeModifier(src, true, src))); } /* add component tag check for object */ } html body wicket:panel /wicket:panel On 10/1/07, Ballist1c [EMAIL PROTECTED] wrote: Hey guys, Right now I am attempting to setup a mechanism which allows users to submit there own youtube video links and getting them to display in an embedded fashion. e.g. (ignore the dashes in HTML) obj-ect width=425 height=350 par-am name=movie value=http://www.youtube.com/v/Z3ClCwcCvdQ;/pa-ram par-am name=wmode value=transparent/pa-ram emb-ed src=http://www.youtube.com/v/Z3ClCwcCvdQ; type=application/x-shockwave-flash wmode=transparent width=425 height=350/em-bed /obj-ect There are some non-standard HTML tags and attributes in use and from what I can tell, it looks like I would have to write my own wicket component. The bit that throws me off, is the HTML to embed youtube videos is nested with multiple levels... Any advice on this matter would be appreciated, i am stuck for a starting point on how to tackle nested HTML and there respective components Thanks guys, Have a great day :) -- View this message in context: http://www.nabble.com/Setting-up-ComponentTags-for-user-submitted-youtube-links-tf4546357.html#a12973665 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.0-beta3 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta3/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How do I force evaluate in a Wizard steps condition to run?
I have three wizard steps A, B and C In step B I have a drop down choice. Whether step c is valid or not depends on the selection in the drop down choice in step B. Everytime the user changes the selection in the drop down choice the wizard must be updated (the evaluate method must be run) since for some selections the next button will be disabled since step b is the last step, while for other selections c is the last step and the next button is enabled. Kent Tong wrote: lizz wrote: A parameter in my wizard step decides whether the next step is valid or not. The end user can change this parameter and I therefore need to be able to reevaluate the next wizard steps when this is changed. I use ICondition and I guess there is a way for me to force the evaluate method to be called again. How do I do that? What do you mean? IConditions are evaluated dynamically. So they will always return their current values. -- View this message in context: http://www.nabble.com/How-do-I-force-evaluate-in-a-Wizard-steps-condition-to-run--tf4545108.html#a12975317 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Onclick and ondblclick on same element
On Fri, 28 Sep 2007 16:43:05 +0200 Federico Fanton [EMAIL PROTECTED] wrote: My problem is that when I double click on the row three events are fired: two onclick and one ondblclick.. Is this normal? Is there a way to isolate the last event and ignore the first two? I googled some more, and found that usually the workaround is to set a timeout for the onclick function, so that if ondblclick gets fired before the timeout, it cancels the onclick and goes on about its business.. Is there a Wicket behavior that works this way, perhaps? ^__^; I could extend AbstractAjaxTimerBehavior maybe.. Many thanks for your time! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using WicketTester with a custom WebSession
2007/10/1, Jonnie [EMAIL PROTECTED]: Hello I'm fairly new to Wicket so forgive me if the answer is obvious and I've missed something. When I use WicketTester to test my Wicket application it always complains about casting the session, I understand this to be because the WicketTester uses a MockSession. Is there any way I can change the WicketTester to handle my custom session so I can run my unit tests? Do you provide your custom Application to the WicketTester? -- greetings from Berlin, Rüdiger Schulz www.2rue.de
Re: Using WicketTester with a custom WebSession
No I don't provide my custom application to the tester. I've had a look at the API, how do I provide this to the tester? Rüdiger_Schulz wrote: 2007/10/1, Jonnie [EMAIL PROTECTED]: Hello I'm fairly new to Wicket so forgive me if the answer is obvious and I've missed something. When I use WicketTester to test my Wicket application it always complains about casting the session, I understand this to be because the WicketTester uses a MockSession. Is there any way I can change the WicketTester to handle my custom session so I can run my unit tests? Do you provide your custom Application to the WicketTester? -- greetings from Berlin, Rüdiger Schulz www.2rue.de -- View this message in context: http://www.nabble.com/Using-WicketTester-with-a-custom-WebSession-tf4546811.html#a12975600 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Onclick and ondblclick on same element
Hi Try this out . This may surely not be the best way to do it. Here when u dbl click, the single click event still occurs...but i am using a variable to detect whether dbl click event happened before or not. In that case, i simply return after toggling back. Click Test code WebMarkupContainer click = new WebMarkupContainer(click); click.setOutputMarkupId(true); AjaxEventBehavior b1 = new AjaxEventBehavior(onclick){ @Override protected void onEvent(AjaxRequestTarget target) { if(dblclickevent){ dblclickevent = false; return; } target.appendJavascript(alert('onclick occurred');); dblclickevent = false; } }; b1.setThrottleDelay(Duration.valueOf(1000)); // Make sure dbl click happens before onclick click.add(b1); AjaxEventBehavior b2 = new AjaxEventBehavior(ondblclick){ @Override protected void onEvent(AjaxRequestTarget target) { target.appendJavascript(alert('ondblclick occurred');); dblclickevent = true; } }; click.add(b2); add(click); /code -swaroop Federico Fanton wrote: On Fri, 28 Sep 2007 16:43:05 +0200 Federico Fanton [EMAIL PROTECTED] wrote: My problem is that when I double click on the row three events are fired: two onclick and one ondblclick.. Is this normal? Is there a way to isolate the last event and ignore the first two? I googled some more, and found that usually the workaround is to set a timeout for the onclick function, so that if ondblclick gets fired before the timeout, it cancels the onclick and goes on about its business.. Is there a Wicket behavior that works this way, perhaps? ^__^; I could extend AbstractAjaxTimerBehavior maybe.. Many thanks for your time! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Onclick-and-ondblclick-on-same-element-tf4534962.html#a12975648 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Help - Best Practice - Mapping Database Constraint Violation to User Interface
mchack wrote: Could someone provide a pointer/link as to the best mechanism to map DB constraint violations from Hibernate (or ORM layer) back to the user interface layer. I'm sure this has been solved but wasn't successful in searching for an answer. I'm not sure if this is the best way to do it, but I use a custom RequestCyleProcessor that extends WebRequestCycleProcessor. It overrides #response(RuntimeException, RequestCycle) to check the RuntimeException for a ConstraintViolationException (call exception.getCause() recursively until you find one or it's null). If it finds one, I send the user to a special error page. The error will be vendor-specific, unfortunately. I use something like this for MySQL: ConstraintViolationException e = (ConstraintViolationException)t; String detail = e.getSQLException().getMessage(); if (detail != null detail.startsWith(Duplicate entry ')) { detail = detail.replaceAll(.*'(.*)'.*, $1); detail = getString( DuplicateEntry, new SingleStringMapModel(detail, detail) ); } We do this for StaleObjectStateException too (use StaleObjectStateException#getEntityName() for your error message). Regards, Al - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Onclick and ondblclick on same element
On Mon, 1 Oct 2007 02:10:13 -0700 (PDT) swaroop belur [EMAIL PROTECTED] wrote: b1.setThrottleDelay(Duration.valueOf(1000)); // Make sure dbl click happens before onclick So the delay takes place *before* the first event, not after? I see.. Many thanks! :) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
wicket datetime / YUI calendar
What's planed for the calendar? I have an issue(I'll file a bug if asked to): Selecting a date on calendar goto another (wicket)page return to the page with calendar and now default date a selected again. I do not do anything special to preserve the date for the calendar, it does not have a model.. Im starting to need these things: Multipage calendar http://developer.yahoo.com/yui/examples/calendar/calgrp.html Calendar dates marked with bold http://developer.yahoo.com/yui/examples/calendar/render.html I could try to implement these thinges myself an supply a patch later. regards Nino - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: wicket datetime / YUI calendar
hi nino, @ your problem: if there is no model which can be updated (ie with an AjaxFormComponentUpdatingBehavior), so wicket doesn't know what happened on the client side. as a consequence the calendar is initialized with the default dates. are we talking about a standalone calendar with an invisible textfield? @ multipage calendar: i already have something in my mind for supporting multipage calendars. i will try to add it this evening. @custom renderer: it would be nice if you could come up with something ;) anymore questions? regards, gerolf On 10/1/07, Nino Saturnino Martinez Vazquez Wael [EMAIL PROTECTED] wrote: What's planed for the calendar? I have an issue(I'll file a bug if asked to): Selecting a date on calendar goto another (wicket)page return to the page with calendar and now default date a selected again. I do not do anything special to preserve the date for the calendar, it does not have a model.. Im starting to need these things: Multipage calendar http://developer.yahoo.com/yui/examples/calendar/calgrp.html Calendar dates marked with bold http://developer.yahoo.com/yui/examples/calendar/render.html I could try to implement these thinges myself an supply a patch later. regards Nino - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Wicket menu with submenu dialog window
You should really create wicket stuff project for this. Or perhaps it's something for the minis? Kent Tong wrote: lizz wrote: Has anyone made a menu (with menu items and submenus) in wicket? I would like a menu that looks more or less like the Swing JMenu. I saw a reference to http://wicket-stuff.svn.sourceforge.net/viewvc/wicket-stuff/trunk/wicket-extensions-menubar/ but didn’t find that project. I need a menu that contains menu items and submenus. The menu items are easy to make but I dont know how to make the submenu. As a way to learn YUI, I've made a wicket YUI menu component. You can download and adapt it for your needs (no warranty of any kind). http://www.nabble.com/file/p12974699/yui-menu.zip yui-menu.zip - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using WicketTester with a custom WebSession
At least in 1.3 you can pass it to the constructor. Don't know for 1.2 though. You can try the archive at nabble. 2007/10/1, Jonnie [EMAIL PROTECTED]: No I don't provide my custom application to the tester. I've had a look at the API, how do I provide this to the tester? Rüdiger_Schulz wrote: 2007/10/1, Jonnie [EMAIL PROTECTED]: Hello I'm fairly new to Wicket so forgive me if the answer is obvious and I've missed something. When I use WicketTester to test my Wicket application it always complains about casting the session, I understand this to be because the WicketTester uses a MockSession. Is there any way I can change the WicketTester to handle my custom session so I can run my unit tests? Do you provide your custom Application to the WicketTester? -- greetings from Berlin, Rüdiger Schulz www.2rue.de -- View this message in context: http://www.nabble.com/Using-WicketTester-with-a-custom-WebSession-tf4546811.html#a12975600 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- greetings from Berlin, Rüdiger Schulz www.2rue.de - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Wicket Meetup Amsterdam: a proposal
Hi all, Since it's been a bit quiet about the Amsterdam Meetup lately, I was thinking of simply proposing a date and a venue myself. Maybe I missed out on the conversation, in which case I apologize upfront! By no means I'm trying to push this into a 'real conference' - these things grow over years! But I do like to see this Meetup happen, because: - I think it would be good to get 'The People Behind Wicket' on stage, while allowing 'New People' to have their say as well, in an informal setting - It's a good way of attracting non-incrowd people - The ApacheCons and similar conferences have a too high barrier for people that are interested in Wicket but do not know how to start. Of course, the ApacheCon conference is an excellent way of broadening ones vision, but for non-Apache people it's hard to dive into - People who have not yet decided whether they want to use Wicket, could be held back by a 'private' meetup. These people do not know the community, and don't know what to expect. A more 'anonymous' (ie. bigger) meetup could help lower the barrier and bring in new developers - We need to close the gap between users and developers, and having them all in one room helps - Too many little meetups shatter the community instead of building it up - It's an excellent environment to grow a network and a community - There's already 28 people on the Wiki page, and this might grow even further - Organizing the meetup in a 'neutral' environment ensures the community stays neutral too - And finally: it should be initiated, supported and organized by the community itself Covering the costs of such a meetup doesn't have to be hard. For the Cocoon GetTogether meetups, there's a 125 euro fee for three (3!) whole days. We do have some sponsors over there to cover for lunches and coffee and connectivity. If we allow sponsors for a Wicket meetup, I guess a one day event could easily be free for all attendees. On the other hand, if sponsors are a concern, then we could have all costs covered by a 50 euro fee or something. The Apache Cocoon community has had a really good experience with Amsterdam as a venue location. It's very well-reachable from all around the world, and pretty affordable too. Just to have something realistic to talk about - I apologize if I'm moving too fast here - I've called the Felix Meritis building to ask which rooms are available (and affordable!). The room can hold up to 50 people sitting at tables (with laptop and all), but we can scale up to 200 if we want :) These dates would fit their schedule: Friday November 23rd Monday November 26th Friday November 30th Please note that these are weekdays. We could also try weekends if that's better. We could also try combining this with a course from the London guys.. Let me know what others think! Kind regards, Arjé Cahn Hippo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How do I force evaluate in a Wizard steps condition to run?
lizz wrote: I have three wizard steps A, B and C In step B I have a drop down choice. Whether step c is valid or not depends on the selection in the drop down choice in step B. Everytime the user changes the selection in the drop down choice the wizard must be updated (the evaluate method must be run) since for some selections the next button will be disabled since step b is the last step, while for other selections c is the last step and the next button is enabled. When I'd suggest you add an artificial step D as the final step saying You're completed the whole process. This step is always enabled. Then no matter step C should be enabled or not, the user will always see a Next button. Another option is try enabling wantOnSelectionChangedNotifications() to refresh the whole page. -- View this message in context: http://www.nabble.com/How-do-I-force-evaluate-in-a-Wizard-steps-condition-to-run--tf4545108.html#a12979454 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Newbie Question Loading localization Resources from Database
Hi, could you please help me with the following problem: I use wicket 1.3.0 beta 3 + java 1.4.2 + tomcat 5.5 I wrote a small page that has a wicket:message key=helloWorld when running tomcat I get: [Localizer] Tried to retrieve a localized string for a component that has not yet been added to the page. This can sometimes lead to an invalid or no localized resource returned. Make sure you are not calling Component#getString() inside your Component's constructor. Offending component: [Page class = com.ppa.ubs.lbs.pages.Login, id = 0, version = 7, ajax = 0] Then I wrote a DatabaseResourceLoader implementing IStringResourceLoader public String loadStringResource(Class clazz, String key, Locale locale, String style) { //funny effect locale.getLanguage() -- Nullpointer Exception //I have to call locale.clone().getLanguage(). Is that normal? ? ... do some db lookup } Then I added some changeLocale-Links to the page constructor: add( new Link(localeEN){ public void onClick() { getSession().setLocale(new Locale(en, EN)); } }); add( new Link(localeDE){ public void onClick() { getSession().setLocale(new Locale(de, DE)); } }); The problem: When I change the locale through the Links, the message still remains the same. The locale passed to the DatabaseResourceLoader always is DE (german). Question: Can it be, that the Session-Locale is not used, because of the Localizer-Problem? Which locale is used instead? Is there a better way to get database-resource-strings? Thanks for your help in advance Best regards Marcus
Can't locate an image file...
I am experimenting with the simplest of the Wicket examples. I was trying to add an image to the SignIn example page. My html code looks like this: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN html xmlns:wicket=http://wicket.apache.org/;headtitleWicket Examples - si gnin/title link rel=stylesheet type=text/css href=style.css /head body style=color: rgb(0, 0, 0); background-color: silver; alink=#99 lin k=#99 vlink=#990099 br span wicket:id=feedback br /span br img style=width: 96px; height: 42px; alt= src=My_logo.gif nbsp; New image added... bigbigspan style=font-weight: bold; font-style: italic;Program Title.../ span/big/bigbr br form wicket:id=signInForm table . rest of the signin.html code is unchanged... When I load the war file, the image does not show - there is a box where it should be, followed by the 'Program Title' text. I put the My_logo.gif file in the same directory as the SignIn.java/SignIn.html files. Questions: 1) Do I need to put something in the SignIn.java file to tell it to load the image? 2) Do I need to add something to a config file somewhere to tell it where to locate the image file? Do the image files have to be in the same src directory as the html/java files or can they be moved somewhere else (like src/images for example)? Thanks very much, nbc - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can't locate an image file...
You need to tell wicket to search for the image. So you have to either: 1. add an Image component to the signin page/panel 2. surround (at least) the img tag with wicket:link/wicket:link Otherwise WIcket will not know that it should look for the image on the classpath. Martijn On 10/1/07, Neil B. Cohen [EMAIL PROTECTED] wrote: I am experimenting with the simplest of the Wicket examples. I was trying to add an image to the SignIn example page. My html code looks like this: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN html xmlns:wicket=http://wicket.apache.org/;headtitleWicket Examples - si gnin/title link rel=stylesheet type=text/css href=style.css /head body style=color: rgb(0, 0, 0); background-color: silver; alink=#99 lin k=#99 vlink=#990099 br span wicket:id=feedback br /span br img style=width: 96px; height: 42px; alt= src=My_logo.gif nbsp; New image added... bigbigspan style=font-weight: bold; font-style: italic;Program Title.../ span/big/bigbr br form wicket:id=signInForm table . rest of the signin.html code is unchanged... When I load the war file, the image does not show - there is a box where it should be, followed by the 'Program Title' text. I put the My_logo.gif file in the same directory as the SignIn.java/SignIn.html files. Questions: 1) Do I need to put something in the SignIn.java file to tell it to load the image? 2) Do I need to add something to a config file somewhere to tell it where to locate the image file? Do the image files have to be in the same src directory as the html/java files or can they be moved somewhere else (like src/images for example)? Thanks very much, nbc - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.0-beta3 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta3/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Page.detachModels() not working like it used to
So the contract of the method has changed since 1.2.6? -Dan On 10/1/07, Igor Vaynberg [EMAIL PROTECTED] wrote: i think the way it works now is that there is a visitor that goes through the hierarchy and calls detach() on every component. so there is no need for detachmodels to do much more then detach the models for the current component only. -igor On 10/1/07, Dan Syrstad [EMAIL PROTECTED] wrote: Anyone know why Page.detachModels() no longer detaches the models of all child components in 1.3beta3? There is a bunch of code commented out in Page.detachModels() that previously did this. Now it just calls super.detachModels() (on Component) which apparently just detaches the model immediately attached to the Page (which renders the need for Page.detachModels() moot). I searched the lists and the closest thing I found was a reference to https://issues.apache.org/jira/browse/WICKET-418, but that seems to have to do with Ajax requests. This has broken a JUnit test that was testing a detachable model using WicketTester. The same test passes in Wicket 1.2.6. Is there something different I should be doing in 1.3? -Dan
Prompting a User to Save When Leaving a Page
I'd like to know if there is a way to prompt a user to save when leaving a page using Wicket 1.2.6. I need to display a confirmation message only if the form has been dirtied. There is a javascript-only solution http://www.4guysfromrolla.com/webtech/100604-1.shtml here . It's kind of ugly because you have to generate custom javascript for every form. Is there a more elegant way with Wicket? I know that Wicket 1.3 has the onBeforeUnload hook, but I am using 1.2.6 and cannot upgrade at the moment. Any ideas are appreciated. - Julian http://javathoughts.capesugarbird.com/ My blog about Wicket and other Java stuff -- View this message in context: http://www.nabble.com/Prompting-a-User-to-Save-When-Leaving-a-Page-tf4549589.html#a12983211 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Page.detachModels() not working like it used to
guess so -igor On 10/1/07, Dan Syrstad [EMAIL PROTECTED] wrote: So the contract of the method has changed since 1.2.6? -Dan On 10/1/07, Igor Vaynberg [EMAIL PROTECTED] wrote: i think the way it works now is that there is a visitor that goes through the hierarchy and calls detach() on every component. so there is no need for detachmodels to do much more then detach the models for the current component only. -igor On 10/1/07, Dan Syrstad [EMAIL PROTECTED] wrote: Anyone know why Page.detachModels() no longer detaches the models of all child components in 1.3beta3? There is a bunch of code commented out in Page.detachModels() that previously did this. Now it just calls super.detachModels() (on Component) which apparently just detaches the model immediately attached to the Page (which renders the need for Page.detachModels() moot). I searched the lists and the closest thing I found was a reference to https://issues.apache.org/jira/browse/WICKET-418, but that seems to have to do with Ajax requests. This has broken a JUnit test that was testing a detachable model using WicketTester. The same test passes in Wicket 1.2.6. Is there something different I should be doing in 1.3? -Dan
hide/show components - role based
Hi all, im working with Wicket 1.2.4, Spring and Acegi. Im trying to dinamically show or hide html components, like links, buttons, etc. Is there a best practice in wicket? Im also using wicket-auth-roles, and i've been digging a little, but i couldn't find a way to do this. BTW, i already read http://cwiki.apache.org/WICKET/acegi-and-wicket-auth-roles.html And in the Hinding Components there is a big and nice TODO ;-) Thanks in advance! Juan Arias
Re: How do I force evaluate in a Wizard steps condition to run?
You would probably have to subclass WizardModel, or come up with a new IWizardModel implementation completely. The former will probably suffice, unless some strategic methods are declared final. lizz wrote: I really dont want to add more steps that the ones I already have. for the case when step c is no longer valid I woild like the next button to be disabled and the finish button to be enabled. Isn't there a method for updating the button panel? Kent Tong wrote: lizz wrote: I have three wizard steps A, B and C In step B I have a drop down choice. Whether step c is valid or not depends on the selection in the drop down choice in step B. Everytime the user changes the selection in the drop down choice the wizard must be updated (the evaluate method must be run) since for some selections the next button will be disabled since step b is the last step, while for other selections c is the last step and the next button is enabled. When I'd suggest you add an artificial step D as the final step saying You're completed the whole process. This step is always enabled. Then no matter step C should be enabled or not, the user will always see a Next button. Another option is try enabling wantOnSelectionChangedNotifications() to refresh the whole page.
Re: Wicket menu with submenu dialog window
I forgot to mention which menus are currently supported in menu2: - MenuBar - Menu - Group Menu (with and without labels) Looking for help with ContextMenu as it is a beast in itself. Anyone created/integrated YUI ContextMenu with Wicket? -- View this message in context: http://www.nabble.com/Wicket-menu-with-submenu-%22dialog-window%22-tf4543964.html#a12988297 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Nabble Hint - Escaping Blocks of HTML in posts
I got this as a response from Nabble support regarding ways to escape blocks of HTML in posts without having to escape each individual and with lt; and gt;. You can now escape HTML by putting it between and . http://www.nabble.com/What-is-the-best-way-to-include-html-markup-in-froum-posts--tf4430044.html#a12985836 Hope people find this helpful. -Mike -- View this message in context: http://www.nabble.com/Nabble-Hint---Escaping-Blocks-of-HTML-in-posts-tf4551391.html#a12988641 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Nabble Hint - Escaping Blocks of HTML in Nabble Posts
I got this as a response from Nabble support regarding ways to escape blocks of HTML in posts without having to escape each individual and . http://www.nabble.com/What-is-the-best-way-to-include-html-markup-in-froum-posts--tf4430044.html#a12985836 You can now escape HTML by putting it between lt;rawgt; and lt;/rawgt; Hope people find this helpful. -Mike -- View this message in context: http://www.nabble.com/Nabble-Hint---Escaping-Blocks-of-HTML-in-Nabble-Posts-tf4551393.html#a12988643 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Disabling of Wizard Cancel button
Hey Vit, umm you may want to create a new thread for this topic Vít Rozkovec wrote: Hi, I am using wizard, its dynamic variant with DynamicWizardModel, DynamicWizardStep and IDynamicWizardStep. Would it be possible to add to wizard the possibility to also disable the cancel button? Or if I can do it somehow myself and get it to trunk, I will do, just tell me. I use wizard for importing many files into database and last step of wizard is just summary, both buttons - Cancel and Finish - do the same and there is no possibility to go back, so I would like to make availiable only Finish button. Thank you. Vitek Ballist1c wrote: Thanks mate, thats PERFECT! haha.. i just found attributeModifier setup!!! lol rad!!! Martijn Dashorst wrote: Create a YouTubePanel: class YouTubePanel extends Panel { private int width; private int height; public YouTubePanel(String id, IModel src) { super(src); add(new AttributeModifier(width, true, new PropertyModel(this, width))); add(new AttributeModifier(height, true, new PropertyModel(this, height))); add(new WebMarkupContainer(movie).add(new AttributeModifier(value, true, src))); add(new WebMarkupContainer(embed).add(new AttributeModifier(src, true, src))); } /* add component tag check for object */ } html body wicket:panel /wicket:panel On 10/1/07, Ballist1c [EMAIL PROTECTED] wrote: Hey guys, Right now I am attempting to setup a mechanism which allows users to submit there own youtube video links and getting them to display in an embedded fashion. e.g. (ignore the dashes in HTML) obj-ect width=425 height=350 par-am name=movie value=http://www.youtube.com/v/Z3ClCwcCvdQ;/pa-ram par-am name=wmode value=transparent/pa-ram emb-ed src=http://www.youtube.com/v/Z3ClCwcCvdQ; type=application/x-shockwave-flash wmode=transparent width=425 height=350/em-bed /obj-ect There are some non-standard HTML tags and attributes in use and from what I can tell, it looks like I would have to write my own wicket component. The bit that throws me off, is the HTML to embed youtube videos is nested with multiple levels... Any advice on this matter would be appreciated, i am stuck for a starting point on how to tackle nested HTML and there respective components Thanks guys, Have a great day :) -- View this message in context: http://www.nabble.com/Setting-up-ComponentTags-for-user-submitted-youtube-links-tf4546357.html#a12973665 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.0-beta3 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta3/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Setting-up-ComponentTags-for-user-submitted-youtube-links-tf4546357.html#a12990093 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Newbie Question Loading localization Resources from Database
Hi Marcus, marcus dickerhof wrote: [...] Question: Can it be, that the Session-Locale is not used, because of the Localizer-Problem? Which locale is used instead? If you're setting the Locale in your Session (probably a class that extends WebSession) and then getting the Locale through the Session, the warning about the Localizer doesn't mean, as far as I know, that the Session Locale isn't being used. Otherwise, the default Locale, which is defined by your browser settings, will be used. marcus dickerhof wrote: Is there a better way to get database-resource-strings? I believe .properties files are a better way to get localized strings... Is there any reason why you can't/shouldn't use them? Hope this helps, Cristina -- View this message in context: http://www.nabble.com/Newbie-Question-Loading-localization-Resources-from-Database-tf4548742.html#a12990188 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How do I force evaluate in a Wizard steps condition to run?
lizz wrote: I really dont want to add more steps that the ones I already have. for the case when step c is no longer valid I woild like the next button to be disabled and the finish button to be enabled. Isn't there a method for updating the button panel? As I said, you can enable wantOnSelectionChangedNotifications() to refresh the whole page. Here is some sample code: public class WizardTest extends WebPage { private String selected = A; public WizardTest() { WizardModel wizardModel = new WizardModel(); wizardModel.addListener(new IWizardModelListener() { public void onFinish() { setResponsePage(Completed.class); } public void onCancel() { } public void onActiveStepChanged(IWizardStep newStep) { } }); wizardModel.add(new MyStep(a)); wizardModel.add(new MyStep2(new PropertyModel(this, selected))); wizardModel.add(new MyStep(c), new ICondition() { public boolean evaluate() { return A.equals(selected); } }); Wizard w = new Wizard(w, wizardModel); add(w); } } public class MyStep2 extends WizardStep { public MyStep2(IModel model) { List options = new ArrayList(); options.add(A); options.add(B); add(new DropDownChoice(s, model, options) { protected boolean wantOnSelectionChangedNotifications() { return true; } }); } } -- View this message in context: http://www.nabble.com/How-do-I-force-evaluate-in-a-Wizard-steps-condition-to-run--tf4545108.html#a12991207 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: hide/show components - role based
Juan Gabriel Arias wrote: Im trying to dinamically show or hide html components, like links, buttons, etc. something like: public class MyPage { public MyPage() { Link myLink = ...; MetaDataRoleAuthorizationStrategy.authorize(myLink, RENDER, role1,role2); } } -- View this message in context: http://www.nabble.com/hide-show-components---role-based-tf4550513.html#a12991489 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Newbie Question Loading localization Resources from Database
//funny effect locale.getLanguage() -- Nullpointer Exception //I have to call locale.clone().getLanguage(). Is that normal? ? Could you give us the full stack trace please? Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]