RE: Components/Behaviour execution order
Cool - thanks Seb - I'll look into it...! :) -Original Message- From: Sebastien [mailto:seb...@gmail.com] Sent: Thursday, 1 October 2015 6:13 PM To: Patrick Davids <patrick.dav...@nubologic.com> Cc: users@wicket.apache.org Subject: Re: Components/Behaviour execution order Hi, @Patrick Yes, we had a behavior sequence order issue [1] that we just solved by calling super.onConfigure(component); at the end of #onConfigure. @Colin When I've complex cases, I am using the event bus. The key point is my magic AjaxPayload base class, so you can create ZStateChangedAjaxPayload extends AjaxPayload, sent from Z, and caught in Y#onEvent and/or any components/behaviors you want... I don't know if you already used the event bus in the past, but if it's not the case, you will like it! :) public class AjaxPayload { private final AjaxRequestTarget target; public AjaxPayload(AjaxRequestTarget target) { this.target = target; } public AjaxRequestTarget getTarget() { return this.target; } public void reload(Component... components) { this.getTarget().add(components); } } Hope this helps, Sebastien. [1] https://github.com/sebfz1/wicket-jquery-ui/issues/43 On Thu, Oct 1, 2015 at 8:57 AM, Patrick Davids <patrick.dav...@nubologic.com > wrote: > Hi Col., > sometimes I try to cheat by using onBeforeRender() in such cases to 'fake' > an order, because its called after onConfigure(). > But this has some restrictions concerning visibility issues of components. > But in simple dependencies this sometimes works for me. > > I think somewhere in wickets jira is an issue for a similar problem, > to feature defining a kind of order of behaviors. > Unfort. I'm not able to find it right away. > > (@Sebastien: I think, we had such problem someday... do you remember > maybe?) > > best regards > Patrick > > > Am 01.10.2015 um 06:27 schrieb Colin Rogers: > >> Wicketeers, >> >> This question is to do with lifecycle execution order - it's not a >> bug as such, just a usage question - I hope you can help. >> >> I have component X with an AjaxFormComponentUpdatingBehavior, that >> triggers updates in Components Y and Z by adding to target. >> >> Y has a generic Behaviour that updates it's data. Z needs to hide or >> show itself depending on Y's data state. >> >> Y needs to use that generic Behaviour, as it's complex, does loads of >> stuff and is used throughout the system - so I can't change this. >> >> Originally, in Z's onConfigure() we set the setVisible() depending on >> Y's state. But that doesn't work as Z's onConfigure() executes after >> Y's Behaviours onConfigure(). Which is just the way >> Component.configure() works. Which is fair enough. >> >> So, I figured if Behaviours execute after onConfigure, I simply put >> the >> setVisible() code into a Behaviour on Z, and bingo! >> >> Only Y's Behaviour always executes first. Always. Even if I create it >> second, even if I add Z to their parent container before Y. I can't >> work out how to affect the order of Components/Behaviour execution. >> >> Note - I did extend the Y's Behaviour to update Z, but as Z has >> already completed its cycle, the state didn't actually update. >> >> Can anyone help? >> >> Cheers, >> Col. >> EMAIL DISCLAIMER This email message and its attachments are >> confidential and may also contain copyright or privileged material. >> If you are not the intended recipient, you may not forward the email >> or disclose or use the information contained in it. If you have >> received this email message in error, please advise the sender >> immediately by replying to this email and delete the message and any >> associated attachments. Any views, opinions, conclusions, advice or >> statements expressed in this email message are those of the >> individual sender and should not be relied upon as the considered >> view, opinion, conclusions, advice or statement of this company >> except where the sender expressly, and with authority, states them to be the >> considered view, opinion, conclusions, advice or statement of this company. >> Every care is taken but we recommend that you scan any attachments >> for viruses. >> >> > EMAIL DISCLAIMER This email message and its attachments are confidential and may also contain copyright or privileged material. If you are not the intended recipient, you may not forward the email or disclose or use the information contained in it. If you have received this email message in error, please advise the sender immediately by replying to this email and delete the message and any associated a
Components/Behaviour execution order
Wicketeers, This question is to do with lifecycle execution order - it's not a bug as such, just a usage question - I hope you can help. I have component X with an AjaxFormComponentUpdatingBehavior, that triggers updates in Components Y and Z by adding to target. Y has a generic Behaviour that updates it's data. Z needs to hide or show itself depending on Y's data state. Y needs to use that generic Behaviour, as it's complex, does loads of stuff and is used throughout the system - so I can't change this. Originally, in Z's onConfigure() we set the setVisible() depending on Y's state. But that doesn't work as Z's onConfigure() executes after Y's Behaviours onConfigure(). Which is just the way Component.configure() works. Which is fair enough. So, I figured if Behaviours execute after onConfigure, I simply put the setVisible() code into a Behaviour on Z, and bingo! Only Y's Behaviour always executes first. Always. Even if I create it second, even if I add Z to their parent container before Y. I can't work out how to affect the order of Components/Behaviour execution. Note - I did extend the Y's Behaviour to update Z, but as Z has already completed its cycle, the state didn't actually update. Can anyone help? Cheers, Col. EMAIL DISCLAIMER This email message and its attachments are confidential and may also contain copyright or privileged material. If you are not the intended recipient, you may not forward the email or disclose or use the information contained in it. If you have received this email message in error, please advise the sender immediately by replying to this email and delete the message and any associated attachments. Any views, opinions, conclusions, advice or statements expressed in this email message are those of the individual sender and should not be relied upon as the considered view, opinion, conclusions, advice or statement of this company except where the sender expressly, and with authority, states them to be the considered view, opinion, conclusions, advice or statement of this company. Every care is taken but we recommend that you scan any attachments for viruses.
RE: New committer - Sebastien Briquet
Only just saw this... well done Sebastien - you've always been amazing help with JQuery-UI :) -Original Message- From: Patrick Davids [mailto:patrick.dav...@nubologic.com] Sent: Monday, 16 February 2015 7:05 PM To: users@wicket.apache.org Subject: Re: New committer - Sebastien Briquet Yeah, congratulations Sebastien! :-) Am 13.02.2015 um 22:02 schrieb Martin Grigorov: The Project Management Committee (PMC) for Apache Wicket has asked Sebastien Briquet to become a committer and we are pleased to announce that he has accepted. Sebastien has been involved with Wicket for several years now by developing one of the most successful integrations with JavaScript libraries, namely Wicket jQuery UI https://github.com/sebfz1/wicket-jquery-ui, reporting bugs, contributing fixes and participating in discussions. Being a committer will enable him to help us even easier in the future. Please welcome Sebastien Briquet to our team! Bienvenue Sebastien! - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org EMAIL DISCLAIMER This email message and its attachments are confidential and may also contain copyright or privileged material. If you are not the intended recipient, you may not forward the email or disclose or use the information contained in it. If you have received this email message in error, please advise the sender immediately by replying to this email and delete the message and any associated attachments. Any views, opinions, conclusions, advice or statements expressed in this email message are those of the individual sender and should not be relied upon as the considered view, opinion, conclusions, advice or statement of this company except where the sender expressly, and with authority, states them to be the considered view, opinion, conclusions, advice or statement of this company. Every care is taken but we recommend that you scan any attachments for viruses. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Handling stale Ajax Requests
Wicketeers, I have an issue to resolve and I hope someone can help. The user opens a link from 'Window 1' to open in new tab ('Window 2') and goes off and does a whole bunch of stuff in Window 2. After following a few links, the user returns to 'Window 1' and triggers an Ajax link. By now this page isn't in the page cache or whatever (at least I assume) and the Ajax link fails. Currently the behaviour is simply to forward to a brand new version of the page (i.e. the base of URL). Which is odd behaviour for the user, as all their state simply disappears. What I'd like to do is forward to the home page with a 'this page or link has expired' or similar so the difference isn't jarring, unfortunately I have no way to trap when this happens. No Exception is triggered in the IRequestCycleListener - I'd have expected a StalePageException or PageExpiredException, or similar but no exception is triggered here. Is there a way to handle this stale ajax request elegantly? Cheers, Col. EMAIL DISCLAIMER This email message and its attachments are confidential and may also contain copyright or privileged material. If you are not the intended recipient, you may not forward the email or disclose or use the information contained in it. If you have received this email message in error, please advise the sender immediately by replying to this email and delete the message and any associated attachments. Any views, opinions, conclusions, advice or statements expressed in this email message are those of the individual sender and should not be relied upon as the considered view, opinion, conclusions, advice or statement of this company except where the sender expressly, and with authority, states them to be the considered view, opinion, conclusions, advice or statement of this company. Every care is taken but we recommend that you scan any attachments for viruses.
RE: TableTree expand node issue
Sven, Thanks - that's really obvious now you mention it - thanks for the heads up, and sorry for being stupid. :) Back to the drawing board :) Cheers, Col. From: Sven Meier [s...@meiers.net] Sent: 18 December 2014 20:51 To: users@wicket.apache.org Subject: Re: TableTree expand node issue Hi, after serialization/deserialization of the page, Homepage#ROOT_NODE is no longer equal to the node passed to your treeProvider's #hasChildren() - thus the expand link is no longer enabled. There are different solutions to this problem, e.g. implementing #equals and #hashcode in HomePage.Item. Let us know if you need further help on this. Regards Sven On 18.12.2014 06:35, Colin Rogers wrote: Wicketeers, I don't know if this is a bug or quirk or something I'm doing wrong, but I have an issue with hitting 'expand' nodes on a TableTree when another page has been opened. It seems to occurs when you open a stateful page - our users love multiple windows, and open tons of pages using 'open in new window' in the browser, and then re-use previous pages. It triggers an Access Denied error, and the stack trace (at end of email). I've created a quickstart below that hopefully illustrates the issue. http://www.tenthart.com/wickettest2.zip The weird thing is, this doesn't seem to happen on your examples pages for the same component, which suggests it's something I'm doing incorrectly. Despite that, the quickstart uses the simplest code I can figure... I hope someone can help, or suggest a work-around or just shed some light on the subject. :) Cheers, Col. WARN - RequestListenerInterface - behavior not enabled; ignore call. Behavior org.apache.wicket.ajax.markup.html.AjaxFallbackLink$1@69ba045 at component [AjaxFallbackLink [Component id = junction]] WARN - RequestCycleExtra - WARN - RequestCycleExtra - Handling the following exception org.apache.wicket.core.request.handler.ListenerInvocationNotAllowedException: Behavior rejected interface invocation. Component: [AjaxFallbackLink [Component id = junction]] Behavior: org.apache.wicket.ajax.markup.html.AjaxFallbackLink$1@69ba045 Listener: [RequestListenerInterface name=IBehaviorListener, method=public abstract void org.apache.wicket.behavior.IBehaviorListener.onRequest()] at org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:237) at org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.invokeListener(ListenerInterfaceRequestHandler.java:250) at org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:236) at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:862) at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64) at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:261) at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:218) at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:289) at org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:259) at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:201) at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:282) EMAIL DISCLAIMER This email message and its attachments are confidential and may also contain copyright or privileged material. If you are not the intended recipient, you may not forward the email or disclose or use the information contained in it. If you have received this email message in error, please advise the sender immediately by replying to this email and delete the message and any associated attachments. Any views, opinions, conclusions, advice or statements expressed in this email message are those of the individual sender and should not be relied upon as the considered view, opinion, conclusions, advice or statement of this company except where the sender expressly, and with authority, states them to be the considered view, opinion, conclusions, advice or statement of this company. Every care is taken but we recommend that you scan any attachments for viruses. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org EMAIL DISCLAIMER This email message and its attachments are confidential and may also contain copyright or privileged material. If you are not the intended recipient, you may not forward the email or disclose or use the information contained in it. If you have received this email message in error, please advise the sender immediately
TableTree expand node issue
Wicketeers, I don't know if this is a bug or quirk or something I'm doing wrong, but I have an issue with hitting 'expand' nodes on a TableTree when another page has been opened. It seems to occurs when you open a stateful page - our users love multiple windows, and open tons of pages using 'open in new window' in the browser, and then re-use previous pages. It triggers an Access Denied error, and the stack trace (at end of email). I've created a quickstart below that hopefully illustrates the issue. http://www.tenthart.com/wickettest2.zip The weird thing is, this doesn't seem to happen on your examples pages for the same component, which suggests it's something I'm doing incorrectly. Despite that, the quickstart uses the simplest code I can figure... I hope someone can help, or suggest a work-around or just shed some light on the subject. :) Cheers, Col. WARN - RequestListenerInterface - behavior not enabled; ignore call. Behavior org.apache.wicket.ajax.markup.html.AjaxFallbackLink$1@69ba045 at component [AjaxFallbackLink [Component id = junction]] WARN - RequestCycleExtra - WARN - RequestCycleExtra - Handling the following exception org.apache.wicket.core.request.handler.ListenerInvocationNotAllowedException: Behavior rejected interface invocation. Component: [AjaxFallbackLink [Component id = junction]] Behavior: org.apache.wicket.ajax.markup.html.AjaxFallbackLink$1@69ba045 Listener: [RequestListenerInterface name=IBehaviorListener, method=public abstract void org.apache.wicket.behavior.IBehaviorListener.onRequest()] at org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:237) at org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.invokeListener(ListenerInterfaceRequestHandler.java:250) at org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:236) at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:862) at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64) at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:261) at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:218) at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:289) at org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:259) at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:201) at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:282) EMAIL DISCLAIMER This email message and its attachments are confidential and may also contain copyright or privileged material. If you are not the intended recipient, you may not forward the email or disclose or use the information contained in it. If you have received this email message in error, please advise the sender immediately by replying to this email and delete the message and any associated attachments. Any views, opinions, conclusions, advice or statements expressed in this email message are those of the individual sender and should not be relied upon as the considered view, opinion, conclusions, advice or statement of this company except where the sender expressly, and with authority, states them to be the considered view, opinion, conclusions, advice or statement of this company. Every care is taken but we recommend that you scan any attachments for viruses.
RE: DataView, OrderByBorder, CheckGroup
Martin, Thanks for the explanation... so - does Wicket not store, and therefore not handle, versions of pages with different renderCounts? But above you listed only non-Ajax components. Doh! That is obvious now you mention it - thanks for the info :) Cheers, Col. -Original Message- From: Martin Grigorov [mailto:mgrigo...@apache.org] Sent: Monday, 13 October 2014 6:01 PM To: users@wicket.apache.org Subject: Re: DataView, OrderByBorder, CheckGroup Hi, On Mon, Oct 13, 2014 at 2:59 AM, Colin Rogers colin.rog...@objectconsulting.com.au wrote: Wicketeers, I don't know if this is a bug, bad coding on my behalf or incompatible components or what not. It's only a minor thing, but I thought it worth raising (as usually, I end up learning something). I've created a quickstart, here; http://tenthart.com/wickettest2.zip The basic thing is that I have a DataView, with columns organised with an OrderByBorder component. Wrapping those, I have a CheckGroup. It's the CheckGroup that seems to trigger a weird behaviour in that the pageId doesn't increment when the OrderByBorder link is clicked. This has the knock on that StalePageException are raised (and handled) when going back through history or more often, when opening links in new window (click 'open in new window' and then click the link again the original window). The affects are minor - the page refreshing and the click being ignored, so nothing majorly important. When you copy the url from the address bar from one tab/window to another the page id stays the same but another special counter changes - Page#renderCount. When you load the page in the second tab/window the renderCount increments with 1. If you use non-Ajax components/behaviors to interact with the page it may increment even more. Later when you go back to the first tab/window and try to use any component (Ajax or not) Wicket will check whether the the renderCount in the request url (e.g. in '3-1-ILinkListener~some~component' '3' is the pageId and '1' is the renderCount) matches with the renderCount of the page with id 3 in the pages' store. If it doesn't then a special PageStaleException is being thrown and Wicket just renders the page with its latest state and respectively renderCount+1. This is needed to prevent using stale/obsolete version of the page. E.g. if in the second tab/window you remove a panel for some entity and this panel contains a child component a link to edit this entity then trying to click on this link in the first tab/window will end with ComponentNotFoundException if there was no such check. Also, as an aside, the Wicket Debug box seems to have disappeared. I haven't checked what is the reason for this to disappear. But above you listed only non-Ajax components. The Ajax debug window appears only if there is an Ajax behavior in the rendered page. Lately I don't see any usefulness in Ajax Debug Window. All the information is available in the browser's Dev tools. Anyway, has anyone got advice on this? Is it a bug? Cheers, Col. EMAIL DISCLAIMER This email message and its attachments are confidential and may also contain copyright or privileged material. If you are not the intended recipient, you may not forward the email or disclose or use the information contained in it. If you have received this email message in error, please advise the sender immediately by replying to this email and delete the message and any associated attachments. Any views, opinions, conclusions, advice or statements expressed in this email message are those of the individual sender and should not be relied upon as the considered view, opinion, conclusions, advice or statement of this company except where the sender expressly, and with authority, states them to be the considered view, opinion, conclusions, advice or statement of this company. Every care is taken but we recommend that you scan any attachments for viruses. EMAIL DISCLAIMER This email message and its attachments are confidential and may also contain copyright or privileged material. If you are not the intended recipient, you may not forward the email or disclose or use the information contained in it. If you have received this email message in error, please advise the sender immediately by replying to this email and delete the message and any associated attachments. Any views, opinions, conclusions, advice or statements expressed in this email message are those of the individual sender and should not be relied upon as the considered view, opinion, conclusions, advice or statement of this company except where the sender expressly, and with authority, states them to be the considered view, opinion, conclusions, advice or statement of this company. Every care is taken but we recommend that you scan any attachments for viruses.
DataView, OrderByBorder, CheckGroup
Wicketeers, I don't know if this is a bug, bad coding on my behalf or incompatible components or what not. It's only a minor thing, but I thought it worth raising (as usually, I end up learning something). I've created a quickstart, here; http://tenthart.com/wickettest2.zip The basic thing is that I have a DataView, with columns organised with an OrderByBorder component. Wrapping those, I have a CheckGroup. It's the CheckGroup that seems to trigger a weird behaviour in that the pageId doesn't increment when the OrderByBorder link is clicked. This has the knock on that StalePageException are raised (and handled) when going back through history or more often, when opening links in new window (click 'open in new window' and then click the link again the original window). The affects are minor - the page refreshing and the click being ignored, so nothing majorly important. Also, as an aside, the Wicket Debug box seems to have disappeared. Anyway, has anyone got advice on this? Is it a bug? Cheers, Col. EMAIL DISCLAIMER This email message and its attachments are confidential and may also contain copyright or privileged material. If you are not the intended recipient, you may not forward the email or disclose or use the information contained in it. If you have received this email message in error, please advise the sender immediately by replying to this email and delete the message and any associated attachments. Any views, opinions, conclusions, advice or statements expressed in this email message are those of the individual sender and should not be relied upon as the considered view, opinion, conclusions, advice or statement of this company except where the sender expressly, and with authority, states them to be the considered view, opinion, conclusions, advice or statement of this company. Every care is taken but we recommend that you scan any attachments for viruses.
RE: Question / Best Practise / (List)Model vs. (List)DataProvider
The way I see (right or wrong!) is, You create/manage Models for individual components on a case-by-case basis. For Repeaters which internal components are dynamically created, you need a DataProvider to create and manage those Models for the components and the Collections that comprise their data. DataProvider could be described as a 'Model Factory', and is not a Model in itself. Cheers, Col. -Original Message- From: Sven Meier [mailto:s...@meiers.net] Sent: Friday, 16 May 2014 6:17 AM To: users@wicket.apache.org Subject: Re: Question / Best Practise / (List)Model vs. (List)DataProvider IDataProvider is all about efficiency, it provides efficient access to a subset of the data. Perhaps we can make it even more efficient with the recent proposal on the @dev list. Regards Sven On 05/08/2014 01:37 PM, Patrick Davids wrote: Hi all, what I often think about, and I cannot really say is; when to use Model or DataProvider as data providing object for components they repeat some thing? Javadoc says, DataProvider are (good) for DataViews. Hmm... ok, and they allow easer iterating (first index, count). I also can achieve this by using a LoadableDetachableModelList combined with a ModelIteratorAdapater. Both have detaching logic... both featuring extension, both have a sort of load-method (getObject() vs. getData()). Sometimes I think, they are so similar to each other... where is the key difference? Would be cool if some of yours just reply his two cents of daily programming experience... so I can get some new point of views. When do you use DataProvider or ModelList? Did you experienced the same, not to exactly know which one you will use for your new page/panel/component? And often think about pro and cons using it with RepeatingViews? And later on, you see... I could have used both... hmm... thanx a lot for feedback and kind regards Patrick - 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 EMAIL DISCLAIMER This email message and its attachments are confidential and may also contain copyright or privileged material. If you are not the intended recipient, you may not forward the email or disclose or use the information contained in it. If you have received this email message in error, please advise the sender immediately by replying to this email and delete the message and any associated attachments. Any views, opinions, conclusions, advice or statements expressed in this email message are those of the individual sender and should not be relied upon as the considered view, opinion, conclusions, advice or statement of this company except where the sender expressly, and with authority, states them to be the considered view, opinion, conclusions, advice or statement of this company. Every care is taken but we recommend that you scan any attachments for viruses. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: Progress Bar
There is a pretty nifty, jquery based progress bar, in wicket-jquery-ui library... http://www.7thweb.net/wicket-jquery-ui/progressbar/DefaultProgressBarPage Cheers, Col. -Original Message- From: Richard W. Adams [mailto:rwada...@up.com] Sent: Tuesday, 6 May 2014 3:19 AM To: users@wicket.apache.org Subject: Progress Bar We have a requirement to implement a progress bar for long-running server operations. We can't use the code at https://github.com/wicketstuff/core/wiki/Progressbar, because it doesn't meet our corporate user interface look-and-feel standards. So, we started our own implementation. Our test page contains these methods below (the TestExecutor below class implements CallableExecutorResult). //-- private Component createButton() { return new AjaxButton(start-button) { private static final long serialVersionUID = -1; @Override protected void onSubmit(final AjaxRequestTarget ajax, final Form? form) { final ExecutorService service = Executors. newSingleThreadExecutor(); try { final ProgressBarTestPage page = ProgressBarTestPage.this; final TransactionData data = new TransactionData (page.getId(), false); final TestExecutor executor = new TestExecutor(data, getPermissions()); executor.addListener(page); // Request notification when done future = service.submit(executor); // Begin execution progressBarUpdater.start(ajax, executor); // Start polling for progress } catch (final Exception ex) { throw new RuntimeException(ex); } service.shutdown(); // Terminate gracefully (VM probably } // won't exit if we fail to do this) }; } //-- /** Observer Pattern method to let us know when the task is done so we can check how things went. */ @Override public void executionComplete(final EnmCallableExecutor executor) { try { if (!future.isCancelled()) {// Unless execution was canceled final ExecutorResult result = future.get(); // Get the outcome System.out.println(result); /* * TODO: Show success or error message */ } } catch (final Exception ex) { ex.printStackTrace(); } } The ProgessBarUpdater class has this method: //-- /** * Displays the progress bar amp; begins the polling. We don't start the polling until * explicitly told to do, for efficiency purposes. * @param ajax The Ajax request wrapper. * @param reporter The object to query for progress data. */ public void start(final AjaxRequestTarget ajax, final ProgressReporter reporter) { add(new AjaxSelfUpdatingTimerBehavior(Duration.seconds(2)) { private static final long serialVersionUID = 1L; @Override protected void onPostProcessTarget(final AjaxRequestTarget ajax) { final Progress progress = reporter.getProgress(); final String script = // Build script to update ProgressScript.build(progress); // progress bar ajax.appendJavascript(script); if (progress == null) { // If operation is finished final ProgressBarUpdater updater = ProgressBarUpdater.this; updater.remove(this); // Stop timer to prevent ajax.addComponent(updater); // pointless polling } } }); ajax.addComponent(this); } The page also contains a Future object so we can check the result after the thread finishes: private FutureExecutorResult future; __ Having said all that, here's the problem: When I click the page's button, Wicket throws this error: Unable to serialize class: java.util.concurrent.FutureTask The FutureTask object, I believe, is coming from the service.submit call whose return value we store in our Future variable. Does anyone know how to get around this roadblock? ** This email and any attachments may contain information that is confidential
RE: Components can no longer be added
Sven, once rendering of components via Ajax has started, you cannot update components. But at the moment when this happens, we are in the onConfigure() part of the lifecycle. Which is before onBeforeRender(), and hence components should've have started rendering... but that is minor as... You should just add all expanded nodes to your tree's model. That's faster and won't trigger any updates: Brilliant! I didn't realize that tree model was the *expanded* nodes, but it makes sense since you now say it... Thanks! This works great and gets round any other issues. :) Cheers, Col. -Original Message- From: Sven Meier [mailto:s...@meiers.net] Sent: Monday, December 9, 2013 8:01 PM To: users@wicket.apache.org Subject: Re: Components can no longer be added Hi, once rendering of components via Ajax has started, you cannot update components. AbstractTree#expand() is a convenience method that updates the expanded branch automatically, hence you get the IllegalStateException. You should just add all expanded nodes to your tree's model. That's faster and won't trigger any updates: tree.getModel().addAll(addNodes); If you always start with all nodes expanded, you might want to use a custom set, which inverses its contents. See org.apache.wicket.examples.tree.FooExpansion for inspiration. Regards Sven On 12/09/2013 06:28 AM, Colin Rogers wrote: Wicketeers, I have another hard-to-track down issue. To make matters worse, I've actually taken this code/pattern, put it into a quickstart - and what do you know - it works fine...! This means I have no way to recreate this error in a demonstrable way. Hopefully if I throw this out there, someone might be able to describe the error and I can then determine what I'm doing to cause it. Unfortunately google has zero results for; +Components can no longer be added +wicket Anyway... the exception I'm getting is; java.lang.IllegalStateException: Components can no longer be added at org.apache.wicket.ajax.AbstractAjaxResponse.assertNotFrozen(AbstractAjaxResponse.java:740) at org.apache.wicket.ajax.AbstractAjaxResponse.assertComponentsNotFrozen(AbstractAjaxResponse.java:733) at org.apache.wicket.ajax.AbstractAjaxResponse.add(AbstractAjaxResponse.java:358) at org.apache.wicket.ajax.AjaxRequestHandler.add(AjaxRequestHandler.java:239) at org.apache.wicket.ajax.AjaxRequestHandler.add(AjaxRequestHandler.java:232) at org.apache.wicket.extensions.markup.html.repeater.tree.TableTree.updateBranch(TableTree.java:178) at org.apache.wicket.extensions.markup.html.repeater.tree.AbstractTree.expand(AbstractTree.java:204) at myapp.TreeUtils.expandNode(TreeUtils.java:25) at myapp.TreeUtils.expandAll(TreeUtils.java:19) It is caused when refreshing a table-tree component, that had previous rendered correctly and had successfully expanded the nodes. This problem happens when the table-trees parent component is refreshed, in which the table is rebuilt from new, and replaced the old table. Having debugged the code, it's something to do with the AjaxRequestHandler that has been retrieved - in that it's components are 'frozen'. It's odd as I'm in the onConfigure() part of the lifecycle, and therefore components should be okay to be added - especially as they are brand new components. Could the AjaxRequestHandler being retrieved be the wrong one, stale one? List I said - I can't recreate it in a Quickstart, so there is obviously something else in the 100k+s of the projects code that is doing something else to mess it up. The 'Tree Utils' class looks like this; public class TreeUtils { @SuppressWarnings(unchecked) public static void expandAll( AbstractTree? tree ) { // stupid cast!! Has to happen for use to retrieve the roots, generically. AbstractTreeObject castTree = (AbstractTreeObject) tree; Iterator? roots = tree.getProvider().getRoots(); while( roots.hasNext() ) { Object root = roots.next(); expandNode( castTree, root ); } } private static void expandNode( AbstractTreeObject tree, Object node) { tree.expand(node); Iterator? children = tree.getProvider().getChildren(node); while( children.hasNext() ) { Object child = children.next(); expandNode( tree, child ); } } } Any pointers and tips would be greatly appreciated. Cheers, Col. EMAIL DISCLAIMER This email message and its attachments are confidential and may also contain copyright or privileged material. If you are not the intended recipient, you may not forward the email or disclose or use the information contained in it. If you have received this email message in error, please advise the sender immediately by replying to this email and delete the message and any associated attachments. Any views
Components can no longer be added
Wicketeers, I have another hard-to-track down issue. To make matters worse, I've actually taken this code/pattern, put it into a quickstart - and what do you know - it works fine...! This means I have no way to recreate this error in a demonstrable way. Hopefully if I throw this out there, someone might be able to describe the error and I can then determine what I'm doing to cause it. Unfortunately google has zero results for; +Components can no longer be added +wicket Anyway... the exception I'm getting is; java.lang.IllegalStateException: Components can no longer be added at org.apache.wicket.ajax.AbstractAjaxResponse.assertNotFrozen(AbstractAjaxResponse.java:740) at org.apache.wicket.ajax.AbstractAjaxResponse.assertComponentsNotFrozen(AbstractAjaxResponse.java:733) at org.apache.wicket.ajax.AbstractAjaxResponse.add(AbstractAjaxResponse.java:358) at org.apache.wicket.ajax.AjaxRequestHandler.add(AjaxRequestHandler.java:239) at org.apache.wicket.ajax.AjaxRequestHandler.add(AjaxRequestHandler.java:232) at org.apache.wicket.extensions.markup.html.repeater.tree.TableTree.updateBranch(TableTree.java:178) at org.apache.wicket.extensions.markup.html.repeater.tree.AbstractTree.expand(AbstractTree.java:204) at myapp.TreeUtils.expandNode(TreeUtils.java:25) at myapp.TreeUtils.expandAll(TreeUtils.java:19) It is caused when refreshing a table-tree component, that had previous rendered correctly and had successfully expanded the nodes. This problem happens when the table-trees parent component is refreshed, in which the table is rebuilt from new, and replaced the old table. Having debugged the code, it's something to do with the AjaxRequestHandler that has been retrieved - in that it's components are 'frozen'. It's odd as I'm in the onConfigure() part of the lifecycle, and therefore components should be okay to be added - especially as they are brand new components. Could the AjaxRequestHandler being retrieved be the wrong one, stale one? List I said - I can't recreate it in a Quickstart, so there is obviously something else in the 100k+s of the projects code that is doing something else to mess it up. The 'Tree Utils' class looks like this; public class TreeUtils { @SuppressWarnings(unchecked) public static void expandAll( AbstractTree? tree ) { // stupid cast!! Has to happen for use to retrieve the roots, generically. AbstractTreeObject castTree = (AbstractTreeObject) tree; Iterator? roots = tree.getProvider().getRoots(); while( roots.hasNext() ) { Object root = roots.next(); expandNode( castTree, root ); } } private static void expandNode( AbstractTreeObject tree, Object node) { tree.expand(node); Iterator? children = tree.getProvider().getChildren(node); while( children.hasNext() ) { Object child = children.next(); expandNode( tree, child ); } } } Any pointers and tips would be greatly appreciated. Cheers, Col. EMAIL DISCLAIMER This email message and its attachments are confidential and may also contain copyright or privileged material. If you are not the intended recipient, you may not forward the email or disclose or use the information contained in it. If you have received this email message in error, please advise the sender immediately by replying to this email and delete the message and any associated attachments. Any views, opinions, conclusions, advice or statements expressed in this email message are those of the individual sender and should not be relied upon as the considered view, opinion, conclusions, advice or statement of this company except where the sender expressly, and with authority, states them to be the considered view, opinion, conclusions, advice or statement of this company. Every care is taken but we recommend that you scan any attachments for viruses.
RE: Components can no longer be added
Yeah, I know exactly what you mean - I'm sure it's something I'm doing! :) I might have to do as you suggest... I was just hoping for a 'you'd only get this error if you'd done something stupid like' and give me something to go on! ;) Cheers, Col. -Original Message- From: Bernard [mailto:bht...@gmail.com] Sent: Monday, December 9, 2013 5:23 PM To: users@wicket.apache.org Subject: Re: Components can no longer be added Hi, I am an expert in shooting myself in the foot with Wicket / Java problems. In a situation like this, I would do the same as you do - isolate the pattern and make a quickstart. Unfortunately, this approach is full of assumptions, and my statistics say that this succeeds only in 20% of all cases. So I usually have to do it the hard way: Take a copy of the application and strip it down generation by generation until the culprit is isolated in its most simplistic form. I think in 50% of all cases, I could see my own fault. In the other 50% I submitted a Wicket jira issue, where again in 50% of these it was my fault not Wicket. Regards, Bernard On Mon, 9 Dec 2013 05:28:52 +, you wrote: Wicketeers, I have another hard-to-track down issue. To make matters worse, I've actually taken this code/pattern, put it into a quickstart - and what do you know - it works fine...! This means I have no way to recreate this error in a demonstrable way. Hopefully if I throw this out there, someone might be able to describe the error and I can then determine what I'm doing to cause it. Unfortunately google has zero results for; +Components can no longer be added +wicket Anyway... the exception I'm getting is; java.lang.IllegalStateException: Components can no longer be added at org.apache.wicket.ajax.AbstractAjaxResponse.assertNotFrozen(AbstractAjaxResponse.java:740) at org.apache.wicket.ajax.AbstractAjaxResponse.assertComponentsNotFrozen(AbstractAjaxResponse.java:733) at org.apache.wicket.ajax.AbstractAjaxResponse.add(AbstractAjaxResponse.java:358) at org.apache.wicket.ajax.AjaxRequestHandler.add(AjaxRequestHandler.java:239) at org.apache.wicket.ajax.AjaxRequestHandler.add(AjaxRequestHandler.java:232) at org.apache.wicket.extensions.markup.html.repeater.tree.TableTree.updateBranch(TableTree.java:178) at org.apache.wicket.extensions.markup.html.repeater.tree.AbstractTree.expand(AbstractTree.java:204) at myapp.TreeUtils.expandNode(TreeUtils.java:25) at myapp.TreeUtils.expandAll(TreeUtils.java:19) It is caused when refreshing a table-tree component, that had previous rendered correctly and had successfully expanded the nodes. This problem happens when the table-trees parent component is refreshed, in which the table is rebuilt from new, and replaced the old table. Having debugged the code, it's something to do with the AjaxRequestHandler that has been retrieved - in that it's components are 'frozen'. It's odd as I'm in the onConfigure() part of the lifecycle, and therefore components should be okay to be added - especially as they are brand new components. Could the AjaxRequestHandler being retrieved be the wrong one, stale one? List I said - I can't recreate it in a Quickstart, so there is obviously something else in the 100k+s of the projects code that is doing something else to mess it up. The 'Tree Utils' class looks like this; public class TreeUtils { @SuppressWarnings(unchecked) public static void expandAll( AbstractTree? tree ) { // stupid cast!! Has to happen for use to retrieve the roots, generically. AbstractTreeObject castTree = (AbstractTreeObject) tree; Iterator? roots = tree.getProvider().getRoots(); while( roots.hasNext() ) { Object root = roots.next(); expandNode( castTree, root ); } } private static void expandNode( AbstractTreeObject tree, Object node) { tree.expand(node); Iterator? children = tree.getProvider().getChildren(node); while( children.hasNext() ) { Object child = children.next(); expandNode( tree, child ); } } } Any pointers and tips would be greatly appreciated. Cheers, Col. EMAIL DISCLAIMER This email message and its attachments are confidential and may also contain copyright or privileged material. If you are not the intended recipient, you may not forward the email or disclose or use the information contained in it. If you have received this email message in error, please advise the sender immediately by replying to this email and delete the message and any associated attachments. Any views, opinions, conclusions, advice or statements expressed in this email message are those of the individual sender and should not be relied upon as the considered view, opinion, conclusions, advice or statement of this company except where the sender expressly, and with authority, states them to be the considered view,
ComponentRenderer
Wicketeers, I have a problem when using ComponentRenderer in an actual live cycle. I assume it's not actually intended for this use, and hence the errors, but if I explain the issue, maybe someone can suggest an alternative or a workaround. So... we have a set of 'pages' in a pageflow that update the main panel of a page with each button click - effectively a Wizard - but using our own component, rather than the standard one. Each step is updated via Ajax. Our requirement - as odd as it is, is... we have a bunch of steps. We then eventually have a 'summary step'. For this step, we need to take a copy of the HTML, and render it to PDF, so in the next step, we can download a PDF version of the summary. The rendering of HTML to PDF is all fine, and saving as a resource - that all fine, too. Basically - the error we end up with is an Ajax error - where the XML response is malformed. A fresh copy of the component/panel is returned, plus a second ajaxResponse tag that has a random page redirect. It's this second ajax response that is ultimately the issue. We've tried adding code to onConfigure(), onBeforeRender() or onAfterRender() - we've also been cloneing the object (via WicketObjects) - with extra code not to repeat the method, etc. I assume, because ComponentRenderer still uses the current 'live' response object, that two responses are being given, and the browser is then confused. Is there anyway to either work round the issues above - using dummy requests, or is there another way to get the generated HTML via page cache or something else? I'm really open to any ideas! :) Cheers, Col. EMAIL DISCLAIMER This email message and its attachments are confidential and may also contain copyright or privileged material. If you are not the intended recipient, you may not forward the email or disclose or use the information contained in it. If you have received this email message in error, please advise the sender immediately by replying to this email and delete the message and any associated attachments. Any views, opinions, conclusions, advice or statements expressed in this email message are those of the individual sender and should not be relied upon as the considered view, opinion, conclusions, advice or statement of this company except where the sender expressly, and with authority, states them to be the considered view, opinion, conclusions, advice or statement of this company. Every care is taken but we recommend that you scan any attachments for viruses.
RE: NullAjaxRequestTarget
Martin, Ah, wicked! Thanks! :) Cheers, Col. -Original Message- From: Martin Grigorov [mailto:mgrigo...@apache.org] Sent: Monday, October 28, 2013 7:11 PM To: users@wicket.apache.org Subject: Re: NullAjaxRequestTarget Hi, It is a known issue: https://issues.apache.org/jira/browse/WICKET-3317 You can also check the mail archives for the discussions On Mon, Oct 28, 2013 at 7:41 AM, Colin Rogers colin.rog...@objectconsulting.com.au wrote: Wicketeers, I have a minor issue, rather than any bug, and thought I'd throw it out there. We tend to use a lot of AjaxFallbackLinks, for obvious reasons. The biggest problem of AjaxFallbackLink is the line of code; @Override public final void onClick() { onClick(null); } Because null can potentially be passed to the onClick(AjaxRequestTarget target) method, in every case we has to use code as; If( target != null ) { target.add(...); } Ad infinitum. When we don't we are potentially letting in bugs each time and 99 times out of 100 developers will forget, which means we have bugs that usually only trigger when a user does a open in new window click or if they've happened to turn of JavaScript - so while they are difficult for the user to trigger they are still there. Is there any chance of un-finalising onClick(), or better yet, having it provide a Null Object (http://en.wikipedia.org/wiki/Null_Object_pattern) instead of null, in order to reduce developer effort and reduce hard to find bugs? Obviously this is a minor, minor thing... Cheers, Col. EMAIL DISCLAIMER This email message and its attachments are confidential and may also contain copyright or privileged material. If you are not the intended recipient, you may not forward the email or disclose or use the information contained in it. If you have received this email message in error, please advise the sender immediately by replying to this email and delete the message and any associated attachments. Any views, opinions, conclusions, advice or statements expressed in this email message are those of the individual sender and should not be relied upon as the considered view, opinion, conclusions, advice or statement of this company except where the sender expressly, and with authority, states them to be the considered view, opinion, conclusions, advice or statement of this company. Every care is taken but we recommend that you scan any attachments for viruses. EMAIL DISCLAIMER This email message and its attachments are confidential and may also contain copyright or privileged material. If you are not the intended recipient, you may not forward the email or disclose or use the information contained in it. If you have received this email message in error, please advise the sender immediately by replying to this email and delete the message and any associated attachments. Any views, opinions, conclusions, advice or statements expressed in this email message are those of the individual sender and should not be relied upon as the considered view, opinion, conclusions, advice or statement of this company except where the sender expressly, and with authority, states them to be the considered view, opinion, conclusions, advice or statement of this company. Every care is taken but we recommend that you scan any attachments for viruses.
NullAjaxRequestTarget
Wicketeers, I have a minor issue, rather than any bug, and thought I'd throw it out there. We tend to use a lot of AjaxFallbackLinks, for obvious reasons. The biggest problem of AjaxFallbackLink is the line of code; @Override public final void onClick() { onClick(null); } Because null can potentially be passed to the onClick(AjaxRequestTarget target) method, in every case we has to use code as; If( target != null ) { target.add(...); } Ad infinitum. When we don't we are potentially letting in bugs each time and 99 times out of 100 developers will forget, which means we have bugs that usually only trigger when a user does a open in new window click or if they've happened to turn of JavaScript - so while they are difficult for the user to trigger they are still there. Is there any chance of un-finalising onClick(), or better yet, having it provide a Null Object (http://en.wikipedia.org/wiki/Null_Object_pattern) instead of null, in order to reduce developer effort and reduce hard to find bugs? Obviously this is a minor, minor thing... Cheers, Col. EMAIL DISCLAIMER This email message and its attachments are confidential and may also contain copyright or privileged material. If you are not the intended recipient, you may not forward the email or disclose or use the information contained in it. If you have received this email message in error, please advise the sender immediately by replying to this email and delete the message and any associated attachments. Any views, opinions, conclusions, advice or statements expressed in this email message are those of the individual sender and should not be relied upon as the considered view, opinion, conclusions, advice or statement of this company except where the sender expressly, and with authority, states them to be the considered view, opinion, conclusions, advice or statement of this company. Every care is taken but we recommend that you scan any attachments for viruses.
RE: Add or remove a row in RefreshingView with Ajax
Hi there, Not sure what you mean by 'does not work'... so guessing the issue, and the solution. Are you updating the whole RepeatingView? If so, you need to wrap the repeater in a WebMarkupContainer and refresh that (remembering to setOutputMarkupId to true etc.) I don't know the reason why, but repeaters have to be updated via their parent container. Cheers, Col. -Original Message- From: MartinoSuperman [mailto:martinosuper...@live.nl] Sent: Friday, October 25, 2013 3:36 AM To: users@wicket.apache.org Subject: Add or remove a row in RefreshingView with Ajax Hi, I have a RefreshingView, which consists of TextFields, Labels and a DownloadLink. When a button is pressed, a new row should be added with the help of Ajax. Unfortunately, this does not work. Can somebody tell me what I have to program to make adding and removing rows in RefreshingView possible? Thanks in advance! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Add-or-remove-a-row-in-RefreshingView-with-Ajax-tp4661944.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 EMAIL DISCLAIMER This email message and its attachments are confidential and may also contain copyright or privileged material. If you are not the intended recipient, you may not forward the email or disclose or use the information contained in it. If you have received this email message in error, please advise the sender immediately by replying to this email and delete the message and any associated attachments. Any views, opinions, conclusions, advice or statements expressed in this email message are those of the individual sender and should not be relied upon as the considered view, opinion, conclusions, advice or statement of this company except where the sender expressly, and with authority, states them to be the considered view, opinion, conclusions, advice or statement of this company. Every care is taken but we recommend that you scan any attachments for viruses. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: p tags!
Bas, Awesome - thanks for find that! I does explain a few things... My code was something like; wicket:panel pdiv wicket:id=subComponent1/div/p div wicket:id=subComponent2/div /wicket:panel Which - from your link - would suggest this is a really bad idea... I'm pretty sure in certain cases this causes the second subComponent2 to render outside the parent, causing a break in the hierarchy, the Ajax responses to not correctly identify the existing components, and in turn causing duplicates. There is nothing special in Wicket code about p tag. I didn't think this would be a Wicket issue per se, more of DOM or JQuery issue, that had a weird knock-on effect on Wicket. I was wondering if Wicket people had experience of it. I think the upshot of this; don't use p tags for random formatting! :) Thanks Martin and Bas - all interesting stuff - I appreciate your inputs! :) Cheers, Col. From: Bas Gooren [b...@iswd.nl] Sent: 10 September 2013 05:52 To: users@wicket.apache.org Subject: Re: p tags! Could it be related to http://stackoverflow.com/questions/10763780/putting-div-inside-p-is-adding-an-extra-p ? I've seen odd behavior before when using block-level elements inside p-tags. However, from your e-mail it's not entirely clear what your html looks like. Subcomponents of mainpanel were wrapped in p-tags does sound like you may have divs inside p tags. Met vriendelijke groet, Kind regards, Bas Gooren Op 9-9-2013 4:28, schreef Colin Rogers: Wicketeers! I have an odd bug, that has been resolved, but I it doesn't explain what and why the issue existed - and with a view to avoiding the issue in future, I thought I should seek some wisdom! :) Basically - I have a application where the 'main panel' is replaced as a link is clicked (along with other panels, too) - oddly, when I hit certain links repeatedly, instead of the mainPanel simply replacing the old version and updating, it produced duplicates - no duplicates in the other panels, just the mainPanel. Meaning I had the same panel repeated from each click down the page. After tons of reverting on code, hacking and experimenting, I finally found the culprit... yep; p tags. When any of my sub-components of mainPanel were wrapped in p tags, it caused the parent to duplicate instead of replace. Replace the p tag with a div and everything works fine. So obviously I have a perfectly good solution! Does anyone have an explanation for this? I'm totally stumped as to why p tags would cause issues in the DOM? Cheers, Col. EMAIL DISCLAIMER This email message and its attachments are confidential and may also contain copyright or privileged material. If you are not the intended recipient, you may not forward the email or disclose or use the information contained in it. If you have received this email message in error, please advise the sender immediately by replying to this email and delete the message and any associated attachments. Any views, opinions, conclusions, advice or statements expressed in this email message are those of the individual sender and should not be relied upon as the considered view, opinion, conclusions, advice or statement of this company except where the sender expressly, and with authority, states them to be the considered view, opinion, conclusions, advice or statement of this company. Every care is taken but we recommend that you scan any attachments for viruses. EMAIL DISCLAIMER This email message and its attachments are confidential and may also contain copyright or privileged material. If you are not the intended recipient, you may not forward the email or disclose or use the information contained in it. If you have received this email message in error, please advise the sender immediately by replying to this email and delete the message and any associated attachments. Any views, opinions, conclusions, advice or statements expressed in this email message are those of the individual sender and should not be relied upon as the considered view, opinion, conclusions, advice or statement of this company except where the sender expressly, and with authority, states them to be the considered view, opinion, conclusions, advice or statement of this company. Every care is taken but we recommend that you scan any attachments for viruses. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
p tags!
Wicketeers! I have an odd bug, that has been resolved, but I it doesn't explain what and why the issue existed - and with a view to avoiding the issue in future, I thought I should seek some wisdom! :) Basically - I have a application where the 'main panel' is replaced as a link is clicked (along with other panels, too) - oddly, when I hit certain links repeatedly, instead of the mainPanel simply replacing the old version and updating, it produced duplicates - no duplicates in the other panels, just the mainPanel. Meaning I had the same panel repeated from each click down the page. After tons of reverting on code, hacking and experimenting, I finally found the culprit... yep; p tags. When any of my sub-components of mainPanel were wrapped in p tags, it caused the parent to duplicate instead of replace. Replace the p tag with a div and everything works fine. So obviously I have a perfectly good solution! Does anyone have an explanation for this? I'm totally stumped as to why p tags would cause issues in the DOM? Cheers, Col. EMAIL DISCLAIMER This email message and its attachments are confidential and may also contain copyright or privileged material. If you are not the intended recipient, you may not forward the email or disclose or use the information contained in it. If you have received this email message in error, please advise the sender immediately by replying to this email and delete the message and any associated attachments. Any views, opinions, conclusions, advice or statements expressed in this email message are those of the individual sender and should not be relied upon as the considered view, opinion, conclusions, advice or statement of this company except where the sender expressly, and with authority, states them to be the considered view, opinion, conclusions, advice or statement of this company. Every care is taken but we recommend that you scan any attachments for viruses.
RE: wicket single page application: replacing panels with ajax and back button support
Hi there, I'm doing something in my code similar to what you are suggesting. The way I do it is basically, each page that I'm navigation to, I call a method 'cleverLink' rather than 'setResponsePage'. 'cleverLink' takes in a AjaxRequestTarget. That method then determines whether the page is swappable - if it's not it just sets the ResponsePage as normal. For the page to be swappable (in my code) the old page and the new page have to have the same entity, and be of the same base page class. Otherwise, things start breaking down! If the page has the same model, then I create the newPage, using the existing pageParameters/model, and simply access each of the main components using getters. Then, in the existing page, I replace (titlePanel, mainPanel, actionPanel etc.). I then clone these objects using 'WicketObjects' utility class (so as not to effect the 'new page') and 'replace' them in the existing old page, marking each one for update via the ajax target. I then use a javascript 'historyPush' event to push the new URL to the browser, with the new Page ID from the new page (via getPageId() ), and the available pageParameters (there is a Wicket class that is good at resolving PageParameters - I can't remember what it is, and haven't my code to look it up). In order to get the page URLs is actually a massive pain for Wicket, especially if you us a combination of 'X', 'X/Y', 'X/Y/Z' paths. For this I have a utility method in my WicketApplication class to hold a map of the paths, created when mounting, for easy lookups. I still had problems with paths, and resorted to only one level in the end, as it was easier and less error prone. You'll need to add some code to redirect via javascript, on back button presses, to the relevant page - but that is something there are plenty of articles on the net about that. It's not very efficient (as a back button press does a redirect), but it does work. The net result is - each page has certain elements updated, and the URL is always correct, the back button works as does bookmarking. It's non-trivial and very specific to mine/your code, but it does work! Mine works on the basis that I only replace certain panels of a page (and leave some) so it has limitations when moving from one page, to another, with a different model and or base page. Hope that is as clear as mud! I'm sure this is breaking *something* in Wicket's standard model, so any ideas, improvements or pointers are welcome! Cheers, Col. From: Maxim Solodovnik [solomax...@gmail.com] Sent: 26 August 2013 01:22 To: users@wicket.apache.org Subject: Re: wicket single page application: replacing panels with ajax and back button support we did it in Apache Openmeetings project https://svn.apache.org/repos/asf/openmeetings/trunk/singlewebapp/src/main/java/org/apache/openmeetings/web/ not sure if it can be used as an example :) but it is working :) On Sun, Aug 25, 2013 at 5:54 PM, Ilkka Seppälä iluwa...@gmail.com wrote: Hi, I'm guessing this is a common way to use Wicket but could not find solution. I want to create a single page application where navigation causes panels to be replaced with ajax. But the immediate problem that rises is how to make these different views bookmarkable and how to make browser's back button work as expected (return to previous view with the previous panel). -Ilkka -- WBR Maxim aka solomax EMAIL DISCLAIMER This email message and its attachments are confidential and may also contain copyright or privileged material. If you are not the intended recipient, you may not forward the email or disclose or use the information contained in it. If you have received this email message in error, please advise the sender immediately by replying to this email and delete the message and any associated attachments. Any views, opinions, conclusions, advice or statements expressed in this email message are those of the individual sender and should not be relied upon as the considered view, opinion, conclusions, advice or statement of this company except where the sender expressly, and with authority, states them to be the considered view, opinion, conclusions, advice or statement of this company. Every care is taken but we recommend that you scan any attachments for viruses. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: Multi select transfer widget
Michael, The component I think you mean is the Palette; http://www.mkyong.com/wicket/wicket-palette-example/ http://www.wicket-library.com/wicket-examples/compref/wicket/bookmarkable/org.apache.wicket.examples.compref.PalettePage?1 Cheers, Col. From: Michael Chandler [michael.chand...@onassignment.com] Sent: 22 August 2013 07:08 To: users@wicket.apache.org Subject: Multi select transfer widget Hi there, Is anyone aware of a good example of a multi-select transfer widget in Wicket? To be more precise, I'm talking about two multiselect drop down choice select boxes where the left box serves as a collection of available choices and the right box serves as the actual selection(s) from the possible choices. A button would allow you to move highlighted choices from the left box to the right box. There are a number of simple ways to pull it off, but I wanted to see if anyone knew of a nifty Wicket example before I began to head down that road on my own. Thanks! Mike EMAIL DISCLAIMER This email message and its attachments are confidential and may also contain copyright or privileged material. If you are not the intended recipient, you may not forward the email or disclose or use the information contained in it. If you have received this email message in error, please advise the sender immediately by replying to this email and delete the message and any associated attachments. Any views, opinions, conclusions, advice or statements expressed in this email message are those of the individual sender and should not be relied upon as the considered view, opinion, conclusions, advice or statement of this company except where the sender expressly, and with authority, states them to be the considered view, opinion, conclusions, advice or statement of this company. Every care is taken but we recommend that you scan any attachments for viruses.
RE: A Wicket in Ruby
Mike, I've never used Scala + Wicket - but the idea doesn't worry me. For specific Scala issues, I'm sure that there is plenty of help, and for the Wicket stuff, the API is identical, and everything here is totally applicable... (or at least I assume)! :) Cheers, Col. -Original Message- From: Michael Pence [mailto:mike.pe...@gmail.com] Sent: 27 June 2013 02:28 To: users@wicket.apache.org Subject: Re: A Wicket in Ruby Scala is even more expressive and powerful than Ruby, so Scala + Wicket is definitely my dream stack. I am just nervous about not having a big peer support community when things get tricky. On Jun 25, 2013, at 11:20 PM, Colin Rogers colin.rog...@objectconsulting.com.au wrote: Mike, Java is still pretty verbose, for all 'recent' improvements - I don't think that will really ever change, but then I don't see that as an issue. My personal style of coding is to write simple, obvious, testable, but ultimately verbose, code. Code that anyone can read, and understand what and why I'm attempting something - with the absolute minimum of comments. But that's just me! :) I've never understood writing one line of code, that takes five lines of comments to fully explain what and why it's attempting, when you could write 3 lines of code with no comments - and would be significantly easier to modify or extend later. When I was younger, and monitors smaller and lines constrained, I too loved ramming as much functionality into the smallest of visual spaces in code, but now I love tons of white space and simple, clean code. It's all about scroll wheels and big monitors! :) ... and Wicket and the super-fast modern JVMs... and t's still quicker and easier and ultimately less verbose to do something in Wicket/Java, than pretty much any other Web framework, IMHO - regardless of Java as a language. You could try Scala with Wicket, or Groovy with Wicket - both are native JVM languages - would these give you greater benefits to your style? Cheers, Col. -Original Message- From: Mike Pence [mailto:mike.pe...@gmail.com] Sent: 26 June 2013 06:48 To: users@wicket.apache.org Subject: Re: A Wicket in Ruby That is a good question that I have been mulling over these last few says. I think that I need to suck it up and just re-familiarize with Java -- it is less verbose, with annotations and closures now, right? -- for all of the benefits that the JVM with Wicket will bring me. I got a bit spoiled by years of Ruby, but man, do you pay for that lack of compile-time checking and type safety over and over again -- especially with regard to performance and endlessly climbing stack traces over typos. On Sun, Jun 23, 2013 at 8:25 PM, Colin Rogers colin.rog...@objectconsulting.com.au wrote: Mike, I hate to be the old cynic and doomsayer, but generally I find that whenever a two programming technologies are 'crossed' over, with the idea that you'll get the advantages of both - the exact opposite occurs and actually you end up with a technology that only has the disadvantages of both and the advantages of neither. After all, Wicket in Java works really well... how would ruby improve it over Java? Or Scala in the JVM? Or Groovy on the JVM? Like I said - sorry - I don't wish to negative, but it seems like a thankless task awaits you! :) Cheers, Col. -Original Message- From: Mike Pence [mailto:mike.pe...@gmail.com] Sent: 22 June 2013 02:21 To: users@wicket.apache.org Subject: A Wicket in Ruby So I have this crazy idea to try to write some subset of Wicket using CRuby and the variety of technologies it employs (EventMachine, etc.) Hard to know where to start though, or how best to form a mental model of what Wicket does vs. doing a straight class-to-class conversion. Maybe there is a test suite in the wicket source I should consider. Of course, there is nothing like stepping through the code to understand the lifecyle of a wicket request (and to see how it persists session data, especially). Am I crazy? EMAIL DISCLAIMER This email message and its attachments are confidential and may also contain copyright or privileged material. If you are not the intended recipient, you may not forward the email or disclose or use the information contained in it. If you have received this email message in error, please advise the sender immediately by replying to this email and delete the message and any associated attachments. Any views, opinions, conclusions, advice or statements expressed in this email message are those of the individual sender and should not be relied upon as the considered view, opinion, conclusions, advice or statement of this company except where the sender expressly, and with authority, states them to be the considered view, opinion, conclusions, advice or statement of this company. Every care is taken but we recommend that you scan any attachments for viruses
RE: A Wicket in Ruby
Mike, Java is still pretty verbose, for all 'recent' improvements - I don't think that will really ever change, but then I don't see that as an issue. My personal style of coding is to write simple, obvious, testable, but ultimately verbose, code. Code that anyone can read, and understand what and why I'm attempting something - with the absolute minimum of comments. But that's just me! :) I've never understood writing one line of code, that takes five lines of comments to fully explain what and why it's attempting, when you could write 3 lines of code with no comments - and would be significantly easier to modify or extend later. When I was younger, and monitors smaller and lines constrained, I too loved ramming as much functionality into the smallest of visual spaces in code, but now I love tons of white space and simple, clean code. It's all about scroll wheels and big monitors! :) ... and Wicket and the super-fast modern JVMs... and t's still quicker and easier and ultimately less verbose to do something in Wicket/Java, than pretty much any other Web framework, IMHO - regardless of Java as a language. You could try Scala with Wicket, or Groovy with Wicket - both are native JVM languages - would these give you greater benefits to your style? Cheers, Col. -Original Message- From: Mike Pence [mailto:mike.pe...@gmail.com] Sent: 26 June 2013 06:48 To: users@wicket.apache.org Subject: Re: A Wicket in Ruby That is a good question that I have been mulling over these last few says. I think that I need to suck it up and just re-familiarize with Java -- it is less verbose, with annotations and closures now, right? -- for all of the benefits that the JVM with Wicket will bring me. I got a bit spoiled by years of Ruby, but man, do you pay for that lack of compile-time checking and type safety over and over again -- especially with regard to performance and endlessly climbing stack traces over typos. On Sun, Jun 23, 2013 at 8:25 PM, Colin Rogers colin.rog...@objectconsulting.com.au wrote: Mike, I hate to be the old cynic and doomsayer, but generally I find that whenever a two programming technologies are 'crossed' over, with the idea that you'll get the advantages of both - the exact opposite occurs and actually you end up with a technology that only has the disadvantages of both and the advantages of neither. After all, Wicket in Java works really well... how would ruby improve it over Java? Or Scala in the JVM? Or Groovy on the JVM? Like I said - sorry - I don't wish to negative, but it seems like a thankless task awaits you! :) Cheers, Col. -Original Message- From: Mike Pence [mailto:mike.pe...@gmail.com] Sent: 22 June 2013 02:21 To: users@wicket.apache.org Subject: A Wicket in Ruby So I have this crazy idea to try to write some subset of Wicket using CRuby and the variety of technologies it employs (EventMachine, etc.) Hard to know where to start though, or how best to form a mental model of what Wicket does vs. doing a straight class-to-class conversion. Maybe there is a test suite in the wicket source I should consider. Of course, there is nothing like stepping through the code to understand the lifecyle of a wicket request (and to see how it persists session data, especially). Am I crazy? EMAIL DISCLAIMER This email message and its attachments are confidential and may also contain copyright or privileged material. If you are not the intended recipient, you may not forward the email or disclose or use the information contained in it. If you have received this email message in error, please advise the sender immediately by replying to this email and delete the message and any associated attachments. Any views, opinions, conclusions, advice or statements expressed in this email message are those of the individual sender and should not be relied upon as the considered view, opinion, conclusions, advice or statement of this company except where the sender expressly, and with authority, states them to be the considered view, opinion, conclusions, advice or statement of this company. Every care is taken but we recommend that you scan any attachments for viruses. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org EMAIL DISCLAIMER This email message and its attachments are confidential and may also contain copyright or privileged material. If you are not the intended recipient, you may not forward the email or disclose or use the information contained in it. If you have received this email message in error, please advise the sender immediately by replying to this email and delete the message and any associated attachments. Any views, opinions, conclusions, advice or statements expressed in this email message are those of the individual sender and should not be relied
RE: A Wicket in Ruby
Mike, I hate to be the old cynic and doomsayer, but generally I find that whenever a two programming technologies are 'crossed' over, with the idea that you'll get the advantages of both - the exact opposite occurs and actually you end up with a technology that only has the disadvantages of both and the advantages of neither. After all, Wicket in Java works really well... how would ruby improve it over Java? Or Scala in the JVM? Or Groovy on the JVM? Like I said - sorry - I don't wish to negative, but it seems like a thankless task awaits you! :) Cheers, Col. -Original Message- From: Mike Pence [mailto:mike.pe...@gmail.com] Sent: 22 June 2013 02:21 To: users@wicket.apache.org Subject: A Wicket in Ruby So I have this crazy idea to try to write some subset of Wicket using CRuby and the variety of technologies it employs (EventMachine, etc.) Hard to know where to start though, or how best to form a mental model of what Wicket does vs. doing a straight class-to-class conversion. Maybe there is a test suite in the wicket source I should consider. Of course, there is nothing like stepping through the code to understand the lifecyle of a wicket request (and to see how it persists session data, especially). Am I crazy? EMAIL DISCLAIMER This email message and its attachments are confidential and may also contain copyright or privileged material. If you are not the intended recipient, you may not forward the email or disclose or use the information contained in it. If you have received this email message in error, please advise the sender immediately by replying to this email and delete the message and any associated attachments. Any views, opinions, conclusions, advice or statements expressed in this email message are those of the individual sender and should not be relied upon as the considered view, opinion, conclusions, advice or statement of this company except where the sender expressly, and with authority, states them to be the considered view, opinion, conclusions, advice or statement of this company. Every care is taken but we recommend that you scan any attachments for viruses. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: setResponsePage
Martin, I do a lot of generic stuff within my code - developing common components, that dynamically determine a page based on variable criteria. Those pages then need to be initialised - using reflection - and have data and state set on them. And I also do a 'panel switching' thing - similar to Facebook - where only the parts of a page that need updating get updated, but the app pushes the 'bookmarkable' part to the browser so the page can still bookmarked, hit in browser history and refreshed, as per normal page. For that I need to create a page - using reflection - and effectively steal the parts of the new page that require updating, add that to the current page and update those elements via Ajax. Ultimately, PageProvider is a really nice way of simply selecting a page of type X, and not having to call getConstructor() - with or without PageParameters - then new instance and having tons of checked exceptions being caught all over my code. It's a nice way of passing around the combinations of Class, or Class and PageParameters, or a page instance - in a generic way. I see your point tho - I'm effectively using a Class for something it's not designed for and you shouldn't have to cater for my quirky use of it. Having said that, I could easily create my own version - that does that any more, and be lighter weight... :) Although... #setResponsePage could at least take a IRequestablePage, no? :) Cheers, Col. -Original Message- From: Martin Grigorov [mailto:mgrigo...@apache.org] Sent: 20 June 2013 16:39 To: users@wicket.apache.org Subject: Re: setResponsePage Hi, PageProvider is more an internal API. There is a ticket that it is complex and needs some kind of simplification. I don't want to expose it more to the user APIs. How exactly you find it more convenient than the current #setResponsePage() versions ? It has constructors that accept renderCount and pageId, but those are usually extracted from the request url. In your code you should not deal with them. On Thu, Jun 20, 2013 at 4:55 AM, Colin Rogers colin.rog...@objectconsulting.com.au wrote: Wicketeers, Super-minor API thing... I've started using PageProvider class within our frameworks, as it's a really convenient class for detailing pages, etc. and avoid having to use Reflection directly. With this in mind, would it be possible to overload Component#setResponsePage that takes a PageProvider or IPageProvider? Cheers, Col. EMAIL DISCLAIMER This email message and its attachments are confidential and may also contain copyright or privileged material. If you are not the intended recipient, you may not forward the email or disclose or use the information contained in it. If you have received this email message in error, please advise the sender immediately by replying to this email and delete the message and any associated attachments. Any views, opinions, conclusions, advice or statements expressed in this email message are those of the individual sender and should not be relied upon as the considered view, opinion, conclusions, advice or statement of this company except where the sender expressly, and with authority, states them to be the considered view, opinion, conclusions, advice or statement of this company. Every care is taken but we recommend that you scan any attachments for viruses. EMAIL DISCLAIMER This email message and its attachments are confidential and may also contain copyright or privileged material. If you are not the intended recipient, you may not forward the email or disclose or use the information contained in it. If you have received this email message in error, please advise the sender immediately by replying to this email and delete the message and any associated attachments. Any views, opinions, conclusions, advice or statements expressed in this email message are those of the individual sender and should not be relied upon as the considered view, opinion, conclusions, advice or statement of this company except where the sender expressly, and with authority, states them to be the considered view, opinion, conclusions, advice or statement of this company. Every care is taken but we recommend that you scan any attachments for viruses. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: Annoying wicket API Docs ... includes exmaples api docs
Using Eclipse, Maven and Maven-plugin, clicking on any source class, downloads the available sources and JavaDocs and displays them in any number of formats. :/ Especially useful when you update Wicket regularly as it keeps your sources up to date, too... 2013/6/19 Ernesto Reinaldo Barreiro reier...@gmail.com Why don't you just install the sources locally on you IDE. Them, you would have both Java doc and source code... There is no better documentation than the code itself. On Wed, Jun 19, 2013 at 9:33 AM, armandoxxx armando@dropchop.com wrote: Hey there ... Does anybody have a link of only wicket framework API docs ? The one that does not include examples docs? It's kind of annoying searching through API, you find a class which looks like something you might use and you find out it's from examples and with none descriptions whatsoever ... Regards Armando -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Annoying-wicket-API-Docs-in cludes-exmaples-api-docs-tp4659611.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 -- Regards - Ernesto Reinaldo Barreiro EMAIL DISCLAIMER This email message and its attachments are confidential and may also contain copyright or privileged material. If you are not the intended recipient, you may not forward the email or disclose or use the information contained in it. If you have received this email message in error, please advise the sender immediately by replying to this email and delete the message and any associated attachments. Any views, opinions, conclusions, advice or statements expressed in this email message are those of the individual sender and should not be relied upon as the considered view, opinion, conclusions, advice or statement of this company except where the sender expressly, and with authority, states them to be the considered view, opinion, conclusions, advice or statement of this company. Every care is taken but we recommend that you scan any attachments for viruses. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
setResponsePage
Wicketeers, Super-minor API thing... I've started using PageProvider class within our frameworks, as it's a really convenient class for detailing pages, etc. and avoid having to use Reflection directly. With this in mind, would it be possible to overload Component#setResponsePage that takes a PageProvider or IPageProvider? Cheers, Col. EMAIL DISCLAIMER This email message and its attachments are confidential and may also contain copyright or privileged material. If you are not the intended recipient, you may not forward the email or disclose or use the information contained in it. If you have received this email message in error, please advise the sender immediately by replying to this email and delete the message and any associated attachments. Any views, opinions, conclusions, advice or statements expressed in this email message are those of the individual sender and should not be relied upon as the considered view, opinion, conclusions, advice or statement of this company except where the sender expressly, and with authority, states them to be the considered view, opinion, conclusions, advice or statement of this company. Every care is taken but we recommend that you scan any attachments for viruses.
RE: Dynamic Context Menu using wicket-jquery-ui
Sebestien, I did get the chance to look at your first suggestion... and it was looking really good. Apologies for not getting the chance to reply. I really liked the change - and the 'issue' didn't seem too much of a problem, but I'm guessing you've solved it, from the looks of, below. Really chuffed you've added it to your stack - the example looks really cool...! :) Will have a proper delve into it tonight or tomorrow - but once again - awesome work! :D Cheers, Col. -Original Message- From: Sebastien [mailto:seb...@gmail.com] Sent: 16 June 2013 03:32 To: users@wicket.apache.org Subject: Re: Dynamic Context Menu using wicket-jquery-ui Hi Colin, By trying to help you on this topic, I finally end up with a working ContextMenu implementation (so, I add it in wicket-jquery-ui-6.8.2-SNAPSHOT...) You can either use it or have a look at the code to complete your own if this one does not full-fit your needs... ContextMenu: https://github.com/sebfz1/wicket-jquery-ui/blob/master/wicket-jquery-ui/src/main/java/com/googlecode/wicket/jquery/ui/widget/menu/ContextMenu.java ContextMenuBehavior: https://github.com/sebfz1/wicket-jquery-ui/blob/master/wicket-jquery-ui/src/main/java/com/googlecode/wicket/jquery/ui/widget/menu/ContextMenuBehavior.java The usage is the following: final ContextMenu menu = new ContextMenu(menu, newMenuItemList()) { private static final long serialVersionUID = 1L; @Override protected void onContextMenu(AjaxRequestTarget target, Component component) { //the menu-item list can be modified here //this.getItemList().add(new MenuItem(my new item)); } @Override public void onClick(AjaxRequestTarget target, IMenuItem item) { } }; this.add(menu); final Label label = new Label(label, my label); label.add(new ContextMenuBehavior(menu)); this.add(label); There is a demo here: http://www.7thweb.net/wicket-jquery-ui/menu/ContextMenuPage Hope you will like it, Best regards, Sebastien. EMAIL DISCLAIMER This email message and its attachments are confidential and may also contain copyright or privileged material. If you are not the intended recipient, you may not forward the email or disclose or use the information contained in it. If you have received this email message in error, please advise the sender immediately by replying to this email and delete the message and any associated attachments. Any views, opinions, conclusions, advice or statements expressed in this email message are those of the individual sender and should not be relied upon as the considered view, opinion, conclusions, advice or statement of this company except where the sender expressly, and with authority, states them to be the considered view, opinion, conclusions, advice or statement of this company. Every care is taken but we recommend that you scan any attachments for viruses. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Dynamic Context Menu using wicket-jquery-ui
Wicketeers, I'm attempting to develop a reusable context menu component. I'm nearly there, but having a few issues, and thought I might share in the hope I might get some help. I realise that another person (bronius) is also having a go at this, but his implementation isn't using wicket-jquery-ui, which I am using and want to utilise. http://www.otbcs.co.uk/wicketmenu.zip The link above includes a zip to a quick start that contains the code. There isn't a lot to it, that isn't already done by wicket-jquery-ui. Requirements; * Open Menu on right click - menus to appear near or in relation to what was clicked. (done) * Menus are dynamically defined - they are not created or rendered initially, on page creation, but are defined dynamically on button event and returned via Ajax for rendering. (done) * Must allow multiple, different, menus on same page. (done) * Must clear down intelligently - when another click elsewhere or escape etc., is pressed. The issue I have at the moment is; * Closing the menu only happens on another context-menu, successfully. I can have it close on an 'onclick' event, which is added to the page, but this in turn disables/ breaks standard links. In the example above, this is the case - the menu behaves nicely, but breaks the standard link. * How would I close the menu on an 'escape' key press? * While not that important; you can't reuse a menu and have it appear where it's clicked. At the moment, they just appear where they are placed. As 'items' can be re-used, this isn't so much of an issue. Any help, advice or suggestions welcome! Cheers, Col. EMAIL DISCLAIMER This email message and its attachments are confidential and may also contain copyright or privileged material. If you are not the intended recipient, you may not forward the email or disclose or use the information contained in it. If you have received this email message in error, please advise the sender immediately by replying to this email and delete the message and any associated attachments. Any views, opinions, conclusions, advice or statements expressed in this email message are those of the individual sender and should not be relied upon as the considered view, opinion, conclusions, advice or statement of this company except where the sender expressly, and with authority, states them to be the considered view, opinion, conclusions, advice or statement of this company. Every care is taken but we recommend that you scan any attachments for viruses.
RE: Panel switching
Martin, Awesome - thanks, once again...! That gives me plenty to get on with... :) Cheers, Col. -Original Message- From: Martin Grigorov [mailto:mgrigo...@apache.org] Sent: 27 May 2013 17:34 To: users@wicket.apache.org Subject: Re: Panel switching Hi, I guess you know that History API (pushState) works only in IE10, all older versions of IE do not support it. About your question: you can use AjaxRequestTarget#addChildren(getPage(), AbstractLink.class) to add all links in the current page to be repainted. Wicket uses getRequestCycle().getUrlRenderer().getBaseUrl() as a base to calculate the relative urls, so you can set it in your #onXyz() callback methods. Using absolute url may break when you are behind a reverse proxy. This is the reason why Wicket produces relative urls. If this is not a problem for you then you can override RequestCycle#newUrlRenderer() to return a renderer that always uses #renderFullUrl() when #renderUrl() is called. On Mon, May 27, 2013 at 4:34 AM, Colin Rogers colin.rog...@objectconsulting.com.au wrote: Wicketeers, I have an odd issue - that isn't really a bug or a coding problem - but something I thought people might have some ideas on. A little background first. I like to have URLs in my application, as per the examples below; player player/messages player/messages/archive player/messages/old something something/another/thing/or/whatever etc. Now - I'm trying to implement 'panel switching' (I honestly have no idea what this is called...) - where I only replace the parts of the page that actually need replacing, rather than recreating all elements of the page and re-rendering them. This is, unsurprisingly, very easy with Wicket. It's easy to determine what needs replacing, and to actually replace them, via ajax. All good! I also want the user to be able to 'refresh' the page and/or bookmark the page and have the page recreate itself from scratch. Again - this is pretty easy, using javascript and history.pushState etc. The problem I have is when some of my Links are relative to the URL. So where I had a link that was relative to X/Y, when I push the URL to be X/Y/Z, all the relative links are out of date. I guess the questions are; how can I make all Links absolute rather than relative? And, is there any way of doing this across the application? Are there other issues that could affect what I'm trying to do? I realise I can just make all my URLs one level deep - so that all relative links work; player playerMessages playerMessagesArchive But it's simply not as pretty! :) Cheers, Col. EMAIL DISCLAIMER This email message and its attachments are confidential and may also contain copyright or privileged material. If you are not the intended recipient, you may not forward the email or disclose or use the information contained in it. If you have received this email message in error, please advise the sender immediately by replying to this email and delete the message and any associated attachments. Any views, opinions, conclusions, advice or statements expressed in this email message are those of the individual sender and should not be relied upon as the considered view, opinion, conclusions, advice or statement of this company except where the sender expressly, and with authority, states them to be the considered view, opinion, conclusions, advice or statement of this company. Every care is taken but we recommend that you scan any attachments for viruses. EMAIL DISCLAIMER This email message and its attachments are confidential and may also contain copyright or privileged material. If you are not the intended recipient, you may not forward the email or disclose or use the information contained in it. If you have received this email message in error, please advise the sender immediately by replying to this email and delete the message and any associated attachments. Any views, opinions, conclusions, advice or statements expressed in this email message are those of the individual sender and should not be relied upon as the considered view, opinion, conclusions, advice or statement of this company except where the sender expressly, and with authority, states them to be the considered view, opinion, conclusions, advice or statement of this company. Every care is taken but we recommend that you scan any attachments for viruses.
Panel switching
Wicketeers, I have an odd issue - that isn't really a bug or a coding problem - but something I thought people might have some ideas on. A little background first. I like to have URLs in my application, as per the examples below; player player/messages player/messages/archive player/messages/old something something/another/thing/or/whatever etc. Now - I'm trying to implement 'panel switching' (I honestly have no idea what this is called...) - where I only replace the parts of the page that actually need replacing, rather than recreating all elements of the page and re-rendering them. This is, unsurprisingly, very easy with Wicket. It's easy to determine what needs replacing, and to actually replace them, via ajax. All good! I also want the user to be able to 'refresh' the page and/or bookmark the page and have the page recreate itself from scratch. Again - this is pretty easy, using javascript and history.pushState etc. The problem I have is when some of my Links are relative to the URL. So where I had a link that was relative to X/Y, when I push the URL to be X/Y/Z, all the relative links are out of date. I guess the questions are; how can I make all Links absolute rather than relative? And, is there any way of doing this across the application? Are there other issues that could affect what I'm trying to do? I realise I can just make all my URLs one level deep - so that all relative links work; player playerMessages playerMessagesArchive But it's simply not as pretty! :) Cheers, Col. EMAIL DISCLAIMER This email message and its attachments are confidential and may also contain copyright or privileged material. If you are not the intended recipient, you may not forward the email or disclose or use the information contained in it. If you have received this email message in error, please advise the sender immediately by replying to this email and delete the message and any associated attachments. Any views, opinions, conclusions, advice or statements expressed in this email message are those of the individual sender and should not be relied upon as the considered view, opinion, conclusions, advice or statement of this company except where the sender expressly, and with authority, states them to be the considered view, opinion, conclusions, advice or statement of this company. Every care is taken but we recommend that you scan any attachments for viruses.
Page's Mounted URL
Wicketeers, Where I have; mountPage( path/to/myPage, MyPersonalPage.class ); mountPage( different/path/customPage, AnotherCustomPage.class ); I now have a Page class (i.e. MyPersonalPage) - how can I determine the mountPage String (i.e path/to/myPage) ? I'm sure this should be simple, but I can't find anything. Methods like urlFor() only work in relation to the current context/request, as far as I can see. You can't override mountPage - as its final - either in order to keep a simple store. Cheers, Col. EMAIL DISCLAIMER This email message and its attachments are confidential and may also contain copyright or privileged material. If you are not the intended recipient, you may not forward the email or disclose or use the information contained in it. If you have received this email message in error, please advise the sender immediately by replying to this email and delete the message and any associated attachments. Any views, opinions, conclusions, advice or statements expressed in this email message are those of the individual sender and should not be relied upon as the considered view, opinion, conclusions, advice or statement of this company except where the sender expressly, and with authority, states them to be the considered view, opinion, conclusions, advice or statement of this company. Every care is taken but we recommend that you scan any attachments for viruses.
RE: Page's Mounted URL
I did! But as I said - urlFor() only deals in relative paths. So if I'm on page X and ask for the path of X I always get ./ which isn't useful for determining anything! :) (and using getUrl() of the request gives me the ajax URL for the link I just requested - ?2-3.ILinkListener-settings-myLink) -Original Message- From: Bertrand Guay-Paquet [mailto:ber...@step.polymtl.ca] Sent: 02 May 2013 15:17 To: users@wicket.apache.org Subject: Re: Page's Mounted URL Have a look at RequestUtils#toAbsolutePath(). Also, look at the email on this mailing list preceding yours titled [wicket 6] Any shortcut to get full url ? :) On 02/05/2013 1:06 AM, Colin Rogers wrote: Wicketeers, Where I have; mountPage( path/to/myPage, MyPersonalPage.class ); mountPage( different/path/customPage, AnotherCustomPage.class ); I now have a Page class (i.e. MyPersonalPage) - how can I determine the mountPage String (i.e path/to/myPage) ? I'm sure this should be simple, but I can't find anything. Methods like urlFor() only work in relation to the current context/request, as far as I can see. You can't override mountPage - as its final - either in order to keep a simple store. Cheers, Col. EMAIL DISCLAIMER This email message and its attachments are confidential and may also contain copyright or privileged material. If you are not the intended recipient, you may not forward the email or disclose or use the information contained in it. If you have received this email message in error, please advise the sender immediately by replying to this email and delete the message and any associated attachments. Any views, opinions, conclusions, advice or statements expressed in this email message are those of the individual sender and should not be relied upon as the considered view, opinion, conclusions, advice or statement of this company except where the sender expressly, and with authority, states them to be the considered view, opinion, conclusions, advice or statement of this company. Every care is taken but we recommend that you scan any attachments for viruses. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org EMAIL DISCLAIMER This email message and its attachments are confidential and may also contain copyright or privileged material. If you are not the intended recipient, you may not forward the email or disclose or use the information contained in it. If you have received this email message in error, please advise the sender immediately by replying to this email and delete the message and any associated attachments. Any views, opinions, conclusions, advice or statements expressed in this email message are those of the individual sender and should not be relied upon as the considered view, opinion, conclusions, advice or statement of this company except where the sender expressly, and with authority, states them to be the considered view, opinion, conclusions, advice or statement of this company. Every care is taken but we recommend that you scan any attachments for viruses. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: Page's Mounted URL
Ignore my last email - I was being dumb! [wicket 6] Any shortcut to get full url ? does have my answer...! Doh! Sorry! :) -Original Message- From: Bertrand Guay-Paquet [mailto:ber...@step.polymtl.ca] Sent: 02 May 2013 15:17 To: users@wicket.apache.org Subject: Re: Page's Mounted URL Have a look at RequestUtils#toAbsolutePath(). Also, look at the email on this mailing list preceding yours titled [wicket 6] Any shortcut to get full url ? :) On 02/05/2013 1:06 AM, Colin Rogers wrote: Wicketeers, Where I have; mountPage( path/to/myPage, MyPersonalPage.class ); mountPage( different/path/customPage, AnotherCustomPage.class ); I now have a Page class (i.e. MyPersonalPage) - how can I determine the mountPage String (i.e path/to/myPage) ? I'm sure this should be simple, but I can't find anything. Methods like urlFor() only work in relation to the current context/request, as far as I can see. You can't override mountPage - as its final - either in order to keep a simple store. Cheers, Col. EMAIL DISCLAIMER This email message and its attachments are confidential and may also contain copyright or privileged material. If you are not the intended recipient, you may not forward the email or disclose or use the information contained in it. If you have received this email message in error, please advise the sender immediately by replying to this email and delete the message and any associated attachments. Any views, opinions, conclusions, advice or statements expressed in this email message are those of the individual sender and should not be relied upon as the considered view, opinion, conclusions, advice or statement of this company except where the sender expressly, and with authority, states them to be the considered view, opinion, conclusions, advice or statement of this company. Every care is taken but we recommend that you scan any attachments for viruses. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org EMAIL DISCLAIMER This email message and its attachments are confidential and may also contain copyright or privileged material. If you are not the intended recipient, you may not forward the email or disclose or use the information contained in it. If you have received this email message in error, please advise the sender immediately by replying to this email and delete the message and any associated attachments. Any views, opinions, conclusions, advice or statements expressed in this email message are those of the individual sender and should not be relied upon as the considered view, opinion, conclusions, advice or statement of this company except where the sender expressly, and with authority, states them to be the considered view, opinion, conclusions, advice or statement of this company. Every care is taken but we recommend that you scan any attachments for viruses. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Dancing Debug window
Hi there guys, When I get an issue with Ajax that generates a report, as below (i.e. with tons of errors.) The Ajax Debug Window 'dances' for ages... it also slows the browser down to almost nothing, and while it 'dances' is almost un-clickable. Is there any way to solve this? Cheers, Col. ERROR: Wicket.Ajax.Call.processComponent: Component with id [[feedbackPanel240]] was not found while trying to perform markup update. Make sure you called component.setOutputMarkupId(true) on the component whose markup you are trying to update. ERROR: Wicket.Ajax.Call.processComponent: Component with id [[feedbackPanel241]] was not found while trying to perform markup update. Make sure you called component.setOutputMarkupId(true) on the component whose markup you are trying to update. ERROR: Wicket.Ajax.Call.processComponent: Component with id [[feedbackPanel242]] was not found while trying to perform markup update. Make sure you called component.setOutputMarkupId(true) on the component whose markup you are trying to update. ERROR: Wicket.Ajax.Call.processComponent: Component with id [[feedbackPanel243]] was not found while trying to perform markup update. Make sure you called component.setOutputMarkupId(true) on the component whose markup you are trying to update. ERROR: Wicket.Ajax.Call.processComponent: Component with id [[feedbackPanelMain244]] was not found while trying to perform markup update. Make sure you called component.setOutputMarkupId(true) on the component whose markup you are trying to update. ERROR: Wicket.Ajax.Call.processComponent: Component with id [[feedbackPanelMain245]] was not found while trying to perform markup update. Make sure you called component.setOutputMarkupId(true) on the component whose markup you are trying to update. ERROR: Wicket.Ajax.Call.processComponent: Component with id [[feedbackPanel246]] was not found while trying to perform markup update. Make sure you called component.setOutputMarkupId(true) on the component whose markup you are trying to update. ERROR: Wicket.Ajax.Call.processComponent: Component with id [[feedbackPanelMain247]] was not found while trying to perform markup update. Make sure you called component.setOutputMarkupId(true) on the component whose markup you are trying to update. ERROR: Wicket.Ajax.Call.processComponent: Component with id [[feedbackPanelMain248]] was not found while trying to perform markup update. Make sure you called component.setOutputMarkupId(true) on the component whose markup you are trying to update. ERROR: Wicket.Ajax.Call.processComponent: Component with id [[feedbackPanel249]] was not found while trying to perform markup update. Make sure you called component.setOutputMarkupId(true) on the component whose markup you are trying to update. ERROR: Wicket.Ajax.Call.processComponent: Component with id [[feedbackPanel24a]] was not found while trying to perform markup update. Make sure you called component.setOutputMarkupId(true) on the component whose markup you are trying to update. ERROR: Wicket.Ajax.Call.processComponent: Component with id [[feedbackPanelMain24b]] was not found while trying to perform markup update. Make sure you called component.setOutputMarkupId(true) on the component whose markup you are trying to update. ERROR: Wicket.Ajax.Call.processComponent: Component with id [[feedbackPanelMain24c]] was not found while trying to perform markup update. Make sure you called component.setOutputMarkupId(true) on the component whose markup you are trying to update. ERROR: Wicket.Ajax.Call.processComponent: Component with id [[feedbackPanel24d]] was not found while trying to perform markup update. Make sure you called component.setOutputMarkupId(true) on the component whose markup you are trying to update. ERROR: Wicket.Ajax.Call.processComponent: Component with id [[feedbackPanelMain24e]] was not found while trying to perform markup update. Make sure you called component.setOutputMarkupId(true) on the component whose markup you are trying to update. ERROR: Wicket.Ajax.Call.processComponent: Component with id [[feedbackPanelMain24f]] was not found while trying to perform markup update. Make sure you called component.setOutputMarkupId(true) on the component whose markup you are trying to update. ERROR: Wicket.Ajax.Call.processComponent: Component with id [[feedbackPanelMain250]] was not found while trying to perform markup update. Make sure you called component.setOutputMarkupId(true) on the component whose markup you are trying to update. ERROR: Wicket.Ajax.Call.processComponent: Component with id [[feedbackPanel251]] was not found while trying to perform markup update. Make sure you called component.setOutputMarkupId(true) on the component whose markup you are trying to update. ERROR: Wicket.Ajax.Call.processComponent: Component with id [[feedbackPanelMain252]] was not found while trying to perform markup update. Make sure you called component.setOutputMarkupId(true) on the
RE: Dancing Debug window
Francois/ Martin, Call the method component's setOutputMarkupId(true); feedbackPanel.setOutputMarkupId(true); I know what the issue is... I'm expressing an issue with the way the error is reported... An error reporting system shouldn't cause errors when reporting errors...! :) (Actually - the particular components *do* have setOutputMarkupId set to true - there is a another issue where they are being updated - several times - from different places, simultaneously. But that isn't important.) The best way is to fix the errors so there is no activity in the debug window at all ;-) A workaround is to monkey-patch Wicket.Ajax.DebugWindow.logError() function. You can re-assign it so anything that fits your needs. I think we can improve this by throttling the animations. I.e. they will be executed only once Nms after the last error log. Yeah - that's kinda what I was thinking. Which each ajax response, the animations should only execute once, not cumulatively per error received. We have huge forms with many 'framework' components. When refactoring these components, and consequently causing errors, bucket loads of Ajax errors can potentially be raised. And they are difficult and frustrating to fix with an overly enthusiastic dancing debug window...! I'm thankful it doesn't come with sound effects... ;) Cheers, Col. -Original Message- From: francois meillet [mailto:francois.meil...@gmail.com] Sent: 16 April 2013 17:29 To: users@wicket.apache.org Subject: Re: Dancing Debug window Call the method component's setOutputMarkupId(true); feedbackPanel.setOutputMarkupId(true); see http://ci.apache.org/projects/wicket/apidocs/6.0.x/org/apache/wicket/Component.html#setOutputMarkupId(boolean) François On Tue, Apr 16, 2013 at 9:20 AM, Colin Rogers colin.rog...@objectconsulting.com.au wrote: Hi there guys, When I get an issue with Ajax that generates a report, as below (i.e. with tons of errors.) The Ajax Debug Window 'dances' for ages... it also slows the browser down to almost nothing, and while it 'dances' is almost un-clickable. Is there any way to solve this? Cheers, Col. ERROR: Wicket.Ajax.Call.processComponent: Component with id [[feedbackPanel240]] was not found while trying to perform markup update. Make sure you called component.setOutputMarkupId(true) on the component whose markup you are trying to update. ERROR: Wicket.Ajax.Call.processComponent: Component with id [[feedbackPanel241]] was not found while trying to perform markup update. Make sure you called component.setOutputMarkupId(true) on the component whose markup you are trying to update. ERROR: Wicket.Ajax.Call.processComponent: Component with id [[feedbackPanel242]] was not found while trying to perform markup update. Make sure you called component.setOutputMarkupId(true) on the component whose markup you are trying to update. ERROR: Wicket.Ajax.Call.processComponent: Component with id [[feedbackPanel243]] was not found while trying to perform markup update. Make sure you called component.setOutputMarkupId(true) on the component whose markup you are trying to update. ERROR: Wicket.Ajax.Call.processComponent: Component with id [[feedbackPanelMain244]] was not found while trying to perform markup update. Make sure you called component.setOutputMarkupId(true) on the component whose markup you are trying to update. ERROR: Wicket.Ajax.Call.processComponent: Component with id [[feedbackPanelMain245]] was not found while trying to perform markup update. Make sure you called component.setOutputMarkupId(true) on the component whose markup you are trying to update. ERROR: Wicket.Ajax.Call.processComponent: Component with id [[feedbackPanel246]] was not found while trying to perform markup update. Make sure you called component.setOutputMarkupId(true) on the component whose markup you are trying to update. ERROR: Wicket.Ajax.Call.processComponent: Component with id [[feedbackPanelMain247]] was not found while trying to perform markup update. Make sure you called component.setOutputMarkupId(true) on the component whose markup you are trying to update. ERROR: Wicket.Ajax.Call.processComponent: Component with id [[feedbackPanelMain248]] was not found while trying to perform markup update. Make sure you called component.setOutputMarkupId(true) on the component whose markup you are trying to update. ERROR: Wicket.Ajax.Call.processComponent: Component with id [[feedbackPanel249]] was not found while trying to perform markup update. Make sure you called component.setOutputMarkupId(true) on the component whose markup you are trying to update. ERROR: Wicket.Ajax.Call.processComponent: Component with id [[feedbackPanel24a]] was not found while trying to perform markup update. Make sure you called component.setOutputMarkupId(true) on the component whose markup you are trying to update. ERROR: Wicket.Ajax.Call.processComponent: Component with id [[feedbackPanelMain24b
RE: AjaxIndicatorAppender on a Panel
(I'm guessing here) but could you add the indicator to the panel (and expose it via a getter method). And then, with each sub-component, implement the IAjaxIndicatorAware and have getAjaxIndicatorMarkupId() reference the panel's indicator mark up ID. I honestly don't know if this will work, but it seems logical? Cheers, Col. -Original Message- From: saty [mailto:satya...@gmail.com] Sent: 03 April 2013 05:40 To: users@wicket.apache.org Subject: Re: AjaxIndicatorAppender on a Panel yeah, thanks I can have my panel implement the IAjaxIndicatorAware and use a AjaxIndicatorAppender as here, but unless i add this indicator to one of the component in the panel it does not show up and also in that case it shows rightly next to the component where i added it. how would i take it out from components in the panel and add it at the panel level itself. MyPanel implements IAjaxIndicatorAware { AjaxIndicatorAppender indicator = new AjaxIndicatorAppender (); @Override public String getAjaxIndicatorMarkupId() { return indicator.getMarkupId(); } } Thanks -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/AjaxIndicatorAppender-on-a-Panel-tp4657694p4657696.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 EMAIL DISCLAIMER This email message and its attachments are confidential and may also contain copyright or privileged material. If you are not the intended recipient, you may not forward the email or disclose or use the information contained in it. If you have received this email message in error, please advise the sender immediately by replying to this email and delete the message and any associated attachments. Any views, opinions, conclusions, advice or statements expressed in this email message are those of the individual sender and should not be relied upon as the considered view, opinion, conclusions, advice or statement of this company except where the sender expressly, and with authority, states them to be the considered view, opinion, conclusions, advice or statement of this company. Every care is taken but we recommend that you scan any attachments for viruses. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: Why does my HelloWorldPage not work?
Hi Mike, Before people/I can help you; what is the error you are getting? Also, have you tried using the Maven Quickstart/ Wicket project archetype - they are incredibly useful in creating a base for a Wicket project? Cheers, Col. -Original Message- From: mike.hua [mailto:hz...@sohu.com] Sent: 18 February 2013 11:53 To: users@wicket.apache.org Subject: Re: Why does my HelloWorldPage not work? Someone can help me? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Why-does-my-HelloWorldPage-not-work-tp4656451p4656452.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 EMAIL DISCLAIMER This email message and its attachments are confidential and may also contain copyright or privileged material. If you are not the intended recipient, you may not forward the email or disclose or use the information contained in it. If you have received this email message in error, please advise the sender immediately by replying to this email and delete the message and any associated attachments. Any views, opinions, conclusions, advice or statements expressed in this email message are those of the individual sender and should not be relied upon as the considered view, opinion, conclusions, advice or statement of this company except where the sender expressly, and with authority, states them to be the considered view, opinion, conclusions, advice or statement of this company. Every care is taken but we recommend that you scan any attachments for viruses. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: Regarding using jetty 6 in wicket
Can you not use the Wicket/Maven archetype? That has it all set up, has a Start.java - and uses Jetty version 7.6.3.v20120416 Cheers, Col. -Original Message- From: kshitiz [mailto:k.agarw...@gmail.com] Sent: 13 February 2013 06:16 To: users@wicket.apache.org Subject: Regarding using jetty 6 in wicket Hi, I am trying to use Jetty 6 in wicket application as it is the requirement as per jelastic hosting. They supports jetty 6. So, I was going through the link https://cwiki.apache.org/WICKET/jetty6-testing.html https://cwiki.apache.org/WICKET/jetty6-testing.html . I downloaded jetty 6.1.23 jar and used the code given the link for Start.java. But the code is throwing compilation error in line jettyServer.start(); and jettyServer.stop(); as start() and stop() are not available. I have even tried doStart and doStop but they are not available So, if the link is correct, which jar the author must be using and in case there is any issue, is there any way of using jetty 6 in the same way we use jetty 8? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Regarding-using-jetty-6-in-wicket-tp4656286.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 EMAIL DISCLAIMER This email message and its attachments are confidential and may also contain copyright or privileged material. If you are not the intended recipient, you may not forward the email or disclose or use the information contained in it. If you have received this email message in error, please advise the sender immediately by replying to this email and delete the message and any associated attachments. Any views, opinions, conclusions, advice or statements expressed in this email message are those of the individual sender and should not be relied upon as the considered view, opinion, conclusions, advice or statement of this company except where the sender expressly, and with authority, states them to be the considered view, opinion, conclusions, advice or statement of this company. Every care is taken but we recommend that you scan any attachments for viruses. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: Behaviour.onInitialise()
That ambiguous-ness is ever more present when you use bind - as there is no guarantee what state the component is in (hence our need for boilerplate code, to determine that state). It's not there if you are using onInitialise, as it's part of the component lifecycle, you know what state the parent component is in. What happens if the behaviour is added after the component has already been initialized? Does its oninitialize() still get called? Of course - I'd expect adding a Behaviour to a Panel is no different from add a Label to a Panel. The onInitialise in the Behaviour would be called the same as the Label - as and when it's part of the component tree. As behaviours are re-useable extensions to components, I'd expect them to behave in the same way. Cheers, Col. -Original Message- From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] Sent: 07 February 2013 19:14 To: users@wicket.apache.org Subject: Re: Behaviour.onInitialise() What happens if the behavior is added after the component has already been initialized? Does its oninitialize() still get called? Ambiguities like this is the reason why there is no such method. -igor On Wednesday, February 6, 2013, Colin Rogers wrote: Martin and other Wicketeers, I have a quick, small question; why is there no 'onInitiailise()' method on Behaviour classes? There is an 'bind' method, but this, unlike 'onInitialise' is call immediately on binding to component, whether the component is in the component tree or not. Obviously it's very easy to work around; * Simply ensure that bind is called after the component is added to the component tree, even throwing an exception when 'component' parameter has null for a parent. (This is how AbstractAjaxBehavior works). * Add a 'firstTime' flag in onConfigure, and set to false after the onInitialise functionality is performed. While it is easy to work around, it seems odd that Behaviours lack the common onInitialise that all Wicket components otherwise have, I'm curious as to why that is, and hoping it wouldn't be an issue to add - it would aid in removing boiler plate code in Behaviours. Cheers, Col. PS. Apologies for spelling 'initialise' and 'behaviour' correctly - I can't help it... :) EMAIL DISCLAIMER This email message and its attachments are confidential and may also contain copyright or privileged material. If you are not the intended recipient, you may not forward the email or disclose or use the information contained in it. If you have received this email message in error, please advise the sender immediately by replying to this email and delete the message and any associated attachments. Any views, opinions, conclusions, advice or statements expressed in this email message are those of the individual sender and should not be relied upon as the considered view, opinion, conclusions, advice or statement of this company except where the sender expressly, and with authority, states them to be the considered view, opinion, conclusions, advice or statement of this company. Every care is taken but we recommend that you scan any attachments for viruses. EMAIL DISCLAIMER This email message and its attachments are confidential and may also contain copyright or privileged material. If you are not the intended recipient, you may not forward the email or disclose or use the information contained in it. If you have received this email message in error, please advise the sender immediately by replying to this email and delete the message and any associated attachments. Any views, opinions, conclusions, advice or statements expressed in this email message are those of the individual sender and should not be relied upon as the considered view, opinion, conclusions, advice or statement of this company except where the sender expressly, and with authority, states them to be the considered view, opinion, conclusions, advice or statement of this company. Every care is taken but we recommend that you scan any attachments for viruses. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: Behaviour.onInitialise()
That actually makes sense, now. I didn't realise that Behaviours could be added to different components - I incorrectly assumed they couldn't. It also makes clear why bind has the component as a parameter, as it would be called multiple times for difference components. Thanks for the answer! :) Cheers, Col. -Original Message- From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] Sent: 08 February 2013 10:59 To: users@wicket.apache.org Subject: Re: Behaviour.onInitialise() On Thu, Feb 7, 2013 at 3:33 PM, Colin Rogers colin.rog...@objectconsulting.com.au wrote: That ambiguous-ness is ever more present when you use bind - as there is no guarantee what state the component is in (hence our need for boilerplate code, to determine that state). It's not there if you are using onInitialise, as it's part of the component lifecycle, you know what state the parent component is in. thats why bind() makes no guarantee about the state of the component, it is simply called when the behavior is added to the component. What happens if the behaviour is added after the component has already been initialized? Does its oninitialize() still get called? Of course - I'd expect adding a Behaviour to a Panel is no different from add a Label to a Panel. The onInitialise in the Behaviour would be called the same as the Label - as and when it's part of the component tree. As behaviours are re-useable extensions to components, I'd expect them to behave in the same way. there is a small problem with this line of thinking: behaviors are different from components in that one instance of a behavior can be added to multiple components. so behavior A gets added to a component that is already initialized - no onInitialize call, then same instance gets added to component B that is not yet initialized, now onInitialize is called? doesnt make any sense unfortunately. perhaps what you can do is describe your concrete usecase for needing this method and we may be able to better help you. -igor Cheers, Col. -Original Message- From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] Sent: 07 February 2013 19:14 To: users@wicket.apache.org Subject: Re: Behaviour.onInitialise() What happens if the behavior is added after the component has already been initialized? Does its oninitialize() still get called? Ambiguities like this is the reason why there is no such method. -igor On Wednesday, February 6, 2013, Colin Rogers wrote: Martin and other Wicketeers, I have a quick, small question; why is there no 'onInitiailise()' method on Behaviour classes? There is an 'bind' method, but this, unlike 'onInitialise' is call immediately on binding to component, whether the component is in the component tree or not. Obviously it's very easy to work around; * Simply ensure that bind is called after the component is added to the component tree, even throwing an exception when 'component' parameter has null for a parent. (This is how AbstractAjaxBehavior works). * Add a 'firstTime' flag in onConfigure, and set to false after the onInitialise functionality is performed. While it is easy to work around, it seems odd that Behaviours lack the common onInitialise that all Wicket components otherwise have, I'm curious as to why that is, and hoping it wouldn't be an issue to add - it would aid in removing boiler plate code in Behaviours. Cheers, Col. PS. Apologies for spelling 'initialise' and 'behaviour' correctly - I can't help it... :) EMAIL DISCLAIMER This email message and its attachments are confidential and may also contain copyright or privileged material. If you are not the intended recipient, you may not forward the email or disclose or use the information contained in it. If you have received this email message in error, please advise the sender immediately by replying to this email and delete the message and any associated attachments. Any views, opinions, conclusions, advice or statements expressed in this email message are those of the individual sender and should not be relied upon as the considered view, opinion, conclusions, advice or statement of this company except where the sender expressly, and with authority, states them to be the considered view, opinion, conclusions, advice or statement of this company. Every care is taken but we recommend that you scan any attachments for viruses. EMAIL DISCLAIMER This email message and its attachments are confidential and may also contain copyright or privileged material. If you are not the intended recipient, you may not forward the email or disclose or use the information contained in it. If you have received this email message in error, please advise the sender immediately by replying to this email and delete the message and any associated attachments. Any views, opinions, conclusions, advice or statements expressed in this email message are those
RE: override the css of the AbstractFormDialog
I honestly could kill for a JQuery based, nested context menu, that could be activated by Ajax and defined dynamically. I get the feeling I might have to make my own, tho. I think it would be easy in terms of activation and definition, but the menu triggering Wicket Ajax commands is the bit I'm missing in my head... -Original Message- From: grazia [mailto:grazia.russolass...@gmail.com] Sent: 08 February 2013 11:38 To: users@wicket.apache.org Subject: Re: override the css of the AbstractFormDialog I did try the suggestion you made, and it worked great. THank you ! The only remaining issue for me is the empty calendar cells, where something like a ContextMenu would be a better solution than the dialog. Any Wicket based ContextMenu ? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/override-the-css-of-the-AbstractFormDialog-tp4656135p4656185.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 EMAIL DISCLAIMER This email message and its attachments are confidential and may also contain copyright or privileged material. If you are not the intended recipient, you may not forward the email or disclose or use the information contained in it. If you have received this email message in error, please advise the sender immediately by replying to this email and delete the message and any associated attachments. Any views, opinions, conclusions, advice or statements expressed in this email message are those of the individual sender and should not be relied upon as the considered view, opinion, conclusions, advice or statement of this company except where the sender expressly, and with authority, states them to be the considered view, opinion, conclusions, advice or statement of this company. Every care is taken but we recommend that you scan any attachments for viruses. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Behaviour.onInitialise()
Martin and other Wicketeers, I have a quick, small question; why is there no 'onInitiailise()' method on Behaviour classes? There is an 'bind' method, but this, unlike 'onInitialise' is call immediately on binding to component, whether the component is in the component tree or not. Obviously it's very easy to work around; * Simply ensure that bind is called after the component is added to the component tree, even throwing an exception when 'component' parameter has null for a parent. (This is how AbstractAjaxBehavior works). * Add a 'firstTime' flag in onConfigure, and set to false after the onInitialise functionality is performed. While it is easy to work around, it seems odd that Behaviours lack the common onInitialise that all Wicket components otherwise have, I'm curious as to why that is, and hoping it wouldn't be an issue to add - it would aid in removing boiler plate code in Behaviours. Cheers, Col. PS. Apologies for spelling 'initialise' and 'behaviour' correctly - I can't help it... :) EMAIL DISCLAIMER This email message and its attachments are confidential and may also contain copyright or privileged material. If you are not the intended recipient, you may not forward the email or disclose or use the information contained in it. If you have received this email message in error, please advise the sender immediately by replying to this email and delete the message and any associated attachments. Any views, opinions, conclusions, advice or statements expressed in this email message are those of the individual sender and should not be relied upon as the considered view, opinion, conclusions, advice or statement of this company except where the sender expressly, and with authority, states them to be the considered view, opinion, conclusions, advice or statement of this company. Every care is taken but we recommend that you scan any attachments for viruses.
RE: Wicket job market
In Australia it's almost non-existent. Mostly technology is 5 or 6 years behind the rest of the world, generally. Most places I've worked for here use JSP and Struts 1. Obviously there are plenty of places that do cutting edge stuff, but it's few and far between. I work for the only company I know of that uses Wicket (they used it before I came, but it's the reason why I'm here). I do plenty of searches for Wicket based jobs, as I'm still a contractor and other than here, there is nothing. Guess that means I'm hoping to stick around! ;) Okay, how's this for Sod's Law. I figure I should do a quick search on seek.com.au before making these claims, and another company in Melbourne mentions Wicket as a nice-to-have on a job description... :) Col. -Original Message- From: Michael Mosmann [mailto:mich...@mosmann.de] Sent: 05 February 2013 08:33 To: users@wicket.apache.org Subject: Re: Wicket job market Am 04.02.2013 15:43, schrieb manuelbarzi: Play Framework, Apache Click, Stripes, Struts, JSF, Seam http://www.indeed.com/jobtrends?q=%22Play+Framework%22%2C+%22Apache+C lick%22%2C+Stripes%2C+Struts%2C+JSF%2C+Seam What needs to be improved to get a wider adoption of Wicket ? IMO, selling Wicket as Vaadin does, may help a lot. I think, you should not compare wicket with vaadin. Wicket is not the right answer for every project. Wicket does not compete with vaadin, because wicket is a different hammer. The rise of javascript apps could change the future of web development, but for such a project you should not use wicket either. IMHO wicket is the better answer than struts, grails (if you have a long term maintenance cycle), jsf... I think there are many wicket projects out there, but wicket is not the so called cool stuff like grails, spring roo and so on... nothing a developer likes to play with (which is IMHO a good thing). I think, this could be changed with wicket 6 (jquery build-in)... but it is a long way. Michael - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org EMAIL DISCLAIMER This email message and its attachments are confidential and may also contain copyright or privileged material. If you are not the intended recipient, you may not forward the email or disclose or use the information contained in it. If you have received this email message in error, please advise the sender immediately by replying to this email and delete the message and any associated attachments. Any views, opinions, conclusions, advice or statements expressed in this email message are those of the individual sender and should not be relied upon as the considered view, opinion, conclusions, advice or statement of this company except where the sender expressly, and with authority, states them to be the considered view, opinion, conclusions, advice or statement of this company. Every care is taken but we recommend that you scan any attachments for viruses. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: how to remove the file icons from the editable tree table ?
Extend DefaultAbstractTree and override getFolderOpen() and getFolderClosed() - which are called by newNodeIcon() (eventually)? -Original Message- From: grazia [mailto:grazia.russolass...@gmail.com] Sent: 25 January 2013 04:18 To: users@wicket.apache.org Subject: Re: how to remove the file icons from the editable tree table ? DefaultAbstractTree.newNodeIcon is the culprit ... I guess I can extend class TreeTable, which extends DefaultAbstractTree, and then override newNodeIcon as I need to ... Any easier way ? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/how-to-remove-the-file-icons-from-the-editable-tree-table-tp4655709p4655733.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 EMAIL DISCLAIMER This email message and its attachments are confidential and may also contain copyright or privileged material. If you are not the intended recipient, you may not forward the email or disclose or use the information contained in it. If you have received this email message in error, please advise the sender immediately by replying to this email and delete the message and any associated attachments. Any views, opinions, conclusions, advice or statements expressed in this email message are those of the individual sender and should not be relied upon as the considered view, opinion, conclusions, advice or statement of this company except where the sender expressly, and with authority, states them to be the considered view, opinion, conclusions, advice or statement of this company. Every care is taken but we recommend that you scan any attachments for viruses. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: FormComponentPanel onchange Events
William, Is the AjaxEventBehavior added to the panel or the component? What event is it fired on? I'd thought you'd need it to be added to the component (rather than panel) and say, triggered 'onblur'. And using a AjaxFormComponentUpdatingBehavior rather than AjaxEventBehavior? Can you post the non-working code up if those suggestions don't solve it? I'd be happy to have a look at it. Cheers, Col. -Original Message- From: William Speirs [mailto:wspe...@apache.org] Sent: Thursday, 13 December 2012 1:51 PM To: users Subject: FormComponentPanel onchange Events I've created a FormComponentPanel with 2 text boxes: A B. I've add this new FormComponentPanel to my page twice: 1 2. What I'd like to have happen is when I change the value of 1A I want that same value copied into 2A. I call setOutputMarkupId to true on 1A, 1B, 2A, and 2B. I setup an AjaxEventBehavior on panel 1 and it fires as expected. However, inside of the onEvent method all of the model instances I try to obtain are always null (therefore preventing me from setting 2A). I've tried getting the form's model object, the model object for panel 1, and even the model object for A1... everything is always null. Is there some method of FormComponentPanel that I'm not overriding that I need to be? Any thoughts on how to make this work? Thanks... Bill- EMAIL DISCLAIMER This email message and its attachments are confidential and may also contain copyright or privileged material. If you are not the intended recipient, you may not forward the email or disclose or use the information contained in it. If you have received this email message in error, please advise the sender immediately by replying to this email and delete the message and any associated attachments. Any views, opinions, conclusions, advice or statements expressed in this email message are those of the individual sender and should not be relied upon as the considered view, opinion, conclusions, advice or statement of this company except where the sender expressly, and with authority, states them to be the considered view, opinion, conclusions, advice or statement of this company. Every care is taken but we recommend that you scan any attachments for viruses. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: Model is null after submit, using FormComponentPanel
Raul, There are better qualified people to answer this, but... Are the components actually passing validation? Pre-validation the model would be null - if the validation fails the model would be null. If the component validates then the model would be updated with the valid value. Col. -Original Message- From: Raul [mailto:ralva...@netwie.com] Sent: Tuesday, 4 December 2012 8:35 AM To: users@wicket.apache.org Subject: Model is null after submit, using FormComponentPanel Hello, I want to create a reusable component for use as part of a form, for this class use FormComponentPanel, As the following article. https://cwiki.apache.org/WICKET/creating-custom-formcomponentpanels-to-build-valid-objects-using-wickets-form-validation-logic.html My problem is that when I submit the internal components (TextFields), updated its model to null, instead of updating the model with the entered string, the method mytextfield.getConvertedInput () returns null during the call to UpdateModel (). Does anyone know what might be happening?. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Model-is-null-after-submit-using-FormComponentPanel-tp4654441.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 EMAIL DISCLAIMER This email message and its attachments are confidential and may also contain copyright or privileged material. If you are not the intended recipient, you may not forward the email or disclose or use the information contained in it. If you have received this email message in error, please advise the sender immediately by replying to this email and delete the message and any associated attachments. Any views, opinions, conclusions, advice or statements expressed in this email message are those of the individual sender and should not be relied upon as the considered view, opinion, conclusions, advice or statement of this company except where the sender expressly, and with authority, states them to be the considered view, opinion, conclusions, advice or statement of this company. Every care is taken but we recommend that you scan any attachments for viruses. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: Cloneing Wicket Objects
Martin, For some reason JQuery clone doesn't work - even with the withDataAndEvents and deepWithDataAndEvents flags set to true... :/ But - thank you for your suggestion - sounds just the thing - will give it a spin tonight :) Cheers, Col. -Original Message- From: Martin Grigorov [mailto:mgrigo...@apache.org] Sent: Monday, 26 November 2012 7:33 PM To: users@wicket.apache.org Subject: Re: Cloneing Wicket Objects Hi, You cannot add a component twice. A component can have just one parent. I think jQuery clone() should work, but I'm not totally sure. You can use WicketObjects#clone() method to clone any kind of Object. It uses Java Serialization to do it. Just make sure you clone it before adding the component to its parent, because the relation will be cloned too. On Mon, Nov 26, 2012 at 12:53 AM, Paul Bors p...@bors.ws wrote: Can't you crate the navigation panel once and call add() on it twice by passing the same reference to it from within your page hierarchy? On the client side I don't see why you would push this cloning to the client. Just let the page contain the same panel (html/js) via a single reference. You should be fine as long as you handle the db trip in the constructor or your own init() method. ~ Thank you, Paul Bors -Original Message- From: Colin Rogers [mailto:colin.rog...@objectconsulting.com.au] Sent: Sunday, November 25, 2012 6:28 PM To: users@wicket.apache.org Subject: Cloneing Wicket Objects Wicketeers, I was wondering what the best was to duplicate or clone wicket components. I need guidance as to the best way to do this. I have, on my screen two 'navigation panels' that are identical - one at the top of the page, another at the bottom. They contain dropdown choice fields that, when 'onchange' event occurs, it triggers an ajax request that redirects the user to another page. As, in order to create the navigation panels - I have to visit the DB, and create them dynamically, so it doesn't make sense to perform this operation twice. Also they generate a large amount of HTML, in order render them, so it seems sensible to do as much as I can on the client side. The idea was - I generate the components once, and then clone them on the client side. This saves going to the DB twice and rendering them twice. I've attempted to use jquery's clone function as; clone(), clone(true) and clone(true, true) - but none work. The elements are copied, but the ajax actions never execute onchange. Is there another way to do this that works? A more wicket-centric way? Cheers, Col. EMAIL DISCLAIMER This email message and its attachments are confidential and may also contain copyright or privileged material. If you are not the intended recipient, you may not forward the email or disclose or use the information contained in it. If you have received this email message in error, please advise the sender immediately by replying to this email and delete the message and any associated attachments. Any views, opinions, conclusions, advice or statements expressed in this email message are those of the individual sender and should not be relied upon as the considered view, opinion, conclusions, advice or statement of this company except where the sender expressly, and with authority, states them to be the considered view, opinion, conclusions, advice or statement of this company. Every care is taken but we recommend that you scan any attachments for viruses. - 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 http://jweekend.com/ EMAIL DISCLAIMER This email message and its attachments are confidential and may also contain copyright or privileged material. If you are not the intended recipient, you may not forward the email or disclose or use the information contained in it. If you have received this email message in error, please advise the sender immediately by replying to this email and delete the message and any associated attachments. Any views, opinions, conclusions, advice or statements expressed in this email message are those of the individual sender and should not be relied upon as the considered view, opinion, conclusions, advice or statement of this company except where the sender expressly, and with authority, states them to be the considered view, opinion, conclusions, advice or statement of this company. Every care is taken but we recommend that you scan any attachments for viruses.
Cloneing Wicket Objects
Wicketeers, I was wondering what the best was to duplicate or clone wicket components. I need guidance as to the best way to do this. I have, on my screen two 'navigation panels' that are identical - one at the top of the page, another at the bottom. They contain dropdown choice fields that, when 'onchange' event occurs, it triggers an ajax request that redirects the user to another page. As, in order to create the navigation panels - I have to visit the DB, and create them dynamically, so it doesn't make sense to perform this operation twice. Also they generate a large amount of HTML, in order render them, so it seems sensible to do as much as I can on the client side. The idea was - I generate the components once, and then clone them on the client side. This saves going to the DB twice and rendering them twice. I've attempted to use jquery's clone function as; clone(), clone(true) and clone(true, true) - but none work. The elements are copied, but the ajax actions never execute onchange. Is there another way to do this that works? A more wicket-centric way? Cheers, Col. EMAIL DISCLAIMER This email message and its attachments are confidential and may also contain copyright or privileged material. If you are not the intended recipient, you may not forward the email or disclose or use the information contained in it. If you have received this email message in error, please advise the sender immediately by replying to this email and delete the message and any associated attachments. Any views, opinions, conclusions, advice or statements expressed in this email message are those of the individual sender and should not be relied upon as the considered view, opinion, conclusions, advice or statement of this company except where the sender expressly, and with authority, states them to be the considered view, opinion, conclusions, advice or statement of this company. Every care is taken but we recommend that you scan any attachments for viruses.
RE: Wicket cannot find id in inner enclosure...but has no problem in outer one!!!
Hey there, This is just a guess!! Why are you creating a new SelectOption?; SelectOption selectedOption = new SelectOption(selectOption[0].getKey(), Selected Value); when you could just use the one that exists (selectOption[0])? The PropertyModel doesn't make sense, ether. I'd remove that line above, and the property model and maybe go for, in total; ChoiceRendererSelectOption choiceRenderer = new ChoiceRendererSelectOption(value, key); final IModelSelectOption iModel = new ModelSelectOption(selectOption[0]); final DropDownChoiceSelectOption postCategoriesDropDown = new DropDownChoiceSelectOption(postCategories, iModel, Arrays.asList(selectOption), choiceRenderer); Like I said, it's a guess, but those things look strange to me... sure other people could help better. Hope it helps... Cheers, Col. -Original Message- From: kshitiz [mailto:k.agarw...@gmail.com] Sent: Wednesday, 18 April 2012 2:51 AM To: users@wicket.apache.org Subject: Re: Wicket cannot find id in inner enclosure...but has no problem in outer one!!! I have removed inner enclosure and its working fine. I am facing another problem. This is my code: ChoiceRendererSelectOption choiceRenderer = new ChoiceRendererSelectOption(value, key); SelectOption selectedOption = new SelectOption(selectOption[0].getKey(), Selected Value); final IModelSelectOption iModel = new PropertyModelSelectOption(selectedOption.getValue(), value); final DropDownChoiceString postCategoriesDropDown = new DropDownChoice(postCategories, iModel, Arrays.asList(selectOption), choiceRenderer); Select Option is : public class SelectOption { private int key; private String value; public SelectOption(int key, String value) { this.key = key; this.value = value; } / getters and setters } Now here, drop down is being rendered in markup.. *select wicket:id=postCategories /select * But the as given in the code, I want a particular value to come as default value. But the default one is coming out 'Choose One'. What is the issue?? But -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-cannot-find-id-in-inner-enclosure-but-has-no-problem-in-outer-one-tp4559666p4565376.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 EMAIL DISCLAIMER This email message and its attachments are confidential and may also contain copyright or privileged material. If you are not the intended recipient, you may not forward the email or disclose or use the information contained in it. If you have received this email message in error, please advise the sender immediately by replying to this email and delete the message and any associated attachments. Any views, opinions, conclusions, advice or statements expressed in this email message are those of the individual sender and should not be relied upon as the considered view, opinion, conclusions, advice or statement of this company except where the sender expressly, and with authority, states them to be the considered view, opinion, conclusions, advice or statement of this company. Every care is taken but we recommend that you scan any attachments for viruses. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: [newbie] Wicket, Spring, Hibernate and transactions in views.
James, Thank you very much for that - a working example is exactly what I need! :) Cheers, Col. -Original Message- From: James Carman [mailto:jcar...@carmanconsulting.com] Sent: 02 March 2010 17:59 To: users@wicket.apache.org Subject: Re: [newbie] Wicket, Spring, Hibernate and transactions in views. Introduce AspectJ and spring-aspects into your build. You can see an example of it in my wicket-advanced sample project: http://svn.carmanconsulting.com/public/wicket-advanced/trunk/ Then, AspectJ will weave the transaction support into your Page/Component classes like you want. There are limits on what type of methods can be transactional, though. I would also recommend the OpenSessionInView filter (which my example project also uses). On Tue, Mar 2, 2010 at 11:25 AM, Colin Rogers coli...@groundsure.com wrote: All, I've got a bit of a newbie Wicket question involving Spring, Hibernate and transactions. The question that I can't seem to find an answer to; Can a view be a created/injected/aop'd like a spring bean so that it honours @Transactional methods for hibernate? An example; public class HomePage extends WebPage { @SpringBean // this is working fine private SessionFactory sessionFactory; public HomePage(final PageParameters parameters) { this.init(); } �...@transactional // this is not working public void init() { Criteria criteria = sessionFactory.getCurrentSession().createCriteria(MyEntity.class); ListMyEntity myEntities = criteria.list(); for( MyEntity myEntity : myEntities ) { // where subEntities is a lazy collection for( SubEntity subEntity : myEntity.getSubEntities() ) { // ... } } } } I've been reading Wicket In Action book, various places on the net and of course, emails on the subject on this list and this particular tutorial; http://wicketinaction.com/2009/06/wicketspringhibernate-configuration/ And I'm still wondering, is this something that is actually possible? I could full understand that it wouldn't be - i.e. that the injector only works for Spring injection dependency and not AOP or anything else. So you inject your dependencies - and they have transaction support etc. But that means I'll be having to force fetching of lazily fetched children from outside the views themselves, which is obviously very painful. It would be so much easier to have transaction support in the view itself and not have to delegate. Any help would be greatly appreciated. The error message I'm receiving is; Caused by: org.hibernate.HibernateException: createCriteria is not valid without active transaction at org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWra pper.invoke(ThreadLocalSessionContext.java:338) at $Proxy15.createCriteria(Unknown Source) at com.tenthart.tacs.testpres.HomePage.init(HomePage.java:39) at com.tenthart.tacs.testpres.HomePage.init(HomePage.java:28) ... 34 more Cheers, Col Emap delivers intelligence, inspiration and access through publications, events and data businesses in retail, media, the public sector and the built environment. www.emap.com. The information in or attached to this email is confidential and may be legally privileged. If you are not the intended recipient of this message any use, disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you have received this message in error, please notify the sender immediately by return email or by telephone on +44(0)207 728 5000 and delete this message and any copies from your computer and network. The Emap group does not warrant that this email and any attachments are free from viruses and accepts no liability for any loss resulting from infected email transmissions. The Emap group reserves the right to monitor all e-mail communications through its networks. Please note that any views expressed in this email may be those of the originator and do not necessarily reflect those of the Emap group. GroundSure Ltd. Company number 03421028 (England and Wales) Emap Limited. Company number: 0537204 (England and Wales). Registered Office: Greater London House, Hampstead Road, London NW1 7EJ, United Kingdom. Details of the operating companies forming part of the Emap group can be found at www.emap.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org Emap delivers intelligence, inspiration and access through publications, events and data businesses in retail, media, the public sector and the built environment. www.emap.com. The information in or attached to this email is confidential
[newbie] Wicket, Spring, Hibernate and transactions in views.
All, I've got a bit of a newbie Wicket question involving Spring, Hibernate and transactions. The question that I can't seem to find an answer to; Can a view be a created/injected/aop'd like a spring bean so that it honours @Transactional methods for hibernate? An example; public class HomePage extends WebPage { @SpringBean // this is working fine private SessionFactory sessionFactory; public HomePage(final PageParameters parameters) { this.init(); } @Transactional // this is not working public void init() { Criteria criteria = sessionFactory.getCurrentSession().createCriteria(MyEntity.class); ListMyEntity myEntities = criteria.list(); for( MyEntity myEntity : myEntities ) { // where subEntities is a lazy collection for( SubEntity subEntity : myEntity.getSubEntities() ) { // ... } } } } I've been reading Wicket In Action book, various places on the net and of course, emails on the subject on this list and this particular tutorial; http://wicketinaction.com/2009/06/wicketspringhibernate-configuration/ And I'm still wondering, is this something that is actually possible? I could full understand that it wouldn't be - i.e. that the injector only works for Spring injection dependency and not AOP or anything else. So you inject your dependencies - and they have transaction support etc. But that means I'll be having to force fetching of lazily fetched children from outside the views themselves, which is obviously very painful. It would be so much easier to have transaction support in the view itself and not have to delegate. Any help would be greatly appreciated. The error message I'm receiving is; Caused by: org.hibernate.HibernateException: createCriteria is not valid without active transaction at org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWra pper.invoke(ThreadLocalSessionContext.java:338) at $Proxy15.createCriteria(Unknown Source) at com.tenthart.tacs.testpres.HomePage.init(HomePage.java:39) at com.tenthart.tacs.testpres.HomePage.init(HomePage.java:28) ... 34 more Cheers, Col Emap delivers intelligence, inspiration and access through publications, events and data businesses in retail, media, the public sector and the built environment. www.emap.com. The information in or attached to this email is confidential and may be legally privileged. If you are not the intended recipient of this message any use, disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you have received this message in error, please notify the sender immediately by return email or by telephone on +44(0)207 728 5000 and delete this message and any copies from your computer and network. The Emap group does not warrant that this email and any attachments are free from viruses and accepts no liability for any loss resulting from infected email transmissions. The Emap group reserves the right to monitor all e-mail communications through its networks. Please note that any views expressed in this email may be those of the originator and do not necessarily reflect those of the Emap group. GroundSure Ltd. Company number 03421028 (England and Wales) Emap Limited. Company number: 0537204 (England and Wales). Registered Office: Greater London House, Hampstead Road, London NW1 7EJ, United Kingdom. Details of the operating companies forming part of the Emap group can be found at www.emap.com
RE: [newbie] Wicket, Spring, Hibernate and transactions in views.
I'd recommend you to make your transactional control in your services and call them from your pages instead of trying to control it in your view. I'd agree in terms of good design, but I'm coding something for myself - and I'm trying to make it easy and as little time consuming as possible. So, yes, transactions in the presentation layer is bad - but it's only read-only transactions, so I'm letting myself off! ;) Having the transactionally controlled service methods, individually instantiate all child entities by hand is also time consuming and would potentially harm performance (if the view didn't need the children, for example). -Original Message- From: Pedro Sena [mailto:sena.pe...@gmail.com] Sent: 02 March 2010 16:39 To: users@wicket.apache.org Subject: Re: [newbie] Wicket, Spring, Hibernate and transactions in views. I don't think so. I'd recommend you to make your transactional control in your services and call them from your pages instead of trying to control it in your view. Best Regards, On Tue, Mar 2, 2010 at 1:25 PM, Colin Rogers coli...@groundsure.com wrote: All, I've got a bit of a newbie Wicket question involving Spring, Hibernate and transactions. The question that I can't seem to find an answer to; Can a view be a created/injected/aop'd like a spring bean so that it honours @Transactional methods for hibernate? An example; public class HomePage extends WebPage { @SpringBean // this is working fine private SessionFactory sessionFactory; public HomePage(final PageParameters parameters) { this.init(); } @Transactional // this is not working public void init() { Criteria criteria = sessionFactory.getCurrentSession().createCriteria(MyEntity.class); ListMyEntity myEntities = criteria.list(); for( MyEntity myEntity : myEntities ) { // where subEntities is a lazy collection for( SubEntity subEntity : myEntity.getSubEntities() ) { // ... } } } } I've been reading Wicket In Action book, various places on the net and of course, emails on the subject on this list and this particular tutorial; http://wicketinaction.com/2009/06/wicketspringhibernate-configuration/ And I'm still wondering, is this something that is actually possible? I could full understand that it wouldn't be - i.e. that the injector only works for Spring injection dependency and not AOP or anything else. So you inject your dependencies - and they have transaction support etc. But that means I'll be having to force fetching of lazily fetched children from outside the views themselves, which is obviously very painful. It would be so much easier to have transaction support in the view itself and not have to delegate. Any help would be greatly appreciated. The error message I'm receiving is; Caused by: org.hibernate.HibernateException: createCriteria is not valid without active transaction at org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWra pper.invoke(ThreadLocalSessionContext.java:338) at $Proxy15.createCriteria(Unknown Source) at com.tenthart.tacs.testpres.HomePage.init(HomePage.java:39) at com.tenthart.tacs.testpres.HomePage.init(HomePage.java:28) ... 34 more Cheers, Col Emap delivers intelligence, inspiration and access through publications, events and data businesses in retail, media, the public sector and the built environment. www.emap.com. The information in or attached to this email is confidential and may be legally privileged. If you are not the intended recipient of this message any use, disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you have received this message in error, please notify the sender immediately by return email or by telephone on +44(0)207 728 5000 and delete this message and any copies from your computer and network. The Emap group does not warrant that this email and any attachments are free from viruses and accepts no liability for any loss resulting from infected email transmissions. The Emap group reserves the right to monitor all e-mail communications through its networks. Please note that any views expressed in this email may be those of the originator and do not necessarily reflect those of the Emap group. GroundSure Ltd. Company number 03421028 (England and Wales) Emap Limited. Company number: 0537204 (England and Wales). Registered Office: Greater London House, Hampstead Road, London NW1 7EJ, United Kingdom. Details of the operating companies forming part of the Emap group can be found at www.emap.com -- /** * Pedro Sena * Systems Architect * Sun Certified Java Programmer * Sun Certified Web Component Developer */ Emap delivers intelligence, inspiration and access through
RE: [newbie] Wicket, Spring, Hibernate and transactions in views.
I'm not DB expert, but why are you using transactions for read only (SELECTs) queries? If you aren't concerned with good design then I wouldn't worry about transactions at all Because you need the transactions for lazy fetching of child elements in hibernate. -Original Message- From: Riyad Kalla [mailto:rka...@gmail.com] Sent: 02 March 2010 16:53 To: users@wicket.apache.org Subject: Re: [newbie] Wicket, Spring, Hibernate and transactions in views. I'm not DB expert, but why are you using transactions for read only (SELECTs) queries? I've only ever seen transactions used to wrap INSERT/UPDATE/DELETE statements (writes) -R On Tue, Mar 2, 2010 at 9:46 AM, Colin Rogers coli...@groundsure.com wrote: I'd recommend you to make your transactional control in your services and call them from your pages instead of trying to control it in your view. I'd agree in terms of good design, but I'm coding something for myself - and I'm trying to make it easy and as little time consuming as possible. So, yes, transactions in the presentation layer is bad - but it's only read-only transactions, so I'm letting myself off! ;) Having the transactionally controlled service methods, individually instantiate all child entities by hand is also time consuming and would potentially harm performance (if the view didn't need the children, for example). -Original Message- From: Pedro Sena [mailto:sena.pe...@gmail.com] Sent: 02 March 2010 16:39 To: users@wicket.apache.org Subject: Re: [newbie] Wicket, Spring, Hibernate and transactions in views. I don't think so. I'd recommend you to make your transactional control in your services and call them from your pages instead of trying to control it in your view. Best Regards, On Tue, Mar 2, 2010 at 1:25 PM, Colin Rogers coli...@groundsure.com wrote: All, I've got a bit of a newbie Wicket question involving Spring, Hibernate and transactions. The question that I can't seem to find an answer to; Can a view be a created/injected/aop'd like a spring bean so that it honours @Transactional methods for hibernate? An example; public class HomePage extends WebPage { @SpringBean // this is working fine private SessionFactory sessionFactory; public HomePage(final PageParameters parameters) { this.init(); } @Transactional // this is not working public void init() { Criteria criteria = sessionFactory.getCurrentSession().createCriteria(MyEntity.class); ListMyEntity myEntities = criteria.list(); for( MyEntity myEntity : myEntities ) { // where subEntities is a lazy collection for( SubEntity subEntity : myEntity.getSubEntities() ) { // ... } } } } I've been reading Wicket In Action book, various places on the net and of course, emails on the subject on this list and this particular tutorial; http://wicketinaction.com/2009/06/wicketspringhibernate-configuration/ And I'm still wondering, is this something that is actually possible? I could full understand that it wouldn't be - i.e. that the injector only works for Spring injection dependency and not AOP or anything else. So you inject your dependencies - and they have transaction support etc. But that means I'll be having to force fetching of lazily fetched children from outside the views themselves, which is obviously very painful. It would be so much easier to have transaction support in the view itself and not have to delegate. Any help would be greatly appreciated. The error message I'm receiving is; Caused by: org.hibernate.HibernateException: createCriteria is not valid without active transaction at org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWra pper.invoke(ThreadLocalSessionContext.java:338) at $Proxy15.createCriteria(Unknown Source) at com.tenthart.tacs.testpres.HomePage.init(HomePage.java:39) at com.tenthart.tacs.testpres.HomePage.init(HomePage.java:28) ... 34 more Cheers, Col Emap delivers intelligence, inspiration and access through publications, events and data businesses in retail, media, the public sector and the built environment. www.emap.com. The information in or attached to this email is confidential and may be legally privileged. If you are not the intended recipient of this message any use, disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you have received this message in error, please notify the sender immediately by return email or by telephone on +44(0)207 728 5000 and delete this message and any copies from your computer and network. The Emap
RE: [newbie] Wicket, Spring, Hibernate and transactions in views.
DEBUG 207:OpenSessionInViewFilter - Closing single Hibernate Session in OpenSessionInViewFilter 2010-03-02 17:19:12,751 DEBUG 207:OpenSessionInViewFilter - Closing single Hibernate Session in OpenSessionInViewFilter 2010-03-02 17:19:12,798 DEBUG 239:OpenSessionInViewFilter - Using SessionFactory 'sessionFactory' for OpenSessionInViewFilter 2010-03-02 17:19:12,798 DEBUG 239:OpenSessionInViewFilter - Using SessionFactory 'sessionFactory' for OpenSessionInViewFilter 2010-03-02 17:19:12,798 DEBUG 181:OpenSessionInViewFilter - Opening single Hibernate Session in OpenSessionInViewFilter 2010-03-02 17:19:12,798 DEBUG 181:OpenSessionInViewFilter - Opening single Hibernate Session in OpenSessionInViewFilter 2010-03-02 17:19:12,798 DEBUG 207:OpenSessionInViewFilter - Closing single Hibernate Session in OpenSessionInViewFilter 2010-03-02 17:19:12,798 DEBUG 207:OpenSessionInViewFilter - Closing single Hibernate Session in OpenSessionInViewFilter -Original Message- From: Pedro Santos [mailto:pedros...@gmail.com] Sent: 02 March 2010 17:11 To: users@wicket.apache.org Subject: Re: [newbie] Wicket, Spring, Hibernate and transactions in views. Consider to use OpenSessionInViewFilter http://static.springsource.org/spring/docs/1.2.9/api/org/springframework /orm/hibernate3/support/OpenSessionInViewFilter.html The doc: Intended for the Open Session in View pattern, i.e. to allow for lazy loading in web views despite the original transactions already being completed. On Tue, Mar 2, 2010 at 2:05 PM, Colin Rogers coli...@groundsure.com wrote: I'm not DB expert, but why are you using transactions for read only (SELECTs) queries? If you aren't concerned with good design then I wouldn't worry about transactions at all Because you need the transactions for lazy fetching of child elements in hibernate. -Original Message- From: Riyad Kalla [mailto:rka...@gmail.com] Sent: 02 March 2010 16:53 To: users@wicket.apache.org Subject: Re: [newbie] Wicket, Spring, Hibernate and transactions in views. I'm not DB expert, but why are you using transactions for read only (SELECTs) queries? I've only ever seen transactions used to wrap INSERT/UPDATE/DELETE statements (writes) -R On Tue, Mar 2, 2010 at 9:46 AM, Colin Rogers coli...@groundsure.com wrote: I'd recommend you to make your transactional control in your services and call them from your pages instead of trying to control it in your view. I'd agree in terms of good design, but I'm coding something for myself - and I'm trying to make it easy and as little time consuming as possible. So, yes, transactions in the presentation layer is bad - but it's only read-only transactions, so I'm letting myself off! ;) Having the transactionally controlled service methods, individually instantiate all child entities by hand is also time consuming and would potentially harm performance (if the view didn't need the children, for example). -Original Message- From: Pedro Sena [mailto:sena.pe...@gmail.com] Sent: 02 March 2010 16:39 To: users@wicket.apache.org Subject: Re: [newbie] Wicket, Spring, Hibernate and transactions in views. I don't think so. I'd recommend you to make your transactional control in your services and call them from your pages instead of trying to control it in your view. Best Regards, On Tue, Mar 2, 2010 at 1:25 PM, Colin Rogers coli...@groundsure.com wrote: All, I've got a bit of a newbie Wicket question involving Spring, Hibernate and transactions. The question that I can't seem to find an answer to; Can a view be a created/injected/aop'd like a spring bean so that it honours @Transactional methods for hibernate? An example; public class HomePage extends WebPage { @SpringBean // this is working fine private SessionFactory sessionFactory; public HomePage(final PageParameters parameters) { this.init(); } @Transactional // this is not working public void init() { Criteria criteria = sessionFactory.getCurrentSession().createCriteria(MyEntity.class); ListMyEntity myEntities = criteria.list(); for( MyEntity myEntity : myEntities ) { // where subEntities is a lazy collection for( SubEntity subEntity : myEntity.getSubEntities() ) { // ... } } } } I've been reading Wicket In Action book, various places on the net and of course, emails on the subject on this list and this particular tutorial; http://wicketinaction.com/2009/06/wicketspringhibernate-configuration/ And I'm still wondering, is this something that is actually possible? I could full understand that it wouldn't
Components and Hyperlinks in inmethod.DataGrid cells
All, I'm trying implement a complicated inmethod DataGrid table and I would like a sanity check as to the solution I came up with. The table is multiple selectable, but in the case of the name column, I want to have a hyperlink that forwards the user to a new view. In the case of other columns I want the DataGrid to perform it's multiple selection as normal. The problem is that DataGrid's as far as I can see, only allows text output for each cell, and don't allow you to render a new component such as a panel or a link with a label. I've attempted to intercept cellClicked method, but attempting to redirect to a new view within that method causes a error in wicket. I've thought about overriding public Component newCell, but that never gets called, and the IRenderable version of newCell isn't any use. I've also tried to wrap WicketColumnAdapter and then use a standard wicket PropertyColumn and the populateItem method to create a link with a label, but as expected this fails as per the advice given in the WicketColumnAdapter javadoc. I've come up with this solution, but it seems like a horrific hack, and I wonder if there isn't a better way of doing it, that makes more sense. In all honesty, I totally chanced upon this solution; columns.add( new WicketColumnAdapter( displayName, new org.apache.wicket.extensions.markup.html.repeater.data.table.PropertyCol umn( new ModelString(name), surname, displayName ) ) { @Override public Component newCell(WebMarkupContainer parent, String componentId, IModel rowModel) { Object object = rowModel.getObject(); LinkPanel panel = new LinkPanel( componentId, object ); return panel; } } ); By wrapping a Wicket PropertyColumn in a WicketColumnAdaptor, the newCell method on the adaptor gets called, and hence we can populate the component. Cheers, Col. Emap delivers intelligence, inspiration and access through publications, events and data businesses in retail, media, the public sector and the built environment. www.emap.com. The information in or attached to this email is confidential and may be legally privileged. If you are not the intended recipient of this message any use, disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you have received this message in error, please notify the sender immediately by return email or by telephone on +44(0)207 728 5000 and delete this message and any copies from your computer and network. The Emap group does not warrant that this email and any attachments are free from viruses and accepts no liability for any loss resulting from infected email transmissions. The Emap group reserves the right to monitor all e-mail communications through its networks. Please note that any views expressed in this email may be those of the originator and do not necessarily reflect those of the Emap group. GroundSure Ltd. Company number 03421028 (England and Wales) Emap Limited. Company number: 0537204 (England and Wales). Registered Office: Greater London House, Hampstead Road, London NW1 7EJ, United Kingdom. Details of the operating companies forming part of the Emap group can be found at www.emap.com