Re: validation and #updateModel
I haven't done that before, so I'll have to figure out how to do it. Thanks for the adviceI'll look into doing that, because I have seen this recommendation made to others, so I should probably learn. However, in the meantime, I think I may have a theory as to why this is happening. When the error was reproduced for me, it seems to happen only during certain errors uploading attachments using the MultiFileUploadField. Now that certain other issues were fixed with this control, I can only reproduce this problem by trying to upload a file larger than the maximum set in Form#setMaxSize. What you said earlier, about how only fields that failed validation should fail to be retained in the form, got me to thinking: since this restriction is set in the Form object, does that block the model update for ALL fields? That would make sense, but it would also make this method nearly unusable except on a dedicated form (i.e. a form used only for uploading files). In that case, I'm better off manually validating upload size. On Tue, Jul 20, 2010 at 5:13 PM, Jeremy Thomerson jer...@wickettraining.com wrote: On Tue, Jul 20, 2010 at 1:22 PM, Ray Weidner ray.weidner.develo...@gmail.com wrote: Back to the original question, when you say all changes to the form are lost - do you mean that the form rerenders with absolutely no values filled out? Only the fields that failed conversion or validation should be blank. See, that throws me off, too. Yes, the supposedly valid fields are not being preserved after submit and fail validation. I would have thought that they should have been preserved, LDM be damned, but they aren't, so that was my theory as to what was causing this. So if that's not causing it, what could be causing such a thing? I'd including source code here, but I'm not even sure what part is causing the problem, so that would be a lot of code. Any ideas? Best thing to do is try to create a quickstart that reproduces it. Typically, you find your error while doing this. If not, you have something you can give us that we can quickly run to debug your problem. -- Jeremy Thomerson http://www.wickettraining.com
Re: OnChangeAjaxBehavior() - problem with id
hi you can try in this way setting item.getModelObject() as final final StandardTekst st = item.getModelObject(); and in the sva button you have to save the ListTekst final ListView list = new ListView(stListing, ListTekst) { @Override protected void populateItem(final ListItemStandardTekst item) { TextClass st = new TextClass(); +++final StandardTekst st = item.getModelObject(); ---st = item.getModelObject(); final TextArea tekst = new TextArea (stTekst,new PropertyModel(st, tekst)); tekst.add(new OnChangeAjaxBehavior() { @Override protected void onUpdate(AjaxRequestTarget target) { String editedText = (String) tekst.getModelObject(); st.setTekst(editedText); } 2010/7/20 lucky rlaczek1...@gmail.com Hi Colleagues, I have listView where in TextArea I have used onChangeAjaxBehavior. In update() I set edited text to the object. Finally in saveButton (this button is required) via savingMethod() I add changes to database and then refresh form. The problem is that when text is edited in given row (item) at the ListView after refresh action the edited text is assigned to the last item at the list. I know that probably I must use in any way id but I don’t know exactly how to do it. Generally saying in my application I must have one saveButton that will be common for all items at the list. This button is also used to save new added item via separate text field in the form. This works fine. Can you suggest please solution. This is very urgent for me. Please also eventually suggest solution without OnChangeAjaxBehavior. Below is my code. Regards, Rafal …… saveButton.add(new AjaxFormComponentUpdatingBehavior(onclick){ protected void onUpdate(AjaxRequestTarget target) { object.savingMethod(st); //Saving changes to database target.addComponent(form); } form.add(saveButton); ….. final ListView list = new ListView(stListing, ListTekst) { @Override protected void populateItem(final ListItemStandardTekst item) { TextClass st = new TextClass(); st = item.getModelObject(); final TextArea tekst = new TextArea (stTekst,new PropertyModel(st, tekst)); tekst.add(new OnChangeAjaxBehavior() { @Override protected void onUpdate(AjaxRequestTarget target) { String editedText = (String) tekst.getModelObject(); st.setTekst(editedText); } -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/OnChangeAjaxBehavior-problem-with-id-tp2296313p2296313.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: new feature in trunk and branch: Component#onConfigure()
can we now deprecate protected boolean callOnBeforeRenderIfNotVisible() ?? because you could do it now in onConfigure right? I hate multiply things do do the same thing :( On Wed, Jul 21, 2010 at 07:05, Igor Vaynberg igor.vaynb...@gmail.com wrote: protected boolean callOnBeforeRenderIfNotVisible() - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: new feature in trunk and branch: Component#onConfigure()
its already deprecated -igor On Tue, Jul 20, 2010 at 11:46 PM, Johan Compagner jcompag...@gmail.com wrote: can we now deprecate protected boolean callOnBeforeRenderIfNotVisible() ?? because you could do it now in onConfigure right? I hate multiply things do do the same thing :( On Wed, Jul 21, 2010 at 07:05, Igor Vaynberg igor.vaynb...@gmail.com wrote: protected boolean callOnBeforeRenderIfNotVisible() - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: validation and #updateModel
Update: I was able to confirm my theory below. It was specifically MultiFileUploadField's validation of file size via Form#setMaxSize that was causing the problem. Again, I question the value of this method if this is the result. It sounds like you have to put attachment uploading in its own separate form. Is this supposed to be standard practice? On Wed, Jul 21, 2010 at 2:25 AM, Ray Weidner ray.weidner.develo...@gmail.com wrote: I haven't done that before, so I'll have to figure out how to do it. Thanks for the adviceI'll look into doing that, because I have seen this recommendation made to others, so I should probably learn. However, in the meantime, I think I may have a theory as to why this is happening. When the error was reproduced for me, it seems to happen only during certain errors uploading attachments using the MultiFileUploadField. Now that certain other issues were fixed with this control, I can only reproduce this problem by trying to upload a file larger than the maximum set in Form#setMaxSize. What you said earlier, about how only fields that failed validation should fail to be retained in the form, got me to thinking: since this restriction is set in the Form object, does that block the model update for ALL fields? That would make sense, but it would also make this method nearly unusable except on a dedicated form (i.e. a form used only for uploading files). In that case, I'm better off manually validating upload size. On Tue, Jul 20, 2010 at 5:13 PM, Jeremy Thomerson jer...@wickettraining.com wrote: On Tue, Jul 20, 2010 at 1:22 PM, Ray Weidner ray.weidner.develo...@gmail.com wrote: Back to the original question, when you say all changes to the form are lost - do you mean that the form rerenders with absolutely no values filled out? Only the fields that failed conversion or validation should be blank. See, that throws me off, too. Yes, the supposedly valid fields are not being preserved after submit and fail validation. I would have thought that they should have been preserved, LDM be damned, but they aren't, so that was my theory as to what was causing this. So if that's not causing it, what could be causing such a thing? I'd including source code here, but I'm not even sure what part is causing the problem, so that would be a lot of code. Any ideas? Best thing to do is try to create a quickstart that reproduces it. Typically, you find your error while doing this. If not, you have something you can give us that we can quickly run to debug your problem. -- Jeremy Thomerson http://www.wickettraining.com
Re: new feature in trunk and branch: Component#onConfigure()
very nice feature, thank you !! On Wed, Jul 21, 2010 at 10:35 AM, Igor Vaynberg igor.vaynb...@gmail.comwrote: another new callback added to 1.4/trunk that is aimed at making life easier when managing component states such as visibility, enabled, etc. /** * Called once per request on components before they are about to be rendered. This method * should be used to configure such things as visibility and enabled flags. * p * Overrides must call {...@code super.onInitialize()}, usually before any other code * /p * p * NOTE: Component hierarchy should not be modified inside this method, instead it should be * done in {...@link #onBeforeRender()} * /p * p * NOTE: Why this method is preferrable to directly overriding {...@link #isVisible()} and * {...@link #isEnabled()}? Because those methods are called multiple times even for processing of * a single request. If they contain expensive logic they can slow down the response time of the * entire page. Further, overriding those methods directly on form components may lead to * inconsistent or unexpected state depending on when those methods are called in the form * processing workflow. It is a better practice to push changes to state rather than pull. * /p * p * NOTE: If component's visibility or another property depends on another component you may call * {...@code other.configure()} followed by {...@code other.isVisible()} as mentioned in * {...@link #configure()} javadoc. * /p * p * NOTE: Why should {...@link #onBeforeRender()} not be used for this? Because if visibility of a * component is toggled inside {...@link #onBeforeRender()} another method needs to be overridden * to make sure {...@link #onBeforeRender()} will be invoked on ivisible components: * * pre * class MyComponent extends WebComponent * { * protected void onBeforeRender() * { * setVisible(Math.rand() gt; 0.5f); * super.onBeforeRender(); * } * * // if this override is forgotten, once invisible component will never become visible * protected boolean callOnBeforeRenderIfNotVisible() * { * return true; * } * } * /pre * * VS * * pre * class MyComponent extends WebComponent * { * protected void onConfigure() * { * setVisible(Math.rand() gt; 0.5f); * super.onConfigure(); * } * } * /pre */ protected void onConfigure() { } /** * Triggers {...@link #onConfigure()} to be invoked on this component if it has not already during * this request. * p * This method should be invoked before any calls to {...@link #isVisible()} or * {...@link #isEnabled()}. Usually this method will be called by the framework before the * component is rendered and so users should not need to call it; however, in cases where * visibility or enabled or other state of one component depends on the state of another this * method should be manually invoked on the other component by the user. EG to link visiliby of * two markup containers the following should be done: * * pre * final WebMarkupContainer source=new WebMarkupContainer(a) { * protected void onConfigure() { *setVisible(Math.rand()0.5f); * } * }; * * WebMarkupContainer linked=new WebMarkupContainer(b) { * protected void onConfigure() { * source.configure(); // make sure source is configured * setVisible(source.isVisible()); * } * } * /pre * * /p */ public final void configure() { if (!getFlag(FLAG_CONFIGURED)) { onConfigure(); setFlag(FLAG_CONFIGURED, true); } } - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- regards, Vineet Semwal
Re: new feature in trunk and branch: Component#onConfigure()
Excellent! Op 21-07-10 07:05, Igor Vaynberg wrote: another new callback added to 1.4/trunk that is aimed at making life easier when managing component states such as visibility, enabled, etc. -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
dateField pattern with no separator
hello, i've a problem when formatting dateField value to pattern ddMM , for example for 01/07/2010 it shows 172010 instaed of 01072010. NB : it works well with separator. this is my source code : protected DateTextField newDateTextField(String id, PropertyModel dateFieldModel){ DateTextField f = DateTextField.withConverter(id, dateFieldModel,new PatternDateConverter(ddMM, true)); return f; } help pleaze -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/dateField-pattern-with-no-separator-tp2296900p2296900.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
FW: Accessing transport within wicketGlobalFailureHandler
I am searching for something similar for my current project. Unfortunately no answers til now? There must however be a better solution, or not? Any help would be appreciated. Thorbjørn -Original Message- From: Gast, Thorsten [mailto:thorsten.g...@wirecard.com] Sent: Wednesday, July 14, 2010 1:36 PM To: users@wicket.apache.org Subject: Accessing transport within wicketGlobalFailureHandler Hi, I want to use wicketGlobalFailureHandler() to handle some http status codes from an Ajax-Call. Currently I am doing something like this - which works fine - but is in my opinion not very nice. function wicketGlobalFailureHandler() { var t = Wicket.Ajax.transports; for (var i = 0; i t.length; ++i) { if (t[i].readyState == 4) { var status = t[i].status; if (status == '401') { alert('Do something...'); } if (status == '403') { alert('Do another thing...'); } } } } Is there a better way, instead of getting all transports and then checking readyState and status code? Is there a possibility to get only the current transport, which triggered the failure handler? Or maybe I'm doing something completely wrong and there is a better approach how I can handle these cases... Regards Thorsten -- Neu: GMX De-Mail - Einfach wie E-Mail, sicher wie ein Brief! Jetzt De-Mail-Adresse reservieren: http://portal.gmx.net/de/go/demail - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Welcome Martin Grigorov as a core team member
Congratulations Martin! Keep up the good work! On Mon, Jul 19, 2010 at 7:58 PM, Jeremy Thomerson jer...@wickettraining.com wrote: The Wicket team is happy to announce that Martin Grigorov was invited to join the Wicket team as a committer and PMC member, and he accepted! Martin's relentless patience, high quality patches and sustained energy haven't gone unnoticed. He has continually provided valuable insights and put a lot of effort into the project. He helps out many on the mailing lists and IRC channel. In Martin's first two days with access, he's already made 16 commits and closed several JIRA issues. We look forward to his continued contributions. Please join me in welcoming Martin to the team! -- Jeremy Thomerson http://www.wickettraining.com -- Best regards, Laurentiu Trica
Additional attributes to ajax events
With the onblur ajax calls, is it possible to add my own javascript . final AjaxFormComponentUpdatingBehavior blurText = new AjaxFormComponentUpdatingBehavior(onblur) { @Override protected void onUpdate(AjaxRequestTarget target) { checkPageNextLink(target); } }; In the markup, can I simply add the onblur and it will get appended? onblur=alert('update') How do I add the ajax call and then add my own javascript call?
AjaxPagingNavigation change style
Hello everyone. I need to change the wicket navigator style. I read in previous posts the solution to this so I created my own subclass AjaxPagingNavigatorModified: public class AjaxPagingNavigatorModified extends AjaxPagingNavigator{ public AjaxPagingNavigatorModified(String id, DataView? dataView){ super(id,dataView); } } And then I created my own markup AjaxPagingNavigatorModified.html html xmlns:wicket body wicket:panel wicket:message key=First/ nbsp; wicket:message key=Previous / # 5 wicket:message key=next/ nbsp; wicket:message key=LastPage/ /wicket:panel /body /html I placed both of them in the same directory, but it doesn't work. The wicket navigator has the default style. What I missing? What's wrong? Can anyone help me? Pleasee -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/AjaxPagingNavigation-change-style-tp2297188p2297188.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Size of ListView
Hello all, We're developing a non-Ajax application that displays a bunch of big tables - about five columns, 300 rows. Since session size was increasing a lot, we looked into the cause of it, and (after making everything detachable and switching to PropertyListModel) found out that the ListItems of each ListView still accounted for about 100k. Since all the data in the tables is read only, we're wondering if we can skip serializing the ListItems. Is this possible? Is there another approach? Danny van Bruggen - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
[wicketstuff-push] NPE when CometdService.initBayeux()
Hi , I am trying Wicketstuff-push with a small chat program , but encounter this problem : org.apache.wicket.WicketRuntimeException: Method onFormSubmitted of interface org.apache.wicket.markup.html.form.IFormSubmitListener targeted at component [MarkupContainer [Component id = sayForm]] threw an exception at org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:193) at org.apache.wicket.request.target.component.listener.ListenerInterfaceRequestTarget.processEvents(ListenerInterfaceRequestTarget.java:73) at org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92) at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1250) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1329) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1428) at org.apache.wicket.RequestCycle.request(RequestCycle.java:545) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:479) at org.apache.wicket.protocol.http.WicketServlet.doPost(WicketServlet.java:160) at javax.servlet.http.HttpServlet.service(HttpServlet.java:158) at javax.servlet.http.HttpServlet.service(HttpServlet.java:96) at com.caucho.server.dispatch.ServletFilterChain.doFilter(ServletFilterChain.java:109) at destiny.webapp.filters.FilterUserAgent.doFilter(FilterUserAgent.java:29) at com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:88) at org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:113) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) at com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:88) at org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:113) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) at com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:88) at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:83) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) at com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:88) at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:183) at com.caucho.server.webapp.AccessLogFilterChain.doFilter(AccessLogFilterChain.java:103) at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:286) at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:789) at com.caucho.network.listen.TcpSocketLink.dispatchRequest(TcpSocketLink.java:660) at com.caucho.network.listen.TcpSocketLink.handleRequestsImpl(TcpSocketLink.java:624) at com.caucho.network.listen.TcpSocketLink.handleRequests(TcpSocketLink.java:575) at com.caucho.network.listen.TcpSocketLink$AcceptTask.doTask(TcpSocketLink.java:1183) at com.caucho.network.listen.TcpSocketLink$ConnectionReadTask.runThread(TcpSocketLink.java:1118) at com.caucho.network.listen.TcpSocketLink$AcceptTask.run(TcpSocketLink.java:1150) at com.caucho.util.ThreadPool$PoolThread.runTasks(ThreadPool.java:901) at com.caucho.util.ThreadPool$PoolThread.run(ThreadPool.java:866) Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:182) ... 34 more Caused by: java.lang.NullPointerException at org.wicketstuff.push.cometd.CometdService.initBayeux(CometdService.java:184) at org.wicketstuff.push.cometd.CometdService.getBayeux(CometdService.java:161) at org.wicketstuff.push.cometd.CometdService.publish(CometdService.java:155) at destiny.wicket.chatroom.ChatPanel$SayForm.onSubmit(ChatPanel.java:603) at org.apache.wicket.markup.html.form.Form.delegateSubmit(Form.java:1538) at org.apache.wicket.markup.html.form.Form.process(Form.java:934) at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:896) ... 39 more After tracing some code , it seems _bayeux cannot be initialized in CometdService.initBayeux() , and that's because it cannot find an attribute org.cometd.bayeux in ServletContext. But I didn't find any code that setAttribute(org.cometd.bayeux , something) in
Clean URLs without /?wicket:interface=:0:::: stuff - is it possible?
Hello, I'm rather new to wicket but I'm amazed about it's power. I still have a bothering question: is it possible to make the website with clean URLs? I mean I want to have the first page like /welcome, the about page like /about and somehow to get rid of the /?wicket:interface=:0 stuff - this appears if you click the banner twice, for example... This is for usability issues as is for SEO reasons. Thank you in advance. -- Best regards, Laurentiu Trica
Why is Component.setDefaultModelObject() checking for equality before setting ?
hi I was surprised to see, in Component.setDefaultModelObject(), the following code: // Check whether this will result in an actual change if (!getModelComparator().compare(this, object)) { modelChanging(); model.setObject(object); modelChanged(); } getModelComparator() being down to, by default, a simple equals between the present model object and the object to set. This setDefaultModelObject is called from updateModel of FormComponent. Why is that ? AFAIK, it brings quite some disadvantages: - adds quite some cost (equals test can be quite expensive, and are always more than just assigning a reference) - if equals isn't properly implemented, can be either meaningless (default equals being different instances are never equals even if logically equal) or not appropriate (in entities, my equals is based on the id, which when editing obviously causes an issue here) - IModel implementations don't behave like that (setObject for a PropertyModel or a Model don't check for non equality) Yet I don't see any added value... In the end, I see potential for misbehavior or unexpected one and no added value. So, why it it this way ? thanks in advance ++ -- Joseph Pachod IT THOMAS DAILY GmbH Adlerstraße 19 79098 Freiburg Deutschland T + 49 761 3 85 59 506 F + 49 761 3 85 59 550 E joseph.pac...@thomas-daily.de www.thomas-daily.de Geschäftsführer/Managing Directors: Wendy Thomas, Susanne Larbig Handelsregister Freiburg i.Br., HRB 3947 Registrieren Sie sich unter https://www.thomas-daily.de/user/sign-in für die TD Morning News, eine kostenlose Auswahl aktueller Themen aus TD Premium, morgens ab 9:15 in Ihrer Mailbox. Aktuelle Presseinformationen für die TD Morning News und TD Premium nimmt unsere Redaktion unter redakt...@thomas-daily.de entgegen. Redaktionsschluss für die TD Morning News ist täglich um 8:45. Register free of charge at https://www.thomas-daily.de/user/sign-in to have the TD Morning News, a selection of the latest topics from TD Premium, delivered to your mailbox from 9:15 every morning. Our editorial department receives the latest press releases for the TD Morning News and TD Premium at redakt...@thomas-daily.de. The editorial deadline for the TD Morning News is 8.45am daily. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Clean URLs without /?wicket:interface=:0:::: stuff - is it possible?
https://cwiki.apache.org/WICKET/url-coding-strategies.html Laurentiu Trica laurentiu.tr...@finalfolder.biz 07/21/2010 11:24 AM Please respond to users@wicket.apache.org To users@wicket.apache.org cc Subject Clean URLs without /?wicket:interface=:0 stuff - is it possible? Hello, I'm rather new to wicket but I'm amazed about it's power. I still have a bothering question: is it possible to make the website with clean URLs? I mean I want to have the first page like /welcome, the about page like /about and somehow to get rid of the /?wicket:interface=:0 stuff - this appears if you click the banner twice, for example... This is for usability issues as is for SEO reasons. Thank you in advance. -- Best regards, Laurentiu Trica Notice: This communication, including any attachments, is intended solely for the use of the individual or entity to which it is addressed. This communication may contain information that is protected from disclosure under State and/or Federal law. Please notify the sender immediately if you have received this communication in error and delete this email from your system. If you are not the intended recipient, you are requested not to disclose, copy, distribute or take any action in reliance on the contents of this information.
RE: Clean URLs without /?wicket:interface=:0:::: stuff - is it possible?
Look into page mounting, BookmarkablePageLink mount(new BookmarkablePageRequestTargetUrlCodingStrategy(nicename, your.package.PageName.class, null)); BookmarkablePageLink nicenameLink = new BookmarkablePageLink(nicename_link, your.package.PageName.class); -Original Message- From: Laurentiu Trica [mailto:laurentiu.tr...@finalfolder.biz] Sent: Wednesday, July 21, 2010 11:23 AM To: users@wicket.apache.org Subject: Clean URLs without /?wicket:interface=:0 stuff - is it possible? Hello, I'm rather new to wicket but I'm amazed about it's power. I still have a bothering question: is it possible to make the website with clean URLs? I mean I want to have the first page like /welcome, the about page like /about and somehow to get rid of the /?wicket:interface=:0 stuff - this appears if you click the banner twice, for example... This is for usability issues as is for SEO reasons. Thank you in advance. -- Best regards, Laurentiu Trica - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Why is Component.setDefaultModelObject() checking for equality before setting ?
the added value is that if wicket detects that the set is a noop because the objects are the same it doesnt need to create a new version of the page. -igor On Wed, Jul 21, 2010 at 8:25 AM, Joseph Pachod j...@thomas-daily.de wrote: hi I was surprised to see, in Component.setDefaultModelObject(), the following code: // Check whether this will result in an actual change if (!getModelComparator().compare(this, object)) { modelChanging(); model.setObject(object); modelChanged(); } getModelComparator() being down to, by default, a simple equals between the present model object and the object to set. This setDefaultModelObject is called from updateModel of FormComponent. Why is that ? AFAIK, it brings quite some disadvantages: - adds quite some cost (equals test can be quite expensive, and are always more than just assigning a reference) - if equals isn't properly implemented, can be either meaningless (default equals being different instances are never equals even if logically equal) or not appropriate (in entities, my equals is based on the id, which when editing obviously causes an issue here) - IModel implementations don't behave like that (setObject for a PropertyModel or a Model don't check for non equality) Yet I don't see any added value... In the end, I see potential for misbehavior or unexpected one and no added value. So, why it it this way ? thanks in advance ++ -- Joseph Pachod IT THOMAS DAILY GmbH Adlerstraße 19 79098 Freiburg Deutschland T + 49 761 3 85 59 506 F + 49 761 3 85 59 550 E joseph.pac...@thomas-daily.de www.thomas-daily.de Geschäftsführer/Managing Directors: Wendy Thomas, Susanne Larbig Handelsregister Freiburg i.Br., HRB 3947 Registrieren Sie sich unter https://www.thomas-daily.de/user/sign-in für die TD Morning News, eine kostenlose Auswahl aktueller Themen aus TD Premium, morgens ab 9:15 in Ihrer Mailbox. Aktuelle Presseinformationen für die TD Morning News und TD Premium nimmt unsere Redaktion unter redakt...@thomas-daily.de entgegen. Redaktionsschluss für die TD Morning News ist täglich um 8:45. Register free of charge at https://www.thomas-daily.de/user/sign-in to have the TD Morning News, a selection of the latest topics from TD Premium, delivered to your mailbox from 9:15 every morning. Our editorial department receives the latest press releases for the TD Morning News and TD Premium at redakt...@thomas-daily.de. The editorial deadline for the TD Morning News is 8.45am daily. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Size of ListView
if the data is strictly read-only and does not contain any links you can try removing the list items in afterrender() -igor On Wed, Jul 21, 2010 at 7:50 AM, Danny van Bruggen tsuih...@gmail.com wrote: Hello all, We're developing a non-Ajax application that displays a bunch of big tables - about five columns, 300 rows. Since session size was increasing a lot, we looked into the cause of it, and (after making everything detachable and switching to PropertyListModel) found out that the ListItems of each ListView still accounted for about 100k. Since all the data in the tables is read only, we're wondering if we can skip serializing the ListItems. Is this possible? Is there another approach? Danny van Bruggen - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Lambdas in Java Preview - Part 5: Apache Wicket
very cool: http://stronglytypedblog.blogspot.com/2010/07/lambdas-in-java-preview-part-5-apache.html -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Lambdas-in-Java-Preview-Part-5-Apache-Wicket-tp2297512p2297512.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Additional attributes to ajax events
You can override the getAjaxCallDecorator method from AjaxFormComponentUpdatingBehavior and return an IAjaxCallDecorator that append your custom javascript On Wed, Jul 21, 2010 at 10:26 AM, Brown, Berlin [GCG-PFS] berlin.br...@primerica.com wrote: With the onblur ajax calls, is it possible to add my own javascript . final AjaxFormComponentUpdatingBehavior blurText = new AjaxFormComponentUpdatingBehavior(onblur) { @Override protected void onUpdate(AjaxRequestTarget target) { checkPageNextLink(target); } }; In the markup, can I simply add the onblur and it will get appended? onblur=alert('update') How do I add the ajax call and then add my own javascript call? -- Pedro Henrique Oliveira dos Santos
Animated page switch possible?
Hi *, has someone implemented an animation while switching pages with setResponsePage? I would like to use effects like scriptaculous.Effect.Grow or Shrink while switching pages. Cheers Per - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Animated page switch possible?
Have you asked your users if they like it? ** Martin 2010/7/21 Per Newgro per.new...@gmx.ch: Hi *, has someone implemented an animation while switching pages with setResponsePage? I would like to use effects like scriptaculous.Effect.Grow or Shrink while switching pages. Cheers Per - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Animated page switch possible?
Just do it with static html. After few minutes of heavy use they will probably decide otherwise. ** Martin 2010/7/21 Per Newgro per.new...@gmx.ch: They would like to see it in action. Then they decide. Per - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Animated page switch possible?
Ok thats a point. Thanks Per - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Animated page switch possible?
If not, hit them with this... These are not the page switching animations you're looking for. Move along. On Wed, Jul 21, 2010 at 3:38 PM, Per Newgro per.new...@gmx.ch wrote: Ok thats a point. Thanks Per - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: Additional attributes to ajax events
Is it possible to add the javascript function in the markup and somehow copy that value and append to the ajax onblur. E.g. This is in my markup : onblur=alert('update') Based on what you said, it looks like you are suggesting adding the javascript method in the Java code. -Original Message- From: Pedro Santos [mailto:pedros...@gmail.com] Sent: Wednesday, July 21, 2010 2:15 PM To: users@wicket.apache.org Subject: Re: Additional attributes to ajax events You can override the getAjaxCallDecorator method from AjaxFormComponentUpdatingBehavior and return an IAjaxCallDecorator that append your custom javascript On Wed, Jul 21, 2010 at 10:26 AM, Brown, Berlin [GCG-PFS] berlin.br...@primerica.com wrote: With the onblur ajax calls, is it possible to add my own javascript . final AjaxFormComponentUpdatingBehavior blurText = new AjaxFormComponentUpdatingBehavior(onblur) { @Override protected void onUpdate(AjaxRequestTarget target) { checkPageNextLink(target); } }; In the markup, can I simply add the onblur and it will get appended? onblur=alert('update') How do I add the ajax call and then add my own javascript call? -- Pedro Henrique Oliveira dos Santos - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Additional attributes to ajax events
Hi Brown, as you are using an behavior that changes the value of the onblur tag attribute from the java code, you need to customize the javascript on your java code also. If you add some javascript on the tag attribute, and then add some behavior that change that tag attribute, you will lose your original javascript. On Wed, Jul 21, 2010 at 4:54 PM, Brown, Berlin [GCG-PFS] berlin.br...@primerica.com wrote: Is it possible to add the javascript function in the markup and somehow copy that value and append to the ajax onblur. E.g. This is in my markup : onblur=alert('update') Based on what you said, it looks like you are suggesting adding the javascript method in the Java code. -Original Message- From: Pedro Santos [mailto:pedros...@gmail.com] Sent: Wednesday, July 21, 2010 2:15 PM To: users@wicket.apache.org Subject: Re: Additional attributes to ajax events You can override the getAjaxCallDecorator method from AjaxFormComponentUpdatingBehavior and return an IAjaxCallDecorator that append your custom javascript On Wed, Jul 21, 2010 at 10:26 AM, Brown, Berlin [GCG-PFS] berlin.br...@primerica.com wrote: With the onblur ajax calls, is it possible to add my own javascript . final AjaxFormComponentUpdatingBehavior blurText = new AjaxFormComponentUpdatingBehavior(onblur) { @Override protected void onUpdate(AjaxRequestTarget target) { checkPageNextLink(target); } }; In the markup, can I simply add the onblur and it will get appended? onblur=alert('update') How do I add the ajax call and then add my own javascript call? -- Pedro Henrique Oliveira dos Santos - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Pedro Henrique Oliveira dos Santos
Re: Size of ListView
I remember trying that, but getting slapped by wicket for trying to change the component tree after rendering.. Or am I missing something? We'll doublecheck it tomorrow. Groet, Vincent On Jul 21, 2010, at 18:37, Igor Vaynberg igor.vaynb...@gmail.com wrote: if the data is strictly read-only and does not contain any links you can try removing the list items in afterrender() -igor On Wed, Jul 21, 2010 at 7:50 AM, Danny van Bruggen tsuih...@gmail.com wrote: Hello all, We're developing a non-Ajax application that displays a bunch of big tables - about five columns, 300 rows. Since session size was increasing a lot, we looked into the cause of it, and (after making everything detachable and switching to PropertyListModel) found out that the ListItems of each ListView still accounted for about 100k. Since all the data in the tables is read only, we're wondering if we can skip serializing the ListItems. Is this possible? Is there another approach? Danny van Bruggen - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: AjaxPagingNavigation change style
ohh I see the problem. I used a markup for AjaxPagingNavigator, but it doesn't have one. The markup is for PagingNavigator. I need to use AjaxPagingNavigator, so I implemented my own class MyAjaxPagingNavigator - copying exactly the same AjaxPagingNavigator code - and then I create a subclass from PagingNavigator, and create the markup. MyAjaxPagingNavigator extends from my own PagingNavigator subclass. But I have a problem my own class doesn't work...If I clicked to next page, the entire page is refresh, I don't understand why? Is there another solution to change the AjaxPagingNavigation Style? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/AjaxPagingNavigation-change-style-tp2297188p2297746.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Animated page switch possible?
Folks I think there is a valid usage here for mobile device apps which use animations between panels. I've run into this myself. Granted a webapp is not native, but some clients do desire a close to native experience and this is a nice touch. Sent from my iPod On Jul 21, 2010, at 12:48 PM, James Carman ja...@carmanconsulting.com wrote: If not, hit them with this... These are not the page switching animations you're looking for. Move along. On Wed, Jul 21, 2010 at 3:38 PM, Per Newgro per.new...@gmx.ch wrote: Ok thats a point. Thanks Per - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
[announce] wicketstuff-core 1.4.9.2 released
Hello, I've staged and promoted a new wicketstuff-core version 1.4.9.2 and it is available through maven central now. The artifacts can be retrieved like this: dependency groupIdorg.wicketstuff/groupId artifactIddatatable-autocomplete/artifactId version1.4.9.2/version /dependency The release contains all changes that were committed on the 1.4.9.x branch between the 1.4.9.1 release and Tuesday July 20. The modules are the same as with the 1.4.9.1 release. SVN Tag: https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/tags/wicketstuff-core-1.4.9.2 My plan right now is to release the 1.4.9.3 version around August 21. I want to do at least one wicketstuff-core release per month but am prepared to do it before the 21st if anyone needs it. Regards, Mike - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Line breaks and label
Hello, I have a label that's displayed on a page. The label displays but with a linebreak and this breaks the sentence that I am writing. How do I get rid of the line break after the label? My code is below (the problematic label is svcName): List list = getServices(); ListView listview = new ListView(servicesList, list) { protected void populateItem(ListItem item) { Service svc = (Service) item.getModelObject(); final String svcUrl = svc.svcUrl(); String svcName = svc.getName(); String count = Hits: + svc.count(); Link svcLink = new Link(svcUrl) { @Override public void onClick() {} @Override protected void onComponentTag(final ComponentTag tag) { tag.put(href, svcUrl); } }; svcLink.add(new Label(svcName, svcName)); item.add(svcLink); item.add(new Label(svcHits, count)); } }; add(listview); And this is my HTML view (the problematic label is svcName): ul class=projects li wicket:id=servicesList a wicket:id=svcUrlspan wicket:id=svcName//a span a href=/svcStatsspan wicket:id=svcHits//a | a href=/svcEditEdit/a | a href=/svcStatToggleDeactivate/a | a href=/svcDelDelete/a /span /li /ul Many thanks nii amon I never see what has been done; I only see what remains to be done - Buddha
Re: TextArea StringValidator and DateValidator
Hi All This is related to validating two types of Form components with Wicket 1.4.9 1.Validating a TextArea using the StringValidator to check for a min and max length. studyDescriptionTxtArea.add(StringValidator.lengthBetween(1, 255)); When I tested with a text content that triggers this validation, the error message reported displays the content of the Text Area that was entered followed by the error message..e.g Output: All the text from studyDescriptionTxtArea + is not between 1 and 255 characters long.The user woudn't want it to repeat the content on the feedback panel. Where have i gone wrong and what is involved in resolving it? 2. Validating a Date Field to report if the date entered is in the future. dateOfApplicationDp.setLabel( new StringResourceModel(error.study.doa.max.range,this, null)); dateOfApplicationDp.add(DateValidator.maximum(new Date()));//I could format this date to a dd/mm/yyy but just for the test The resource key has the field name: i.e Date Of Application However I get the following message: 07/24/2010' is larger than the maximum of Thu Jul 22 12:03:00 WST 2010. It is correct but would like to control this prefixed with the Field Name also how can I add the custom error message and not just the label? i.e Date Of Application cannot be in the future and override what Wicket Validator returns? Thanks for the time Regards Niv
Re: AjaxPagingNavigation change style
Ivonetta, If you wanna change the styles, you can also add an id attribute to AjaxPaginavigator and use style css in the way: #myPageN { your style } in this way you would not have to overwrite the markup. It is easier. On Wed, Jul 21, 2010 at 5:50 PM, Ivoneta ietaraz...@gmail.com wrote: ohh I see the problem. I used a markup for AjaxPagingNavigator, but it doesn't have one. The markup is for PagingNavigator. I need to use AjaxPagingNavigator, so I implemented my own class MyAjaxPagingNavigator - copying exactly the same AjaxPagingNavigator code - and then I create a subclass from PagingNavigator, and create the markup. MyAjaxPagingNavigator extends from my own PagingNavigator subclass. But I have a problem my own class doesn't work...If I clicked to next page, the entire page is refresh, I don't understand why? Is there another solution to change the AjaxPagingNavigation Style? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/AjaxPagingNavigation-change-style-tp2297188p2297746.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Fernando Wermus. www.linkedin.com/in/fernandowermus