Re: Wicket portlets on LIferay
Thx for help, but this doesn't sort it out. A tried: code ... protected void init() { getRequestCycleSettings().setRenderStrategy(IRequestCycleSettings.ONE_PASS_RENDER); super.init(); } ... /code and also code ... protected void init() { super.init(); getRequestCycleSettings().setRenderStrategy(IRequestCycleSettings.ONE_PASS_RENDER); } ... /code Any idea? Miso -- View this message in context: http://www.nabble.com/Wicket-portlets-on-LIferay-tf4231110.html#a12047909 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: {wicket 1.3 Beta 2} Adding panel via ajax...
Of course:) This goes wrong: What I would like from below was for it to replace the PhoneSearchPanel with the next step (gotoPage) Now I have to use panel since im using the tabs from extension, originally I created this with pages.. I've though of having a container(which also would be a panel) which could keep track of panels instead, im not sure that would work better? public PhoneSearchPanel(String id, final IPhoneManipulationPanel gotoPage) { super(id); setOutputMarkupId(true); Form form = new Form(form); final Panel panel = this; add(form); AutoCompleteTextField phoneName = new AutoCompleteTextField( phoneName, selectedPhone) { @Override protected Iterator getChoices(String input) { return SDUTApplication.getService().findPhonesByFilter(input, null, null, null, null, null, null, null).iterator(); } }; form.add(phoneName); form.add(new AjaxButton(submit, form) { @Override protected void onSubmit(AjaxRequestTarget target, Form form) { gotoPage.setPhone(selectedPhone); target.addComponent((Component) gotoPage, panel.getMarkupId()); } }); } } Eelco Hillenius wrote: On 8/7/07, Nino Saturnino Martinez Vazquez Wael [EMAIL PROTECTED] wrote: Ok, I'll try to explain myself a little better. Im using the tabs from extensions, tabs require that what you work with are panels (otherwise I would have done this with pages). So some of my tabs have a certain flow. Inorder to create that flow I have to replace panels along the way, for example start with the search panel, then replace the search panel with the edit panel. However wicket complains that you cant add the panel via ajax with being attached to a page, and since im replaceing not adding this cant be done? Am I using a wrong approach on this? I'm not sure what goes wrong. I'm doing component replacements via Ajax all the time, without any wizardy needed. Can you give us a code fragment of what you were doing earlier? Eelco - 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: help script.aculo.us wicket
look at the wiki? http://wicketstuff.org/confluence/display/STUFFWIKI/wicketstuff-scriptaculous anita nichols wrote: I download the jar, but how do I use script.aculo.us on wicket? Thanks, Anita - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to use form method=get?
Hi, being new to wicket I may be completely wrong about this but my thoughts are these. It cannot be done. When constructing a form in wicket, the action attribute value contains the url to the destination page including the wicket component navigation information, i.e. action=some-context/some-page?wicket-component-nav-info However, when a browser submits a form with method get, the url is modified so that the part of the url following the '?' is encoding the form data. All wicket component nav info is then lost and wicket is lost when trying to determine the IFormListener and instead defaults to the HomePage. What are your thoughts on this. Best Regards -Thomas -- View this message in context: http://www.nabble.com/How-to-use-form-method%3D%22get%22--tf4229581.html#a12048394 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: WicketTester vs Component.error()
On 8/7/07, Igor Vaynberg [EMAIL PROTECTED] wrote: in 1.2 you cannot call error/info/etc from component's constructor because you havent added that component to the page yet. in 1.3 it just works. Indeed. I was under the false impression that this function worked on regular deployment, but the error message is exactly the same. Yay for unit testing! :-) Gabor - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: resource reference vs resource
Matej Knopp matej.knopp at gmail.com writes: Yeah, ResourceReference is like global resource factory. That is for resources that don't belong to any component/page (they can't touch any component instance while they are served). However, I don't understand why we should not just use static class members like: class Foo { static Resource MY_JS = ...; } class Bar { void g() { Resource r = Foo.MY_JS; ... } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: resource reference vs resource
I think it has more to do with the resource URL generation. The ResourceReference registers itself with application (using the Scope and name parameters). Then the application uses those information to generate resource reference url and looks up the resource reference on request. While regular resources (without using resource reference) are bound to the component so the component path is used to generate resource URL. I don't say current approach is the best one or most transparent, but we need to have a way to generate unique URL for shared Resources (as now we do with help of ResourceReference) and be able to lookup the Resource instance on request. -Matej On 8/8/07, Kent Tong [EMAIL PROTECTED] wrote: Matej Knopp matej.knopp at gmail.com writes: Yeah, ResourceReference is like global resource factory. That is for resources that don't belong to any component/page (they can't touch any component instance while they are served). However, I don't understand why we should not just use static class members like: class Foo { static Resource MY_JS = ...; } class Bar { void g() { Resource r = Foo.MY_JS; ... } } - 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: Wicket portlets on LIferay
Now you are outside my area of expertise :-). I hope that Ate or Janne is reading this. Martijn On 8/8/07, Miso [EMAIL PROTECTED] wrote: Thx for help, but this doesn't sort it out. A tried: code ... protected void init() { getRequestCycleSettings().setRenderStrategy(IRequestCycleSettings.ONE_PASS_RENDER); super.init(); } ... /code and also code ... protected void init() { super.init(); getRequestCycleSettings().setRenderStrategy(IRequestCycleSettings.ONE_PASS_RENDER); } ... /code Any idea? Miso -- View this message in context: http://www.nabble.com/Wicket-portlets-on-LIferay-tf4231110.html#a12047909 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Wicket joins the Apache Software Foundation as Apache Wicket Apache Wicket 1.3.0-beta2 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta2/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Wicket portlets on LIferay
Also, make sure you are using the code from the experimental portlet branch, as that is the only part where the portlet support is built into (seeing you are using wicket 1.3 based code). Martijn On 8/8/07, Miso [EMAIL PROTECTED] wrote: Thx for help, but this doesn't sort it out. A tried: code ... protected void init() { getRequestCycleSettings().setRenderStrategy(IRequestCycleSettings.ONE_PASS_RENDER); super.init(); } ... /code and also code ... protected void init() { super.init(); getRequestCycleSettings().setRenderStrategy(IRequestCycleSettings.ONE_PASS_RENDER); } ... /code Any idea? Miso -- View this message in context: http://www.nabble.com/Wicket-portlets-on-LIferay-tf4231110.html#a12047909 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Wicket joins the Apache Software Foundation as Apache Wicket Apache Wicket 1.3.0-beta2 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta2/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Wicket portlets on LIferay
Yes, I'm using this experimental portlet branch. -- View this message in context: http://www.nabble.com/Wicket-portlets-on-LIferay-tf4231110.html#a12051724 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: Wicket portlets on LIferay
Me too :) -- View this message in context: http://www.nabble.com/Wicket-portlets-on-LIferay-tf4231110.html#a12051726 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] Add a yui calendar without a datetextfield
Hi *, i'm new to the group and hope to find some answers here :-). I checked the examples and i got the idea to add a simple rendered yui calendar instance to a webpage. I don't want to add a datetextfield and then click the button beside it. Is this possible? And if so how? Thanks for your time Cheers Per - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
wicketstuff-dojo questions and answers
I'm getting the feeling this list doesn't have a ton of patience for questions it considers dumb. (or related to a library rather than core wicket) So with the idea that I might have asked a few dumb things, and to show that I'm trying to resolve things on my own, I'm going to give my answers to the questions I do have: Q. Can I attach the same wicketstuff-dojo DojoMenu to multiple components? A. No. Although some Wicket behaviors can be attached to multiple compontents, DojoContextualMenuBehavior requires each element get its own DojoMenu. Q. How do I modify the color and spacing of the context menu? A. You'd need to override the generate*JS functions in a subclass of DojoMenu and DojoMenuItem to point to your own CSS class (probably mostly cut and pasted from the .css dug out of the Wicketstuff-Dojo source.) Q. How do you get line separators between menu items? A. You'd have to make up a new DojoMenuItemSeperator class, and figure out how to compose the the underlying javascript to support that. Q. How would you dynamically change the icon for a menu item? A. You'd either have to create an entirely new menu, getting the element to drop its old behavior and connect it with the new version or possibly extend DojoMenuItem so that it could reset the icon, but this would require reaching more into the mysterious javascript. Q. a. Why isn't this stuff documented in more depth? b. And why don't people answer every stupid little question I have. A. a. Wicketstuff-Dojo is still a fairly young project with people who are currently more into coding it for more functionality than documenting. You're certainly welcome to contribute. b. These volunteers aren't interested in doing your work for you! And they're busy. And your questions are sometimes dumb. All that said, I'm considering going back to the approach of making my own context menu from more low level components (actually a lot of the work on that was already done by another guy at my company, but we hoped to leverage something as cool and easy to integrate as the Wicketstuff-Dojo menu; but we have pretty stringent look-and-feel demands, and while the Dojo stuff looks good, it isn't especially easy to reconfigure...) Thanks for any improvements to my answers! Kirk - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Newbie] Add a yui calendar without a datetextfield
i used to use the code below, but now i see eelco has removed AbstractCalendar :( so maybe he can tell us how we can accomplish it now package com.tbs.webapp.component; import java.util.Date; import java.util.Map; import org.apache.wicket.extensions.yui.calendar.AbstractCalendar; import org.apache.wicket.markup.html.IHeaderContributor; import org.apache.wicket.markup.html.IHeaderResponse; import org.apache.wicket.markup.html.link.ILinkListener; import org.apache.wicket.model.IModel; import org.joda.time.DateMidnight; public class Calendar extends AbstractCalendar implements ILinkListener, IHeaderContributor { public Calendar(String id) { super(id); } public Calendar(String id, IModel model) { super(id); setModel(model); } public final void onLinkClicked() { String arg = getRequest().getParameter(getJavascriptWidgetId()); String[] parts = arg.split(,); int year = Integer.parseInt(parts[0]); int month = Integer.parseInt(parts[1]); int day = Integer.parseInt(parts[2]); setModelObject(new DateMidnight(year, month, day).toDate()); onClick(); } @Override protected void appendToInit(String markupId, String javascriptId, String javascriptWidgetId, StringBuffer b) { super.appendToInit(markupId, javascriptId, javascriptWidgetId, b); b.append(getJavascriptWidgetId()); b.append(.selectEvent.subscribe(\n\tfunction(type,args,obj) {\n\t\twindow.location='); b.append(urlFor(ILinkListener.INTERFACE)); b.append().append(getJavascriptWidgetId()).append(='+args;\n); b.append(\t}\n\t,).append(getJavascriptWidgetId()).append(, true);); Date date = (Date) getModelObject(); b.append(getJavascriptWidgetId()); b.append(.setYear().append(1900 + date.getYear()); b.append();); b.append(getJavascriptWidgetId()); b.append(.setMonth().append(date.getMonth()); b.append();); } public void renderHead(IHeaderResponse response) { // TODO Auto-generated method stub } @Override protected void configureWidgetProperties(Map widgetProperties) { super.configureWidgetProperties(widgetProperties); Date date = (Date) getModelObject(); if (date != null) { widgetProperties.put(selected, (date.getMonth() + 1) + / + date.getDate() + / + (1900 + date.getYear())); } } protected void onClick() { } } -igor On 8/8/07, Per Newgro [EMAIL PROTECTED] wrote: Hi *, i'm new to the group and hope to find some answers here :-). I checked the examples and i got the idea to add a simple rendered yui calendar instance to a webpage. I don't want to add a datetextfield and then click the button beside it. Is this possible? And if so how? Thanks for your time Cheers Per - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Newbie] Add a yui calendar without a datetextfield
i was looking for AbstractCalendar too... hm, maybe we could use this as an opportunity to provide an all around YUI Calendar integration with features like a standalone calendar, multiple calendars, calendars that open when a specific event occurs (eg. focus of textfield or click on an image). this could also be a step in the direction of a wicket-yui project. eelco, wdyt? On 8/8/07, Igor Vaynberg [EMAIL PROTECTED] wrote: i used to use the code below, but now i see eelco has removed AbstractCalendar :( so maybe he can tell us how we can accomplish it now package com.tbs.webapp.component; import java.util.Date; import java.util.Map; import org.apache.wicket.extensions.yui.calendar.AbstractCalendar; import org.apache.wicket.markup.html.IHeaderContributor; import org.apache.wicket.markup.html.IHeaderResponse; import org.apache.wicket.markup.html.link.ILinkListener; import org.apache.wicket.model.IModel; import org.joda.time.DateMidnight; public class Calendar extends AbstractCalendar implements ILinkListener, IHeaderContributor { public Calendar(String id) { super(id); } public Calendar(String id, IModel model) { super(id); setModel(model); } public final void onLinkClicked() { String arg = getRequest().getParameter(getJavascriptWidgetId()); String[] parts = arg.split(,); int year = Integer.parseInt(parts[0]); int month = Integer.parseInt(parts[1]); int day = Integer.parseInt(parts[2]); setModelObject(new DateMidnight(year, month, day).toDate()); onClick(); } @Override protected void appendToInit(String markupId, String javascriptId, String javascriptWidgetId, StringBuffer b) { super.appendToInit(markupId, javascriptId, javascriptWidgetId, b); b.append(getJavascriptWidgetId()); b.append(.selectEvent.subscribe(\n\tfunction(type,args,obj) {\n\t\twindow.location='); b.append(urlFor(ILinkListener.INTERFACE)); b.append ().append(getJavascriptWidgetId()).append(='+args;\n); b.append(\t}\n\t,).append(getJavascriptWidgetId()).append(, true);); Date date = (Date) getModelObject(); b.append(getJavascriptWidgetId()); b.append(.setYear().append(1900 + date.getYear()); b.append();); b.append(getJavascriptWidgetId()); b.append(.setMonth().append(date.getMonth()); b.append();); } public void renderHead(IHeaderResponse response) { // TODO Auto-generated method stub } @Override protected void configureWidgetProperties(Map widgetProperties) { super.configureWidgetProperties(widgetProperties); Date date = (Date) getModelObject(); if (date != null) { widgetProperties.put(selected, (date.getMonth() + 1) + / + date.getDate() + / + (1900 + date.getYear())); } } protected void onClick() { } } -igor On 8/8/07, Per Newgro [EMAIL PROTECTED] wrote: Hi *, i'm new to the group and hope to find some answers here :-). I checked the examples and i got the idea to add a simple rendered yui calendar instance to a webpage. I don't want to add a datetextfield and then click the button beside it. Is this possible? And if so how? Thanks for your time Cheers Per - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Newbie] Add a yui calendar without a datetextfield
On 8/8/07, Igor Vaynberg [EMAIL PROTECTED] wrote: i used to use the code below, but now i see eelco has removed AbstractCalendar :( Sorry. I put it back. The problem is that it isn't maintained well, as all the effort so far has been around the date picker. And since the datepicker is a behavior, and AbstractCalendar a component there's a lot of code duplication. AbstractCalendar should be fixed for that sometime. Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Newbie] Add a yui calendar without a datetextfield
On 8/8/07, Gerolf Seitz [EMAIL PROTECTED] wrote: i was looking for AbstractCalendar too... hm, maybe we could use this as an opportunity to provide an all around YUI Calendar integration with features like a standalone calendar, multiple calendars, calendars that open when a specific event occurs (eg. focus of textfield or click on an image). this could also be a step in the direction of a wicket-yui project. eelco, wdyt? Yeah, I'm all for that. It would be nice to have a calendar that works as both a popup and normal (I guess we can just create a component that uses the datepicker behavior internally but in an opened state without a close button, and that component itself could be a hidden field. Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Newbie] Add a yui calendar without a datetextfield
can you not factor out the common thing into an abstract behavior and have abstractcalendar add that abstract behavior to itself and bridge config methods through itself? -igor On 8/8/07, Eelco Hillenius [EMAIL PROTECTED] wrote: On 8/8/07, Igor Vaynberg [EMAIL PROTECTED] wrote: i used to use the code below, but now i see eelco has removed AbstractCalendar :( Sorry. I put it back. The problem is that it isn't maintained well, as all the effort so far has been around the date picker. And since the datepicker is a behavior, and AbstractCalendar a component there's a lot of code duplication. AbstractCalendar should be fixed for that sometime. Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: wicketstuff-dojo questions and answers
I'm getting the feeling this list doesn't have a ton of patience for questions it considers dumb. I think it's more a matter of us being incredibly busy :) Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: wicketstuff-dojo questions and answers
On 8/8/07, Kirk Israel [EMAIL PROTECTED] wrote: I'm getting the feeling this list doesn't have a ton of patience for questions it considers dumb. (or related to a library rather than core wicket) So with the idea that I might have asked a few dumb things, and to show that I'm trying to resolve things on my own, I'm going to give my answers to the questions I do have: not the case. what you have to understand is that dojo stuff is a wicket-stuff project. created and maintained by developers that are not core developers. so it is really up to those developers to monitor this list and answer questions. -igor
Re: wicketstuff-dojo questions and answers
Q. a. Why isn't this stuff documented in more depth? b. And why don't people answer every stupid little question I have. A. a. Wicketstuff-Dojo is still a fairly young project with people who are currently more into coding it for more functionality than documenting. You're certainly welcome to contribute. b. These volunteers aren't interested in doing your work for you! And they're busy. And your questions are sometimes dumb. Note that wicket-stuff projects have a different status than the core projects. We have one team member (JBQ) working on that project, but the rest of us don't know much about it. As for your remark about documentation... tbh I agree. We're trying to keep the core projects well documented (though unfortunately there are some slips in there as well lately) but we don't monitor the wicket-stuff projects for such things. All that said, I'm considering going back to the approach of making my own context menu from more low level components (actually a lot of the work on that was already done by another guy at my company, but we hoped to leverage something as cool and easy to integrate as the Wicketstuff-Dojo menu; but we have pretty stringent look-and-feel demands, and while the Dojo stuff looks good, it isn't especially easy to reconfigure...) The good about that is that you'll have exactly what you need. Cheers, Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Newbie] Add a yui calendar without a datetextfield
On 8/8/07, Igor Vaynberg [EMAIL PROTECTED] wrote: can you not factor out the common thing into an abstract behavior and have abstractcalendar add that abstract behavior to itself and bridge config methods through itself? Possibly. Core of the matter is that we should get rid of the code duplication we have now, and update the normal calendar component so that it takes advantage of all the things we've been building into the datepicker recently. Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: wicketstuff-dojo questions and answers
On 8/8/07, Igor Vaynberg [EMAIL PROTECTED] wrote: On 8/8/07, Kirk Israel [EMAIL PROTECTED] wrote: not the case. what you have to understand is that dojo stuff is a wicket-stuff project. created and maintained by developers that are not core developers. so it is really up to those developers to monitor this list and answer questions. Ok. But most side projects (including Wicketstuff/Wicketstuff-Dojo) haven't forked their own mailing lists or discussion groups, true? Nothing leapt out after searching through the wiki pages. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: wicketstuff-dojo questions and answers
no they havent. i am not saying that this isnt the place to ask questions, i am saying dont expect to receive the same quality of service as you receive when asking questions about the core projects. also not that not everyone on this list uses that wicket-stuff project, so probably most people know nothing about it and cant help you. -igor On 8/8/07, Kirk Israel [EMAIL PROTECTED] wrote: On 8/8/07, Igor Vaynberg [EMAIL PROTECTED] wrote: On 8/8/07, Kirk Israel [EMAIL PROTECTED] wrote: not the case. what you have to understand is that dojo stuff is a wicket-stuff project. created and maintained by developers that are not core developers. so it is really up to those developers to monitor this list and answer questions. Ok. But most side projects (including Wicketstuff/Wicketstuff-Dojo) haven't forked their own mailing lists or discussion groups, true? Nothing leapt out after searching through the wiki pages. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Adding Ajax behavior on radio button
I have a 2 radio buttons that enable a dropdown and a text field respectively. Thus, depending on which radio button is selected, either the dropdown or the text field is enabled. Thus I need ajax capability when a radio button is selected, but evidently this can't happen in Wicket, because, for some reason, the radio button is not a FormComponent (new AjaxFormComponentUpdatingBehavior(), not new AjaxComponentUpdatingBehavior() is available). What is the best way to get around this? -- View this message in context: http://www.nabble.com/Adding-Ajax-behavior-on-radio-button-tf4238831.html#a12061159 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: mountBookmarkablePage and missing parameters - exception thrown
I believe this syntax should be forgiving to the user. A framework should ease life where possible. What is the benefit of encoding URLs /param1/value1/param2/value2 over ?param1=value1param2=value2 ? The way it is shown to the users. Not for developers. And not only for search engine spiders. I want to use it in cases where the user may be given feeling that he is browsing some structure. If we say 'a' and hide the implementation details from users - then why to prohibit saying 'b'? The only thing that should be checked (possibly already works) is to check if shorter path does not make incorrect assumptions on the nesting level when referring resources like CSS or IMG files. It matters if it generates '../../../style.css' or '../../style.css' But possibly this is already working. Darek Eelco Hillenius wrote: i dont see why we should support this. if you expect the user to mess with your urls then you should either leave it as a query string or use indexed coding strat. imho we should fail early - imagine looking at logs and trying to figure out wtf that url came from. could it be a wicket encoding problem? user messed with it? etc etc. I don't think it's always bad if people mess with parameters, especially not when it concerns paths like Dariusz mentioned. To me, it is natural to directly play with a path, though I wouldn't play with parameters if they come in the form ?foo=bar. I would prefer Wicket to be more forgiving and let users decide whether they have enough information to process a request. the code to support this wouldnt be hairy at all - just remove the check and see if param is missing and add it as ...hmm or maybe better to add it as null? see what i mean. Yeah, that's the kind of hairyness I meant. Then again, that could be just a setting. Eelco -- View this message in context: http://www.nabble.com/mountBookmarkablePage-and-missing-parameters---exception-thrown-tf4219655.html#a12061758 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: mountBookmarkablePage and missing parameters - exception thrown
On 8/8/07, Dariusz Wojtas [EMAIL PROTECTED] wrote: I want to use it in cases where the user may be given feeling that he is browsing some structure. well, my point was that structure is probably better represented by indexed coding strategy, which is forgiving. for example /products/clothes/tshirts/red (indexed) is better imho then /products/category/clothes/subcategory/tshirts/color/red (default) -igor
Re: Adding Ajax behavior on radio button
This looks like it's 1.3, I'm on 1.2.6. Is it 1.3? Maybe AjaxEventBehavior(onchange) could help? It seems to be acting erratic though. I can get to the onEvent method on on button, but not the other. Have exactly the same onEvent method set up on both radio buttons (which are part of a radio group). igor.vaynberg wrote: see AjaxFormChoiceComponentUpdatingBehavior -igor On 8/8/07, jq58 [EMAIL PROTECTED] wrote: I have a 2 radio buttons that enable a dropdown and a text field respectively. Thus, depending on which radio button is selected, either the dropdown or the text field is enabled. Thus I need ajax capability when a radio button is selected, but evidently this can't happen in Wicket, because, for some reason, the radio button is not a FormComponent (new AjaxFormComponentUpdatingBehavior(), not new AjaxComponentUpdatingBehavior() is available). What is the best way to get around this? -- View this message in context: http://www.nabble.com/Adding-Ajax-behavior-on-radio-button-tf4238831.html#a12061159 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/Adding-Ajax-behavior-on-radio-button-tf4238831.html#a12062792 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Motivation for having setRequired()
I guess this was already discussed at some point on the dev list, but I couldn't find the thread. I'm just very curious about the motivation of deprecating RequiredValidator in favour of the setRequired method. Knowing how clever you devs are, I'm sure there's a good reason, but at first glace, to me the RequiredValidator seems like a more elegant solution... Would somebody mind explaining this decision, if you have the time? Thanks! Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Motivation for having setRequired()
the whole refactor started because validators were doing a lot of repeitive stuff. for example lets say you have a textfield for a purchase quantity. you add three validators to it, requred, min1) and checkinventory. min(1) = { if (input==null) return; int i=typeconvertinput(); if (i1) error(); } checkinventory() = { if (input==null) return; int i=typeconvert(); if (igetavailable()) error(); } what do we notice... both validators have input==null check because they will run whether or not field is required or not. both validators have to perform typeconversion - which is potentially an expensive operation. so lets refactor type conversion into the formcomponent. great, but the problem is we dont know if we have to convert a or not. so we also factor out the required check. the nice thing about it is that now our validators look like this min(1) = { if (i1) error(); } checkinventory() = { if (igetavailable()) error(); } so now not every validator has to check for null, and type conversion is only performed/checked once and in a single place. -igor On 8/8/07, David Leangen [EMAIL PROTECTED] wrote: I guess this was already discussed at some point on the dev list, but I couldn't find the thread. I'm just very curious about the motivation of deprecating RequiredValidator in favour of the setRequired method. Knowing how clever you devs are, I'm sure there's a good reason, but at first glace, to me the RequiredValidator seems like a more elegant solution... Would somebody mind explaining this decision, if you have the time? Thanks! Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to put a form on each row within a DataView?
if you get duplicate id exception you are probably doing this populate(Item item) { Form f=new Form(f); add(form); } instead of the correct way: populate(Item item) { Form f=new Form(f); item.add(f); } -igor On 8/8/07, Mark van Leeuwen [EMAIL PROTECTED] wrote: Hi I have a table which is populated using a DataView. Now I have a requirement to add button actions on every row. I tried defining a form within a column but get an error that I cannot have duplicate ids. Can I do this within a DataView component? If not, is there another repeater type component that can do this? Thanks Mark
Custom RequiredValidation message (was: Motivation for having setRequired())
Ok, thanks for the explanation, Igor. Maybe, then, you can tell me if there is a better way of doing what I'm doing... I'm working on customising the required messages for each field. For example, for a contact form, rather than writing: - A value for field 'Enter your email' is required - A value for field 'Subject' is required - A value for field 'Enter your message text below' is required I prefer to write: - Please enter your email address - Please enter the subject - Please enter your message text The only reasonable way I could think of doing this was to override the (deprecated!) RequiredValidator, just so I could write this in my properties file: EmailRequiredValidator = Please enter your email address SubjectRequiredValidator = Please enter the subject MessageBodyRequiredValidator = Please enter your message text This works, but: 1. the parent class is deprecated 2. from what you write above, it sounds like this could cause a lot of processing for nothing 3. I don't like this heavy-handed approach, anyway! Do you see a better way? Cheers, Dave On Wed, 2007-08-08 at 19:15 -0700, Igor Vaynberg wrote: the whole refactor started because validators were doing a lot of repeitive stuff. for example lets say you have a textfield for a purchase quantity. you add three validators to it, requred, min1) and checkinventory. min(1) = { if (input==null) return; int i=typeconvertinput(); if (i1) error(); } checkinventory() = { if (input==null) return; int i=typeconvert(); if (igetavailable()) error(); } what do we notice... both validators have input==null check because they will run whether or not field is required or not. both validators have to perform typeconversion - which is potentially an expensive operation. so lets refactor type conversion into the formcomponent. great, but the problem is we dont know if we have to convert a or not. so we also factor out the required check. the nice thing about it is that now our validators look like this min(1) = { if (i1) error(); } checkinventory() = { if (igetavailable()) error(); } so now not every validator has to check for null, and type conversion is only performed/checked once and in a single place. -igor On 8/8/07, David Leangen [EMAIL PROTECTED] wrote: I guess this was already discussed at some point on the dev list, but I couldn't find the thread. I'm just very curious about the motivation of deprecating RequiredValidator in favour of the setRequired method. Knowing how clever you devs are, I'm sure there's a good reason, but at first glace, to me the RequiredValidator seems like a more elegant solution... Would somebody mind explaining this decision, if you have the time? Thanks! Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Custom RequiredValidation message (was: Motivation for having setRequired())
Ok, that's much nicer than my way. Thank you! On Wed, 2007-08-08 at 20:00 -0700, Igor Vaynberg wrote: there are two ways you can do it. if you want total control you can put this in the .properties of the page with the form formid.email.Required=Enter your email formid.subject.Requried=Subject is required if you want some structured way you can use formcomponent.setlabel email.setlabel(new model(email)); subject.setlabel(new model(subject)); // these are ususally ResourceModels that pull the value from .properties file then in the .properties Required=Enter your ${label} this will construct Enter your email/Enter your subject messages -igor On 8/8/07, David Leangen [EMAIL PROTECTED] wrote: Ok, thanks for the explanation, Igor. Maybe, then, you can tell me if there is a better way of doing what I'm doing... I'm working on customising the required messages for each field. For example, for a contact form, rather than writing: - A value for field 'Enter your email' is required - A value for field 'Subject' is required - A value for field 'Enter your message text below' is required I prefer to write: - Please enter your email address - Please enter the subject - Please enter your message text The only reasonable way I could think of doing this was to override the (deprecated!) RequiredValidator, just so I could write this in my properties file: EmailRequiredValidator = Please enter your email address SubjectRequiredValidator = Please enter the subject MessageBodyRequiredValidator = Please enter your message text This works, but: 1. the parent class is deprecated 2. from what you write above, it sounds like this could cause a lot of processing for nothing 3. I don't like this heavy-handed approach, anyway! Do you see a better way? Cheers, Dave On Wed, 2007-08-08 at 19:15 -0700, Igor Vaynberg wrote: the whole refactor started because validators were doing a lot of repeitive stuff. for example lets say you have a textfield for a purchase quantity. you add three validators to it, requred, min1) and checkinventory. min(1) = { if (input==null) return; int i=typeconvertinput(); if (i1) error(); } checkinventory() = { if (input==null) return; int i=typeconvert(); if (igetavailable()) error(); } what do we notice... both validators have input==null check because they will run whether or not field is required or not. both validators have to perform typeconversion - which is potentially an expensive operation. so lets refactor type conversion into the formcomponent. great, but the problem is we dont know if we have to convert a or not. so we also factor out the required check. the nice thing about it is that now our validators look like this min(1) = { if (i1) error(); } checkinventory() = { if (igetavailable()) error(); } so now not every validator has to check for null, and type conversion is only performed/checked once and in a single place. -igor On 8/8/07, David Leangen [EMAIL PROTECTED] wrote: I guess this was already discussed at some point on the dev list, but I couldn't find the thread. I'm just very curious about the motivation of deprecating RequiredValidator in favour of the setRequired method. Knowing how clever you devs are, I'm sure there's a good reason, but at first glace, to me the RequiredValidator seems like a more elegant solution... Would somebody mind explaining this decision, if you have the time? Thanks! Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Custom RequiredValidation message
afaik they .properties can be attached to any container with associated markup: so page/panel/border should work furthermore you can move them up to the application.properties which is a global file. -igor On 8/8/07, David Leangen [EMAIL PROTECTED] wrote: if you want total control you can put this in the .properties of the page with the form formid.email.Required=Enter your email formid.subject.Requried=Subject is required Is it not possible to put this in the properties file for the component? I.e.: // Constructor for Page public MyPage( String id ) { add( new MyForm( myForm ); } // Constructor for Form public MyForm( String id ) { add( new MyComponent( myComponent ); } So in the properties file MyComponent.properties: email.Required=Enter your email subject.Requried=Enter the subject Or are the two ways you described in your last message the only ways to possibly resolve customised messages (unless, I suppose, if I create my own resolver)? Essentially, I would like to have finer-grained control over my validation messages, but not need to have to repeat them for every page. So: formid.email.Required = blah requires me to rewrite them for every page, but Required = Enter your ${label} is not really as fine-grained as I'd like it to be. Thanks again, Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Wicket-auth-roles 1.2.6 1.4 JVM
Sorry Flavio, I don't have it anymore. The guy who actually did the the port left our company. I asked him to make a source jar as well, he didn't. Regards, Erik. Flavio schreef: Hi Erik, me again. Can you send me the source code? Thanks, Flavio. On 7/30/07, Flavio [EMAIL PROTECTED] wrote: Yes, I known that is fast and easy but I tried to do it myself and I had problems. Thanks! On 7/30/07, Erik van Oosten [EMAIL PROTECTED] wrote: Hi Flavio, It only takes 15 minutes to make it yourself. But anyway, here is one: http://omelet.zapto.org/pub/wicket/wicket-auth-roles-1.2.2-1.4.jar It is derived from Wicket 1.2.2 but we use it in a Wicket 1.2.6 environment on production. Regards, Erik. Flavio wrote: Hi! I'm trying to integrate acegi and wicket on a 1.4 JVM. Can anyone send me wicket-auth-roles without annotations and ported to 1.4? Thanks, Flavio. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Erik van Oosten http://2008.rubyenrails.nl/ http://www.day-to-day-stuff.blogspot.com/ - 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] -- Erik van Oosten http://2008.rubyenrails.nl/ http://www.day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]