Re: wicket-event added twice problem
In which Wicket version should be filtered? 2008/8/28 Tomasz Prus <[EMAIL PROTECTED]> > Heh :) Lightbox, not livebox > > 2008/8/28 Tomasz Prus <[EMAIL PROTECTED]> > > Wicket 1.3.4 >> >> When i add livebox JS script and google maps then livebox doesn't work >> properly because wicket-event is added twice. >> >> 2008/8/27 Matej Knopp <[EMAIL PROTECTED]> >> >> What wicket version? This should be filtered by wicket. >>> >>> -Matej >>> >>> On Wed, Aug 27, 2008 at 4:13 PM, Nino Saturnino Martinez Vazquez Wael >>> <[EMAIL PROTECTED]> wrote: >>> > show us some code..:) >>> > >>> > Tomasz Prus wrote: >>> >> >>> >> Hi >>> >> >>> >> I have problem because wicket-event.js is added twice and couse error. >>> >> (each >>> >> component with wicket-event.js adds it) >>> >> >>> >> Please help, how can i add it only one? >>> >> >>> >> Similar problem is with css files >>> >> >>> >> Best regards, >>> >> Tomek >>> >> >>> >> >>> > >>> > -- >>> > -Wicket for love >>> > >>> > Nino Martinez Wael >>> > Java Specialist @ Jayway DK >>> > http://www.jayway.dk >>> > +45 2936 7684 >>> > >>> > >>> > - >>> > 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-event added twice problem
Heh :) Lightbox, not livebox 2008/8/28 Tomasz Prus <[EMAIL PROTECTED]> > Wicket 1.3.4 > > When i add livebox JS script and google maps then livebox doesn't work > properly because wicket-event is added twice. > > 2008/8/27 Matej Knopp <[EMAIL PROTECTED]> > > What wicket version? This should be filtered by wicket. >> >> -Matej >> >> On Wed, Aug 27, 2008 at 4:13 PM, Nino Saturnino Martinez Vazquez Wael >> <[EMAIL PROTECTED]> wrote: >> > show us some code..:) >> > >> > Tomasz Prus wrote: >> >> >> >> Hi >> >> >> >> I have problem because wicket-event.js is added twice and couse error. >> >> (each >> >> component with wicket-event.js adds it) >> >> >> >> Please help, how can i add it only one? >> >> >> >> Similar problem is with css files >> >> >> >> Best regards, >> >> Tomek >> >> >> >> >> > >> > -- >> > -Wicket for love >> > >> > Nino Martinez Wael >> > Java Specialist @ Jayway DK >> > http://www.jayway.dk >> > +45 2936 7684 >> > >> > >> > - >> > 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-event added twice problem
Wicket 1.3.4 When i add livebox JS script and google maps then livebox doesn't work properly because wicket-event is added twice. 2008/8/27 Matej Knopp <[EMAIL PROTECTED]> > What wicket version? This should be filtered by wicket. > > -Matej > > On Wed, Aug 27, 2008 at 4:13 PM, Nino Saturnino Martinez Vazquez Wael > <[EMAIL PROTECTED]> wrote: > > show us some code..:) > > > > Tomasz Prus wrote: > >> > >> Hi > >> > >> I have problem because wicket-event.js is added twice and couse error. > >> (each > >> component with wicket-event.js adds it) > >> > >> Please help, how can i add it only one? > >> > >> Similar problem is with css files > >> > >> Best regards, > >> Tomek > >> > >> > > > > -- > > -Wicket for love > > > > Nino Martinez Wael > > Java Specialist @ Jayway DK > > http://www.jayway.dk > > +45 2936 7684 > > > > > > - > > 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: fileupload element checking filename existing before upload using ajax
Mattom, Thank you for sharing code. Thank you . 2008/8/28, Mattom <[EMAIL PROTECTED]>: > > Found a different solution, in case somebody is interested: > > fileUploadField.add(new AjaxEventBehavior("onchange") >{ >protected void onEvent(AjaxRequestTarget target) { >Request request = RequestCycle.get().getRequest(); >String filename = request.getParameter("filename"); >System.out.println("filename is [" + filename + "]"); >} > >public CharSequence getCallbackUrl(boolean > onlyTargetActivePage) { >CharSequence callBackUrl > = super.getCallbackUrl(onlyTargetActivePage); >return callBackUrl + "&filename=' + this.value + '"; >} > >}); > > not as beautiful as I'd like to have it, because I'm manually messing > around with the callback url, but it works :-). > > :-), > Thomas > > >
Re: Override HeaderResponse' renderJavascript() method
Yes,That can make it. But if i just want to modify it. Can I make it? 在08-8-27,Matej Knopp <[EMAIL PROTECTED]> 写道: > > Don't specify the id. Just put there null, the javascript will be > always rendered. > > -Matej > > On Wed, Aug 27, 2008 at 3:20 AM, 张伟 <[EMAIL PROTECTED]> wrote: > > Hello, > >I use the renderJavascript(java.lang.CharSequence javascript, > > java.lang.String id) method in HeaderResponse class to output the some > js > > code in html header. This renderJavascript method will render javascript > > code to the response, if the javascript has not already been rendered. > But > > i want to override if the javascript has already been rendered. How can > i > > make it? Thank you. BTW, excuse my poor English. > > >
Re: Use wicket page templates not for webapplication
http://cwiki.apache.org/confluence/display/WICKET/FAQs#FAQs-HowcanIrendermytemplatestoaString%3F On Tue, Aug 26, 2008 at 10:43 PM, Nino Saturnino Martinez Vazquez Wael <[EMAIL PROTECTED]> wrote: > Kan, please put in your findings in a page on the wiki (maybe under faq). > Seems it's something people do once in a while.. > > I did something similar once, but realized somewhere in the process that it > werent exactly the same content writing a mail as the web page. I used the > wicket text templates heavy instead. > > kan wrote: >> >> Can I render a page but not in web environment? E.g. I want to create >> an javax.mail with html-body and want to reuse my wicket components to >> generate content. So, no servlets, no sessions, no requests/responses, >> no ajax - just render a page to a stream. >> >> > > -- > -Wicket for love > > Nino Martinez Wael > Java Specialist @ Jayway DK > http://www.jayway.dk > +45 2936 7684 > > > - > 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: Ajax validation error messages
Excellent - thank you. pointbreak+wicketstuff wrote: > > Why not just put a filter on your 'global' feedbackpanel and filter out > the messages that you already display for each component? E.g. I have > the following code in a form: > >private void addGlobalSubmitPanel() { > final List components = getFormComponents(); > final FeedbackPanel feedback = new FeedbackPanel(FEEDBACK); > feedback.setFilter(new IFeedbackMessageFilter() { > public boolean accept(FeedbackMessage message) { > return !components.contains(message.getReporter()); > } > }); > add(feedback); > } > > private List getFormComponents() { > final List components = new > ArrayList(); > visitFormComponents(new FormComponent.IVisitor() { > public Object formComponent(IFormVisitorParticipant > formComponent) { > final FormComponent fc = (FormComponent)formComponent; > components.add(fc); > return Component.IVisitor.CONTINUE_TRAVERSAL; > } > }); > return components; > } > >> > >> > Hi. Can anyone recommend a good strategy for handling and dislplaying >> > validation error messages when using Ajax? >> > >> > I want my basic field validation error to show next to the relevant >> input >> > text boxes, and have used my own FormComponentFeedbackBorder to do >> this. >> > >> > I still want a feedback panel for more fatal backend errors - eg, >> "record >> > already exists", "concurrent record modification", etc. >> > >> > Problem. If I put a feedback panel on the page, and repaint this in my >> > button's onError with target.addComponent(feedback) - then I get >> > duplicates of my field validation errors in my panel. Not what I want. >> > >> > If I only repaint the feedback onSubmit then I can catch the backend >> error >> > and display my message. But subsequent Ajax form submissions don't >> refresh >> > the page, so the error message in the feedback panel "sticks" on the >> page. >> > >> > Not sure how to clear out existing errors in the feedback panel when >> using >> > Ajax, so have now used a label on my page instead, and manually clean >> up >> > after myself. But is this the best way to go? >> > >> >> -- >> View this message in context: >> http://www.nabble.com/Ajax-validation-error-messages-tp19190006p19190919.html >> Sent from the Wicket - User mailing list archive at Nabble.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] > > > -- View this message in context: http://www.nabble.com/Ajax-validation-error-messages-tp19190006p19191684.html 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: Ajax validation error messages
Why not just put a filter on your 'global' feedbackpanel and filter out the messages that you already display for each component? E.g. I have the following code in a form: private void addGlobalSubmitPanel() { final List components = getFormComponents(); final FeedbackPanel feedback = new FeedbackPanel(FEEDBACK); feedback.setFilter(new IFeedbackMessageFilter() { public boolean accept(FeedbackMessage message) { return !components.contains(message.getReporter()); } }); add(feedback); } private List getFormComponents() { final List components = new ArrayList(); visitFormComponents(new FormComponent.IVisitor() { public Object formComponent(IFormVisitorParticipant formComponent) { final FormComponent fc = (FormComponent)formComponent; components.add(fc); return Component.IVisitor.CONTINUE_TRAVERSAL; } }); return components; } > > > > Hi. Can anyone recommend a good strategy for handling and dislplaying > > validation error messages when using Ajax? > > > > I want my basic field validation error to show next to the relevant input > > text boxes, and have used my own FormComponentFeedbackBorder to do this. > > > > I still want a feedback panel for more fatal backend errors - eg, "record > > already exists", "concurrent record modification", etc. > > > > Problem. If I put a feedback panel on the page, and repaint this in my > > button's onError with target.addComponent(feedback) - then I get > > duplicates of my field validation errors in my panel. Not what I want. > > > > If I only repaint the feedback onSubmit then I can catch the backend error > > and display my message. But subsequent Ajax form submissions don't refresh > > the page, so the error message in the feedback panel "sticks" on the page. > > > > Not sure how to clear out existing errors in the feedback panel when using > > Ajax, so have now used a label on my page instead, and manually clean up > > after myself. But is this the best way to go? > > > > -- > View this message in context: > http://www.nabble.com/Ajax-validation-error-messages-tp19190006p19190919.html > Sent from the Wicket - User mailing list archive at Nabble.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]
Re: controlling number with wicket?
Thanks for the reply, but is there an example for AttributeAppender? I checked the java Doc but still can't figure out how to use it inside a ListView it just appends it inside the list view container: if I put s wicket:id inside the i get an error because of the after it , I get: Expected close tag for '' Possible attempt to embed component(s) '' in the body of this component which discards its body Sami Vit Rozkovec wrote: Hallo, you can do with AttributeModifier or AttributeAppender. Vitek Sami wrote: Hello, I have been trying to control the colspan in a table but no luck :( any one has an example of how to do it? code: - wicket:id="categoryName">[Category] wicket:id="Info">[Info] wicket:id="Type">[Type] wicket:id="Date">[Date] - I want to control the number in the colspan markup? I tried but didnt work. Many thanks Sami - 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: Ajax validation error messages
May be you can use AjaxFormSubmitBehavior? steve222 wrote: > > Hi. Can anyone recommend a good strategy for handling and dislplaying > validation error messages when using Ajax? > > I want my basic field validation error to show next to the relevant input > text boxes, and have used my own FormComponentFeedbackBorder to do this. > > I still want a feedback panel for more fatal backend errors - eg, "record > already exists", "concurrent record modification", etc. > > Problem. If I put a feedback panel on the page, and repaint this in my > button's onError with target.addComponent(feedback) - then I get > duplicates of my field validation errors in my panel. Not what I want. > > If I only repaint the feedback onSubmit then I can catch the backend error > and display my message. But subsequent Ajax form submissions don't refresh > the page, so the error message in the feedback panel "sticks" on the page. > > Not sure how to clear out existing errors in the feedback panel when using > Ajax, so have now used a label on my page instead, and manually clean up > after myself. But is this the best way to go? > -- View this message in context: http://www.nabble.com/Ajax-validation-error-messages-tp19190006p19190919.html 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 models
I don't tend to use models in my pages. I tend to think of Pages as having more to do with site navigation, as opposed to what is actually displayed in them... (you would then add genericized panels, like ViewOrderPanel, etc., to a page.). John Patterson wrote: > > Yeah guess I will do that. was just wondering if I was in the minority > using models in my pages. > > > igor.vaynberg wrote: >> >> you can always create your own subclass that is generified, and use that >> >> -igor >> >> On Wed, Aug 27, 2008 at 3:17 AM, John Patterson <[EMAIL PROTECTED]> >> wrote: >>> >>> Hi, in almost all my pages I set a model for the page and then need to >>> retrieve it using the un-typesafe getDefaultModel(). Or I implement a >>> typesafe getModel(). I was just wondering if others really normally use >>> pages without models? If not maybe Page should be generified? >>> >>> JD >>> -- >>> View this message in context: >>> http://www.nabble.com/Page-models-tp19178165p19178165.html >>> Sent from the Wicket - User mailing list archive at Nabble.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] >> >> >> > > -- View this message in context: http://www.nabble.com/Page-models-tp19178165p19190800.html 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 Cart: open-source e-commerce wicket app
James, If you need any CMS functionality at all for your cart project, please have a look at: http://brix-cms.googlecode.com/ For example, you could incorporate your cart panels as "tiles" inside of Brix. msc65jap wrote: > > Is anyone interested in contributing to an open-source e-commerce > wicket engine? I was thinking of calling it WicketCart. I have written > a primitive version which serves as a good foundation to build upon. > > I have a new client, a royal college, requiring an e-commerce web app > so just pondering the idea of WicketCart. If other developers are > interested in contributing then I will make it open-source. I have > written it so far using Spring and Hibernate but very open for it to > additionally be implemented for other frameworks. > > If anyone wants specific details or wants to discuss it a bit more, > then feel free to email me. > > Best, > James. > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Wicket-Cart%3A-open-source-e-commerce-wicket-app-tp19184933p19190630.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Nested forms and IndicatingAjaxSubmitButton - multiple issues
Hi, I have IndicatingAjaxButton in a form within a panel, panel itself is inside another wrapper form on the enclosing page. Seems like I get really weird behavior based on how many forms I have on the page - even though the ajaxsubmit button's form hierarchy doesnt really change. Condition 1: When there are 2 forms - indicatingajaxbutton -> form -> panel -> form -> page In both IE and FF onSubmit() of the indicatingajaxbutton gets called correctly - but entire page gets reloaded instead of just updating the targets added to the ajaxtarget. Even though the containing page in the above hierarchy is bookmarkable page In IE the url changes to wicket:interface::10:2 etc. Condition 2: When there are atleast 3 forms - indicatingajaxbutton -> form -> panel -> form1, form2 (at the same level) -> page In FF most of the time it works correctly - although every now and then I do see the loadabledetachable model load method not even called for the updating components In IE 7 - Dont get a call to onSubmit() for indicatingajaxbutton at all but the page reloads and again even though the page is bookmarkable - wicket:interface url shows with the bumped version number Can someone think of any work arounds while this gets looked at? -- View this message in context: http://www.nabble.com/Nested-forms-and-IndicatingAjaxSubmitButton---multiple-issues-tp19190442p19190442.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Generics - Re: First impressions of 1.4-m3
I'm probably too late coming into the discussion but from reviewing past threads it appears the only reason for 1.4-m3 over m2 and removing generics from Component is because some things like Page and Label don't make sense with generics? If that is really the only reason (and there may be others that I just didn't understand) why can't we make Component generic and then do: public class Label extends WebComponent { ... } and now Label is not generic anymore. Edward Edward wrote: I've been a little busy so just took my first look at 1.4-m3 and spend a few minutes upgrading a small app. So far the only thing I wish were different is for getModel and getModelObject to not have been changed to getDefaultModel and getDefaultModelObject. That breaks old code and some things like libraries I may not have control over to upgrade. My preference would have been to keep them the same and have the new generic ones named something else like getComponentModel and getComponentModelObject. This way old code still works but I have a migration path to start using generics in my app. Just my $.02 Edward - 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: controlling number with wicket?
google and find http://cwiki.apache.org/WICKET/how-to-modify-an-attribute-on-a-html-tag.html On Wed, 27 Aug 2008 20:52:56 +0100, "Sami" <[EMAIL PROTECTED]> said: > Hello, > I have been trying to control the colspan in a table but no luck :( > > any one has an example of how to do it? > > code: > - > > wicket:id="categoryName">[Category] > > wicket:id="Info">[Info] > wicket:id="Type">[Type] > wicket:id="Date">[Date] > > > - > > I want to control the number in the colspan markup? > I tried but didnt work. > > Many thanks > Sami > > > - > 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: GetModelObject returns null-filled Object?
Ok, figured out, that the Spring-injected Bean is the reason for this behavior! Works fine if I use u = new Users(); instead of the Spring-injected Users as Model. Any clues how to circumvent this behavior without instantiating the model myself?? greetz Markus p.s.: Sorry for the frequent posting. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Ajax validation error messages
Hi. Can anyone recommend a good strategy for handling and dislplaying validation error messages when using Ajax? I want my basic field validation error to show next to the relevant input text boxes, and have used my own FormComponentFeedbackBorder to do this. I still want a feedback panel for more fatal backend errors - eg, "record already exists", "concurrent record modification", etc. Problem. If I put a feedback panel on the page, and repaint this in my button's onError with target.addComponent(feedback) - then I get duplicates of my field validation errors in my panel. Not what I want. If I only repaint the feedback onSubmit then I can catch the backend error and display my message. But subsequent Ajax form submissions don't refresh the page, so the error message in the feedback panel "sticks" on the page. Not sure how to clear out existing errors in the feedback panel when using Ajax, so have now used a label on my page instead, and manually clean up after myself. But is this the best way to go? -- View this message in context: http://www.nabble.com/Ajax-validation-error-messages-tp19190006p19190006.html 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: fileupload element checking filename existing before upload using ajax
Found a different solution, in case somebody is interested: fileUploadField.add(new AjaxEventBehavior("onchange") { protected void onEvent(AjaxRequestTarget target) { Request request = RequestCycle.get().getRequest(); String filename = request.getParameter("filename"); System.out.println("filename is [" + filename + "]"); } public CharSequence getCallbackUrl(boolean onlyTargetActivePage) { CharSequence callBackUrl = super.getCallbackUrl(onlyTargetActivePage); return callBackUrl + "&filename=' + this.value + '"; } }); not as beautiful as I'd like to have it, because I'm manually messing around with the callback url, but it works :-). :-), Thomas Original-Nachricht > Datum: Wed, 27 Aug 2008 22:51:51 +0200 > Von: "Mattom" <[EMAIL PROTECTED]> > An: users@wicket.apache.org > Betreff: Re: fileupload element checking filename existing before upload > using ajax > That's what I've found, too, that uploading using ajax is not possible. > > But :-), I don't need the upload to be ajax, all I need is the filename, > as soon as the file was choosen by the user. > That way I could validate the filename serverside, and provide immediate > feedback, before the (maybe) long upload is performed. > So, just adding a parameter to the ajax "onchange" call would do the > trick. > > What I'll try now is adding another "hidden" ajax form, link the file > upload element to a hidden field in this form, and then "manually" submit this > form, by adding my own "wicket free" javascript... not beautiful, but > should work. > > Thanks for your help, > Thomas > > Original-Nachricht > > Datum: Wed, 27 Aug 2008 08:57:01 -0700 (PDT) > > Von: Michael Sparer <[EMAIL PROTECTED]> > > An: users@wicket.apache.org > > Betreff: Re: fileupload element checking filename existing before upload > using ajax > > > > > the problem is file uploading with ajax - that's just not possible > > (restriction of the http protocol as far as I remember), however you can > > 'simulate' using some approaches, e.g. a hidden iframe where you post > your > > file to. > > that topic has been discussed many times, just search the list - if i > > remember correctly there's already a component for that somewhere in > > wicketstuff ... > > > > regards, > > Michael > > > > Thomas Lutz wrote: > > > > > > Hi list ! > > > > > > I'm trying to build a upload form consisting of one ore more > > fileuploads. > > > > > > If the file(s) already exist(s) on the server, I'd like to throw a > > > validation message, but, before uploading takes place. > > > > > > I tried to attach AjaxEventBehavior to the FileUploadField, onchange > is > > > executed, but I've no access to the current value of the file input > > > element. Tried AjaxFormComponentUpdatingBehavior as well, no success. > > > > > > How should I approach this ? Basically all I need is ajaxing the > > onchange > > > with the "new value" back to the server. > > > > > > Thanks for your help, > > > Thomas > > > -- > > > Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! > > > Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer > > > > > > - > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > > > - > > Michael Sparer > > http://talk-on-tech.blogspot.com > > -- > > View this message in context: > > > http://www.nabble.com/fileupload-element-checking-filename-existing-before-upload-using-ajax-tp19181551p19184026.html > > Sent from the Wicket - User mailing list archive at Nabble.com. > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > -- > GMX Kostenlose Spiele: Einfach online spielen und Spaß haben mit Pastry > Passion! > http://games.entertainment.gmx.net/de/entertainment/games/free/puzzle/6169196 > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- GMX Kostenlose Spiele: Einfach online spielen und Spaß haben mit Pastry Passion! http://games.entertainment.gmx.net/de/entertainment/games/free/puzzle/6169196 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: fileupload element checking filename existing before upload using ajax
That's what I've found, too, that uploading using ajax is not possible. But :-), I don't need the upload to be ajax, all I need is the filename, as soon as the file was choosen by the user. That way I could validate the filename serverside, and provide immediate feedback, before the (maybe) long upload is performed. So, just adding a parameter to the ajax "onchange" call would do the trick. What I'll try now is adding another "hidden" ajax form, link the file upload element to a hidden field in this form, and then "manually" submit this form, by adding my own "wicket free" javascript... not beautiful, but should work. Thanks for your help, Thomas Original-Nachricht > Datum: Wed, 27 Aug 2008 08:57:01 -0700 (PDT) > Von: Michael Sparer <[EMAIL PROTECTED]> > An: users@wicket.apache.org > Betreff: Re: fileupload element checking filename existing before upload > using ajax > > the problem is file uploading with ajax - that's just not possible > (restriction of the http protocol as far as I remember), however you can > 'simulate' using some approaches, e.g. a hidden iframe where you post your > file to. > that topic has been discussed many times, just search the list - if i > remember correctly there's already a component for that somewhere in > wicketstuff ... > > regards, > Michael > > Thomas Lutz wrote: > > > > Hi list ! > > > > I'm trying to build a upload form consisting of one ore more > fileuploads. > > > > If the file(s) already exist(s) on the server, I'd like to throw a > > validation message, but, before uploading takes place. > > > > I tried to attach AjaxEventBehavior to the FileUploadField, onchange is > > executed, but I've no access to the current value of the file input > > element. Tried AjaxFormComponentUpdatingBehavior as well, no success. > > > > How should I approach this ? Basically all I need is ajaxing the > onchange > > with the "new value" back to the server. > > > > Thanks for your help, > > Thomas > > -- > > Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! > > Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > - > Michael Sparer > http://talk-on-tech.blogspot.com > -- > View this message in context: > http://www.nabble.com/fileupload-element-checking-filename-existing-before-upload-using-ajax-tp19181551p19184026.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- GMX Kostenlose Spiele: Einfach online spielen und Spaß haben mit Pastry Passion! http://games.entertainment.gmx.net/de/entertainment/games/free/puzzle/6169196 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: GetModelObject returns null-filled Object?
As demanded by Nicklas the 2 files causing the Problem attached to this email. (I hope it passes the mailingList-robot) Hope you can tell me where the Error sits :/ (Excuse me for the bad formatting before, looked good in my Mail-Agent :( ) Items: RegisterPage.java RegisterPage.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: controlling number with wicket?
Hallo, you can do with AttributeModifier or AttributeAppender. Vitek Sami wrote: Hello, I have been trying to control the colspan in a table but no luck :( any one has an example of how to do it? code: - wicket:id="categoryName">[Category] wicket:id="Info">[Info] wicket:id="Type">[Type] wicket:id="Date">[Date] - I want to control the number in the colspan markup? I tried but didnt work. Many thanks Sami - 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: Maven QuickStart in Eclipse on Tomcat
If I knew enough about Jetty to be confident that there would be no hitches there, that would certainly be the optimal solution (and, given your experience with it, I'm sure you're right.) But considering that my knowledge of Jetty is perhaps on par with my knowledge of the history of Abkhazia, I figure that it's safer for now to run everything in the same server environment. igor.vaynberg wrote: > > same, no one said anything about switching anything in production env. > > -igor > -- View this message in context: http://www.nabble.com/Maven-QuickStart-in-Eclipse-on-Tomcat-tp19183955p19188753.html 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: controlling number with wicket?
use an attribute modifier -igor On Wed, Aug 27, 2008 at 12:52 PM, Sami <[EMAIL PROTECTED]> wrote: > Hello, > I have been trying to control the colspan in a table but no luck :( > > any one has an example of how to do it? > > code: > - > > wicket:id="categoryName">[Category] > >wicket:id="Info">[Info] > [Type] > [Date] > > > - > > I want to control the number in the colspan markup? > I tried but didnt work. > > Many thanks > Sami > > > - > 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: Maven QuickStart in Eclipse on Tomcat
same, no one said anything about switching anything in production env. -igor On Wed, Aug 27, 2008 at 11:51 AM, James Carman <[EMAIL PROTECTED]> wrote: > Yeah, couldn't you just take the war file created by maven and drop it > in your webapps directory of tomcat in your "production" environment? > Use jetty to develop, but tomcat to deploy. That's what we do. > > On Wed, Aug 27, 2008 at 2:48 PM, Jon Stockdill <[EMAIL PROTECTED]> wrote: >> Developing with jetty is very nice, we use it for many projects. For >> deployment, to remove any jars during deployment set the scope in the >> dependency to provided, see: >> http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html >> >> Also, to learn more about maven, google for "Better Builds with Maven" >> It is a great resource. >> >> --jon >> >> >> >> >> >> >> >> On Wed, Aug 27, 2008 at 2:36 PM, insom <[EMAIL PROTECTED]> wrote: >>> >>> I know -- that's the Jetty one, right? I keep telling myself that as I've >>> been trying to get this working with Tomcat. But in the I think fighting >>> with Tomcat will be easier than fighting with our administration to switch >>> the production server to Jetty. >>> >>> >>> igor.vaynberg wrote: you could just use the included Start class and have it startup much faster.. -igor On Wed, Aug 27, 2008 at 11:31 AM, insom <[EMAIL PROTECTED]> wrote: > > That did it. Thanks again. As an aside to anyone else who's also figuring > this out, I had to remove both the servlet-api jar and the > org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER from the list in order > to > get it to work. > > > Martijn Dashorst wrote: >> >> Remove it from the devloader list. >> >> Martijn >> > > -- > View this message in context: > http://www.nabble.com/Maven-QuickStart-in-Eclipse-on-Tomcat-tp19183955p19186957.html > Sent from the Wicket - User mailing list archive at Nabble.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] >>> >>> -- >>> View this message in context: >>> http://www.nabble.com/Maven-QuickStart-in-Eclipse-on-Tomcat-tp19183955p19187087.html >>> Sent from the Wicket - User mailing list archive at Nabble.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] >> >> > > - > 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]
controlling number with wicket?
Hello, I have been trying to control the colspan in a table but no luck :( any one has an example of how to do it? code: - wicket:id="categoryName">[Category] wicket:id="Info">[Info] [Type] [Date] - I want to control the number in the colspan markup? I tried but didnt work. Many thanks Sami - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: GetModelObject returns null-filled Object?
But whats weird is, that target contains the values. Its something with CGLib :/(look at debugger @ bottom) Can anyone help me with this issue? Thats what eclipse-Debugger says to the variable Users foo = (Users) form.getModelObject(); foo Users$$EnhancerByCGLIB$$9a8d5764 (id=4364) CGLIB$BOUND true CGLIB$CALLBACK_0 LazyInitProxyFactory$CGLibInterceptor (id=4368) locator SpringBeanLocator (id=4372) target Users (id=4373) target Users (id=4440) geburtsdatum Date (id=4443) gender "m" (id=) groups HashSet (id=4445) idnull nick"aaa" (id=4436) passwort Passwort$$EnhancerByCGLIB$$45e0481d (id=4448) usersdetail UsersDetail$$EnhancerByCGLIB$$2a32f2f5 (id=4449) typeName "com.getshoxed.database.Users" (id=4374) geburtsdatum null gender null groups HashSet (id=4369) idnull nicknull passwort null usersdetail null
[wicketstuff-dojo] Dropping *on* Something...
I'm following the simple Dojo D'n'D example (http://wicketstuff.org/confluence/display/STUFFWIKI/Simple+Dojo+D%27n%27D+tutorial) and I've set up a list of labels rather than images. It looks like I can only drop in between stuff. How would I be able to tell if you're actually trying to drop *onto* something (like if I dropped onto a tree node and wanted to add the thing as a child rather than as a previous/next sibling)? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Maven QuickStart in Eclipse on Tomcat
Yeah, couldn't you just take the war file created by maven and drop it in your webapps directory of tomcat in your "production" environment? Use jetty to develop, but tomcat to deploy. That's what we do. On Wed, Aug 27, 2008 at 2:48 PM, Jon Stockdill <[EMAIL PROTECTED]> wrote: > Developing with jetty is very nice, we use it for many projects. For > deployment, to remove any jars during deployment set the scope in the > dependency to provided, see: > http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html > > Also, to learn more about maven, google for "Better Builds with Maven" > It is a great resource. > > --jon > > > > > > > > On Wed, Aug 27, 2008 at 2:36 PM, insom <[EMAIL PROTECTED]> wrote: >> >> I know -- that's the Jetty one, right? I keep telling myself that as I've >> been trying to get this working with Tomcat. But in the I think fighting >> with Tomcat will be easier than fighting with our administration to switch >> the production server to Jetty. >> >> >> igor.vaynberg wrote: >>> >>> you could just use the included Start class and have it startup much >>> faster.. >>> >>> -igor >>> >>> On Wed, Aug 27, 2008 at 11:31 AM, insom <[EMAIL PROTECTED]> wrote: That did it. Thanks again. As an aside to anyone else who's also figuring this out, I had to remove both the servlet-api jar and the org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER from the list in order to get it to work. Martijn Dashorst wrote: > > Remove it from the devloader list. > > Martijn > -- View this message in context: http://www.nabble.com/Maven-QuickStart-in-Eclipse-on-Tomcat-tp19183955p19186957.html Sent from the Wicket - User mailing list archive at Nabble.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] >>> >>> >>> >> >> -- >> View this message in context: >> http://www.nabble.com/Maven-QuickStart-in-Eclipse-on-Tomcat-tp19183955p19187087.html >> Sent from the Wicket - User mailing list archive at Nabble.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] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Maven QuickStart in Eclipse on Tomcat
Developing with jetty is very nice, we use it for many projects. For deployment, to remove any jars during deployment set the scope in the dependency to provided, see: http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html Also, to learn more about maven, google for "Better Builds with Maven" It is a great resource. --jon On Wed, Aug 27, 2008 at 2:36 PM, insom <[EMAIL PROTECTED]> wrote: > > I know -- that's the Jetty one, right? I keep telling myself that as I've > been trying to get this working with Tomcat. But in the I think fighting > with Tomcat will be easier than fighting with our administration to switch > the production server to Jetty. > > > igor.vaynberg wrote: >> >> you could just use the included Start class and have it startup much >> faster.. >> >> -igor >> >> On Wed, Aug 27, 2008 at 11:31 AM, insom <[EMAIL PROTECTED]> wrote: >>> >>> That did it. Thanks again. As an aside to anyone else who's also figuring >>> this out, I had to remove both the servlet-api jar and the >>> org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER from the list in order >>> to >>> get it to work. >>> >>> >>> Martijn Dashorst wrote: Remove it from the devloader list. Martijn >>> >>> -- >>> View this message in context: >>> http://www.nabble.com/Maven-QuickStart-in-Eclipse-on-Tomcat-tp19183955p19186957.html >>> Sent from the Wicket - User mailing list archive at Nabble.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] >> >> >> > > -- > View this message in context: > http://www.nabble.com/Maven-QuickStart-in-Eclipse-on-Tomcat-tp19183955p19187087.html > Sent from the Wicket - User mailing list archive at Nabble.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]
Re: Maven QuickStart in Eclipse on Tomcat
I know -- that's the Jetty one, right? I keep telling myself that as I've been trying to get this working with Tomcat. But in the I think fighting with Tomcat will be easier than fighting with our administration to switch the production server to Jetty. igor.vaynberg wrote: > > you could just use the included Start class and have it startup much > faster.. > > -igor > > On Wed, Aug 27, 2008 at 11:31 AM, insom <[EMAIL PROTECTED]> wrote: >> >> That did it. Thanks again. As an aside to anyone else who's also figuring >> this out, I had to remove both the servlet-api jar and the >> org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER from the list in order >> to >> get it to work. >> >> >> Martijn Dashorst wrote: >>> >>> Remove it from the devloader list. >>> >>> Martijn >>> >> >> -- >> View this message in context: >> http://www.nabble.com/Maven-QuickStart-in-Eclipse-on-Tomcat-tp19183955p19186957.html >> Sent from the Wicket - User mailing list archive at Nabble.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] > > > -- View this message in context: http://www.nabble.com/Maven-QuickStart-in-Eclipse-on-Tomcat-tp19183955p19187087.html 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: Maven QuickStart in Eclipse on Tomcat
you could just use the included Start class and have it startup much faster.. -igor On Wed, Aug 27, 2008 at 11:31 AM, insom <[EMAIL PROTECTED]> wrote: > > That did it. Thanks again. As an aside to anyone else who's also figuring > this out, I had to remove both the servlet-api jar and the > org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER from the list in order to > get it to work. > > > Martijn Dashorst wrote: >> >> Remove it from the devloader list. >> >> Martijn >> > > -- > View this message in context: > http://www.nabble.com/Maven-QuickStart-in-Eclipse-on-Tomcat-tp19183955p19186957.html > Sent from the Wicket - User mailing list archive at Nabble.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]
Re: Maven QuickStart in Eclipse on Tomcat
That did it. Thanks again. As an aside to anyone else who's also figuring this out, I had to remove both the servlet-api jar and the org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER from the list in order to get it to work. Martijn Dashorst wrote: > > Remove it from the devloader list. > > Martijn > -- View this message in context: http://www.nabble.com/Maven-QuickStart-in-Eclipse-on-Tomcat-tp19183955p19186957.html 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: Maven QuickStart in Eclipse on Tomcat
Remove it from the devloader list. Martijn On Wed, Aug 27, 2008 at 7:51 PM, insom <[EMAIL PROTECTED]> wrote: > > Ugh. Of course, you're right. I had been getting a ClassNotFoundException > before I tried the DevLoader, and I didn't notice that the error had changed > to ClassCastException afterward. > > I'm not sure how to remove servlet-api from the Maven dependencies list. The > Properties/Java Build Path/Libraries approach that I use for normal jars > doesn't work -- the "Remove" option is disabled. My very basic understanding > of Maven would point me at the pom.xml, but that doesn't explicitly list > servlet-api as a dependency either. Where is servlet-api defined as a > dependency, and how do I get rid of it? > > Thanks for all your help. > > > Martijn Dashorst wrote: >> >> Obviously it *is* finding the wicket-1.3.4.jar. ClassCastException != >> ClassNotFoundException. >> >> You have to remove the servlet-api jar from the classpath when you run >> your application in tomcat. >> >> Martijn >> > > -- > View this message in context: > http://www.nabble.com/Maven-QuickStart-in-Eclipse-on-Tomcat-tp19183955p19185757.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.3.4 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Maven QuickStart in Eclipse on Tomcat
Ugh. Of course, you're right. I had been getting a ClassNotFoundException before I tried the DevLoader, and I didn't notice that the error had changed to ClassCastException afterward. I'm not sure how to remove servlet-api from the Maven dependencies list. The Properties/Java Build Path/Libraries approach that I use for normal jars doesn't work -- the "Remove" option is disabled. My very basic understanding of Maven would point me at the pom.xml, but that doesn't explicitly list servlet-api as a dependency either. Where is servlet-api defined as a dependency, and how do I get rid of it? Thanks for all your help. Martijn Dashorst wrote: > > Obviously it *is* finding the wicket-1.3.4.jar. ClassCastException != > ClassNotFoundException. > > You have to remove the servlet-api jar from the classpath when you run > your application in tomcat. > > Martijn > -- View this message in context: http://www.nabble.com/Maven-QuickStart-in-Eclipse-on-Tomcat-tp19183955p19185757.html 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: GetModelObject returns null-filled Object?
I´m using it that way: final Form regF = new Form("RegisterForm") { @Override protected void onSubmit() { Users foo = (Users) this.getModelObject(); String bar = foo.getNick(); if (!validateForm(foo)) { onError(); return; } } @Override protected void onError() { super.onError(); //? } }; regF.setOutputMarkupId(true); u.setPasswort(pw); u.setUsersdetail(ud); final BoundCompoundPropertyModel model = new BoundCompoundPropertyModel(u); regF.setModel(model); FormComponent nick = new TextField("nick") .setRequired(true) .setLabel(new Model("Nickname")); regF.add(nick); Any Idea? Thanks for the Tip with the IFormValidator, I´ll take a look at it!
Re: application scope objects in Wicket
Thank you both for your answers, Jeremy and James. The data structure I'll use in the real case will be a collection of objects with one object for each of the user sessions. That same object will be accessed only once outside the user session and then it will be erased. There won't be 2 threads accessing the same object in the collection at the same time but they will access the collection object itself concurrently (even if on separate elements). That's why I thought about using synchronized methods only for removing, setting and adding an element in the Collection, I hope this will work correctly without affecting the performance of the WebApplication object. Don't know if I should incapsulate the collection in another object member of WebApplication and implement the synchronized methods inside it. I didn't post these details because my doubt was really on the correctness of overriding the get() method of WebApplication to enable the use of application scope objects. Thanks for the advice and cheers, Marvan James Perry wrote: Firstly I hope you are enjoying building your first Wicket web app. Is this application scope object immutable? What is the data structure? IMHO, if it's immutable then it's OK to use composition within your WebApplication by adding this object as a field within WebApplication. I would just make it final so it never gets incorrectly pointed to a different object once initialized. However if this has mutable shared data, then do not use the WebApplication's intrinsic lock as you will jeopardize its throughput to process requests. For example: public class FooBarApplication extends WebApplication { private MyAppScopeObject appScopeObject; public synchronized MyAppScopeObject getAppScopeObject(){ return appScopeObject; } public synchronized void setAppScopeObject(MyAppScopeObject appScopeObject) { this.appScopeObject = appScopeObject; } } Instead, use your application-scope object's intrinsic lock or use a suitable mutex in the Java 5/6 API. Best, James. On Mon, Aug 25, 2008 at 12:04 PM, Marvan Spagnolo <[EMAIL PROTECTED]> wrote: Hi all, I'm new to Wicket and developing my first Wicket website. I have some temporary objects created inside a users' session but needed by a parallel process which uses them outside the user session and I would like to avoid temporarily persisting them into a database. I'm looking at using application scope objects but I'm not sure how to do it best in Wicket. I guess I should override the get() method of WebApplication mimicking the pattern used for custom Session objects. public class WicketApplication extends MyWebApplication { private Object applicationScopeObject; public WicketApplication() { setApplicationScopeObject( ); } @Override public static WicketApplication get() { return (WicketApplication) WebApplication.get(); } public Object getApplicationScopeObject(){ return this.applicationScopeObject; } public void setApplicationScopeObject( Object applicationScopeObject ){ this.applicationScopeObject = applicationScopeObject; } [...] } public class PageInsideUserSession { public PageInsideUserSession(){ [...] // object has already been initialized WicketApplication.get().setApplicationScopeObject( object ); } } public class PageOutsideUserSession { public PageOutsideUserSession(){ Object object = WicketApplication.get().getApplicationScopeObject(); [...] } } In my case synchronizing the access to the application scope object should not be needed. Is this approach correct (and efficient) or is there a better solution ? Should I maybe use a separate parent class (parent of WicketApplication and child of WebApplication) for overriding the get() method (in case the override interferes with something else in the framework) ? Cheers, Marvan -- Reza Marvan Spagnolo SW Engineer - Freelancer - 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]
Wicket Cart: open-source e-commerce wicket app
Is anyone interested in contributing to an open-source e-commerce wicket engine? I was thinking of calling it WicketCart. I have written a primitive version which serves as a good foundation to build upon. I have a new client, a royal college, requiring an e-commerce web app so just pondering the idea of WicketCart. If other developers are interested in contributing then I will make it open-source. I have written it so far using Spring and Hibernate but very open for it to additionally be implemented for other frameworks. If anyone wants specific details or wants to discuss it a bit more, then feel free to email me. Best, James. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
First impressions of 1.4-m3
I've been a little busy so just took my first look at 1.4-m3 and spend a few minutes upgrading a small app. So far the only thing I wish were different is for getModel and getModelObject to not have been changed to getDefaultModel and getDefaultModelObject. That breaks old code and some things like libraries I may not have control over to upgrade. My preference would have been to keep them the same and have the new generic ones named something else like getComponentModel and getComponentModelObject. This way old code still works but I have a migration path to start using generics in my app. Just my $.02 Edward - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Maven QuickStart in Eclipse on Tomcat
On Wed, Aug 27, 2008 at 5:52 PM, insom <[EMAIL PROTECTED]> wrote: > libraries?) I think I have it mostly configured correctly, but when I start > Tomcat I get the following error: > java.lang.ClassCastException: org.apache.wicket.protocol.http.WicketFilter > cannot be cast to javax.servlet.Filter > Obviously, it's not finding the wicket-1.3.4.jar. Here are my screenshots > from Eclipse: Obviously it *is* finding the wicket-1.3.4.jar. ClassCastException != ClassNotFoundException. You have to remove the servlet-api jar from the classpath when you run your application in tomcat. Martijn -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.3.4 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Maven QuickStart in Eclipse on Tomcat
Are you, by any chance, using the DevLoader plugin to run Tomcat ? If so, you should go in the tomcat properties of your project, edit the devloader classpath properties, and disable all jetty jars and the servlet-api jar ... Hope this helps, Antoine. insom wrote: I'm trying to run the Wicket QuickStart app in Eclipse on Tomcat. I'm entirely new to Maven and its dependencies (which seem to be just project libraries?) I think I have it mostly configured correctly, but when I start Tomcat I get the following error: java.lang.ClassCastException: org.apache.wicket.protocol.http.WicketFilter cannot be cast to javax.servlet.Filter at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:255) at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:397) . . . Obviously, it's not finding the wicket-1.3.4.jar. Here are my screenshots from Eclipse: http://www.nabble.com/file/p19183955/packageExplorer.png and http://www.nabble.com/file/p19183955/buildPath.png So it appears that the wicket jar is there under Maven Dependencies. Is there anything I need to do in order to get the items under Maven Dependencies to be recognized by the application? Thanks much. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: fileupload element checking filename existing before upload using ajax
the problem is file uploading with ajax - that's just not possible (restriction of the http protocol as far as I remember), however you can 'simulate' using some approaches, e.g. a hidden iframe where you post your file to. that topic has been discussed many times, just search the list - if i remember correctly there's already a component for that somewhere in wicketstuff ... regards, Michael Thomas Lutz wrote: > > Hi list ! > > I'm trying to build a upload form consisting of one ore more fileuploads. > > If the file(s) already exist(s) on the server, I'd like to throw a > validation message, but, before uploading takes place. > > I tried to attach AjaxEventBehavior to the FileUploadField, onchange is > executed, but I've no access to the current value of the file input > element. Tried AjaxFormComponentUpdatingBehavior as well, no success. > > How should I approach this ? Basically all I need is ajaxing the onchange > with the "new value" back to the server. > > Thanks for your help, > Thomas > -- > Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! > Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/fileupload-element-checking-filename-existing-before-upload-using-ajax-tp19181551p19184026.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Maven QuickStart in Eclipse on Tomcat
I'm trying to run the Wicket QuickStart app in Eclipse on Tomcat. I'm entirely new to Maven and its dependencies (which seem to be just project libraries?) I think I have it mostly configured correctly, but when I start Tomcat I get the following error: java.lang.ClassCastException: org.apache.wicket.protocol.http.WicketFilter cannot be cast to javax.servlet.Filter at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:255) at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:397) . . . Obviously, it's not finding the wicket-1.3.4.jar. Here are my screenshots from Eclipse: http://www.nabble.com/file/p19183955/packageExplorer.png and http://www.nabble.com/file/p19183955/buildPath.png So it appears that the wicket jar is there under Maven Dependencies. Is there anything I need to do in order to get the items under Maven Dependencies to be recognized by the application? Thanks much. -- View this message in context: http://www.nabble.com/Maven-QuickStart-in-Eclipse-on-Tomcat-tp19183955p19183955.html 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: Editing a Tree of Data...
Hi James You can get very very far just using listboxes and checkboxes, unless the customer wants the tree for the tree's sake.. checkout http://www.jobindsats.dk/sw167.asp select databank (I know it's danish, and don't mind asp extension it's really wicket behind) Otherwise I'd try to go with drag and drop as it are, and if it were too bad i'd fix it:) James Carman wrote: In our application, the users want to be able to construct their own ad-hoc summary tree out of rows of data from a table. They want to select the rows and do something like "add to my summary tree." Then it would take them to a screen where they can edit that summary tree. The operations we need to be able to do are: 1. Move nodes around within the tree (moving to subnodes of an existing node and being able to re-order nodes within a node). 2. Create their own nodes that can be containers/folders/categories for other nodes. 3. Remove nodes. How would you guys go about doing something like this in Wicket? Do you think the drag-and-drop support is rich enough to allow for this type of functionality? Would it be worth it (I could potentially put this stuff in our Swing client piece of the application if need be)? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -Wicket for love Nino Martinez Wael Java Specialist @ Jayway DK http://www.jayway.dk +45 2936 7684 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: wicket-event added twice problem
What wicket version? This should be filtered by wicket. -Matej On Wed, Aug 27, 2008 at 4:13 PM, Nino Saturnino Martinez Vazquez Wael <[EMAIL PROTECTED]> wrote: > show us some code..:) > > Tomasz Prus wrote: >> >> Hi >> >> I have problem because wicket-event.js is added twice and couse error. >> (each >> component with wicket-event.js adds it) >> >> Please help, how can i add it only one? >> >> Similar problem is with css files >> >> Best regards, >> Tomek >> >> > > -- > -Wicket for love > > Nino Martinez Wael > Java Specialist @ Jayway DK > http://www.jayway.dk > +45 2936 7684 > > > - > 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: Page models
we decided not to generify components unless it made sense. since pages, unlike eg formcomponents, do not use their models for anything they are not generified. -igor On Wed, Aug 27, 2008 at 8:22 AM, John Patterson <[EMAIL PROTECTED]> wrote: > > Yeah guess I will do that. was just wondering if I was in the minority using > models in my pages. > > > igor.vaynberg wrote: >> >> you can always create your own subclass that is generified, and use that >> >> -igor >> >> On Wed, Aug 27, 2008 at 3:17 AM, John Patterson <[EMAIL PROTECTED]> wrote: >>> >>> Hi, in almost all my pages I set a model for the page and then need to >>> retrieve it using the un-typesafe getDefaultModel(). Or I implement a >>> typesafe getModel(). I was just wondering if others really normally use >>> pages without models? If not maybe Page should be generified? >>> >>> JD >>> -- >>> View this message in context: >>> http://www.nabble.com/Page-models-tp19178165p19178165.html >>> Sent from the Wicket - User mailing list archive at Nabble.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] >> >> >> > > -- > View this message in context: > http://www.nabble.com/Page-models-tp19178165p19183332.html > Sent from the Wicket - User mailing list archive at Nabble.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]
Editing a Tree of Data...
In our application, the users want to be able to construct their own ad-hoc summary tree out of rows of data from a table. They want to select the rows and do something like "add to my summary tree." Then it would take them to a screen where they can edit that summary tree. The operations we need to be able to do are: 1. Move nodes around within the tree (moving to subnodes of an existing node and being able to re-order nodes within a node). 2. Create their own nodes that can be containers/folders/categories for other nodes. 3. Remove nodes. How would you guys go about doing something like this in Wicket? Do you think the drag-and-drop support is rich enough to allow for this type of functionality? Would it be worth it (I could potentially put this stuff in our Swing client piece of the application if need be)? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Page models
Yeah guess I will do that. was just wondering if I was in the minority using models in my pages. igor.vaynberg wrote: > > you can always create your own subclass that is generified, and use that > > -igor > > On Wed, Aug 27, 2008 at 3:17 AM, John Patterson <[EMAIL PROTECTED]> wrote: >> >> Hi, in almost all my pages I set a model for the page and then need to >> retrieve it using the un-typesafe getDefaultModel(). Or I implement a >> typesafe getModel(). I was just wondering if others really normally use >> pages without models? If not maybe Page should be generified? >> >> JD >> -- >> View this message in context: >> http://www.nabble.com/Page-models-tp19178165p19178165.html >> Sent from the Wicket - User mailing list archive at Nabble.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] > > > -- View this message in context: http://www.nabble.com/Page-models-tp19178165p19183332.html 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: Any wicketstuff.org site admins around?
Count me out on this one, only have permissions for the software not the server itself.. David Nedrow wrote: It doesn't look as though there is any way to send a message to the site admins listed on the Wicket Stuff site. The web server is not setting the correct mime-type for .war files. If any of the admins see this, could you add something like the following (assuming Apache httpd)... AddType application/octet-stream .war -David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -Wicket for love Nino Martinez Wael Java Specialist @ Jayway DK http://www.jayway.dk +45 2936 7684 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Question regarding [WICKET-1420] - Allow to change charset in St ringRequestTarget
open a jira issue and create a patch -igor On Wed, Aug 27, 2008 at 4:44 AM, <[EMAIL PROTECTED]> wrote: > Hi, > > we ran into trouble with the StringRequestTarget on Wicket 1.4-m3, when our > system file.encoding was different from the encoding used for the > communication between Wicket and the web browser. In short, we use UTF-8 for > our web pages and JSON. Java uses Cp1252 as file encoding on one of our > machines, so the CharSet of the OutputStream used by StringRequestTarget is > set to Cp1252 as well. > > The StringRequestTarget sets the content type to "text/charset=utf-8" by > default (possibly because the request is encoded in UTF-8 ?). > Setting a the content type parameter of the StringRequestTarget to > "application/json; charset=UTF-8" does not change the charset used by the > OutputStream, so you will send corrupt data. I don't think that the content > type should be set to "...;charset:cp1252" - if the web pages and the > request are UTF-8, the response should be UTF-8 as well. > > Right now we are overloading StringResourceTarget (= cutting and pasting the > whole class, then applying our changes), so that we have a new constructor: >> public MyStringRequestTarget(String mimeType, String string, Charset > charset) { ... } > > The charset is stored in a member variable and used in in onResponse(): > >> MyStringRequestTarget.onResponse() >> { >> ... >> stream.setCharset(charset); >> response.setContentType(mimeType + ";charset=" + charset.name()); >> ... >> } > > Could these changes be applied to Wicket / trunk 1.4? > Or am I missing something obvious? > > Niels > > - > 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: Page models
you can always create your own subclass that is generified, and use that -igor On Wed, Aug 27, 2008 at 3:17 AM, John Patterson <[EMAIL PROTECTED]> wrote: > > Hi, in almost all my pages I set a model for the page and then need to > retrieve it using the un-typesafe getDefaultModel(). Or I implement a > typesafe getModel(). I was just wondering if others really normally use > pages without models? If not maybe Page should be generified? > > JD > -- > View this message in context: > http://www.nabble.com/Page-models-tp19178165p19178165.html > Sent from the Wicket - User mailing list archive at Nabble.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]
Re: wicket-event added twice problem
show us some code..:) Tomasz Prus wrote: Hi I have problem because wicket-event.js is added twice and couse error. (each component with wicket-event.js adds it) Please help, how can i add it only one? Similar problem is with css files Best regards, Tomek -- -Wicket for love Nino Martinez Wael Java Specialist @ Jayway DK http://www.jayway.dk +45 2936 7684 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Localization issue
Yeah this seems to be the issue... Janos Cserep wrote: Actually now I have only one label for testing purposes: add(new Label("locale", getSession().getLocale().getLanguage())); That's actually bad practice. You are adding the component in the constructor. That code runs only once - when you create the component, page, etc. Try: add(new Label("locale", new PropertyModel(this, "session.locale.language")); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -Wicket for love Nino Martinez Wael Java Specialist @ Jayway DK http://www.jayway.dk +45 2936 7684 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
wicket-event added twice problem
Hi I have problem because wicket-event.js is added twice and couse error. (each component with wicket-event.js adds it) Please help, how can i add it only one? Similar problem is with css files Best regards, Tomek
fileupload element checking filename existing before upload using ajax
Hi list ! I'm trying to build a upload form consisting of one ore more fileuploads. If the file(s) already exist(s) on the server, I'd like to throw a validation message, but, before uploading takes place. I tried to attach AjaxEventBehavior to the FileUploadField, onchange is executed, but I've no access to the current value of the file input element. Tried AjaxFormComponentUpdatingBehavior as well, no success. How should I approach this ? Basically all I need is ajaxing the onchange with the "new value" back to the server. Thanks for your help, Thomas -- Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: GetModelObject returns null-filled Object?
What model are you using for the form? How are you setting it? While you're there have a look at IFormValidator (look at its implementations to see how to use it) as it's much neater to add your Hibernate validator like this rather then hard coding it in your overridden onSubmit method. Best, James. On Wed, Aug 27, 2008 at 2:06 PM, Markus <[EMAIL PROTECTED]> wrote: > Following Code: (just Stubs used for Form / onSubmit for illustration) > > > > Form { > > onSubmit { > > > > Users foo = (Users) this.getModelObject(); > > String bar = foo.getNick(); > > > > //Hibernate-Validator validateForm() > > if (!validateForm(foo)) { > > (…) > > } > > > > > > When I use the debugger and look at foo, every variable is filled with null, > but bar contains the right value? > > Why is this the way it is? Can I change it? > > Because Hibernate Validator also can´t read out the correct content and says > it is null or empty :( > > > > Thanks for you help. > > Markus > > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
GetModelObject returns null-filled Object?
Following Code: (just Stubs used for Form / onSubmit for illustration) Form { onSubmit { Users foo = (Users) this.getModelObject(); String bar = foo.getNick(); //Hibernate-Validator validateForm() if (!validateForm(foo)) { ( ) } When I use the debugger and look at foo, every variable is filled with null, but bar contains the right value? Why is this the way it is? Can I change it? Because Hibernate Validator also can´t read out the correct content and says it is null or empty :( Thanks for you help. Markus
Re: Localization issue
Actually now I have only one label for testing purposes: add(new Label("locale", getSession().getLocale().getLanguage())); That's actually bad practice. You are adding the component in the constructor. That code runs only once - when you create the component, page, etc. Try: add(new Label("locale", new PropertyModel(this, "session.locale.language")); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Error while adding css for a Panel
Well, I fould a link about http://cwiki.apache.org/WICKET/working-with-wicket-models.html#WorkingwithWicketmodels-CompoundPropertyModels CompoundPropertyModel . But I don't know how can I add it to a Page. btakacs wrote: > > It seems that this happens only in 1.4. > > Maybe because I haven't added CompoundPropertyModel. > > Does anybody know what is it for? > * A simple compound model which uses the component's name as the property > expression to retrieve > * properties on the nested model object. > * > * CompoundPropertyModel is a chaining model so it will call get/setobject > on the given object if > * the object is an instanceof IModel itself. > It does not make too much sense for me. Maybe I should investigate the > architecture of wicket. Are there any good article about that? > > And what can I do in 1.4 instead setModel(new > CompoundPropertyModel(this)); since there is no setModel method in WebPage > there. > > Thanks: >Bence > > > > btakacs wrote: >> >> Hi >> >> I get the following error in that line >> add(HeaderContributor.forCss(MenuPanel.class, "MenuPanel.css")); >> >> Caused by: java.lang.NoSuchMethodError: >> com.myapp.wicket.MenuPanel.add([Lorg/apache/wicket/behavior/IBehavior;)Lorg/apache/wicket/Component; >> at com.myapp.wicket.MenuPanel.(MenuPanel.java:34) >> at com.myapp.wicket.HeaderPanel.(HeaderPanel.java:40) >> at com.myapp.wicket.BasePage.(BasePage.java:32) >> at com.myapp.wicket.BasePage.(BasePage.java:26) >> at com.myapp.wicket.HomePage.(HomePage.java:19) >> at com.myapp.wicket.HomePage.(HomePage.java:16) >> ... 47 more >> registered listener interface [RequestListenerInterface >> name=IActivePageBehaviorListener, method=public abstract void >> org.apache.wicket.behavior.IBehaviorListener.onRequest()] >> >> Any tips? >> >> Thanks: >>Bence >> > > -- View this message in context: http://www.nabble.com/Error-while-adding-css-for-a-Panel-tp19177849p19180275.html 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: Localization issue
Janos Cserep-4 wrote: > > Are you setting up your components based on your locale in the > constructor? > Actually now I have only one label for testing purposes: add(new Label("locale", getSession().getLocale().getLanguage())); > Because if you do, then setting a Page object with setResponsePage won't > create new component objects for you. > > Try: > > setResponsePage(this.getPage().getClass()); - this will forward you to a > new instance of the page... > Well, it seems to help. It seems that the method with Class type forces the reload. It's weird a little... Thanks Bence - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Localization-issue-tp19160932p19180156.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
True reason for surround modal window with a form ?
Hi, I curious what is the true reason for surround whole modal component in a form. Thx for reply. Jakub -- View this message in context: http://www.nabble.com/True-reason-for-surround-modal-window-with-a-form---tp19179674p19179674.html 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: Error while adding css for a Panel
It seems that this happens only in 1.4. Maybe because I haven't added CompoundPropertyModel. Does anybody know what is it for? * A simple compound model which uses the component's name as the property expression to retrieve * properties on the nested model object. * * CompoundPropertyModel is a chaining model so it will call get/setobject on the given object if * the object is an instanceof IModel itself. It does not make too much sense for me. Maybe I should investigate the architecture of wicket. Are there any good article about that? And what can I do in 1.4 instead setModel(new CompoundPropertyModel(this)); since there is no setModel method in WebPage there. Thanks: Bence btakacs wrote: > > Hi > > I get the following error in that line > add(HeaderContributor.forCss(MenuPanel.class, "MenuPanel.css")); > > Caused by: java.lang.NoSuchMethodError: > com.myapp.wicket.MenuPanel.add([Lorg/apache/wicket/behavior/IBehavior;)Lorg/apache/wicket/Component; > at com.myapp.wicket.MenuPanel.(MenuPanel.java:34) > at com.myapp.wicket.HeaderPanel.(HeaderPanel.java:40) > at com.myapp.wicket.BasePage.(BasePage.java:32) > at com.myapp.wicket.BasePage.(BasePage.java:26) > at com.myapp.wicket.HomePage.(HomePage.java:19) > at com.myapp.wicket.HomePage.(HomePage.java:16) > ... 47 more > registered listener interface [RequestListenerInterface > name=IActivePageBehaviorListener, method=public abstract void > org.apache.wicket.behavior.IBehaviorListener.onRequest()] > > Any tips? > > Thanks: >Bence > -- View this message in context: http://www.nabble.com/Error-while-adding-css-for-a-Panel-tp19177849p19179396.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Question regarding [WICKET-1420] - Allow to change charset in St ringRequestTarget
Hi, we ran into trouble with the StringRequestTarget on Wicket 1.4-m3, when our system file.encoding was different from the encoding used for the communication between Wicket and the web browser. In short, we use UTF-8 for our web pages and JSON. Java uses Cp1252 as file encoding on one of our machines, so the CharSet of the OutputStream used by StringRequestTarget is set to Cp1252 as well. The StringRequestTarget sets the content type to "text/charset=utf-8" by default (possibly because the request is encoded in UTF-8 ?). Setting a the content type parameter of the StringRequestTarget to "application/json; charset=UTF-8" does not change the charset used by the OutputStream, so you will send corrupt data. I don't think that the content type should be set to "...;charset:cp1252" - if the web pages and the request are UTF-8, the response should be UTF-8 as well. Right now we are overloading StringResourceTarget (= cutting and pasting the whole class, then applying our changes), so that we have a new constructor: > public MyStringRequestTarget(String mimeType, String string, Charset charset) { ... } The charset is stored in a member variable and used in in onResponse(): > MyStringRequestTarget.onResponse() > { > ... > stream.setCharset(charset); > response.setContentType(mimeType + ";charset=" + charset.name()); > ... > } Could these changes be applied to Wicket / trunk 1.4? Or am I missing something obvious? Niels - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Change style of TreeNode
Kai Schubert-Altmann skrev: Thanks a lot, Edvin. I will try your answers to 2. and 3.. But I think, that overwriting the populateTreeItem method wouldn't help, because i want to modify nodes of an existing tree, for example mark them red if I click on them. Any suggestions? That's why you need to add an AbstractBehaviour to each item. The onComponentTag() method will be run before the component is rendered, so you can check the state of your userObject and add/remove classes using the tag.put() approach :) Also, you might look into onNodeLinkClicked() method of the tree, if you want to perform actions when you click on an item. The onNodeLinkClicked() gives you access to the AjaxRequestTarget, so you can also execute arbitrary javascript code, like this: protected void onNodeLinkClicked(AjaxRequestTarget target, TreeNode node) { MyObject myObject = (MyObject) ((DefaultMutableTreeNode) node).getUserObject(); if(myObject.getMyState()) target.appendJavascript("targetTheComponentWithAJavascriptMethod(" + getId() + ");"); } Either that, or you could change the state of the userObject in the onNodeLinkClicked method and add it to the AjaxRequestTarget. Your AbstractBehaviour will then take care of visualizing the new state of the object for you :) -- Edvin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Page models
i think many people doent want to do Page and that kind of stuff... dont think that it is used much (the model of the page) johan On Wed, Aug 27, 2008 at 12:17 PM, John Patterson <[EMAIL PROTECTED]> wrote: > > Hi, in almost all my pages I set a model for the page and then need to > retrieve it using the un-typesafe getDefaultModel(). Or I implement a > typesafe getModel(). I was just wondering if others really normally use > pages without models? If not maybe Page should be generified? > > JD > -- > View this message in context: > http://www.nabble.com/Page-models-tp19178165p19178165.html > 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: AjaxEventBehaviour with request parameters?
No problem... :) Happy to help. Sarkast wrote: God, that's how I did it in my code with the AbstractAjaxBehaviour as well, must have misread it when I was looking at it... feel kind of stupid now :-/ Thanks! -- -Wicket for love Nino Martinez Wael Java Specialist @ Jayway DK http://www.jayway.dk +45 2936 7684 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Change style of TreeNode
Thanks a lot, Edvin. I will try your answers to 2. and 3.. But I think, that overwriting the populateTreeItem method wouldn't help, because i want to modify nodes of an existing tree, for example mark them red if I click on them. Any suggestions? 2008/8/26 Edvin Syse <[EMAIL PROTECTED]> > Kai Schubert-Altmann skrev: > >> Hi everybody, >> >> I have some question regarding my existing wicket tree: >> >> 1. How can I change the style or css class of one or more TreeNodes? >> > > If you override the populateTreeItem() method, you can add an > AbstractBehaviour to the item and override the onComponentTag method. From > there you can do tag.put("class", "yourValue"). > > 2. How can I specify custom icons for some nodes? >> > > Override the getNodeIcon() method of the tree. > > 3. How can i change the name, that will be shown in the tree, without >> changing the name of the userObject? >> > > I guess the simple solution would be to provide a toString() method on > your userObject that returns the desired value :) > > Alternatively you could override the renderNode method of the Tree, which > by default does: > >protected String renderNode(TreeNode node) >{ >return node.toString(); >} > > > Just get your userObject from the node and return the string you want from > there :) > > -- Edvin > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Page models
Hi, in almost all my pages I set a model for the page and then need to retrieve it using the un-typesafe getDefaultModel(). Or I implement a typesafe getModel(). I was just wondering if others really normally use pages without models? If not maybe Page should be generified? JD -- View this message in context: http://www.nabble.com/Page-models-tp19178165p19178165.html 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: AjaxEventBehaviour with request parameters?
God, that's how I did it in my code with the AbstractAjaxBehaviour as well, must have misread it when I was looking at it... feel kind of stupid now :-/ Thanks! -- View this message in context: http://www.nabble.com/AjaxEventBehaviour-with-request-parameters--tp19178005p19178158.html 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: AjaxEventBehaviour with request parameters?
I do it this way in openlayers contrib: Request request = RequestCycle.get().getRequest(); String lon = request.getParameter("lon"); String lat = request.getParameter("lat"); Sarkast wrote: Hello community, I have a small (I hope) problem. I am using an AjaxEventBehaviour('onclick') and would like to tell my onEvent method additional information, however, I don't have a request, like I do with an abstractajaxbehaviour. However an abstractajaxbehaviour doesn't have an 'onclick' as far as I can tell. public class ClickAjax extends AjaxEventBehavior { public ClickAjax (String action) { super(action); } @Override protected void onEvent(AjaxRequestTarget target) { //where do i see the parameter? } @Override protected CharSequence getEventHandler() { CharSequence callbackUrl= getCallbackUrl(); StringBuilder javaScript = new StringBuilder(); javaScript.append("resetableElementsObject.resetActiveElements();\n"); javaScript.append("var _contextMenu = new contextMenu();\n"); javaScript.append("_contextMenu.addMenuItem('Option1', function() { wicketAjaxGet('" + callbackUrl + "&Parameter=false') });\n"); javaScript.append("_contextMenu.addMenuItem('Option2', function() {'" + callbackUrl + "&Parameter=true'});\n"); javaScript.append("_contextMenu.show();\n"); return javaScript; } } I get to the onEvent method when I choose an option in my menu, but I can't access the parameter, because of the missing request. Is there an accepted way to do this? Thanks in advance, Tom -- -Wicket for love Nino Martinez Wael Java Specialist @ Jayway DK http://www.jayway.dk +45 2936 7684 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AjaxEventBehaviour with request parameters?
Hello community, I have a small (I hope) problem. I am using an AjaxEventBehaviour('onclick') and would like to tell my onEvent method additional information, however, I don't have a request, like I do with an abstractajaxbehaviour. However an abstractajaxbehaviour doesn't have an 'onclick' as far as I can tell. public class ClickAjax extends AjaxEventBehavior { public ClickAjax (String action) { super(action); } @Override protected void onEvent(AjaxRequestTarget target) { //where do i see the parameter? } @Override protected CharSequence getEventHandler() { CharSequence callbackUrl= getCallbackUrl(); StringBuilder javaScript = new StringBuilder(); javaScript.append("resetableElementsObject.resetActiveElements();\n"); javaScript.append("var _contextMenu = new contextMenu();\n"); javaScript.append("_contextMenu.addMenuItem('Option1', function() { wicketAjaxGet('" + callbackUrl + "&Parameter=false') });\n"); javaScript.append("_contextMenu.addMenuItem('Option2', function() {'" + callbackUrl + "&Parameter=true'});\n"); javaScript.append("_contextMenu.show();\n"); return javaScript; } } I get to the onEvent method when I choose an option in my menu, but I can't access the parameter, because of the missing request. Is there an accepted way to do this? Thanks in advance, Tom -- View this message in context: http://www.nabble.com/AjaxEventBehaviour-with-request-parameters--tp19178005p19178005.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
StringResourceModel: use MessageFormat features without params array?
Hello mailing list, Short question: if my interpretation of the source code is correct, it is not possible to use StringResourceModel's MessageFormat features just with a single model (without passing a params array). If this is right: would it be a good idea to make it possible or is there a good reason that it is not, which I am not aware of? What I do not like about the Array way is that the message in the property file has not only to be aware of what was passed in this Array, but also in which order, which is not very flexible. WDYT? I have an idea in mind how this could be achieved and also would like to contribute... however, as I am not too deep into the wicket internals, I cannot promise my solution would be the most elegant one ;-) Cheers -- View this message in context: http://www.nabble.com/StringResourceModel%3A-use-MessageFormat-features-without-params-array--tp19177943p19177943.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Error while adding css for a Panel
Hi I get the following error in that line add(HeaderContributor.forCss(MenuPanel.class, "MenuPanel.css")); Caused by: java.lang.NoSuchMethodError: com.myapp.wicket.MenuPanel.add([Lorg/apache/wicket/behavior/IBehavior;)Lorg/apache/wicket/Component; at com.myapp.wicket.MenuPanel.(MenuPanel.java:34) at com.myapp.wicket.HeaderPanel.(HeaderPanel.java:40) at com.myapp.wicket.BasePage.(BasePage.java:32) at com.myapp.wicket.BasePage.(BasePage.java:26) at com.myapp.wicket.HomePage.(HomePage.java:19) at com.myapp.wicket.HomePage.(HomePage.java:16) ... 47 more registered listener interface [RequestListenerInterface name=IActivePageBehaviorListener, method=public abstract void org.apache.wicket.behavior.IBehaviorListener.onRequest()] Any tips? Thanks: Bence -- View this message in context: http://www.nabble.com/Error-while-adding-css-for-a-Panel-tp19177849p19177849.html 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: Localization issue
Ok This is my code for a locale switching link that will disable when active: @Override protected WebMarkupContainer getLocaleComponent(String id, final Locale locale) { Link link = new Link(id) { @Override public void onClick() { getSession().setLocale(locale); this.setEnabled(false); }protected void onBeforeRender() { super.onBeforeRender(); this.setEnabled(!locale.equals(getSession().getLocale())); }; }; return link; } It works just fine, with 1.3.4 . When using page parameter & bookmarkable links it looks like this, no redirection involved: protected WebMarkupContainer getLocaleComponent(String id, Locale locale) { BookmarkablePageLink bookmarkablePageLink = new BookmarkablePageLink( id, this.getClass(), getPageParameters(locale)); if (locale.equals(getSession().getLocale())) { bookmarkablePageLink.setEnabled(false); } return bookmarkablePageLink; } protected PageParameters getPageParameters(Locale locale) { PageParameters pageParameters = new PageParameters(); if (pageParameters.containsKey("locale")) { pageParameters.remove("locale"); } pageParameters.add("locale", locale.getLanguage()); return pageParameters; } btakacs wrote: I haven't added ajax support, and I am still having that problem. Nino.Martinez wrote: Yeah, I were just uncertain if you might had added some ajax that were causing the problem.. you are still having problems? btakacs wrote: Hi Yeah, I understand that it is working with Ajax. But first I wanted to make it without ajax. Later I can upgrade. I don't know yet how can I ajaxify my pages, and this should work without ajax. Bence Nino.Martinez wrote: Yeah I can confirm what Daniel are saying.. I have the same approach.. On the otherhand if it's an ajax link you'll need to add all the components you want rerendered. Daniel Stoch wrote: Hi, But what exactly not work? I'm using a Link with onClick() code: getSession().setLocale(locale); to swicth current locale and everything works ok. All page components are localized correctly. I think this setResponsePage(this.getPage()); call in your code is not necessary: @Override public final void onClick() { Locale locale = new Locale("en"); this.getSession().setLocale(locale); setResponsePage(this.getPage()); } -- -Wicket for love Nino Martinez Wael Java Specialist @ Jayway DK http://www.jayway.dk +45 2936 7684 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -Wicket for love Nino Martinez Wael Java Specialist @ Jayway DK http://www.jayway.dk +45 2936 7684 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -Wicket for love Nino Martinez Wael Java Specialist @ Jayway DK http://www.jayway.dk +45 2936 7684 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Localization issue
why the locale changes does not apply to the components? Are you setting up your components based on your locale in the constructor? Because if you do, then setting a Page object with setResponsePage won't create new component objects for you. Try: setResponsePage(this.getPage().getClass()); - this will forward you to a new instance of the page... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Localization issue
I haven't added ajax support, and I am still having that problem. Nino.Martinez wrote: > > Yeah, I were just uncertain if you might had added some ajax that were > causing the problem.. > > you are still having problems? > > btakacs wrote: >> Hi >> >> Yeah, I understand that it is working with Ajax. But first I wanted to >> make >> it without ajax. Later I can upgrade. >> I don't know yet how can I ajaxify my pages, and this should work without >> ajax. >> >> Bence >> >> >> >> Nino.Martinez wrote: >> >>> Yeah I can confirm what Daniel are saying.. I have the same approach.. >>> On the otherhand if it's an ajax link you'll need to add all the >>> components you want rerendered. >>> >>> Daniel Stoch wrote: >>> Hi, But what exactly not work? I'm using a Link with onClick() code: getSession().setLocale(locale); to swicth current locale and everything works ok. All page components are localized correctly. I think this setResponsePage(this.getPage()); call in your code is not necessary: @Override public final void onClick() { Locale locale = new Locale("en"); this.getSession().setLocale(locale); setResponsePage(this.getPage()); } >>> -- >>> -Wicket for love >>> >>> Nino Martinez Wael >>> Java Specialist @ Jayway DK >>> http://www.jayway.dk >>> +45 2936 7684 >>> >>> >>> - >>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>> For additional commands, e-mail: [EMAIL PROTECTED] >>> >>> >>> >>> >> >> > > -- > -Wicket for love > > Nino Martinez Wael > Java Specialist @ Jayway DK > http://www.jayway.dk > +45 2936 7684 > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Localization-issue-tp19160932p19177447.html 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: Override HeaderResponse' renderJavascript() method
Don't specify the id. Just put there null, the javascript will be always rendered. -Matej On Wed, Aug 27, 2008 at 3:20 AM, 张伟 <[EMAIL PROTECTED]> wrote: > Hello, >I use the renderJavascript(java.lang.CharSequence javascript, > java.lang.String id) method in HeaderResponse class to output the some js > code in html header. This renderJavascript method will render javascript > code to the response, if the javascript has not already been rendered. But > i want to override if the javascript has already been rendered. How can i > make it? Thank you. BTW, excuse my poor English. >
Re: Localization issue
Yeah, I were just uncertain if you might had added some ajax that were causing the problem.. you are still having problems? btakacs wrote: Hi Yeah, I understand that it is working with Ajax. But first I wanted to make it without ajax. Later I can upgrade. I don't know yet how can I ajaxify my pages, and this should work without ajax. Bence Nino.Martinez wrote: Yeah I can confirm what Daniel are saying.. I have the same approach.. On the otherhand if it's an ajax link you'll need to add all the components you want rerendered. Daniel Stoch wrote: Hi, But what exactly not work? I'm using a Link with onClick() code: getSession().setLocale(locale); to swicth current locale and everything works ok. All page components are localized correctly. I think this setResponsePage(this.getPage()); call in your code is not necessary: @Override public final void onClick() { Locale locale = new Locale("en"); this.getSession().setLocale(locale); setResponsePage(this.getPage()); } -- -Wicket for love Nino Martinez Wael Java Specialist @ Jayway DK http://www.jayway.dk +45 2936 7684 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -Wicket for love Nino Martinez Wael Java Specialist @ Jayway DK http://www.jayway.dk +45 2936 7684 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Localization issue
Hi Yeah, I understand that it is working with Ajax. But first I wanted to make it without ajax. Later I can upgrade. I don't know yet how can I ajaxify my pages, and this should work without ajax. Bence Nino.Martinez wrote: > > Yeah I can confirm what Daniel are saying.. I have the same approach.. > On the otherhand if it's an ajax link you'll need to add all the > components you want rerendered. > > Daniel Stoch wrote: >> Hi, >> >> But what exactly not work? >> >> I'm using a Link with onClick() code: >> getSession().setLocale(locale); >> to swicth current locale and everything works ok. All page components >> are localized correctly. >> >> I think this setResponsePage(this.getPage()); call in your code is >> not necessary: >> @Override >> public final void onClick() { >> Locale locale = new Locale("en"); >> this.getSession().setLocale(locale); >> setResponsePage(this.getPage()); >> } >> >> > > -- > -Wicket for love > > Nino Martinez Wael > Java Specialist @ Jayway DK > http://www.jayway.dk > +45 2936 7684 > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Localization-issue-tp19160932p19175986.html 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 resources (css, js and images)?
Sound like a good approach, I guess then if there were something like this components that would allow sharing of css etc (static css,js etc components) should just add to headercontribmanager, and ones that should not would just use the "old way". However it could be nice with some settings for this, sometimes it's just not feasible to merge like if you have a lot of components that are only shown 10% of the time or so.. richardwilko wrote: Hi, A few months back I started work on a slightly different method of adding resources to a page, where, it works out what resources are added on the page, combines them together with the yui javascript compressor, caches the result, and serves it. Unfortunately I haven't had any time to work on it as my new job has taken me away from wicket, but I am happy to share my rough code with anyone that wants it. :( and :) resources are added like so: HeaderContribManager.add(new ResourceReference(...), getPage()); and in each page add HeaderContribManager.getHeaderContributor(this.class, localString, styleString); in both cases put in the onBeforeRender method (the panels and such need to be added to the page before you can use getPage() afaik) Like I said its very rough, but it does have the advantage of producing a js file for each page, hopefully taking into account local and style, and should work when a panel adds javascript, and you use that panel in multiple pages. http://www.nabble.com/file/p19170189/HeaderContribManager.java HeaderContribManager.java <[EMAIL PROTECTED]> wrote: I've been hearing some rants on how merging resources can up the performance, should wicket be able todo this? I mean merging several css's into one etc.. I know it wont work for dynamic css/js/images. But on static it could, even yslow recommends you merge your resources into one... Images might be stretching it too far? WDYT? http://workingwithrails.com/railsplugin/5317-asset-packager http://www.kaboomerang.com/blog/2007/11/29/getting-to-10-actiontastic-actionatr-gwt-and-automagic-rest/ - http://www.richard-wilkinson.co.uk My blog: http://www.richard-wilkinson.co.uk -- -Wicket for love Nino Martinez Wael Java Specialist @ Jayway DK http://www.jayway.dk +45 2936 7684 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: IClusterable -- When should it be used?
We can remove it again if we don't need it anymore. Eelco On Tue, Aug 26, 2008 at 1:30 PM, Matej Knopp <[EMAIL PROTECTED]> wrote: > Right now there really isn't any practical reason for having > IClusterable at all. > > Even terracotta uses regular serialization to get pages over cluster. > > -Matej > > On Tue, Aug 26, 2008 at 10:26 PM, Johan Compagner <[EMAIL PROTECTED]> wrote: >> if you have objects that would be kept in the session, you have to use >> Serializable. >> at the moment you use that you can choose for IClusterable so that when you >> use terracotta it will be clustered >> >> johan >> >> >> >> On Tue, Aug 26, 2008 at 10:14 PM, shetc <[EMAIL PROTECTED]> wrote: >> >>> >>> I guess my real questions was: What objects in a Wicket application should >>> be >>> marked as clusterable? >>> (Or did you already answer that? :confused: ) >>> -- >>> View this message in context: >>> http://www.nabble.com/IClusterableWhen-should-it-be-used--tp19163261p19169507.html >>> Sent from the Wicket - User mailing list archive at Nabble.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] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Handling Exceptions in WebSession or WebApplication
That works. Thanks. throw restartresponseexception with your error page -- View this message in context: http://www.nabble.com/Handling-Exceptions-in-WebSession-or-WebApplication-tp19175475p19175698.html 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: getForm() on a component inside 2nd level Fragment returns null?
Ritesh Trivedi wrote: Edvin, Before posting, I already made Form a private member of the toolbar and passed it from the parent fragment as a workaround. My main question was - why didnt getForm() on the button work? and second - not sure how you are saying markupProvider is the form? markup provider is the page. My page markup file has the fragments. What am I missing? Martijn answered the first one I see. Sorry for not stating it right away. I was more focused on finding a solution for you :) So to the markupProvider being your form: You wrote: // Cart Header Toolbar cartForm.add(new CartActionToolbar("cartHeaderToolbar", "cartActionToolbar", ViewCartPage.this, cartForm)); And your only constructor in CartActionToolbar is: public CartActionToolbar(String id, String markupId, MarkupContainer markupProvider) I didn't count the arguments, I just saw that markupProvider was the last argument, and also that cartForm was the last argument you passed into it. (God damned wrapping in the mail client confused me, I read your mail on the ASUS EEPC - not the biggest screen in the world :) It seems you don't hit this constructor at all? :) Anyways, a cleaner way to do this is to override the onBeforeRender() method of the fragment. Then the component hierarchy is complete, so you can call getParent() or even better, getForm() directly on the component to get the form. Just remember to call super.onBeforeRender() as well :) -- Edvin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]