Re: Invalid Date Using DatePicker and Short Date Format
any help on this? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Invalid-Date-Using-DatePicker-and-Short-Date-Format-tp3058289p3943329.html Sent from the Users forum 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: GoAndClearFilter does not reset filterForm fields
Hi Attila, Here is my dataprovider. (It's ugly and works for just one column). http://apache-wicket.1842946.n4.nabble.com/file/n3943394/HrpDataProvider.java HrpDataProvider.java TIA Regards., Sandor -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/GoAndClearFilter-does-not-reset-filterForm-fields-tp3940445p3943394.html Sent from the Users forum 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
Multi-tabs and back-button support 1.5.2
We are developing an application with forms and currently using wicket 1.4.18. There are primarily two issues that we are struggeling with when upgrading to wicket 1.5.2. Let's say we open Page A in two tabs, first Tab1 and then Tab2. If we fill the form in Tab1 and submit it will be valid data, but they are not stored on our models. However, if we fill in form in Tab2 they are stored since this tab has a higher version number than Tab1. More or less the same issue exists when using back-button. Open PageA, fill in the form and submit. Use back-button and change values and submit. The new values are not stored on the models. In our case it would have been better if the version number increased when using the back-button. Is it supposed to work in 1.5.2, and are there some special settings one must be aware of? Charlie
Re: wicketstuff-push examples working across browsers
Hello Seb, Thanks for answering back to my email quickly. I'm glad to hear support for Chrome, but are you also supporting, at least trying to support IE7 and above? Many thanks and regards, Soheb - Original Message - From: Sebastian nospam...@gmx.net To: users@wicket.apache.org Sent: Wednesday, 26 October, 2011 5:21:52 PM Subject: Re: wicketstuff-push examples working across browsers hi, cometd had a bug that affects websocket support in conjunction with chrome browsers. It is fixed in the latest 1.4.0RC1 release of cometd. We incorporated the changes (and fixed some other issues) in wicketstuff trunk. thus they will be available with the wicketstuff 1.5.2 release. Regards, Seb On 26.10.2011 10:25, Soheb Mahmood wrote: Hello everyone, I'm planning to use wicketstuff-core in an actual production environment, and to be more specific, I'm planning to use push-cometd. I'm currently using wicketstuff version 1.4.14 to match the current version of Wicket we are using in production. I got the example to run, and one of the things I wondered was what is the browser support aimed for push-cometd? So far, I can only get the cometd example working in Firefox and Opera, and there is a lack of support for Google Chrome 14.0.835.202 nor Internet Explorer 7. I can get the Wicket Timer example working, but the reason we are thinking of implementing comet into production is to minimize the request impact on our server, and with the Wicket Timer example, that uses TimerPushService, which if we wanted similar functionality, we could just use AjaxTimeoutBehavior instead. Even the Basic Cometd test doesn't work under IE7 and Chrome. I was wondering if you were aware of this, and if you had any suggestions to solve this cross-browser issue (at least from our end). It's also worth noting that I haven't modified the push-parent-jdk-1.6 folder contents at all. Many thanks, Soheb - 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: LDMs load too early - hold outdated application data.
On 26 Oct 2011, at 11:57, Wilhelmsen Tor Iver wrote: It seems to me that Wicket should detach its models again after events have triggered, in addition to after rendering has completed. That would reset the state of all models to what the developer expects it to be before rendering begins. That's nearly always - then you are just as well served with an AbstractReadOnlyModel that loads data on every call to getObject()... :) If you claim that an LDM's use is limited to avoiding a load in between event handling and rendering of a page, that would make LDMs damn near useless. Luckily, this is simply not true. An LDM's main use is to avoid multiple loads when the model is accessed multiple times during rendering. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: LDMs load too early - hold outdated application data.
On 26 Oct 2011, at 12:14, Sven Meier wrote: Hi, Or use a separate LDM for each of your list items I'm not sure I understand what you mean here. Could you illustrate? your LDM seems to return a list of items and you're iterating over them with a ListView. Note that ListView uses a ListItemModel for each item: Fair. Though my actual use case is an LDM that populates a dropdown. There is only one button in the form to delete the dropdown's selected object, whose onSubmit uses the dropdown's model to determine what object to delete. It seems to me that Wicket should detach its models again after events have triggered, in addition to after rendering has completed. That would resetthe state of all models to what the developer expects it to be before rendering begins. You can hook your own listener into Wicket (I*Listener) and detach the models yourself. If we can think of no issues with this approach, I'd much rather vote to make it standard behavior in Wicket, so that developers can trust their models behave as they'd expect. HTH Sven -Ursprüngliche Nachricht- Von: Maarten Billemont [mailto:lhun...@lyndir.com] Gesendet: Mittwoch, 26. Oktober 2011 11:50 An: users@wicket.apache.org Betreff: Re: LDMs load too early - hold outdated application data. On 26 Oct 2011, at 10:52, Sven Meier wrote: This is a common problem when working with LDM. You can detach the LDM by yourself after the event. I could. But it would be a work-around and it wouldn't solve the underlying issue. As a result, this bug will keep haunting us. Or use a separate LDM for each of your list items: This way the LDM of the list is loaded for rendering *after* the event only. Additionally the event won't crash when the list of users has changed while the page is displayed. I'm not sure I understand what you mean here. Could you illustrate? It seems to me that Wicket should detach its models again after events have triggered, in addition to after rendering has completed. That would reset the state of all models to what the developer expects it to be before rendering begins. HTH Sven -Ursprüngliche Nachricht- Von: Maarten Billemont [mailto:lhun...@lyndir.com] Gesendet: Mittwoch, 26. Oktober 2011 10:15 An: users@wicket.apache.org Betreff: LDMs load too early - hold outdated application data. I just had a bug in my application where my LDM lists all users to fill a form field, but that same form also has a button to delete the selected user from the database. The problem is that the button's onSubmit triggers AFTER the LDM is populated, because it apparently needs the LDM's information to figure out what user was selected in the form (so, to figure out what user to delete). Only, once the button's onSubmit has triggered, the user is deleted from persistence, and to render an up-to-date page, the LDM's model should NO LONGER include that user. I had initially assumed this would work fine because the LDM reloads its model for each page refresh, but in this scenario the LDM is only loaded before the persistence layer is up-to-date with the information that needs to be rendered. Which leads me to wonder the following: Shouldn't an LDM load its state from up-to-date data? Shouldn't its load() be invoked AFTER all events have been handled? Shouldn't the response page be rendered AFTER all logic has been processed? And shouldn't the LDM use FRESH data for that rendering, rather than using the state from BEFORE the logic was processed? Isn't this a bug in the way wicket handles model object loading? It certainly doesn't stroke with what a developer might intuitively expect from an LDM - so there's some kind of mismatch going on. And personally, I'd really like to be able to TRUST that my LDMs are ALWAYS populated from CURRENT data when the response rendering that uses it happens. - 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 - 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: Multi-tabs and back-button support 1.5.2
Hi, I think Page.renderCount is what stops the storing of the values. This flag indicates that the page the user uses is stale, i.e. there is another render of the same page happened after. The actual check is in PageProvider class. I don't see any clean solution for now. What should happen if the user opens an edit page for the same entity in two tabs ? For example she saves some changes in tab2 and then goes to tab1 makes another changes and tries to save them too ? I guess you will want to abort the second save because it works with stale data. On Thu, Oct 27, 2011 at 7:51 AM, Charlie Midtlyng charlie.midtl...@gmail.com wrote: We are developing an application with forms and currently using wicket 1.4.18. There are primarily two issues that we are struggeling with when upgrading to wicket 1.5.2. Let's say we open Page A in two tabs, first Tab1 and then Tab2. If we fill the form in Tab1 and submit it will be valid data, but they are not stored on our models. However, if we fill in form in Tab2 they are stored since this tab has a higher version number than Tab1. More or less the same issue exists when using back-button. Open PageA, fill in the form and submit. Use back-button and change values and submit. The new values are not stored on the models. In our case it would have been better if the version number increased when using the back-button. Is it supposed to work in 1.5.2, and are there some special settings one must be aware of? Charlie -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Bookmarkable link within AjaxLazyLoadPanel
I am trying to put a link inside an AjaxLazyLoadPanel using BookmarkablePageLink and Label. However, I always run into a close tag not found error. Here's my Java code: add(new AjaxLazyLoadPanel(itemcnt){ @Override public Component getLazyLoadComponent(String id){ int count = 0; PageParameters params = null; BookmarkablePageLink link = new BookmarkablePageLink(id, Page.class,params); add(link); link.add(new Label(+count); return link; } }); My HTML code is as follows: -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Bookmarkable-link-within-AjaxLazyLoadPanel-tp3943587p3943587.html Sent from the Users forum 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: Bookmarkable link within AjaxLazyLoadPanel
On Thu, Oct 27, 2011 at 10:25 AM, codix jackeblag...@yahoo.com wrote: I am trying to put a link inside an AjaxLazyLoadPanel using BookmarkablePageLink and Label. However, I always run into a close tag not found error. Here's my Java code: add(new AjaxLazyLoadPanel(itemcnt){ @Override public Component getLazyLoadComponent(String id){ int count = 0; PageParameters params = null; BookmarkablePageLink link = new BookmarkablePageLink(id, Page.class,params); add(link); link.add(new Label(+count); return link; } }); My HTML code is as follows: Your HTML didn't make it. Better return a Panel/Fragment that contains the link+label. Additionally in Wicket 1.5.x all Links have #setBody(IModelString) which will be used as a label for the link. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Bookmarkable-link-within-AjaxLazyLoadPanel-tp3943587p3943587.html Sent from the Users forum 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 -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Bookmarkable link within AjaxLazyLoadPanel
I think you forgot to close the following link.add(new Label(+count)*)*; -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Bookmarkable-link-within-AjaxLazyLoadPanel-tp3943587p3943617.html Sent from the Users forum 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: Bookmarkable link within AjaxLazyLoadPanel
Your HTML didn't make it. Better return a Panel/Fragment that contains the link+label. it seems to be merged with the rich html mail. clicking on the link below (nabble post), the html is perfectly visible. may it be considered for next time ;-) View this message in context: http://apache-wicket.1842946.n4.nabble.com/Bookmarkable-link-within-AjaxLazyLoadPanel-tp3943587p3943587.html Sent from the Users forum 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: Bookmarkable link within AjaxLazyLoadPanel
Sorry about that. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Bookmarkable-link-within-AjaxLazyLoadPanel-tp3943587p3943642.html Sent from the Users forum 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: Bookmarkable link within AjaxLazyLoadPanel
On Thu, Oct 27, 2011 at 10:43 AM, manuelbarzi manuelba...@gmail.com wrote: Your HTML didn't make it. Better return a Panel/Fragment that contains the link+label. it seems to be merged with the rich html mail. clicking on the link below (nabble post), the html is perfectly visible. may it be considered for next time ;-) I don't use Nabble to read the mails... I think using any pastebin service will be better to paste your code. This way it will be better formatted (hopefully) and will have syntax highlighting. I.e. Much easier to read than here. View this message in context: http://apache-wicket.1842946.n4.nabble.com/Bookmarkable-link-within-AjaxLazyLoadPanel-tp3943587p3943587.html Sent from the Users forum 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 -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Multi-tabs and back-button support 1.5.2
I would actually like to accept the data from both tabs as long as they are valid. The same effect should be available on back-button and changing values. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Multi-tabs-and-back-button-support-1-5-2-tp3943445p3943856.html Sent from the Users forum 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: Multi-tabs and back-button support 1.5.2
The only option is see is to make the check for stale page configurable via IPageSettings for example. On Thu, Oct 27, 2011 at 12:16 PM, Charlie Midtlyng charlie.midtl...@gmail.com wrote: I would actually like to accept the data from both tabs as long as they are valid. The same effect should be available on back-button and changing values. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Multi-tabs-and-back-button-support-1-5-2-tp3943445p3943856.html Sent from the Users forum 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 -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
popup to disapear on defaultdatatable paging
Hi i have a problem. I have a popup that triggers on a page. If it contains pageparameter popup it should trigger. The problem is that i want it to disapear on the defaultdatatable paging. Becouse now everytime i press something in the paging the popup popsup. Is there a way to override the paging so i could remove the pageparameter? SortableDataProviderDoc provider = new SortableDocumentProvider(wrappedDocumentList); provider.setSort(bla, true); add(new DefaultDataTableDoc(dataTable, columns, provider, DEFAULT_PAGE_SIZE)); String onLoadScript = ; if (parameters.containsKey(popup)) { LOGGER.debug(Adding popup window script); onLoadScript = ; } add(new Label(onLoadScript, onLoadScript).setEscapeModelStrings(false).setOutputMarkupId(true)); -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/popup-to-disapear-on-defaultdatatable-paging-tp3943946p3943946.html Sent from the Users forum 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: popup to disapear on defaultdatatable paging
On Thu, Oct 27, 2011 at 1:00 PM, midikem anders.nystro...@gmail.com wrote: Hi i have a problem. I have a popup that triggers on a page. If it contains pageparameter popup it should trigger. The problem is that i want it to disapear on the defaultdatatable paging. Becouse now everytime i press something in the paging the popup popsup. Is there a way to override the paging so i could remove the pageparameter? SortableDataProviderDoc provider = new SortableDocumentProvider(wrappedDocumentList); provider.setSort(bla, true); add(new DefaultDataTableDoc(dataTable, columns, provider, DEFAULT_PAGE_SIZE)); String onLoadScript = ; if (parameters.containsKey(popup)) { LOGGER.debug(Adding popup window script); onLoadScript = ; } add(new Label(onLoadScript, onLoadScript).setEscapeModelStrings(false).setOutputMarkupId(true)); Don't use DefaultDataTable but DataTable with explicitly specified toolbars. This way you can extend the default PagingNavigator with your own that removes the special parameter. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/popup-to-disapear-on-defaultdatatable-paging-tp3943946p3943946.html Sent from the Users forum 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 -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
@AuthorizeAction multiple actions
Hello all, I would like to ask is it possible to add multiple authorize actions on one class. It would mean that in case the user has role (i.e.) Admin component is enabled and rendered, for role user component is disabled and rendered, and for role guest component is not rendered. Kind of combination of these two annotations: @AuthorizeAction(action = ENABLE, roles = { ROLE_ADMIN }) @AuthorizeAction(action = RENDER, roles = { ROLE_USER }) What would be the best way to implement this? Thank you. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/AuthorizeAction-multiple-actions-tp3943997p3943997.html Sent from the Users forum 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: @AuthorizeAction multiple actions
On Thu, Oct 27, 2011 at 1:23 PM, nebojsa.nedic nebojsa.b.ne...@gmail.com wrote: Hello all, I would like to ask is it possible to add multiple authorize actions on one class. It would mean that in case the user has role (i.e.) Admin component is enabled and rendered, for role user component is disabled and rendered, and for role guest component is not rendered. Kind of combination of these two annotations: @AuthorizeAction(action = ENABLE, roles = { ROLE_ADMIN }) @AuthorizeAction(action = RENDER, roles = { ROLE_USER }) @AuthorizeAction(action = ENABLE, roles = { ROLE_ADMIN, ROLE_USER }) @AuthorizeAction(action = RENDER, roles = { ROLE_USER }) List all roles which are authorized to do the action. What would be the best way to implement this? Thank you. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/AuthorizeAction-multiple-actions-tp3943997p3943997.html Sent from the Users forum 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 -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: @AuthorizeAction multiple actions
You can't have two of the same annotations on the same target. You would need an @AuthorizeActions which would group them together. Or, check out how we handled this in wicketopia (shameless plug). :-) Sent from tablet device. Please excuse typos and brevity. On Oct 27, 2011 7:23 AM, nebojsa.nedic nebojsa.b.ne...@gmail.com wrote:
Re: @AuthorizeAction multiple actions
He had different actions On Oct 27, 2011 7:32 AM, Martin Grigorov mgrigo...@apache.org wrote: On Thu, Oct 27, 2011 at 1:23 PM, nebojsa.nedic nebojsa.b.ne...@gmail.com wrote: Hello all, I would like to ask is it possible to add multiple authorize actions on one class. It would mean that in case the user has role (i.e.) Admin component is enabled and rendered, for role user component is disabled and rendered, and for role guest component is not rendered. Kind of combination of these two annotations: @AuthorizeAction(action = ENABLE, roles = { ROLE_ADMIN }) @AuthorizeAction(action = RENDER, roles = { ROLE_USER }) @AuthorizeAction(action = ENABLE, roles = { ROLE_ADMIN, ROLE_USER }) @AuthorizeAction(action = RENDER, roles = { ROLE_USER }) List all roles which are authorized to do the action. What would be the best way to implement this? Thank you. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/AuthorizeAction-multiple-actions-tp3943997p3943997.html Sent from the Users forum 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 -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: @AuthorizeAction multiple actions
This should work I guess? http://wicket.apache.org/apidocs/1.5/org/apache/wicket/authroles/authorization/strategies/role/annotations/AuthorizeActions.html Martijn On Thu, Oct 27, 2011 at 2:41 PM, James Carman ja...@carmanconsulting.com wrote: He had different actions On Oct 27, 2011 7:32 AM, Martin Grigorov mgrigo...@apache.org wrote: On Thu, Oct 27, 2011 at 1:23 PM, nebojsa.nedic nebojsa.b.ne...@gmail.com wrote: Hello all, I would like to ask is it possible to add multiple authorize actions on one class. It would mean that in case the user has role (i.e.) Admin component is enabled and rendered, for role user component is disabled and rendered, and for role guest component is not rendered. Kind of combination of these two annotations: @AuthorizeAction(action = ENABLE, roles = { ROLE_ADMIN }) @AuthorizeAction(action = RENDER, roles = { ROLE_USER }) @AuthorizeAction(action = ENABLE, roles = { ROLE_ADMIN, ROLE_USER }) @AuthorizeAction(action = RENDER, roles = { ROLE_USER }) List all roles which are authorized to do the action. What would be the best way to implement this? Thank you. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/AuthorizeAction-multiple-actions-tp3943997p3943997.html Sent from the Users forum 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 -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Become a Wicket expert, learn from the best: http://wicketinaction.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: @AuthorizeAction multiple actions
That's what I said! :) On Oct 27, 2011 8:44 AM, Martijn Dashorst martijn.dasho...@gmail.com wrote: This should work I guess? http://wicket.apache.org/apidocs/1.5/org/apache/wicket/authroles/authorization/strategies/role/annotations/AuthorizeActions.html Martijn On Thu, Oct 27, 2011 at 2:41 PM, James Carman ja...@carmanconsulting.com wrote: He had different actions On Oct 27, 2011 7:32 AM, Martin Grigorov mgrigo...@apache.org wrote: On Thu, Oct 27, 2011 at 1:23 PM, nebojsa.nedic nebojsa.b.ne...@gmail.com wrote: Hello all, I would like to ask is it possible to add multiple authorize actions on one class. It would mean that in case the user has role (i.e.) Admin component is enabled and rendered, for role user component is disabled and rendered, and for role guest component is not rendered. Kind of combination of these two annotations: @AuthorizeAction(action = ENABLE, roles = { ROLE_ADMIN }) @AuthorizeAction(action = RENDER, roles = { ROLE_USER }) @AuthorizeAction(action = ENABLE, roles = { ROLE_ADMIN, ROLE_USER }) @AuthorizeAction(action = RENDER, roles = { ROLE_USER }) List all roles which are authorized to do the action. What would be the best way to implement this? Thank you. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/AuthorizeAction-multiple-actions-tp3943997p3943997.html Sent from the Users forum 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 -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Become a Wicket expert, learn from the best: http://wicketinaction.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: popup to disapear on defaultdatatable paging
I still got a problem. When i override onClick() and just try to logg something out nothing happends. @Override protected PagingNavigationLink? newPagingNavigationLink(String id, IPageable pageable, final int pageNumber) { return new PagingNavigationLink(id, pageable, pageNumber) { private static final long serialVersionUID = 1L; @Override public void onClick() { LOGGER.info(Bla); if (parameters.containsKey(popup)) { parameters.remove(popup); } } }; } -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/popup-to-disapear-on-defaultdatatable-paging-tp3943946p3944415.html Sent from the Users forum 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
WicketFilter cannot resolve filterPath if filterMappingUrlPattern is not configured
Hi, We noticed this while running our application in an environment where firewall blocks all connections to outside addresses. Adding filterMappingUrlPattern parameter helped. so for instance helloworld's web.xml (http://wicket.apache.org/learn/examples/helloworld.html) would be something like: web-app display-nameWicket Examples/display-name filter filter-nameHelloWorldApplication/filter-name filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class init-param param-nameapplicationClassName/param-name param-valueorg.apache.wicket.examples.helloworld.HelloWorldApplication/param-value /init-param init-param param-namefilterMappingUrlPattern/param-name param-value/*/param-value /init-param /filter filter-mapping filter-nameHelloWorldApplication/filter-name url-pattern/*/url-pattern /filter-mapping /web-app Regards, Mikko
PageExpiredException: Different JSessionId after second Ajax-Call only in IE8
Hi, i think have read (hopefully) all the posts about PageExpiredExceptions (Serializable etc.). I have a DropDownChoice, that updates a List of Links via Ajax (please see code below). After updating the List of Links or clicking on one of the links the *second time* in IE8 i receive a different session-id and therefore the PageExpiredExcption appears. Code for updating the list: code dropDownChoice.add(new AjaxFormComponentUpdatingBehavior(onchange) { private static final long serialVersionUID = 6589985163593895157L; protected void onUpdate(AjaxRequestTarget target) { ... //Reload a list of links } }); /code Summary: - Problem only in IE8 - In Firefox everything works fine. - Wicket 1.4. - The application runs on WAS7 - No session replication - played around with settings e.g. getPageSettings().setAutomaticMultiWindowSupport(false); and caching. - Problem appears after the second Ajax-Call. - Error message is: onRuntimeException Cannot find the rendered page in session [pagemap=null,componentPath=4:border:_body:dialogContainer:contentPanels:infoTextContentPanel:ajaxEnabledContainer:fieldActions,versionNumber=0] Thanks for any help! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/PageExpiredException-Different-JSessionId-after-second-Ajax-Call-only-in-IE8-tp3944468p3944468.html Sent from the Users forum 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: wicketstuff-push examples working across browsers
I just read my email again and I sounded really rude when asking my question. What I mean to ask was, out of curiousity, if you were trying to get the IE7 browser+ working? I'm really sorry if I've offended you or anyone. I'm very embarrassed by that tone in the email (it's not what I actually meant to say), and I really do appreciate your hard work and effort towards wicketstuff (as I have seen on git). Soheb - Original Message - From: Sebastian nospam...@gmx.net To: users@wicket.apache.org Sent: Wednesday, 26 October, 2011 5:21:52 PM Subject: Re: wicketstuff-push examples working across browsers hi, cometd had a bug that affects websocket support in conjunction with chrome browsers. It is fixed in the latest 1.4.0RC1 release of cometd. We incorporated the changes (and fixed some other issues) in wicketstuff trunk. thus they will be available with the wicketstuff 1.5.2 release. Regards, Seb On 26.10.2011 10:25, Soheb Mahmood wrote: Hello everyone, I'm planning to use wicketstuff-core in an actual production environment, and to be more specific, I'm planning to use push-cometd. I'm currently using wicketstuff version 1.4.14 to match the current version of Wicket we are using in production. I got the example to run, and one of the things I wondered was what is the browser support aimed for push-cometd? So far, I can only get the cometd example working in Firefox and Opera, and there is a lack of support for Google Chrome 14.0.835.202 nor Internet Explorer 7. I can get the Wicket Timer example working, but the reason we are thinking of implementing comet into production is to minimize the request impact on our server, and with the Wicket Timer example, that uses TimerPushService, which if we wanted similar functionality, we could just use AjaxTimeoutBehavior instead. Even the Basic Cometd test doesn't work under IE7 and Chrome. I was wondering if you were aware of this, and if you had any suggestions to solve this cross-browser issue (at least from our end). It's also worth noting that I haven't modified the push-parent-jdk-1.6 folder contents at all. Many thanks, Soheb - 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: wicketstuff-push examples working across browsers
On Thu, Oct 27, 2011 at 3:58 PM, Soheb Mahmood so...@humboldt.co.uk wrote: I just read my email again and I sounded really rude when asking my question. What I mean to ask was, out of curiousity, if you were trying to get the IE7 browser+ working? I'm really sorry if I've offended you or anyone. I'm very embarrassed by that tone in the email (it's not what I actually meant to say), and I really do appreciate your hard work and effort towards wicketstuff (as I have seen on git). Did you try the latest code from wicketstuff/core master branch ? Maybe it already works on IE... Soheb - Original Message - From: Sebastian nospam...@gmx.net To: users@wicket.apache.org Sent: Wednesday, 26 October, 2011 5:21:52 PM Subject: Re: wicketstuff-push examples working across browsers hi, cometd had a bug that affects websocket support in conjunction with chrome browsers. It is fixed in the latest 1.4.0RC1 release of cometd. We incorporated the changes (and fixed some other issues) in wicketstuff trunk. thus they will be available with the wicketstuff 1.5.2 release. Regards, Seb On 26.10.2011 10:25, Soheb Mahmood wrote: Hello everyone, I'm planning to use wicketstuff-core in an actual production environment, and to be more specific, I'm planning to use push-cometd. I'm currently using wicketstuff version 1.4.14 to match the current version of Wicket we are using in production. I got the example to run, and one of the things I wondered was what is the browser support aimed for push-cometd? So far, I can only get the cometd example working in Firefox and Opera, and there is a lack of support for Google Chrome 14.0.835.202 nor Internet Explorer 7. I can get the Wicket Timer example working, but the reason we are thinking of implementing comet into production is to minimize the request impact on our server, and with the Wicket Timer example, that uses TimerPushService, which if we wanted similar functionality, we could just use AjaxTimeoutBehavior instead. Even the Basic Cometd test doesn't work under IE7 and Chrome. I was wondering if you were aware of this, and if you had any suggestions to solve this cross-browser issue (at least from our end). It's also worth noting that I haven't modified the push-parent-jdk-1.6 folder contents at all. Many thanks, Soheb - 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 -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicketstuff-push examples working across browsers
hi Soheb, no problem. I gave it a try this morning on IE9 and it also failed with the current push version in trunk. I just committed a change that makes it work in IE. https://github.com/wicketstuff/core/commit/3e09edf3e21fdb039cdb844e88653ccfdd33a4c4 Regards, Seb On 27.10.2011 15:58, Soheb Mahmood wrote: I just read my email again and I sounded really rude when asking my question. What I mean to ask was, out of curiousity, if you were trying to get the IE7 browser+ working? I'm really sorry if I've offended you or anyone. I'm very embarrassed by that tone in the email (it's not what I actually meant to say), and I really do appreciate your hard work and effort towards wicketstuff (as I have seen on git). Soheb - Original Message - From: Sebastiannospam...@gmx.net To: users@wicket.apache.org Sent: Wednesday, 26 October, 2011 5:21:52 PM Subject: Re: wicketstuff-push examples working across browsers hi, cometd had a bug that affects websocket support in conjunction with chrome browsers. It is fixed in the latest 1.4.0RC1 release of cometd. We incorporated the changes (and fixed some other issues) in wicketstuff trunk. thus they will be available with the wicketstuff 1.5.2 release. Regards, Seb On 26.10.2011 10:25, Soheb Mahmood wrote: Hello everyone, I'm planning to use wicketstuff-core in an actual production environment, and to be more specific, I'm planning to use push-cometd. I'm currently using wicketstuff version 1.4.14 to match the current version of Wicket we are using in production. I got the example to run, and one of the things I wondered was what is the browser support aimed for push-cometd? So far, I can only get the cometd example working in Firefox and Opera, and there is a lack of support for Google Chrome 14.0.835.202 nor Internet Explorer 7. I can get the Wicket Timer example working, but the reason we are thinking of implementing comet into production is to minimize the request impact on our server, and with the Wicket Timer example, that uses TimerPushService, which if we wanted similar functionality, we could just use AjaxTimeoutBehavior instead. Even the Basic Cometd test doesn't work under IE7 and Chrome. I was wondering if you were aware of this, and if you had any suggestions to solve this cross-browser issue (at least from our end). It's also worth noting that I haven't modified the push-parent-jdk-1.6 folder contents at all. Many thanks, Soheb - 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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: @AuthorizeAction multiple actions
Thank you very much for your help. Yes that helped - I did not know for this annotation. This is the code how it looks like now: @AuthorizeActions(actions = { @AuthorizeAction(action = ENABLE, roles = { ROLE_ADMIN }), @AuthorizeAction(action = RENDER, roles = { ROLE_ADMIN, ROLE_USER }) }) At first, I even didn't saw this s at the end :). -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/AuthorizeAction-multiple-actions-tp3943997p3944682.html Sent from the Users forum 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: Invalid Date Using DatePicker and Short Date Format
I am not sure about your example, but this is working and it might help. Maybe there are better ways to do it as well. String dateFormat = dd.MM.; DateTextField dateField = new DateTextField(date, new PropertyModelDate(...), dateFormat); startDateField.add(DateValidator.range(calMin.getTime(), calMax.getTime(), dateFormat));//Validation DatePicker datePickerStartDate = new DatePicker(); datePickerStartDate.setShowOnFieldClick(true); Hopefully this helps... -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Invalid-Date-Using-DatePicker-and-Short-Date-Format-tp3058289p3944711.html Sent from the Users forum 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: LDMs load too early - hold outdated application data.
On Thu, Oct 27, 2011 at 12:29 AM, Maarten Billemont lhun...@lyndir.com wrote: On 26 Oct 2011, at 12:14, Sven Meier wrote: Hi, Or use a separate LDM for each of your list items I'm not sure I understand what you mean here. Could you illustrate? your LDM seems to return a list of items and you're iterating over them with a ListView. Note that ListView uses a ListItemModel for each item: Fair. Though my actual use case is an LDM that populates a dropdown. There is only one button in the form to delete the dropdown's selected object, whose onSubmit uses the dropdown's model to determine what object to delete. It seems to me that Wicket should detach its models again after events have triggered, in addition to after rendering has completed. That would resetthe state of all models to what the developer expects it to be before rendering begins. You can hook your own listener into Wicket (I*Listener) and detach the models yourself. If we can think of no issues with this approach, I'd much rather vote to make it standard behavior in Wicket, so that developers can trust their models behave as they'd expect. this wont be a standard behavior as it would add a lot of overhead. during listener processing you may load five LDMs with database queries and only one of them will be effected by the form submission - so why should we have to reload the other four? imho it is a well known fact that if you do something like this: ListFoo list=model.getobject(); Foo foo=list.get(0); removeFromDatabase(foo); we all understand that model.getobject() still returns an unchanged list, so if you want a refreshed list you have to call model.detach(); the core of your problem here is that you are using a ListView to represent data in your database, which is something that ListView is *not* designed to be used for. it is designed to be used with lists, which your database tables are not. if you dont want to run into this then use a dataview or a datatable. -igor HTH Sven -Ursprüngliche Nachricht- Von: Maarten Billemont [mailto:lhun...@lyndir.com] Gesendet: Mittwoch, 26. Oktober 2011 11:50 An: users@wicket.apache.org Betreff: Re: LDMs load too early - hold outdated application data. On 26 Oct 2011, at 10:52, Sven Meier wrote: This is a common problem when working with LDM. You can detach the LDM by yourself after the event. I could. But it would be a work-around and it wouldn't solve the underlying issue. As a result, this bug will keep haunting us. Or use a separate LDM for each of your list items: This way the LDM of the list is loaded for rendering *after* the event only. Additionally the event won't crash when the list of users has changed while the page is displayed. I'm not sure I understand what you mean here. Could you illustrate? It seems to me that Wicket should detach its models again after events have triggered, in addition to after rendering has completed. That would reset the state of all models to what the developer expects it to be before rendering begins. HTH Sven -Ursprüngliche Nachricht- Von: Maarten Billemont [mailto:lhun...@lyndir.com] Gesendet: Mittwoch, 26. Oktober 2011 10:15 An: users@wicket.apache.org Betreff: LDMs load too early - hold outdated application data. I just had a bug in my application where my LDM lists all users to fill a form field, but that same form also has a button to delete the selected user from the database. The problem is that the button's onSubmit triggers AFTER the LDM is populated, because it apparently needs the LDM's information to figure out what user was selected in the form (so, to figure out what user to delete). Only, once the button's onSubmit has triggered, the user is deleted from persistence, and to render an up-to-date page, the LDM's model should NO LONGER include that user. I had initially assumed this would work fine because the LDM reloads its model for each page refresh, but in this scenario the LDM is only loaded before the persistence layer is up-to-date with the information that needs to be rendered. Which leads me to wonder the following: Shouldn't an LDM load its state from up-to-date data? Shouldn't its load() be invoked AFTER all events have been handled? Shouldn't the response page be rendered AFTER all logic has been processed? And shouldn't the LDM use FRESH data for that rendering, rather than using the state from BEFORE the logic was processed? Isn't this a bug in the way wicket handles model object loading? It certainly doesn't stroke with what a developer might intuitively expect from an LDM - so there's some kind of mismatch going on. And personally, I'd really like to be able to TRUST that my LDMs are ALWAYS populated from CURRENT data when the response rendering that uses it happens. - To unsubscribe, e-mail:
Re: Multi-tabs and back-button support 1.5.2
hrm. i dont think the rendercount should prevent me from using the page. if i write my application as a single page then our back button support is completely hosed. i should be able to back button and re-submit the form. -igor On Thu, Oct 27, 2011 at 3:20 AM, Martin Grigorov mgrigo...@apache.org wrote: The only option is see is to make the check for stale page configurable via IPageSettings for example. On Thu, Oct 27, 2011 at 12:16 PM, Charlie Midtlyng charlie.midtl...@gmail.com wrote: I would actually like to accept the data from both tabs as long as they are valid. The same effect should be available on back-button and changing values. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Multi-tabs-and-back-button-support-1-5-2-tp3943445p3943856.html Sent from the Users forum 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 -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - 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: Multi-tabs and back-button support 1.5.2
On Thu, Oct 27, 2011 at 5:48 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote: hrm. i dont think the rendercount should prevent me from using the page. if i write my application as a single page then our back button support is completely hosed. i should be able to back button and re-submit the form. As single page - i.e. completely Ajax navigation ? In this case back button support is on your own. Do you suggest to remove the check for stale page ? -igor On Thu, Oct 27, 2011 at 3:20 AM, Martin Grigorov mgrigo...@apache.org wrote: The only option is see is to make the check for stale page configurable via IPageSettings for example. On Thu, Oct 27, 2011 at 12:16 PM, Charlie Midtlyng charlie.midtl...@gmail.com wrote: I would actually like to accept the data from both tabs as long as they are valid. The same effect should be available on back-button and changing values. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Multi-tabs-and-back-button-support-1-5-2-tp3943445p3943856.html Sent from the Users forum 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 -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - 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 -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Multi-tabs and back-button support 1.5.2
no, not necessarily ajax. simple links that instead of navigating to a different page do panel replacement. -igor On Thu, Oct 27, 2011 at 8:51 AM, Martin Grigorov mgrigo...@apache.org wrote: On Thu, Oct 27, 2011 at 5:48 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote: hrm. i dont think the rendercount should prevent me from using the page. if i write my application as a single page then our back button support is completely hosed. i should be able to back button and re-submit the form. As single page - i.e. completely Ajax navigation ? In this case back button support is on your own. Do you suggest to remove the check for stale page ? -igor On Thu, Oct 27, 2011 at 3:20 AM, Martin Grigorov mgrigo...@apache.org wrote: The only option is see is to make the check for stale page configurable via IPageSettings for example. On Thu, Oct 27, 2011 at 12:16 PM, Charlie Midtlyng charlie.midtl...@gmail.com wrote: I would actually like to accept the data from both tabs as long as they are valid. The same effect should be available on back-button and changing values. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Multi-tabs-and-back-button-support-1-5-2-tp3943445p3943856.html Sent from the Users forum 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 -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - 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 -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - 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: Multi-tabs and back-button support 1.5.2
On Thu, Oct 27, 2011 at 5:53 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote: no, not necessarily ajax. simple links that instead of navigating to a different page do panel replacement. ok I think back button should not be harmed by the stale check. @Charlie: can you create a quickstart, attach it to a ticket and describe the steps ? Thanks! -igor On Thu, Oct 27, 2011 at 8:51 AM, Martin Grigorov mgrigo...@apache.org wrote: On Thu, Oct 27, 2011 at 5:48 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote: hrm. i dont think the rendercount should prevent me from using the page. if i write my application as a single page then our back button support is completely hosed. i should be able to back button and re-submit the form. As single page - i.e. completely Ajax navigation ? In this case back button support is on your own. Do you suggest to remove the check for stale page ? -igor On Thu, Oct 27, 2011 at 3:20 AM, Martin Grigorov mgrigo...@apache.org wrote: The only option is see is to make the check for stale page configurable via IPageSettings for example. On Thu, Oct 27, 2011 at 12:16 PM, Charlie Midtlyng charlie.midtl...@gmail.com wrote: I would actually like to accept the data from both tabs as long as they are valid. The same effect should be available on back-button and changing values. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Multi-tabs-and-back-button-support-1-5-2-tp3943445p3943856.html Sent from the Users forum 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 -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - 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 -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - 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 -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
AjaxFormComponentUpdatingBehavior broken after invalid submit
Wicket 1.5.1 I have a DropDownChoice with an AjaxFormComponentUpdatingBehavior(onchange) behavior attached to it, when a value is chosen in the dropdown the selected value is used to lookup data via a service call and then update other textfields in the form. This works great until you use the dropdown after the form was submitted with validation errors. The onUpdate event in the AjaxFormComponentUpdatingBehavior is still called but the other form textfields are NOT being updated on the screen. Any ideas why the model isn't being updated? Or, maybe I am misunderstanding what's really happening. Any Ideas what to try next? Thanks new AjaxFormComponentUpdatingBehavior(onchange) { @Override protected void onUpdate(final AjaxRequestTarget target) { String selectedValue = aiNumberSelection.getValue(); AgencyInterest agencyInterest; if (!isEmpty(selectedValue) NumberUtils.isDigits(selectedValue)) { agencyInterest = agencyInterestService.findByAiNumber(new Long(selectedValue)); } else { agencyInterest = new AgencyInterest(); } eerBackingModel.setAgencyInterest(agencyInterest); form.setDefaultModelObject(eerBackingModel); target.add(feedbackPanel); target.add(form.get(CID_AI_NAME)); target.add(form.get(CID_AI_NUMBER)); target.add(form.get(CID_AI_OWNER)); target.add(form.get(CID_AI_IS_STATIONARY)); target.add(form.get(CID_AI_IS_PORTABLE)); target.add(form.get(CID_AI_UTM)); target.add(form.get(CID_AI_LAT)); target.add(form.get(CID_AI_LON)); target.add(form.get(CID_AI_TITLEV_PERMIT)); target.add(form.get(CID_AI_NSR_PERMIT)); }
Re: An extensive RIA technology comparison matrix including Wicket
To be honest, I don't think the comparison matrix is that bad. I would consider a framework like Vaadin over Wicket if all I wanted a typical desktop style only (menu bar, content frames + layout manager, fancy widgets) only type of application, what they call application oriented, especially if it would benefit a lot from client-side UI management. Or just do that in Java. I can tell you from experience that developing (and e.g. debugging!) with GWT is painful on many different levels. I like how Vaadin markets itself, what it's goals are etc, but I can't imagine not stumbling into the same kind of hassle that comes with developing with GWT. Might even make it worse, as it's yet another abstraction over it. My2c, Eelco - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: An extensive RIA technology comparison matrix including Wicket
Ugh, I mean 'just do that in JavaScript' On Thu, Oct 27, 2011 at 7:07 PM, Eelco Hillenius eelco.hillen...@gmail.com wrote: To be honest, I don't think the comparison matrix is that bad. I would consider a framework like Vaadin over Wicket if all I wanted a typical desktop style only (menu bar, content frames + layout manager, fancy widgets) only type of application, what they call application oriented, especially if it would benefit a lot from client-side UI management. Or just do that in Java. I can tell you from experience that developing (and e.g. debugging!) with GWT is painful on many different levels. I like how Vaadin markets itself, what it's goals are etc, but I can't imagine not stumbling into the same kind of hassle that comes with developing with GWT. Might even make it worse, as it's yet another abstraction over it. My2c, Eelco - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: LDMs load too early - hold outdated application data.
On 27 Oct 2011, at 17:18, Igor Vaynberg wrote: On Thu, Oct 27, 2011 at 12:29 AM, Maarten Billemont lhun...@lyndir.com wrote: On 26 Oct 2011, at 12:14, Sven Meier wrote: Hi, Or use a separate LDM for each of your list items I'm not sure I understand what you mean here. Could you illustrate? your LDM seems to return a list of items and you're iterating over them with a ListView. Note that ListView uses a ListItemModel for each item: Fair. Though my actual use case is an LDM that populates a dropdown. There is only one button in the form to delete the dropdown's selected object, whose onSubmit uses the dropdown's model to determine what object to delete. It seems to me that Wicket should detach its models again after events have triggered, in addition to after rendering has completed. That would resetthe state of all models to what the developer expects it to be before rendering begins. You can hook your own listener into Wicket (I*Listener) and detach the models yourself. If we can think of no issues with this approach, I'd much rather vote to make it standard behavior in Wicket, so that developers can trust their models behave as they'd expect. this wont be a standard behavior as it would add a lot of overhead. during listener processing you may load five LDMs with database queries and only one of them will be effected by the form submission - Then those four will not get loaded before rendering and there is no problem. Their models will be detached from after the last rendering, their LDMs unloaded, and with no getObject to load them before render, when this new detach-before-render is called, their internal state will still be detached. No double loading if you're not being used during event processing. Or am I wrong? If not, then perhaps it is feasible still to do this. If wicket loads all models of form components regardless, then maybe it can be made more lazy. so why should we have to reload the other four? imho it is a well known fact that if you do something like this: ListFoo list=model.getobject(); Foo foo=list.get(0); removeFromDatabase(foo); we all understand that model.getobject() still returns an unchanged list, so if you want a refreshed list you have to call model.detach(); I've never actually thought it necessary to invoke this method myself; I mostly considered it internal-use. But perhaps, yes, the developer should be aware of needing to do this maintenance. the core of your problem here is that you are using a ListView to represent data in your database, which is something that ListView is *not* designed to be used for. it is designed to be used with lists, which your database tables are not. if you dont want to run into this then use a dataview or a datatable. I'm not using a ListView (at least not directly). I'm using a DDC. And AFAIK this issue would also exist for eg. ListDataProvider. -igor HTH Sven -Ursprüngliche Nachricht- Von: Maarten Billemont [mailto:lhun...@lyndir.com] Gesendet: Mittwoch, 26. Oktober 2011 11:50 An: users@wicket.apache.org Betreff: Re: LDMs load too early - hold outdated application data. On 26 Oct 2011, at 10:52, Sven Meier wrote: This is a common problem when working with LDM. You can detach the LDM by yourself after the event. I could. But it would be a work-around and it wouldn't solve the underlying issue. As a result, this bug will keep haunting us. Or use a separate LDM for each of your list items: This way the LDM of the list is loaded for rendering *after* the event only. Additionally the event won't crash when the list of users has changed while the page is displayed. I'm not sure I understand what you mean here. Could you illustrate? It seems to me that Wicket should detach its models again after events have triggered, in addition to after rendering has completed. That would reset the state of all models to what the developer expects it to be before rendering begins. HTH Sven -Ursprüngliche Nachricht- Von: Maarten Billemont [mailto:lhun...@lyndir.com] Gesendet: Mittwoch, 26. Oktober 2011 10:15 An: users@wicket.apache.org Betreff: LDMs load too early - hold outdated application data. I just had a bug in my application where my LDM lists all users to fill a form field, but that same form also has a button to delete the selected user from the database. The problem is that the button's onSubmit triggers AFTER the LDM is populated, because it apparently needs the LDM's information to figure out what user was selected in the form (so, to figure out what user to delete). Only, once the button's onSubmit has triggered, the user is deleted from persistence, and to render an up-to-date page, the LDM's model should NO LONGER include that user. I had initially assumed this would work fine because the LDM reloads its model for each page refresh, but in this
Re: Bookmarkable link within AjaxLazyLoadPanel
Here is the code: http://pastebin.com/uQnU464W http://pastebin.com/uQnU464W -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Bookmarkable-link-within-AjaxLazyLoadPanel-tp3943587p3946743.html Sent from the Users forum 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: AjaxFormComponentUpdatingBehavior broken after invalid submit
Hi, did you already try a call to form.modelChanged() in onUpdate? - -- Regards, Hans http://cantaa.de -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/AjaxFormComponentUpdatingBehavior-broken-after-invalid-submit-tp3945964p3946955.html Sent from the Users forum 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