Re: Several Form onSubmit, is it possible add via AbstractBehavior?
As I understand the only way to catch the form's onSubmit is by analyze form components validation which is performed by form submitting. And if validation is successful then form submit will be done for sure. Am I correct understand? Trying to find workaround for this issue,in MyCustomBehavior I found form's button and added AjaxEvenBehavior(onclick) to it. Strangely but form.getDefaultButton() returned null and the only way to get form's Button component is the traversing over all the form components and finding a button component (not sure if it best way). So when I clicked the button the AjaxEventBehavior.onEvent occurs (in MyCustomBehavior) and next AjaxFallbackButton.onSubmit on main form had invoked. But I found that the target parameter is null in main onSubmit handler of form's AjaxFallbackButton. What wrong in this case? Why the target is null in form's buton handler and not null in the form Behavior's button handler. This is the same button in fact. In the form it have onSubmit handler, and in MyCustomBehavior it have onEvent handler. A piece of code is given below... Thanks a lot for help. public class MyCustomBehavior extends AbstractBehavior { .. @Override public void onConfigure(Component component) { // this.form.getDefaultButton() - return null in fact (why) Iterator? extends Component iter = form.iterator(); while (iter.hasNext()) { FormComponent? fc = (FormComponent?)iter.next(); if (fc.isEnabled() (fc instanceof Button)) { fc.add(new AjaxEventBehavior(onclick) { private static final long serialVersionUID = 1L; @Override protected void onEvent(AjaxRequestTarget target) { // here target is not null System.out.println(clicked ); } }); }; } // end of while } // end of onConfigure } // Main page form.add(new AjaxFallbackButton(submit,form) { protected void onSubmit(AjaxRequestTarget target, Form? aForm) { // here target is null (why?) . // some main actions for form submit... } }); . form.add(new MyCustomBehavior(feedback)); ... // End of main page - Best wishes, Alex. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Several-Form-onSubmit-is-it-possible-add-via-AbstractBehavior-tp4656347p4656393.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
Several Form onSubmit, is it possible add via AbstractBehavior?
Hi. I have AjaxFallbackButton on the form with defined onSubmit handler. There also one custom AbstractBehavior added to the form. This Behavior does some action with form's components (add event handlers for form's text controls) and next should intercept form's onSubmit event to do some action also. I try do this by adding form.AjaxFormSubmitBehavior(form, onsubmit) in this AbstractBehavior (do this by override the onConfigure). As a result only AjaxFormSubmitBehavior.onSubmit handler of MyCustomBehavior invoked but form button's onSubmit is ignored. What is wrong in this case? Is it possible to add additional onSubmit action to the form via custom Behavior like in my case? Thanks for advice. .. form.add(new AjaxFallbackButton(submit,form) { protected void onSubmit(AjaxRequestTarget target, Form? aForm) { // some mail form submit actions } }); form.add(new MyCustomBehavior(feedbackPanel)); .. public class MyCustomBehavior extends AbstractBehavior { private FeedbackPanel feedback; private Form form; public MyCustomBehavior(FeedbackPanel feedback) { this.feedback = feedback; } @Override public void bind(Component component) { super.bind(component) // here initialize form this.form = (Form) component; } @Override public void onConfigure(Component component) { // here form's text controls event handlers added via AjaxFormComponentUpdationBehavior this.form.add(new AjaxFormSubmitBehavior(this.form, onsubmit) { @Override protected void onSubmit(AjaxRequestTarget target) { // form submit action, set flag of some operation // this onSubmit handler should be invoked after main form onSubmit handler } @Override protected void onError(AjaxRequestTarget target) { } } } } -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Several-Form-onSubmit-is-it-possible-add-via-AbstractBehavior-tp4656347.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Performance tuning Wicket[1.5]...
Maybe bottleneck is somewhere else? SQL request maybe? Some eager loading... On 29 August 2012 10:31, nino martinez wael nino.martinez.w...@gmail.com wrote: A little feedback. First I tried visualVM (did not provide enough detail for this extreme optimization), then jprofiler (had trouble getting it to work), but yourkit gave the best result. However there was little I could do, other than removing an unnecessary filter (character encoding fix for tomcat/wicket).. Other than that there werent many hotspots. regards Nino 2012/8/27 nino martinez wael nino.martinez.w...@gmail.com Yup, I'll do that another round.. Although I'll use visualvm... 2012/8/27 Martin Grigorov mgrigo...@apache.org Fire Yourkit/JProfiler and see what they say. On Mon, Aug 27, 2012 at 2:45 PM, nino martinez wael nino.martinez.w...@gmail.com wrote: Hi Im seeing a load on our server. Tried these settings in wicketapplication: getPageSettings().setVersionPagesByDefault(false); getStoreSettings().setInmemoryCacheSize(200); And in our MainPage: setVersioned(false); All of our services are being cached, so it's not the backend thats the problem.. Im using LDM's everywhere. Our main page are using ajax to refresh itself. And load turns linearly bad, until max load on somewhere around 100 sessions. Memory are not a problem, wicket app uses very little around 100 mb and server has 4gb. CPU are a AMD opteron 2.2 ghz. -- Best regards / Med venlig hilsen Nino Martinez -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Best regards / Med venlig hilsen Nino Martinez -- Best regards / Med venlig hilsen Nino Martinez -- Best regards Alexandr - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Jqwicket
Wicket 6.0 has jQuery support by its own. 2012/8/30 Pierre Goupil goupilpie...@gmail.com Good evening, I have two simple questions regarding jqwicket: - are there any plans for Wicket 6.0? Or even a work in progress? - does it have a Git repository? Or is it just using SVN? Regards, Pierre
Re: page version and forms
Nope, 1.5 Well, I am not quite sure that my statement is correct. while tree project has some kind of examples, there are no real documentation. Let's consieder http://www.mysticcoders.com/blog/autocomplete-with-an-object/ - my opinion is that sometimes one may want to make an impression quickly looking through a short how-to instead of downloading code, trying to assemble it (btw, your instruction doesn't work) and digging through the code. It works most of the time if time is not a question. On 22 August 2012 11:24, Sven Meier s...@meiers.net wrote: Are you using wicket-tree or the new components in Wicket 6? Please be more specific what information you're looking for. I'll gladly provide more info in javadoc or in the wiki. Sven Alex Shubert alex.shub...@gmail.com schrieb: Sven while you are here: why no documentation for Tree? Nothing at all? Right now I face a problem - tree do not persist it's state (Bookmarcable links, copied from example) and I have no clue where to see. On 21 August 2012 21:38, Sven Meier s...@meiers.net wrote: And the winner is ... Martin! On AppEngine I still have Wicket 1.4.x running. Sven On 08/21/2012 02:59 PM, Martin Grigorov wrote: The Google Code repo contains 1.5 but the deployed app is using pre-1.5 version. I can bet on this. On Tue, Aug 21, 2012 at 3:37 PM, Alex Shubert alex.shub...@gmail.com wrote: Martin, http://wicket-tree.googlecode.com/svn/repo/wicket-tree/wicket-tree-parent/0.5.0/wicket-tree-parent-0.5.0.pom Again, no 1.4 at all. Not in one place. Moreover, '?wicket:interface=:0:1:::' doesn't means 1.4 is in action. Just take Is there a reason why you don't trust me ? :-) wicket:interface is no more used in 1.5+, unless the application adds it explicitly. Wicket (the framework) doesn't use it anymore. a look at event listener implementation. About the problem: the page I gave link for is really stateless but it is not meant to be, it just happened. If user choose any other tree renders version number eager to appear. The most Wicket problem right now is it's occult state. Wiki is hopelessly outdated, most of the examples refer to 1.2.-1.3 version... Most of them are actually still valid. There are new pages labeled with wicket15 and wicket6 which refer to the new features in 1.5 and 6.0 respect. If someone wonder how to determine why his page is stateful here is the solution: There is StatelessChecker in wicket-devutils for this task. if (!isPageStateless()) { visitChildren(Component.class, new IVisitorComponent, Component() { @Override public void component(Component component, IVisitComponent iVisit) { if (!component.isStateless()) { LOGGER.info(Stateful component found [ + component.getClass().getName() + : + component.getMarkupId() + ]); // iVisit.stop(component); } } }); } If in need of test detection, extract visitor to separate class and instantiate pages with WicketTester. On 21 August 2012 15:47, Martin Grigorov mgrigo...@apache.org wrote: Sorry for being stubborn but having '?wicket:interface=:0:1:::' in the url means that this is Wicket pre-1.5 ;-) I guess Sven will join this conversation later today and explain in more details. On Tue, Aug 21, 2012 at 2:16 PM, Alex Shubert alex.shub...@gmail.com wrote: Martin with all my respect but their build script uses dependency groupIdorg.apache.wicket/groupId artifactIdwicket-core/artifactId version${wicket.version}/version /dependency ${wicket.version} derived from parent pom where wicket.version1.5.0/wicket.version So, 1. no stateless form 2. it is 1.5 3. it's pretty easy to ensure yourself just by looking into code http://code.google.com/p/wicket-tree/wiki/RunningExamples It even can't be compiled under 1.4 Anyway: what does your answer has to do with my question? One more time: how that example manage not to increase page version shown in url on every tree node selection? thanks On 21 August 2012 14:39, Martin Grigorov mgrigo...@apache.org wrote: The deployed examples use Wicket 1.4. http://wicket-tree.appspot.com/?wicket:interface=:0:1::: On Tue, Aug 21, 2012 at 1:35 PM, Alex Shubert alex.shub...@gmail.com wrote: They are using FormVoid form = new FormVoid(form); and still no version in url on round-trips. Also, FilterForm from Wicket API doesn't extends StatelessForm while your answer states that must be the case. On 21 August 2012 14:20, Martin Grigorov mgrigo...@apache.org wrote: Use StatelessForm instead. On Tue, Aug 21, 2012 at 1:06 PM, Alex Shubert alex.shub...@gmail.com wrote: Hello Recently I found
Re: page version and forms
Sven while you are here: why no documentation for Tree? Nothing at all? Right now I face a problem - tree do not persist it's state (Bookmarcable links, copied from example) and I have no clue where to see. On 21 August 2012 21:38, Sven Meier s...@meiers.net wrote: And the winner is ... Martin! On AppEngine I still have Wicket 1.4.x running. Sven On 08/21/2012 02:59 PM, Martin Grigorov wrote: The Google Code repo contains 1.5 but the deployed app is using pre-1.5 version. I can bet on this. On Tue, Aug 21, 2012 at 3:37 PM, Alex Shubert alex.shub...@gmail.com wrote: Martin, http://wicket-tree.googlecode.com/svn/repo/wicket-tree/wicket-tree-parent/0.5.0/wicket-tree-parent-0.5.0.pom Again, no 1.4 at all. Not in one place. Moreover, '?wicket:interface=:0:1:::' doesn't means 1.4 is in action. Just take Is there a reason why you don't trust me ? :-) wicket:interface is no more used in 1.5+, unless the application adds it explicitly. Wicket (the framework) doesn't use it anymore. a look at event listener implementation. About the problem: the page I gave link for is really stateless but it is not meant to be, it just happened. If user choose any other tree renders version number eager to appear. The most Wicket problem right now is it's occult state. Wiki is hopelessly outdated, most of the examples refer to 1.2.-1.3 version... Most of them are actually still valid. There are new pages labeled with wicket15 and wicket6 which refer to the new features in 1.5 and 6.0 respect. If someone wonder how to determine why his page is stateful here is the solution: There is StatelessChecker in wicket-devutils for this task. if (!isPageStateless()) { visitChildren(Component.class, new IVisitorComponent, Component() { @Override public void component(Component component, IVisitComponent iVisit) { if (!component.isStateless()) { LOGGER.info(Stateful component found [ + component.getClass().getName() + : + component.getMarkupId() + ]); // iVisit.stop(component); } } }); } If in need of test detection, extract visitor to separate class and instantiate pages with WicketTester. On 21 August 2012 15:47, Martin Grigorov mgrigo...@apache.org wrote: Sorry for being stubborn but having '?wicket:interface=:0:1:::' in the url means that this is Wicket pre-1.5 ;-) I guess Sven will join this conversation later today and explain in more details. On Tue, Aug 21, 2012 at 2:16 PM, Alex Shubert alex.shub...@gmail.com wrote: Martin with all my respect but their build script uses dependency groupIdorg.apache.wicket/groupId artifactIdwicket-core/artifactId version${wicket.version}/version /dependency ${wicket.version} derived from parent pom where wicket.version1.5.0/wicket.version So, 1. no stateless form 2. it is 1.5 3. it's pretty easy to ensure yourself just by looking into code http://code.google.com/p/wicket-tree/wiki/RunningExamples It even can't be compiled under 1.4 Anyway: what does your answer has to do with my question? One more time: how that example manage not to increase page version shown in url on every tree node selection? thanks On 21 August 2012 14:39, Martin Grigorov mgrigo...@apache.org wrote: The deployed examples use Wicket 1.4. http://wicket-tree.appspot.com/?wicket:interface=:0:1::: On Tue, Aug 21, 2012 at 1:35 PM, Alex Shubert alex.shub...@gmail.com wrote: They are using FormVoid form = new FormVoid(form); and still no version in url on round-trips. Also, FilterForm from Wicket API doesn't extends StatelessForm while your answer states that must be the case. On 21 August 2012 14:20, Martin Grigorov mgrigo...@apache.org wrote: Use StatelessForm instead. On Tue, Aug 21, 2012 at 1:06 PM, Alex Shubert alex.shub...@gmail.com wrote: Hello Recently I found wicket tree control http://wicket-tree.appspot.com/nested and one there is a thing I can't understand: while the page contains Form it looks like not versioned. I mean there are no version number in a url. How does it work then? Is there any clear way to build pages containing Form without explicit version number in url except some black magic involved ( modified MountedMapper ) -- Best regards Alexandr - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e
Re: page version and forms
They are using FormVoid form = new FormVoid(form); and still no version in url on round-trips. Also, FilterForm from Wicket API doesn't extends StatelessForm while your answer states that must be the case. On 21 August 2012 14:20, Martin Grigorov mgrigo...@apache.org wrote: Use StatelessForm instead. On Tue, Aug 21, 2012 at 1:06 PM, Alex Shubert alex.shub...@gmail.com wrote: Hello Recently I found wicket tree control http://wicket-tree.appspot.com/nested and one there is a thing I can't understand: while the page contains Form it looks like not versioned. I mean there are no version number in a url. How does it work then? Is there any clear way to build pages containing Form without explicit version number in url except some black magic involved ( modified MountedMapper ) -- Best regards Alexandr - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Best regards Alexandr - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: page version and forms
Martin with all my respect but their build script uses dependency groupIdorg.apache.wicket/groupId artifactIdwicket-core/artifactId version${wicket.version}/version /dependency ${wicket.version} derived from parent pom where wicket.version1.5.0/wicket.version So, 1. no stateless form 2. it is 1.5 3. it's pretty easy to ensure yourself just by looking into code http://code.google.com/p/wicket-tree/wiki/RunningExamples It even can't be compiled under 1.4 Anyway: what does your answer has to do with my question? One more time: how that example manage not to increase page version shown in url on every tree node selection? thanks On 21 August 2012 14:39, Martin Grigorov mgrigo...@apache.org wrote: The deployed examples use Wicket 1.4. http://wicket-tree.appspot.com/?wicket:interface=:0:1::: On Tue, Aug 21, 2012 at 1:35 PM, Alex Shubert alex.shub...@gmail.com wrote: They are using FormVoid form = new FormVoid(form); and still no version in url on round-trips. Also, FilterForm from Wicket API doesn't extends StatelessForm while your answer states that must be the case. On 21 August 2012 14:20, Martin Grigorov mgrigo...@apache.org wrote: Use StatelessForm instead. On Tue, Aug 21, 2012 at 1:06 PM, Alex Shubert alex.shub...@gmail.com wrote: Hello Recently I found wicket tree control http://wicket-tree.appspot.com/nested and one there is a thing I can't understand: while the page contains Form it looks like not versioned. I mean there are no version number in a url. How does it work then? Is there any clear way to build pages containing Form without explicit version number in url except some black magic involved ( modified MountedMapper ) -- Best regards Alexandr - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Best regards Alexandr - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Best regards Alexandr - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: page version and forms
Martin, http://wicket-tree.googlecode.com/svn/repo/wicket-tree/wicket-tree-parent/0.5.0/wicket-tree-parent-0.5.0.pom Again, no 1.4 at all. Not in one place. Moreover, '?wicket:interface=:0:1:::' doesn't means 1.4 is in action. Just take a look at event listener implementation. About the problem: the page I gave link for is really stateless but it is not meant to be, it just happened. If user choose any other tree renders version number eager to appear. The most Wicket problem right now is it's occult state. Wiki is hopelessly outdated, most of the examples refer to 1.2.-1.3 version... If someone wonder how to determine why his page is stateful here is the solution: if (!isPageStateless()) { visitChildren(Component.class, new IVisitorComponent, Component() { @Override public void component(Component component, IVisitComponent iVisit) { if (!component.isStateless()) { LOGGER.info(Stateful component found [ + component.getClass().getName() + : + component.getMarkupId() + ]); // iVisit.stop(component); } } }); } If in need of test detection, extract visitor to separate class and instantiate pages with WicketTester. On 21 August 2012 15:47, Martin Grigorov mgrigo...@apache.org wrote: Sorry for being stubborn but having '?wicket:interface=:0:1:::' in the url means that this is Wicket pre-1.5 ;-) I guess Sven will join this conversation later today and explain in more details. On Tue, Aug 21, 2012 at 2:16 PM, Alex Shubert alex.shub...@gmail.com wrote: Martin with all my respect but their build script uses dependency groupIdorg.apache.wicket/groupId artifactIdwicket-core/artifactId version${wicket.version}/version /dependency ${wicket.version} derived from parent pom where wicket.version1.5.0/wicket.version So, 1. no stateless form 2. it is 1.5 3. it's pretty easy to ensure yourself just by looking into code http://code.google.com/p/wicket-tree/wiki/RunningExamples It even can't be compiled under 1.4 Anyway: what does your answer has to do with my question? One more time: how that example manage not to increase page version shown in url on every tree node selection? thanks On 21 August 2012 14:39, Martin Grigorov mgrigo...@apache.org wrote: The deployed examples use Wicket 1.4. http://wicket-tree.appspot.com/?wicket:interface=:0:1::: On Tue, Aug 21, 2012 at 1:35 PM, Alex Shubert alex.shub...@gmail.com wrote: They are using FormVoid form = new FormVoid(form); and still no version in url on round-trips. Also, FilterForm from Wicket API doesn't extends StatelessForm while your answer states that must be the case. On 21 August 2012 14:20, Martin Grigorov mgrigo...@apache.org wrote: Use StatelessForm instead. On Tue, Aug 21, 2012 at 1:06 PM, Alex Shubert alex.shub...@gmail.com wrote: Hello Recently I found wicket tree control http://wicket-tree.appspot.com/nested and one there is a thing I can't understand: while the page contains Form it looks like not versioned. I mean there are no version number in a url. How does it work then? Is there any clear way to build pages containing Form without explicit version number in url except some black magic involved ( modified MountedMapper ) -- Best regards Alexandr - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Best regards Alexandr - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Best regards Alexandr - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users
Re: page version and forms
It's obvious that selection of leafs (implemented as BookmarcableLinks) is NOT handled by Ajax. BookmarkableFolderContent.java : 62 PageParameters parameters = new PageParameters(); parameters.add(foo, foo.getId()); return new BookmarkablePageLinkVoid(id, tree.getPage() .getClass(), parameters); Or you can take a look at FB console and see network activity. On 21 August 2012 16:48, Pointbreak pointbreak+wicketst...@ml1.net wrote: The tree node selections are fully handled by ajax requests, so they will (obviously) never change the url of the page. Change the selection of e.g. the dropdown for Content, and you will see that the url changes. There are ways to have forms without version/id information in the URL. Search this list for e.g. NoVersionMount. Such solutions do change how Wicket behaves with the back-button/page-refresh, since a new version of the page will always be returned in that case. On Tue, Aug 21, 2012, at 13:16, Alex Shubert wrote: [...] Anyway: what does your answer has to do with my question? One more time: how that example manage not to increase page version shown in url on every tree node selection? thanks [...] On 21 August 2012 14:39, Martin Grigorov mgrigo...@apache.org wrote: The deployed examples use Wicket 1.4. http://wicket-tree.appspot.com/?wicket:interface=:0:1::: On Tue, Aug 21, 2012 at 1:35 PM, Alex Shubert alex.shub...@gmail.com wrote: They are using FormVoid form = new FormVoid(form); and still no version in url on round-trips. Also, FilterForm from Wicket API doesn't extends StatelessForm while your answer states that must be the case. On 21 August 2012 14:20, Martin Grigorov mgrigo...@apache.org wrote: Use StatelessForm instead. On Tue, Aug 21, 2012 at 1:06 PM, Alex Shubert alex.shub...@gmail.com wrote: Hello Recently I found wicket tree control http://wicket-tree.appspot.com/nested and one there is a thing I can't understand: while the page contains Form it looks like not versioned. I mean there are no version number in a url. How does it work then? Is there any clear way to build pages containing Form without explicit version number in url except some black magic involved ( modified MountedMapper ) -- Best regards Alexandr - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Best regards Alexandr - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Best regards Alexandr - 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 -- Best regards Alexandr - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: page version and forms
Martin, does it really makes any difference? Lack of stateless navigation does ( https://issues.apache.org/jira/browse/WICKET-1086 ) Anyway, I explained solution in my prev letter. Thanks! On 21 August 2012 16:59, Martin Grigorov mgrigo...@apache.org wrote: The Google Code repo contains 1.5 but the deployed app is using pre-1.5 version. I can bet on this. On Tue, Aug 21, 2012 at 3:37 PM, Alex Shubert alex.shub...@gmail.com wrote: Martin, http://wicket-tree.googlecode.com/svn/repo/wicket-tree/wicket-tree-parent/0.5.0/wicket-tree-parent-0.5.0.pom Again, no 1.4 at all. Not in one place. Moreover, '?wicket:interface=:0:1:::' doesn't means 1.4 is in action. Just take Is there a reason why you don't trust me ? :-) wicket:interface is no more used in 1.5+, unless the application adds it explicitly. Wicket (the framework) doesn't use it anymore. a look at event listener implementation. About the problem: the page I gave link for is really stateless but it is not meant to be, it just happened. If user choose any other tree renders version number eager to appear. The most Wicket problem right now is it's occult state. Wiki is hopelessly outdated, most of the examples refer to 1.2.-1.3 version... Most of them are actually still valid. There are new pages labeled with wicket15 and wicket6 which refer to the new features in 1.5 and 6.0 respect. If someone wonder how to determine why his page is stateful here is the solution: There is StatelessChecker in wicket-devutils for this task. if (!isPageStateless()) { visitChildren(Component.class, new IVisitorComponent, Component() { @Override public void component(Component component, IVisitComponent iVisit) { if (!component.isStateless()) { LOGGER.info(Stateful component found [ + component.getClass().getName() + : + component.getMarkupId() + ]); // iVisit.stop(component); } } }); } If in need of test detection, extract visitor to separate class and instantiate pages with WicketTester. On 21 August 2012 15:47, Martin Grigorov mgrigo...@apache.org wrote: Sorry for being stubborn but having '?wicket:interface=:0:1:::' in the url means that this is Wicket pre-1.5 ;-) I guess Sven will join this conversation later today and explain in more details. On Tue, Aug 21, 2012 at 2:16 PM, Alex Shubert alex.shub...@gmail.com wrote: Martin with all my respect but their build script uses dependency groupIdorg.apache.wicket/groupId artifactIdwicket-core/artifactId version${wicket.version}/version /dependency ${wicket.version} derived from parent pom where wicket.version1.5.0/wicket.version So, 1. no stateless form 2. it is 1.5 3. it's pretty easy to ensure yourself just by looking into code http://code.google.com/p/wicket-tree/wiki/RunningExamples It even can't be compiled under 1.4 Anyway: what does your answer has to do with my question? One more time: how that example manage not to increase page version shown in url on every tree node selection? thanks On 21 August 2012 14:39, Martin Grigorov mgrigo...@apache.org wrote: The deployed examples use Wicket 1.4. http://wicket-tree.appspot.com/?wicket:interface=:0:1::: On Tue, Aug 21, 2012 at 1:35 PM, Alex Shubert alex.shub...@gmail.com wrote: They are using FormVoid form = new FormVoid(form); and still no version in url on round-trips. Also, FilterForm from Wicket API doesn't extends StatelessForm while your answer states that must be the case. On 21 August 2012 14:20, Martin Grigorov mgrigo...@apache.org wrote: Use StatelessForm instead. On Tue, Aug 21, 2012 at 1:06 PM, Alex Shubert alex.shub...@gmail.com wrote: Hello Recently I found wicket tree control http://wicket-tree.appspot.com/nested and one there is a thing I can't understand: while the page contains Form it looks like not versioned. I mean there are no version number in a url. How does it work then? Is there any clear way to build pages containing Form without explicit version number in url except some black magic involved ( modified MountedMapper ) -- Best regards Alexandr - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Best regards Alexandr
RE: Suppress Ajax ComponentNotFoundException
Thank you. I don't think either of those will work (though I will try them) as * The update event is (I assume - but don't know as I can't reproduce the problem myself) being generated in the browser before the modal window is closed. * The canCallListenerInterface method is invoked after the component has been found - so it's already too late. Alex -Original Message- From: W Mazur [mailto:wlodekma...@gmail.com] Sent: Monday, 25 June 2012 8:48 p.m. To: users@wicket.apache.org Subject: Re: Suppress Ajax ComponentNotFoundException I would try to add WindowClosedCallback to Modal Window and remove behavior(s) in that callback (unless you are going to reuse that ModalWindow). Another option: try to override Behavior's canCallListenerInterface() Regards Wlodek 2012/6/25 Alex Grant alex.gr...@unimarket.com: I have a problem that shows up intermittently (and never when I try to reproduce it). We have ModalWindows that contain fields with associated AjaxFormComponentUpdatingBehaviors on the onblur event. These work great while the ModalWindow is open but sometimes events are received out of sequence and we get an update event firing after ModalWindow is closed. Wicket the throws a ComponentNotFoundException and the users sees the error page. Is there some way I can prevent these happening, or at least suppress them? All the field values will have been submitted when the ModalWindow was closed so the extra update event can be safely ignored. Thanks Alex Grant. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Suppress Ajax ComponentNotFoundException
I have a problem that shows up intermittently (and never when I try to reproduce it). We have ModalWindows that contain fields with associated AjaxFormComponentUpdatingBehaviors on the onblur event. These work great while the ModalWindow is open but sometimes events are received out of sequence and we get an update event firing after ModalWindow is closed. Wicket the throws a ComponentNotFoundException and the users sees the error page. Is there some way I can prevent these happening, or at least suppress them? All the field values will have been submitted when the ModalWindow was closed so the extra update event can be safely ignored. Thanks Alex Grant. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ModalDialog and returning back
Thank you very much, I will try to use jQuery directly. 2012/6/6 Jeffrey Schneller jeffrey.schnel...@envisa.com You could just include the logo panel on the page and uses straight jQuery to show and hide the logo panel. You wouldn't need the Ajax timer and your extended OpenOnLoadModalWindow class. It should then be able to support the back button. You could also determine if the user has been to your app before in the same session and choose to show the logo or not (there are a few jQuery plugins that can help with determining that) With Wicket 6 my understanding is that jQuery will be included by Wicket so this may be even easier to do in 6 and all in Java code. I have not looked at version 6 yet. On Jun 6, 2012, at 7:04 AM, Alex zeita...@googlemail.com wrote: Dear All, I have an application that on renderOnDomReadyJavascript shows Modal Dialog for 5 seconds and then closes it. It is kind of Logo. Unfortunately if user goes to another site and returns back then “Page expired” is displayed in this Modal Dialog and it is not closes. Is it possible to avoid showing this Modal Dialog after user returns to my application pressing “Back” Button on the Browser or to show it properly for 5 sec. Thanks a lot in advance, Alex public class LogoStarter { private static final Logger log = LoggerFactory.getLogger(LogoStarter.class); public LogoStarter(final WebPage webPage) { final ModalWindow modalLogo; final ModalWindow modalInfo; webPage.add(modalLogo = new OpenOnLoadModalWindow(modalLogo)); modalLogo.setTitle(); modalLogo.setPageCreator(new ModalWindow.PageCreator() { private static final long serialVersionUID = 2674999186672458996L; public Page createPage() { return new Logo(); } }); webPage.add(new AjaxLinkObject(logo) { public void onClick(AjaxRequestTarget target) { if (target != null) { modalLogo.show(target); } else { System.out.println(JS off); setResponsePage(new Logo(JS_OFF_MSG)); } } }); webPage.add(new AbstractAjaxTimerBehavior(Duration.seconds(5)) { protected void onTimer(AjaxRequestTarget target) { if (modalLogo.isShown()) modalLogo.close(target); stop(); } }); } } public class OpenOnLoadModalWindow extends ModalWindow implements IHeaderContributor { public OpenOnLoadModalWindow(String id) { super(id); } public OpenOnLoadModalWindow(String id, IModel? model) { super(id, model); } public void renderHead(IHeaderResponse response) { response.renderOnDomReadyJavascript(getWindowOpenJavascript()); } protected boolean makeContentVisible() { return true; } }
Re: ModalDialog and returning back
Thanks a lot for your answer Melinda! If my Logo will extend Panel instead of WebPage what should I use instead of createPage() and setResponsePage(); without this I get an error: ERROR - RequestCycle - Error creating page for modal dialog. org.apache.wicket.WicketRuntimeException: Error creating page for modal dialog. at org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow.getWindowOpenJavascript(ModalWindow.java:1130) at de.regio.impl.OpenOnLoadModalWindow.renderHead(OpenOnLoadModalWindow.java:53) at org.apache.wicket.Component.renderHead(Component.java:2801) at org.apache.wicket.markup.html.panel.Panel.renderHead(Panel.java:138) at org.apache.wicket.markup.html.internal.HtmlHeaderContainer$1.component(HtmlHeaderContainer.java:231) at org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java:920) at org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java:960) at org.apache.wicket.markup.html.internal.HtmlHeaderContainer.renderHeaderSections(HtmlHeaderContainer.java:222) at org.apache.wicket.markup.html.internal.HtmlHeaderContainer.onComponentTagBody(HtmlHeaderContainer.java:137) at org.apache.wicket.Component.renderComponent(Component.java:2728) at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1559) at org.apache.wicket.Component.render(Component.java:2528) at org.apache.wicket.MarkupContainer.autoAdd(MarkupContainer.java:229) at org.apache.wicket.markup.resolver.HtmlHeaderResolver.resolve(HtmlHeaderResolver.java:80) at org.apache.wicket.markup.resolver.ComponentResolvers.resolve(ComponentResolvers.java:81) at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1465) at org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1575) at org.apache.wicket.Page.onRender(Page.java:1594) at org.apache.wicket.Component.render(Component.java:2528) at org.apache.wicket.Page.renderPage(Page.java:932) at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:261) at org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:105) at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1260) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1331) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1438) at org.apache.wicket.RequestCycle.request(RequestCycle.java:546) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:486) at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:319) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418) at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230) at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:326) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542) at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409) at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582) 2012/6/8 Melinda Dweer melinda.dw...@gmail.com Hi, Some things I would try are 1-Instead of a page use a panel for your modal. That way the page expired will not be shown on the page. 2-Make your page expired page the page you want to show. 3-AFAIK the method public void renderHead(IHeaderResponse response) { response.renderOnDomReadyJavascript(getWindowOpenJavascript()); } is the one determining the modal will be show on load. Yo can for instance use a more permanent cookie and don't call response.renderOnDomReadyJavascript(getWindowOpenJavascript()); depending on that condition. Regards, Melinda On Wed, Jun 6, 2012 at 1:04 PM, Alex zeita...@googlemail.com wrote: Dear All, I have an application that on renderOnDomReadyJavascript shows Modal Dialog for 5 seconds and then closes it. It is kind of Logo. Unfortunately if user goes to another site and returns back then “Page
ModalDialog and returning back
Dear All, I have an application that on renderOnDomReadyJavascript shows Modal Dialog for 5 seconds and then closes it. It is kind of Logo. Unfortunately if user goes to another site and returns back then “Page expired” is displayed in this Modal Dialog and it is not closes. Is it possible to avoid showing this Modal Dialog after user returns to my application pressing “Back” Button on the Browser or to show it properly for 5 sec. Thanks a lot in advance, Alex public class LogoStarter { private static final Logger log = LoggerFactory.getLogger(LogoStarter.class); public LogoStarter(final WebPage webPage) { final ModalWindow modalLogo; final ModalWindow modalInfo; webPage.add(modalLogo = new OpenOnLoadModalWindow(modalLogo)); modalLogo.setTitle(); modalLogo.setPageCreator(new ModalWindow.PageCreator() { private static final long serialVersionUID = 2674999186672458996L; public Page createPage() { return new Logo(); } }); webPage.add(new AjaxLinkObject(logo) { public void onClick(AjaxRequestTarget target) { if (target != null) { modalLogo.show(target); } else { System.out.println(JS off); setResponsePage(new Logo(JS_OFF_MSG)); } } }); webPage.add(new AbstractAjaxTimerBehavior(Duration.seconds(5)) { protected void onTimer(AjaxRequestTarget target) { if (modalLogo.isShown()) modalLogo.close(target); stop(); } }); } } public class OpenOnLoadModalWindow extends ModalWindow implements IHeaderContributor { public OpenOnLoadModalWindow(String id) { super(id); } public OpenOnLoadModalWindow(String id, IModel? model) { super(id, model); } public void renderHead(IHeaderResponse response) { response.renderOnDomReadyJavascript(getWindowOpenJavascript()); } protected boolean makeContentVisible() { return true; } }
RE: Error during start of wicket application
Seems like a classpath issue. Make sure that all the wicket jars that you need are included in your path. - Alex -Original Message- From: André Schütz [mailto:andre-p...@gmx.de] Sent: Thursday, February 23, 2012 12:13 PM To: users@wicket.apache.org Subject: Error during start of wicket application Hello, I get the following error message during a start of the tomcat server with a clean packed wicket application: /** * BEGIN */ Exception in thread Thread-2 java.lang.NoClassDefFoundError: org/apache/wicket/ApplicationListenerCollection$2 at org.apache.wicket.ApplicationListenerCollection.onBeforeDestroyed(ApplicationListenerCollection.java:44) at org.apache.wicket.Application.internalDestroy(Application.java:639) at org.apache.wicket.protocol.http.WebApplication.internalDestroy(WebApplication.java:563) at org.apache.wicket.protocol.http.WicketFilter.destroy(WicketFilter.java:478) at org.apache.catalina.core.ApplicationFilterConfig.release(ApplicationFilterConfig.java:357) at org.apache.catalina.core.StandardContext.filterStop(StandardContext.java:3873) at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4605) at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1098) at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1098) at org.apache.catalina.core.StandardEngine.stop(StandardEngine.java:448) at org.apache.catalina.core.StandardService.stop(StandardService.java:584) at org.apache.catalina.core.StandardServer.stop(StandardServer.java:744) at org.apache.catalina.startup.Catalina.stop(Catalina.java:643) at org.apache.catalina.startup.Catalina$CatalinaShutdownHook.run(Catalina.java:687) Caused by: java.lang.ClassNotFoundException: org.apache.wicket.ApplicationListenerCollection$2 at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1484) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1329) ... 14 more /** * END */ Any ideas about this error? Thanks, Andre -- Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de - 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
tomcat deployment issues
If someone could help me out with this issue, that would be awesome. Currently: Deploying on Tomcat 6. Default deploy folder is webapps webapps/ROOT is where my 1st wicket app is (lets call it App1) webapps.web2 is another Host record for a different URL. webapps.web2/app2 is my wicket app #2 No matter what I tried, app#2 doesn't get started (but servlets from same context work fine). When I go to the url, it says: java.lang.IllegalStateException: Application with name 'App2' already exists.' org.apache.wicket.Application.setName(Application.java:854) org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:337) org.apache.wicket.protocol.http.WicketServlet.init(WicketServlet.java:271) javax.servlet.GenericServlet.init(GenericServlet.java:212) ... I tried renaming it to App3 (in web.xml and I get same message except it says App3). I checked all the web.xml files on the server, no other one has App2 in it. I have lib folders under each app. I don't share anything beside DB drivers in Tomcat's lib folder. I have Wicket 1.5.4 for App1 and 1.5.5 for App2 (donno if that makes a diff). Any ideas? Regards, - Alex. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
unixODBC, Wicket, Tomcat
Dear All, Does anybody have experience in using unixODBC with Wicket and Tomcat? It is possible to establish connection with jetty. But it does not work with Tomcat under Ubuntu. Stand alone java class (without using wicket) is working under Ubuntu fine. Any help would be highly appreciated. Alex
Re: unixODBC, Wicket, Tomcat
Sorry, I get: Genral Error | sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6986) | sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7114) | sun.jdbc.odbc.JdbcOdbc.SQLDriverConnect(JdbcOdbc.java:3073) | sun.jdbc.odbc.JdbcOdbcConnection.initialize(JdbcOdbcConnection.java:323) | sun.jdbc.odbc.JdbcOdbcDriver.connect(JdbcOdbcDriver.java:174) | java.sql.DriverManager.getConnection(DriverManager.java:582) | java.sql.DriverManager.getConnection(DriverManager.java:207) | wicketqs.HomePage.init(HomePage.java:39) | sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) | sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) | sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) | java.lang.reflect.Constructor.newInstance(Constructor.java:513) | org.apache.wicket.session.DefaultPageFactory.createPage(DefaultPageFactory.java:188) | org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:65) | org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.newPage(BookmarkablePageRequestTarget.java:298) | org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.getPage(BookmarkablePageRequestTarget.java:320) | org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.processEvents(BookmarkablePageRequestTarget.java:234) | org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92) | org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1250) | org.apache.wicket.RequestCycle.step(RequestCycle.java:1329) | org.apache.wicket.RequestCycle.steps(RequestCycle.java:1428) | org.apache.wicket.RequestCycle.request(RequestCycle.java:545) | org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:479) | org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:312) | org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) | org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) | org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) | org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) | org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) | org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) | org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:567) | org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) | org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) | org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856) | org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) | org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454) | java.lang.Thread.run(Thread.java:662) Am 24. Februar 2012 14:13 schrieb Martin Grigorov mgrigo...@apache.org: It doesn't work doesn't say much about the problem ... Give more details On Fri, Feb 24, 2012 at 2:06 PM, Alex zeita...@googlemail.com wrote: Dear All, Does anybody have experience in using unixODBC with Wicket and Tomcat? It is possible to establish connection with jetty. But it does not work with Tomcat under Ubuntu. Stand alone java class (without using wicket) is working under Ubuntu fine. Any help would be highly appreciated. Alex -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: unixODBC, Wicket, Tomcat
I am just trying to make connection to unixODBC using jdbcOdbc Bridge: public class HomePage extends WebPage { public HomePage(final PageParameters parameters) { Connection con = null; try { Class.forName(sun.jdbc.odbc.JdbcOdbcDriver) ; // Connect with a url string con = DriverManager.getConnection(jdbc:odbc:mdbtest;); ListString strgLst = new ArrayListString(); strgLst.add(Connection ok.); add(getLst(strgLst)); con.close(); } catch (SQLException e) { add(getErrLst(SQLException:, e)); } catch (Exception e) { add(getErrLst(Exception:, e)); } } private ListViewString getErrLst(String firstMsg, Exception e){ StackTraceElement[] err; ListString errStrg = new ArrayListString(); err = e.getStackTrace(); errStrg.add(firstMsg); errStrg.add(e.getMessage()); for (int i = 0; ierr.length;i++){ errStrg.add(err[i].toString()); } return getLst(errStrg); } private ListViewString getLst(ListString strgLst){ ListViewString listview = new ListViewString(listview, strgLst) { protected void populateItem(ListItemString item) { item.add(new Label(message, item.getModel())); } }; return listview; } } Running on Windows with Jetty I get: Connection ok. Running on Ubuntu 9.10 with Tomcat 6 I get: SQLException: General error sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6986) sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7114) sun.jdbc.odbc.JdbcOdbc.SQLDriverConnect(JdbcOdbc.java:3073) sun.jdbc.odbc.JdbcOdbcConnection.initialize(JdbcOdbcConnection.java:323) sun.jdbc.odbc.JdbcOdbcDriver.connect(JdbcOdbcDriver.java:174) java.sql.DriverManager.getConnection(DriverManager.java:582) java.sql.DriverManager.getConnection(DriverManager.java:207) wicketqs.HomePage.init(HomePage.java:42) sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) java.lang.reflect.Constructor.newInstance(Constructor.java:513) org.apache.wicket.session.DefaultPageFactory.createPage(DefaultPageFactory.java:188) org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:65) org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.newPage(BookmarkablePageRequestTarget.java:298) org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.getPage(BookmarkablePageRequestTarget.java:320) org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.processEvents(BookmarkablePageRequestTarget.java:234) org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92) org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1250) org.apache.wicket.RequestCycle.step(RequestCycle.java:1329) org.apache.wicket.RequestCycle.steps(RequestCycle.java:1428) org.apache.wicket.RequestCycle.request(RequestCycle.java:545) org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:479) org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:312) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:567) org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856) org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454) java.lang.Thread.run(Thread.java:662) Running on Ubuntu as Standalone Java class (without Wicket) I get: Connection ok. Am 24. Februar 2012 14:13 schrieb Martin Grigorov mgrigo...@apache.org: It doesn't work doesn't say much about the problem ... Give more details On Fri, Feb 24, 2012 at 2:06 PM, Alex zeita...@googlemail.com wrote: Dear All, Does anybody have experience in using unixODBC with Wicket and Tomcat? It is possible to establish connection with jetty. But it does not work with Tomcat under Ubuntu. Stand alone java class (without using wicket) is working
Re: Apache Wicket is a Flawed Framework
First of all, sorry for my previous comment. It was wrong judging you instead discussing the points addressed in your post. Nevertheless, nobody hates you for your opinion :). This kind of posts appears from time to time and there is nothing wrong with them as long as these address valid issues (which is not the case this time). You cannot please everybody. The only problem is the way you titled your post - that is the real bashing. When writing this kind of post, don't forget that you are bashing not only the framework, but also the time and effort of the people who contributed to this open source project. A constructive critique is always appreciated. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Apache-Wicket-is-a-Flawed-Framework-tp4080411p4084976.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Apache Wicket is a Flawed Framework
This is not an april fool's day, it is just an opinion of an http://www.linkedin.com/pub/eric-kizaki/30/2b1/1a4 inexperienced developer . Eric, if you have troubles in understanding wicket, you are definitely doing it wrong. Wicket is not a silver bullet, but it is a great tool when comparing to existing technologies. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Apache-Wicket-is-a-Flawed-Framework-tp4080411p4081174.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
ModalWindow shows Error Page in Opera
Dear all, While trying to open a ModalWindow the Opera shows error page. Translated from German it says something like “Internal Communication error. Check the address or search for web site” In FF, IE, Safari everything works fine. Wicket version 1.4.9 Opera 11.52 Thanks a lot in advance Alex
Re: ModalWindow shows Error Page in Opera
Thanks to all. With wicket 1.4.19 it works fine. 2011/10/21 Attila Király kiralyattila...@gmail.com It is fixed in 1.4.18 too: https://issues.apache.org/jira/browse/WICKET-3615 Attila 2011/10/21 nhsoft.yhw nhsoft@gmail.com Wicket 1.5.x have fixed the problem. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/ModalWindow-shows-Error-Page-in-Opera-tp3924738p3924885.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: weekly memory usage increase by 500 Mb problem
Thank you very much for your answer. I tried to use JProfiler. Under Windows it works fine. But in the working environment (Ubuntu 9.10, Tomcat6, Java Sun 1.6.0_24 HotSpot 64 bit mixed mode) the list with running JVMs is empty. If I use jpenable it says: No unprofiled JVMs found. Unfortunately googling did not help. :)
Re: weekly memory usage increase by 500 Mb problem
I managed to run JProfiler. The startup command should be located not in CATALINA_OPTS but in JAVA_OPTS. It is really good tool! In the mean time JProfiler running in Production, I will look on Eclipse Memory Analyzer. Thank you very much again for your help! 2011/9/13 Alex zeita...@googlemail.com Thank you very much for your answer. I tried to use JProfiler. Under Windows it works fine. But in the working environment (Ubuntu 9.10, Tomcat6, Java Sun 1.6.0_24 HotSpot 64 bit mixed mode) the list with running JVMs is empty. If I use jpenable it says: No unprofiled JVMs found. Unfortunately googling did not help. :)
weekly memory usage increase by 500 Mb problem
Hi, My Wicket application eats memory. The memory usage constantly increasing. So every week it is growing by 500 Mb. Can anyone suggest where can I start looking for the reason? Can JUnit testing help to figure out the reason? How? I have following set up: Wicket 1.4.9 Ubuntu 9.10 Tomcat 6 Dependencies: Spring 2.5.6 postgresql 8.3-603.jdbc4 commons-dbcp 1.4 itextpdf 5.0.4 log4j 1.2.14 slf4j-log4j12 1.4.2 Alex
Re: Using IResourceCachingStrategy with context relative resources(non PackageResource)
Serban, if you are using wro4j-maven-plugin, you can achieve the FilenameWithVersionResourceCachingStrategy feature by providing the http://code.google.com/p/wro4j/wiki/OutputNamingStrategy Resource Naming Strategy . -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Using-IResourceCachingStrategy-with-context-relative-resources-non-PackageResource-tp3712574p3713308.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Using IResourceCachingStrategy with context relative resources(non PackageResource)
It should be possible to include dynamically all resources in the page contained inside a servlet context folder (no need to know the exact name of the resource). -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Using-IResourceCachingStrategy-with-context-relative-resources-non-PackageResource-tp3712574p3713807.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: OutputStreams and Panels
Julian, may you provide a small hello-world project? I would like to see how all this work. I heard never before about BIRT and have no idea is it any good. thanks On 9 July 2011 03:40, Julian Sinai jsi...@gmail.com wrote: I should add that I used BIRT 3.7 for this. Julian -- Best regards Alex - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: using a different pagemap
I have a question then. What pagemap actually for? In javadoc there are only #FIXME javadoc. Is there some documentation on this? Also it is mentioned in multi window support but still no clues what impact does it have on modal windows on multiwindows at all.. Someone? Thank you. -- Best regards Alex - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
developers needed
Hi. Can use a wicket developer or two for a 3-4 week project. Needs to be able to work legally in US, sign a Non-Disclosure Agreement (NDA) and have an SSN# for a W9 form (to do 1099). Work from home. Gotta be able to show me some wicket work (with source samples) you did in the past. Work would start asap. Don't care if you work nights and weekends, but you gotta be available to do the work. Later on, there will be other projects and occasional maintenance work. Please send me your rates and source samples. Email directly to above address as I don't read all the messages in these forums all that often these days. We are a small company in NJ that does development. Mostly in Java. Sincerely, - Alex. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Page-ModalWindow[Form]-ModalWindow[Form] problem
ParentPage 1. creates a SomeObject. Not a model or something. 2. Creates a modalpage with a private field assigned to SomeObject 3. Shows ModalWindow with it's content set to another page. So I have to keep in a window's content page a reference to a caller page in order to set result value? Nice, thanks. On 17 June 2011 19:54, Andrea Del Bene adelb...@ciseonweb.it wrote: If I understand right you should not pass to ModalWindow: -model of parent page -an instance of parent page In these two scenarios when you close ModalWindow Wicket restore the original version of parent page, that is the version existing before opening modal window. To avoid this problem instead of page instance you should pass to your ModalWindow a PageReference to your parent page. PS: If you look at examples bundled with Wicket (ModalContent1Page.java) you'll see that the ModalWindow with page content uses PageReference. Andrea, I have a strange feeling. Why to speak about page version if there are no such problem transmitting modal result from modal to page. Such example exists even in a example bundle... I feel I miss something here. On 17 June 2011 16:14, Andrea Del Beneadelb...@ciseonweb.it wrote: The issue is here: https://issues.apache.org/jira/browse/WICKET-3809 I trust in you, a colleague On 17 June 2011 15:15, Andrea Del Beneadelb...@ciseonweb.it wrote: I'm going to open an issue on JIRA - 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 -- Best regards Alex - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Page-ModalWindow[Form]-ModalWindow[Form] problem
Hello I got a strange problem with multiply Modal Windows. Let's imagine we have an Entity A with field of entity B (1 to 1 relation) . Now we create the Edit page, which contains a form and some edit fields. One of that field is the Label with add AjaxButton. Add button creates a new modal window with edit fields for that B Entity. In a model of a first ModalWindow we have brandly new Entity. B in turn have it's field of C with Add button. So I show second modal window where I create and fill Entity C. Now if I press submit on the second modal window debugger shows me correct model update with a new C, things are going as expected. But after pressing submit on the first modal window, it's model accessed in a Page just looks like a very first version of a page with newly created model. All looks like there was no calling ModalWindow.show and all of the actions at all. Debugger shows that the model disappears somewhere in a request cycle process. This can be reproduced really easy, cos you even have nothing to do on the second modal window, you can just show and close it. Wicket 1.4.17 Java 6-23. Do I miss something? Any serialization flag I have no idea about? -- Best regards Alex - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Page-ModalWindow[Form]-ModalWindow[Form] problem
Page. I found your discussion with Marieke Vandamme. Looks very similiar to my case. On 17 June 2011 14:02, Andrea Del Bene adelb...@ciseonweb.it wrote: Hi Alex, maybe I'm facing the same problemyour modal windows' content is a Page or a Panel? -- Best regards Alex - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Page-ModalWindow[Form]-ModalWindow[Form] problem
I trust in you, a colleague On 17 June 2011 15:15, Andrea Del Bene adelb...@ciseonweb.it wrote: I'm going to open an issue on JIRA -- Best regards Alex - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Page-ModalWindow[Form]-ModalWindow[Form] problem
Andrea, I have a strange feeling. Why to speak about page version if there are no such problem transmitting modal result from modal to page. Such example exists even in a example bundle... I feel I miss something here. On 17 June 2011 16:14, Andrea Del Bene adelb...@ciseonweb.it wrote: The issue is here: https://issues.apache.org/jira/browse/WICKET-3809 I trust in you, a colleague On 17 June 2011 15:15, Andrea Del Beneadelb...@ciseonweb.it wrote: I'm going to open an issue on JIRA - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Best regards Alex - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
DataTable and toolbar
Hello Recently I found public static final String TOOLBAR_COMPONENT_ID = toolbar; in DataTable sources but can't find such ID in markups. How exactly does it works? Thanks -- Best regards Alex - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: DataTable and toolbar
Sure thing, but how exactly does it works if there are no such ID in html markup for DataTable? =) This was the question. On 11 February 2011 16:18, Pedro Santos pedros...@gmail.com wrote: Hi, u use this id to create an AbstractToolbar to be add to DataTable using one of its method like: DataTable#addTopToolbar DataTable#addBottomToolbar On Fri, Feb 11, 2011 at 11:08 AM, Alex Shubert alex.shub...@gmail.comwrote: Hello Recently I found public static final String TOOLBAR_COMPONENT_ID = toolbar; in DataTable sources but can't find such ID in markups. How exactly does it works? Thanks -- Best regards Alex - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Pedro Henrique Oliveira dos Santos -- Best regards Alex - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: DataTable and toolbar
So, the toolbar id just droppped out? It is used only as a marker? 2011/2/11 Robert Dahlström robert.dahlst...@bwin.org: In the addToolbar() method you have: WebMarkupContainer item = new ToolbarContainer(container.newChildId()); That's where the magic happens :) Regards Robert -- Best regards Alex - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: DataTable and toolbar
It looks like WebMarkupContainer does not require ID at all. It somehow unusuall 2011/2/11 Robert Dahlström robert.dahlst...@bwin.org: As far as I can tell yes. But maybe someone with better knowledge can enlighten us? /Robert -- Best regards Alex - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Editable DefaultDataTable
Hello Currently I am working on Editable DefaultDatatable. My first attempt was to override protected ItemT newRowItem with final Item item = super.newRowItem(id, index, tiModel); item.add(new AjaxFormSubmitBehavior(onclick) { naively thought that adding rowItem to ajax target will trigger ICellPopulator#populateItem call for every cell so I have a chance to read special metaData from parent rowItem and if it exists return TextField instead Label for every cell iin a row.. It seems I was wrong - item repopulation does not happens. I need any advice how may I implement such behaviour, except switching to Knopp's code. It just impossible right now becouse there are already implemented filter functionality. Thank's in advance. P.S.: I hope I am not alone who works now and does not shopping. -- Best regards Alex - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Editable DefaultDataTable
Implementing what? The one reason why we cant move to Knopp's implementation is huge relaying on IColumn and all that things. So, we already have enough IColumn implementation. What exactly you suggest to overload? On 26 December 2010 20:09, Jeremy Thomerson jer...@wickettraining.com wrote: You might have better success implementing it in your IColumn implementations since they generate the components for each cell. On Sun, Dec 26, 2010 at 4:55 AM, alex shubert alex.shub...@gmail.com wrote: Hello Currently I am working on Editable DefaultDatatable. My first attempt was to override protected ItemT newRowItem with final Item item = super.newRowItem(id, index, tiModel); item.add(new AjaxFormSubmitBehavior(onclick) { naively thought that adding rowItem to ajax target will trigger ICellPopulator#populateItem call for every cell so I have a chance to read special metaData from parent rowItem and if it exists return TextField instead Label for every cell iin a row.. It seems I was wrong - item repopulation does not happens. I need any advice how may I implement such behaviour, except switching to Knopp's code. It just impossible right now becouse there are already implemented filter functionality. Thank's in advance. P.S.: I hope I am not alone who works now and does not shopping. -- Best regards Alex - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Jeremy Thomerson http://wickettraining.com Need a CMS for Wicket? Use Brix! http://brixcms.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Best regards Alex - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Editable DefaultDataTable
Ummm interface IColumn extends ICellPopulator and there are no place to insert that code. It is possible in ICellPopulator and, as I said before, the #populateItem is called only once so you just cant read the state from row. I'll try to explain: what I need is to trigger row cells repopulation on user click on any cell in that row. so, it may be described as: cell clicked - row announced- every cell in that row repaint/replaces it's content On 26 December 2010 21:16, Jeremy Thomerson jer...@wickettraining.com wrote: Well, in the IColumn is where it actually creates a label to display something in the table. If you want to have it editable, that's where you need the if (foo) { rowItem.add(new Label(...)); } else { rowItem.add(new TextField(...)) } logic. On Sun, Dec 26, 2010 at 11:58 AM, Alex Shubert alex.shub...@gmail.com wrote: Implementing what? The one reason why we cant move to Knopp's implementation is huge relaying on IColumn and all that things. So, we already have enough IColumn implementation. What exactly you suggest to overload? On 26 December 2010 20:09, Jeremy Thomerson jer...@wickettraining.com wrote: You might have better success implementing it in your IColumn implementations since they generate the components for each cell. On Sun, Dec 26, 2010 at 4:55 AM, alex shubert alex.shub...@gmail.com wrote: Hello Currently I am working on Editable DefaultDatatable. My first attempt was to override protected ItemT newRowItem with final Item item = super.newRowItem(id, index, tiModel); item.add(new AjaxFormSubmitBehavior(onclick) { naively thought that adding rowItem to ajax target will trigger ICellPopulator#populateItem call for every cell so I have a chance to read special metaData from parent rowItem and if it exists return TextField instead Label for every cell iin a row.. It seems I was wrong - item repopulation does not happens. I need any advice how may I implement such behaviour, except switching to Knopp's code. It just impossible right now becouse there are already implemented filter functionality. Thank's in advance. P.S.: I hope I am not alone who works now and does not shopping. -- Best regards Alex - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Jeremy Thomerson http://wickettraining.com Need a CMS for Wicket? Use Brix! http://brixcms.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Best regards Alex - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Jeremy Thomerson http://wickettraining.com Need a CMS for Wicket? Use Brix! http://brixcms.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Best regards Alex - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Editable DefaultDataTable
Sure. But it doesnt look like a solution for it's resource consumption. So, again: after any cell click I need to announce the rw and the row must, in turn, somehow command only it's cells to repopulate their content. I know, how to do it without any framework, but wicket way to do it unclear for me. populateItem is called to create the component hierarchy for your table every time it needs to be recreated. If you put a break point -- Best regards Alex - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Editable DefaultDataTable
Jeremy thanks for your patience. that last thing is what I meaning. But how to make row call repopulate on it's column. I mean, it is not a problem to visit every child of rowItem and filter all of IColumn descendants. But there are no reason to call populateItem on IColumn as I have no idea what to do with received Components. Is it correct that you this approach suggest to re-implement all class from AbstractDataGridView? Or do I miss something? P.S. : it is strange a bit, but I did not set reusable strategy... and still no #populateItem calls. I have to look in the sources, I guess. One other alternative would involve manually doing the repopulate yourself. Presumably your link is in one of the columns in the row. At that point, it has a reference to the table and the row item. It could iterate through the columns of the table and call populateItem manually for that particular row. -- Jeremy Thomerson http://wickettraining.com Need a CMS for Wicket? Use Brix! http://brixcms.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Best regards Alex - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Editable DefaultDataTable
DefaultDataTable.setItemReuseStrategy(DefaultItemReuseStrategy.getInstance()); doent change anything. ICellPopulator#populateItem is not called. Something is broken in the Danish Kingdom Or in my Wicket knowledge :) On 26 December 2010 22:27, Jeremy Thomerson jer...@wickettraining.com wrote: On Sun, Dec 26, 2010 at 1:20 PM, Alex Shubert alex.shub...@gmail.com wrote: Jeremy thanks for your patience. that last thing is what I meaning. But how to make row call repopulate on it's column. I mean, it is not a problem to visit every child of rowItem and filter all of IColumn descendants. But there are no reason to call populateItem on IColumn as I have no idea what to do with received Components. Is it correct that you this approach suggest to re-implement all class from AbstractDataGridView? Or do I miss something? No, absolutely not. I'd recommend doing it the first way I suggested. But, alas, you don't want to because you think that it will use too many resources. :) In the lack of that, you'll have to play around with iterating through the columns for the row and repopulate them. P.S. : it is strange a bit, but I did not set reusable strategy... and still no #populateItem calls. I have to look in the sources, I guess. Breakpoints are your friend. If you think there's a bug, create a quickstart and send it in. You'll likely find your problem while doing so. -- Jeremy Thomerson http://wickettraining.com Need a CMS for Wicket? Use Brix! http://brixcms.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Best regards Alex - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket resources (css, js and images)?
Though this topic is quite old, I think it is still actual. Since the 1.5 release is not far away, did anybody thought if the (at least) js resource merging should occur? This is very useful when you have a page with a large number of components, each loading a large number of small resources. Having a single resource (js and/or css) as a result of page rendering could have a dramatic page loading time improvement. Thanks! Alex Objelean -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-resources-css-js-and-images-tp1868800p3089781.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
FormComponentPanel + unknown collection type
Hello! I got a problem with type mysmatch then implementing custom component. First of all, the code^ public class EnumCheckGroupT extends Enum extends FormComponentPanelCollectionT { public EnumCheckGroup(final String id, final IModel? extends CollectionT model, final ClassT enumClass) { //noinspection unchecked super(id, (IModelCollectionT) model); group = new CheckGroupT(checkgroup, model); ... } That model comes from: CompoundPropertyModelGroup formModel = new CompoundPropertyModelGroup(service.createGroup()); .. EnumCheckGroup checkGroup = new EnumCheckGroup(roles, formModel.bind(roles), RoleEnum.class); Roles is a set of Enum and has getter and setter like Set getRoles / Group setRoles(Set) all of that renders already filled Set without problems, but fails to set with type mismatch. PropertyResolver#setValue receives value as ArrayList while property is a Set. If I call setType(getModelObject.getClass) on CheckGroup it tryes to convert every Check to PersistentSet (hibernate proxy for a Set) so it doesnt look like a solution. Call of setType(getModelObject.getClass) in beforeRender() changes nothing. Any ideas? Thanks in advance... -- Best regards Alex - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: FormComponentPanel + unknown collection type
Anyone? ( On 6 December 2010 15:59, alex shubert alex.shub...@gmail.com wrote: Hello! I got a problem with type mysmatch then implementing custom component. First of all, the code^ public class EnumCheckGroupT extends Enum extends FormComponentPanelCollectionT { public EnumCheckGroup(final String id, final IModel? extends CollectionT model, final ClassT enumClass) { //noinspection unchecked super(id, (IModelCollectionT) model); group = new CheckGroupT(checkgroup, model); ... } That model comes from: CompoundPropertyModelGroup formModel = new CompoundPropertyModelGroup(service.createGroup()); .. EnumCheckGroup checkGroup = new EnumCheckGroup(roles, formModel.bind(roles), RoleEnum.class); Roles is a set of Enum and has getter and setter like Set getRoles / Group setRoles(Set) all of that renders already filled Set without problems, but fails to set with type mismatch. PropertyResolver#setValue receives value as ArrayList while property is a Set. If I call setType(getModelObject.getClass) on CheckGroup it tryes to convert every Check to PersistentSet (hibernate proxy for a Set) so it doesnt look like a solution. Call of setType(getModelObject.getClass) in beforeRender() changes nothing. Any ideas? Thanks in advance... -- Best regards Alex -- Best regards Alex - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: FormComponentPanel + unknown collection type
Oh, I fouled myself There nothing to do with setType at all and WiA uses explicit call only instead of generics. So, if there are code such as mine, all one have to do is properly assembly object on it's way to model. private CollectionT modelField; @Override protected void onInitialize() { super.onInitialize(); collection = getModelObject(); } @Override protected void convertInput() { collection.clear(); collection.addAll(group.getConvertedInput()); setConvertedInput(collection); } } The solution was prompted by #updateModel() God bless open source and all Wicket authors =)) -- Best regards Alex - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
IMarkupResourceStreamProvider for ListView
Hello I got the following error trying to provide custom render for ListView WicketMessage: The component(s) below failed to render. A common problem is that you have added a component in code but forgot to reference it in the markup (thus the component will never be rendered). New class signature is private abstract class EnumListViewT extends ListViewT implements IMarkupResourceStreamProvider I was sure getMarkupResourceStream will be called then EnumListView is to be added to a page. But it never happens, debug pointer never suspends execution at this point. What may be wrong? (except my English ofc) -- Best regards Alex - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: IMarkupResourceStreamProvider for ListView
Martin, thanks a lot. On 3 December 2010 17:45, Martin Grigorov mgrigo...@apache.org wrote: you need to call MarkupContainer#renderAssociatedMarkup() see https://gist.github.com/468502 for an example with WebMarkupContainerWithAssociatedMarkup On Fri, Dec 3, 2010 at 3:36 PM, alex shubert alex.shub...@gmail.com wrote: Hello I got the following error trying to provide custom render for ListView WicketMessage: The component(s) below failed to render. A common problem is that you have added a component in code but forgot to reference it in the markup (thus the component will never be rendered). New class signature is private abstract class EnumListViewT extends ListViewT implements IMarkupResourceStreamProvider I was sure getMarkupResourceStream will be called then EnumListView is to be added to a page. But it never happens, debug pointer never suspends execution at this point. What may be wrong? (except my English ofc) -- Best regards Alex - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Best regards Alex - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: IMarkupResourceStreamProvider for ListView
Looks like onComponentTagBody is never called for ListView I overrided it with copy-paste from Panel and .. nothing. Even If I replace method body with Exception nothing happens... On 3 December 2010 17:45, Martin Grigorov mgrigo...@apache.org wrote: you need to call MarkupContainer#renderAssociatedMarkup() see https://gist.github.com/468502 for an example with WebMarkupContainerWithAssociatedMarkup On Fri, Dec 3, 2010 at 3:36 PM, alex shubert alex.shub...@gmail.com wrote: Hello I got the following error trying to provide custom render for ListView WicketMessage: The component(s) below failed to render. A common problem is that you have added a component in code but forgot to reference it in the markup (thus the component will never be rendered). New class signature is private abstract class EnumListViewT extends ListViewT implements IMarkupResourceStreamProvider I was sure getMarkupResourceStream will be called then EnumListView is to be added to a page. But it never happens, debug pointer never suspends execution at this point. What may be wrong? (except my English ofc) -- Best regards Alex - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Best regards Alex - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: IMarkupResourceStreamProvider for ListView
Martijn thanks for your patience and help. Sometimes I miss obvious things. Only one question left: why onComponentTagBody implemented on ListView if it's never called? I miss something clear again? On 3 December 2010 18:18, Martijn Dashorst martijn.dasho...@gmail.com wrote: Read the ListView javadoc: it states that a ListView has no markup itself. Override ListItem's onComponentTagBody instead... Martijn On Fri, Dec 3, 2010 at 4:15 PM, alex shubert alex.shub...@gmail.com wrote: Looks like onComponentTagBody is never called for ListView I overrided it with copy-paste from Panel and .. nothing. Even If I replace method body with Exception nothing happens... On 3 December 2010 17:45, Martin Grigorov mgrigo...@apache.org wrote: you need to call MarkupContainer#renderAssociatedMarkup() see https://gist.github.com/468502 for an example with WebMarkupContainerWithAssociatedMarkup On Fri, Dec 3, 2010 at 3:36 PM, alex shubert alex.shub...@gmail.com wrote: Hello I got the following error trying to provide custom render for ListView WicketMessage: The component(s) below failed to render. A common problem is that you have added a component in code but forgot to reference it in the markup (thus the component will never be rendered). New class signature is private abstract class EnumListViewT extends ListViewT implements IMarkupResourceStreamProvider I was sure getMarkupResourceStream will be called then EnumListView is to be added to a page. But it never happens, debug pointer never suspends execution at this point. What may be wrong? (except my English ofc) -- Best regards Alex - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Best regards Alex - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Become a Wicket expert, learn from the best: http://wicketinaction.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Best regards Alex - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: AjaxButton + Form
Sure. Just add a Form and AjaxButton and see. I replaced Button with Link as assembly of object to be ready before button handler called sounds reasonable for me. On 1 December 2010 17:46, Andrea Del Bene adelb...@ciseonweb.it wrote: That sounds strange. AjaxButton implements IFormSubmittingComponent interface, hence it should first invoke its onsubmit method and then parent form's onSubmit (as described in Form class JavaDoc). Is your AjaxButton inside form's hierarchy? It is public final void onFormSubmitted() No, Form#onSubmit is not called at all. After successful execution of internal submission trace proceed to AjaxButton#onSubmit(AjaxRequestTarget target, Form? form) - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Best regards Alex - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Problem on wicket-auth-role ve Spring-security integration
Let me guess may be the reason is that document is pretty outdated and provides no help if one looking for a how-to manual? It just looks pretty useless for whos already familiar with JAAS and SpringSecurity 'cos they will not found anything new and almost unhelpful for whom doesn't . :) For unknown reason the page looks locked so one can't propose new version. 2010/12/2 Altuğ Bilgin Altıntaş alt...@gmail.com: why you don't just use Spring Security + Wicket ? 2010/12/2 Taner Diler jtdde...@gmail.com Hi, I'm trying to integrate Wicket-auth-roles 1.4.9 and Spring Security 3.0.4 by following https://cwiki.apache.org/WICKET/spring-security-and-wicket-auth-roles.html . @AuthorizeAction and @AuthorizeInstantiation annotations are not working. The blog says The only filter we need defined from Acegi is the HttpSessionContextIntegrationFilter. This filter will ensure that the SecurityContext is transported to and from the HttpSession onto the Thread context. All authorization is delegated to the wicket-auth-roles module which uses Annotations (@AuthorizeInstantiation). So how can I make configuration to provide this? -- Best regards Alex - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: webapp shutdown listeners
Why dont you add you very own listener to servlet container? -- Best regards Alex - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
AjaxButton + Form
Hello! May someone explain me, why AjaxButton must call his parent form onSubmittion? It surely did becouse of @Override protected void onEvent(AjaxRequestTarget target) { getForm().getRootForm().onFormSubmitted(); ... Why to submit form if it's Ajax request? The real example: I have a filterForm with some fileds where entered data can be malformed and as so may not be used in filtering. So, I mistyped something in filter fileds alredy forget about that and pressing add button. But as FilterForm uses onSubmission user receives error message that does not related with his latest activity. May be there are any way to say AjaxButton not to call form validation at least? Or the right way is to put such buttons in separate form? But what if this is delete current line button? -- Best regards Alex - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: AjaxButton + Form
Thanks for your response. Looks like I misunderstand the very purpose of the component. But anyway, this is NOT submission. I mean, if you trace the call to the end, you'll find that no call of overridden Form#onSubmit happens. only Form#onSubmission called. That's why I stay confused. Although it is good to know that Model object is validated and assembled on AJAX call arrival... -- Best regards Alex - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: AjaxButton + Form
It is public final void onFormSubmitted() No, Form#onSubmit is not called at all. After successful execution of internal submission trace proceed to AjaxButton#onSubmit(AjaxRequestTarget target, Form? form) -- Best regards Alex - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: visural-wicket 0.6.5 released!
Looks good. Thanks for your work. P.S.: Whoa! And with examples too! - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: visural-wicket 0.6.5 released!
I must ask it: why did you make such fat header at your page? Did you every try to take a look at this in 1600*900 notebook screen? All you writings begins in bottom second part of the screen. It is not my busenees of course, but why dont you kill that nice picture and resize header to just contain pragmatic without strong empty white line? Ah, forget it. At least you did not add banner on the top of all of that :) -- Best regards Alex - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
FilterToolbar
Hello I wonder why FilterToolbar requires IFilterStateLocator? It already requres FilterForm which has method #getStateLocator and there no another constructor for 4.13. FilterForm can not be instantiated without locator for Exception in nested class. If you forget: public FilterToolbar(final DataTable? table, final FilterForm form, final IFilterStateLocator stateLocator) So, what is the profit in this? Why can't we just have Locator from the form? -- Best regards Alex - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: error in heritance
replace wicket:extend with wicket:panel -- Best regards Alex - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: error in heritance
Sorry, did'nt unfold your message. It looks like you forgot to insert wicket:child in parent markup. That tags mark the place where inherited component will be placed. I hope I didnt miss anything now. On 23 November 2010 15:55, alex shubert alex.shub...@gmail.com wrote: replace wicket:extend with wicket:panel -- Best regards Alex - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: error in heritance
That day is too long for me. What about html files names? May be typo or incorrect place? Or maybe you build script does not move html to the same packet as corresponding java classes is? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: error in heritance
Look, you have java classes in path like com\consisint\frontend\pages and corresponding HTML in \FrontEnd\FrontEnd\WebContent\views You have to have HTML files in the same folder where you compilled classes are. Something like $ls com\consisint\frontend\pages ThirdByRolMain.class ThirdByRolMain.html ThirdByRolPolicy.class ThirdByRolPolicy.html Do ot and run you code again. The two class is in package com.consisint.frontend.pages. And the html in C:\programs\FrontEnd\FrontEnd\WebContent\views . - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: error in heritance
take a look In all the Wicket examples, you have to put all files in the same package directory. This means putting the markup files and the java files next to one another. (c) http://wicket.apache.org/learn/examples/markupinheritance.html -- Best regards Alex - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Example of Ajax DataView update
final DefaultDataTableGroup view; AjaxButton deleteSelected = new AjaxButton(delete-selected) { @Override protected void onSubmit(AjaxRequestTarget target, Form? form) { target.addComponent(view); } On 22 November 2010 11:05, javax jav...@gmail.com wrote: Hi! Can you show me an example of Ajax update of a paging table (I use DataView for it)? Thank you! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Example-of-Ajax-DataView-update-tp3053204p3053204.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 -- -- Best regards Alex - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket + GAE
Martin, are you sure you deployed the application using DEPLOYMENT mode and resourcePollFrequency is null? At least these are the only configurations needs to be updated (in wicket 1.4) in order to work with GAE. Alex -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-GAE-tp3039886p3040226.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Problems displaying a PDF from stream
Thank you very much Stefan, it works perfectly! 2010/10/29 Stefan Lindner lind...@visionet.de How does your trigger look like? I mean the a or button or input type=submit element? Does it trigger a page refresh, means does it start a request tot he server? Then you still have a problem with cleared session cookie. You need something like div onclick=openURL(bookmarkableURLWithParameters)/ or more in detail div onclick= window.open('http://url.to.servlet.domain', '', 'scrollbars=yes,location=no,menuBar=no,resizable=yes,status=no,toolbar=no') / No request cycle is triggered, the page stays untouched you can clear the session cookie as often as you like I did not proof this but I thin this could be te right way. Stefan -Ursprüngliche Nachricht- Von: Alex Zeit [mailto:zeita...@googlemail.com] Gesendet: Freitag, 29. Oktober 2010 14:22 An: users@wicket.apache.org Betreff: Re: Problems displaying a PDF from stream I mean going to menu Clear private data (in German version it is Neueste Chronik löschen). Yes Cookies are also removed. For now I implemented my PDF generator as separate Servlet but it has same behaviour unless I disable caching: // Set to expire far in the past. response.setHeader(Expires, Sat, 6 May 1995 12:00:00 GMT); if(request.getHeader(User-Agent).contains(MSIE)){ // Set IE extended HTTP/1.1 no-cache headers (use addHeader). response.addHeader(Cache-Control, post-check=0, pre-check=0); }else{ // Set standard HTTP/1.1 no-cache headers. // 29.10.10 OE Not working with IE 7 response.setHeader(Cache-Control, no-store, no-cache, must-revalidate); } // Set IE extended HTTP/1.1 no-cache headers (use addHeader). response.addHeader(Cache-Control, post-check=0, pre-check=0); // Set standard HTTP/1.0 no-cache header. response.setHeader(Pragma, no-cache); I don't really like this workaround with checking User agnet. But it is only way to make it work properly with Firefox and IE. 2010/10/28 Stefan Lindner lind...@visionet.de What do you mean with After clearing chronik? Does this mean that the session cookie is lost after After clearing chronik? You may take a look at the generated HTML: Onclick=.?wicket:interface=:5:.:pdfIcon:pdf::ILinkListener:: This refers to a version oft he page that is no longer valid after the session is lost. Refreshing the page starts a new session and it works again. You must (I don't know how at the moment) produce a sort of bookemarkable url for this case I think. My guess would be to use a separate servlet for this. Stefan -Ursprüngliche Nachricht- Von: Alex Zeit [mailto:zeita...@googlemail.com] Gesendet: Donnerstag, 28. Oktober 2010 18:21 An: users@wicket.apache.org Betreff: Re: Problems displaying a PDF from stream Now it works with IE and this is most important thing. Thank you very much! However the problem with Firefox remains. After clearing chronik while Pdf document is open if I click the link comes page expired, after refreshing the main page with link if I click link again comes empty page. 2010/10/28 Alex Zeit zeita...@googlemail.com Thanks a lot Stefan I will try it right now 2010/10/28 Stefan Lindner lind...@visionet.de Try this: public class MyResourceStreamWriter extends AbstractResourceStreamWriter { private static final long serialVersionUID = 1L; public MyResourceStreamWriter() { } @Override public void write(final OutputStream output) { // ! prduce output here and stream it to output try { output.flush(); } catch (Exception e) { e.printStackTrace(); } } @Override public String getContentType() { return application/pdf; } } LinkT pdfLink = new LinkT(pdf) { private static final long serialVersionUID = 1L; @Override public void onClick() { ResourceStreamRequestTarget rsrt = new ResourceStreamRequestTarget(new MyResourceStreamWriter()); //rsrt.setFileName(file.pdf); // use this if yout want your browser to ask you wheter you want to save the cownloaded PDF in fil efile.pdf getRequestCycle().setRequestTarget(rsrt); } }; pdfLink.setPopupSettings(new PopupSettings(PopupSettings.RESIZABLE | PopupSettings.SCROLLBARS)); add(pdfLink); Stefan
Re: Problems displaying a PDF from stream
Sorry Stefan, I restarted Firefox and checked again - it does not work :-( 2010/11/2 Alex Zeit zeita...@googlemail.com Thank you very much Stefan, it works perfectly! 2010/10/29 Stefan Lindner lind...@visionet.de How does your trigger look like? I mean the a or button or input type=submit element? Does it trigger a page refresh, means does it start a request tot he server? Then you still have a problem with cleared session cookie. You need something like div onclick=openURL(bookmarkableURLWithParameters)/ or more in detail div onclick= window.open('http://url.to.servlet.domain', '', 'scrollbars=yes,location=no,menuBar=no,resizable=yes,status=no,toolbar=no') / No request cycle is triggered, the page stays untouched you can clear the session cookie as often as you like I did not proof this but I thin this could be te right way. Stefan -Ursprüngliche Nachricht- Von: Alex Zeit [mailto:zeita...@googlemail.com] Gesendet: Freitag, 29. Oktober 2010 14:22 An: users@wicket.apache.org Betreff: Re: Problems displaying a PDF from stream I mean going to menu Clear private data (in German version it is Neueste Chronik löschen). Yes Cookies are also removed. For now I implemented my PDF generator as separate Servlet but it has same behaviour unless I disable caching: // Set to expire far in the past. response.setHeader(Expires, Sat, 6 May 1995 12:00:00 GMT); if(request.getHeader(User-Agent).contains(MSIE)){ // Set IE extended HTTP/1.1 no-cache headers (use addHeader). response.addHeader(Cache-Control, post-check=0, pre-check=0); }else{ // Set standard HTTP/1.1 no-cache headers. // 29.10.10 OE Not working with IE 7 response.setHeader(Cache-Control, no-store, no-cache, must-revalidate); } // Set IE extended HTTP/1.1 no-cache headers (use addHeader). response.addHeader(Cache-Control, post-check=0, pre-check=0); // Set standard HTTP/1.0 no-cache header. response.setHeader(Pragma, no-cache); I don't really like this workaround with checking User agnet. But it is only way to make it work properly with Firefox and IE. 2010/10/28 Stefan Lindner lind...@visionet.de What do you mean with After clearing chronik? Does this mean that the session cookie is lost after After clearing chronik? You may take a look at the generated HTML: Onclick=.?wicket:interface=:5:.:pdfIcon:pdf::ILinkListener:: This refers to a version oft he page that is no longer valid after the session is lost. Refreshing the page starts a new session and it works again. You must (I don't know how at the moment) produce a sort of bookemarkable url for this case I think. My guess would be to use a separate servlet for this. Stefan -Ursprüngliche Nachricht- Von: Alex Zeit [mailto:zeita...@googlemail.com] Gesendet: Donnerstag, 28. Oktober 2010 18:21 An: users@wicket.apache.org Betreff: Re: Problems displaying a PDF from stream Now it works with IE and this is most important thing. Thank you very much! However the problem with Firefox remains. After clearing chronik while Pdf document is open if I click the link comes page expired, after refreshing the main page with link if I click link again comes empty page. 2010/10/28 Alex Zeit zeita...@googlemail.com Thanks a lot Stefan I will try it right now 2010/10/28 Stefan Lindner lind...@visionet.de Try this: public class MyResourceStreamWriter extends AbstractResourceStreamWriter { private static final long serialVersionUID = 1L; public MyResourceStreamWriter() { } @Override public void write(final OutputStream output) { // ! prduce output here and stream it to output try { output.flush(); } catch (Exception e) { e.printStackTrace(); } } @Override public String getContentType() { return application/pdf; } } LinkT pdfLink = new LinkT(pdf) { private static final long serialVersionUID = 1L; @Override public void onClick() { ResourceStreamRequestTarget rsrt = new ResourceStreamRequestTarget(new MyResourceStreamWriter()); //rsrt.setFileName(file.pdf); // use this if yout want your browser to ask you wheter you want to save the cownloaded PDF in fil efile.pdf getRequestCycle().setRequestTarget(rsrt); } }; pdfLink.setPopupSettings
RE: Disable button double-click without breaking Form.setDefaultButton
Thank you for your help, problem solved. -Original Message- From: Jeremy Thomerson [mailto:jer...@wickettraining.com] Sent: Friday, 29 October 2010 5:59 p.m. To: users@wicket.apache.org Subject: Re: Disable button double-click without breaking Form.setDefaultButton Do it in your form itself. For instance, you can save a boolean flag that tells you that the form has already been submitted and not accept a second submit, or whatever. On Thu, Oct 28, 2010 at 9:58 PM, Alex Grant alex.gr...@unimarket.comwrote: Thanks, That was actually me asking that question. :) That worked perfectly for AjaxButtons, but what I'm trying to do now is disable double-click for non-ajax buttons. Alex -Original Message- From: Alexander Morozov [mailto:alexander.v.moro...@gmail.com] Sent: Friday, 29 October 2010 3:31 p.m. To: users@wicket.apache.org Subject: Re: Disable button double-click without breaking Form.setDefaultButton Check this thread http://apache-wicket.1842946.n4.nabble.com/Preventing-double-click-of- AjaxButtons-in-ModalWindow-td2289480.html -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Disable-button-double-click -without-breaking-Form-setDefaultButton-tp3018140p3018370.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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Jeremy Thomerson http://wickettraining.com *Need a CMS for Wicket? Use Brix! http://brixcms.org* - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Problems displaying a PDF from stream
I mean going to menu Clear private data (in German version it is Neueste Chronik löschen). Yes Cookies are also removed. For now I implemented my PDF generator as separate Servlet but it has same behaviour unless I disable caching: // Set to expire far in the past. response.setHeader(Expires, Sat, 6 May 1995 12:00:00 GMT); if(request.getHeader(User-Agent).contains(MSIE)){ // Set IE extended HTTP/1.1 no-cache headers (use addHeader). response.addHeader(Cache-Control, post-check=0, pre-check=0); }else{ // Set standard HTTP/1.1 no-cache headers. // 29.10.10 OE Not working with IE 7 response.setHeader(Cache-Control, no-store, no-cache, must-revalidate); } // Set IE extended HTTP/1.1 no-cache headers (use addHeader). response.addHeader(Cache-Control, post-check=0, pre-check=0); // Set standard HTTP/1.0 no-cache header. response.setHeader(Pragma, no-cache); I don't really like this workaround with checking User agnet. But it is only way to make it work properly with Firefox and IE. 2010/10/28 Stefan Lindner lind...@visionet.de What do you mean with After clearing chronik? Does this mean that the session cookie is lost after After clearing chronik? You may take a look at the generated HTML: Onclick=.?wicket:interface=:5:.:pdfIcon:pdf::ILinkListener:: This refers to a version oft he page that is no longer valid after the session is lost. Refreshing the page starts a new session and it works again. You must (I don't know how at the moment) produce a sort of bookemarkable url for this case I think. My guess would be to use a separate servlet for this. Stefan -Ursprüngliche Nachricht- Von: Alex Zeit [mailto:zeita...@googlemail.com] Gesendet: Donnerstag, 28. Oktober 2010 18:21 An: users@wicket.apache.org Betreff: Re: Problems displaying a PDF from stream Now it works with IE and this is most important thing. Thank you very much! However the problem with Firefox remains. After clearing chronik while Pdf document is open if I click the link comes page expired, after refreshing the main page with link if I click link again comes empty page. 2010/10/28 Alex Zeit zeita...@googlemail.com Thanks a lot Stefan I will try it right now 2010/10/28 Stefan Lindner lind...@visionet.de Try this: public class MyResourceStreamWriter extends AbstractResourceStreamWriter { private static final long serialVersionUID = 1L; public MyResourceStreamWriter() { } @Override public void write(final OutputStream output) { // ! prduce output here and stream it to output try { output.flush(); } catch (Exception e) { e.printStackTrace(); } } @Override public String getContentType() { return application/pdf; } } LinkT pdfLink = new LinkT(pdf) { private static final long serialVersionUID = 1L; @Override public void onClick() { ResourceStreamRequestTarget rsrt = new ResourceStreamRequestTarget(new MyResourceStreamWriter()); //rsrt.setFileName(file.pdf); // use this if yout want your browser to ask you wheter you want to save the cownloaded PDF in fil efile.pdf getRequestCycle().setRequestTarget(rsrt); } }; pdfLink.setPopupSettings(new PopupSettings(PopupSettings.RESIZABLE | PopupSettings.SCROLLBARS)); add(pdfLink); Stefan -Ursprüngliche Nachricht- Von: Alex Zeit [mailto:zeita...@googlemail.com] Gesendet: Donnerstag, 28. Oktober 2010 15:21 An: users@wicket.apache.org Betreff: Re: Problems displaying a PDF from stream Yes 2010/10/28 Stefan Lindner lind...@visionet.de Do you want to open the PDF in a separate window? Klick on some button and open a new browser window with pdf? Stefan -Ursprüngliche Nachricht- Von: Alex Zeit [mailto:zeita...@googlemail.com] Gesendet: Donnerstag, 28. Oktober 2010 15:14 An: users@wicket.apache.org Betreff: Problems displaying a PDF from stream While trying to display a PDF document from stream following problems arrise: IE7: Resource can not be displaied at all. Firefox 3.6.12: PDF is displaied but if Chronk is cleared in Firefox while document is open then it cannot be displaied again. It is possible only after restarting Firefox. No errors in log. The code: public class PdfGen extends WebResource { public PdfGen
Re: Wicket 1.5 and GAE
Issue created: https://issues.apache.org/jira/browse/WICKET-3138 -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-1-5-and-GAE-tp3016185p3016762.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
Problems displaying a PDF from stream
While trying to display a PDF document from stream following problems arrise: IE7: Resource can not be displaied at all. Firefox 3.6.12: PDF is displaied but if Chronk is cleared in Firefox while document is open then it cannot be displaied again. It is possible only after restarting Firefox. No errors in log. The code: public class PdfGen extends WebResource { public PdfGen() { setCacheable(false); } @Override public IResourceStream getResourceStream() { IResourceStream resourceStream = new AbstractResourceStreamWriter() { private static final long serialVersionUID = 1934248394380163944L; public void write(OutputStream output) { testItextDirect(output); } public String getContentType() { return application/pdf; } }; return resourceStream; } private void testItextDirect(OutputStream output){ try { Document document = new Document(); PdfWriter.getInstance(document, output); document.open(); document.add(new Paragraph(Hello World)); document.add(new Paragraph(new Date().toString())); document.close(); } catch (DocumentException de) { try { throw new IOException(de.getMessage()); } catch (IOException e) { e.printStackTrace(); } } } } in the init() of AuthenticatedWebApplication SharedResource added like this: getSharedResources().add(pdfGen, new PdfGen()); Any help would be highly appreciated Alex
Re: Problems displaying a PDF from stream
Yes 2010/10/28 Stefan Lindner lind...@visionet.de Do you want to open the PDF in a separate window? Klick on some button and open a new browser window with pdf? Stefan -Ursprüngliche Nachricht- Von: Alex Zeit [mailto:zeita...@googlemail.com] Gesendet: Donnerstag, 28. Oktober 2010 15:14 An: users@wicket.apache.org Betreff: Problems displaying a PDF from stream While trying to display a PDF document from stream following problems arrise: IE7: Resource can not be displaied at all. Firefox 3.6.12: PDF is displaied but if Chronk is cleared in Firefox while document is open then it cannot be displaied again. It is possible only after restarting Firefox. No errors in log. The code: public class PdfGen extends WebResource { public PdfGen() { setCacheable(false); } @Override public IResourceStream getResourceStream() { IResourceStream resourceStream = new AbstractResourceStreamWriter() { private static final long serialVersionUID = 1934248394380163944L; public void write(OutputStream output) { testItextDirect(output); } public String getContentType() { return application/pdf; } }; return resourceStream; } private void testItextDirect(OutputStream output){ try { Document document = new Document(); PdfWriter.getInstance(document, output); document.open(); document.add(new Paragraph(Hello World)); document.add(new Paragraph(new Date().toString())); document.close(); } catch (DocumentException de) { try { throw new IOException(de.getMessage()); } catch (IOException e) { e.printStackTrace(); } } } } in the init() of AuthenticatedWebApplication SharedResource added like this: getSharedResources().add(pdfGen, new PdfGen()); Any help would be highly appreciated Alex - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Problems displaying a PDF from stream
Thanks a lot Stefan I will try it right now 2010/10/28 Stefan Lindner lind...@visionet.de Try this: public class MyResourceStreamWriter extends AbstractResourceStreamWriter { private static final long serialVersionUID = 1L; public MyResourceStreamWriter() { } @Override public void write(final OutputStream output) { // ! prduce output here and stream it to output try { output.flush(); } catch (Exception e) { e.printStackTrace(); } } @Override public String getContentType() { return application/pdf; } } LinkT pdfLink = new LinkT(pdf) { private static final long serialVersionUID = 1L; @Override public void onClick() { ResourceStreamRequestTarget rsrt = new ResourceStreamRequestTarget(new MyResourceStreamWriter()); //rsrt.setFileName(file.pdf); // use this if yout want your browser to ask you wheter you want to save the cownloaded PDF in fil efile.pdf getRequestCycle().setRequestTarget(rsrt); } }; pdfLink.setPopupSettings(new PopupSettings(PopupSettings.RESIZABLE | PopupSettings.SCROLLBARS)); add(pdfLink); Stefan -Ursprüngliche Nachricht- Von: Alex Zeit [mailto:zeita...@googlemail.com] Gesendet: Donnerstag, 28. Oktober 2010 15:21 An: users@wicket.apache.org Betreff: Re: Problems displaying a PDF from stream Yes 2010/10/28 Stefan Lindner lind...@visionet.de Do you want to open the PDF in a separate window? Klick on some button and open a new browser window with pdf? Stefan -Ursprüngliche Nachricht- Von: Alex Zeit [mailto:zeita...@googlemail.com] Gesendet: Donnerstag, 28. Oktober 2010 15:14 An: users@wicket.apache.org Betreff: Problems displaying a PDF from stream While trying to display a PDF document from stream following problems arrise: IE7: Resource can not be displaied at all. Firefox 3.6.12: PDF is displaied but if Chronk is cleared in Firefox while document is open then it cannot be displaied again. It is possible only after restarting Firefox. No errors in log. The code: public class PdfGen extends WebResource { public PdfGen() { setCacheable(false); } @Override public IResourceStream getResourceStream() { IResourceStream resourceStream = new AbstractResourceStreamWriter() { private static final long serialVersionUID = 1934248394380163944L; public void write(OutputStream output) { testItextDirect(output); } public String getContentType() { return application/pdf; } }; return resourceStream; } private void testItextDirect(OutputStream output){ try { Document document = new Document(); PdfWriter.getInstance(document, output); document.open(); document.add(new Paragraph(Hello World)); document.add(new Paragraph(new Date().toString())); document.close(); } catch (DocumentException de) { try { throw new IOException(de.getMessage()); } catch (IOException e) { e.printStackTrace(); } } } } in the init() of AuthenticatedWebApplication SharedResource added like this: getSharedResources().add(pdfGen, new PdfGen()); Any help would be highly appreciated Alex - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Problems displaying a PDF from stream
Now it works with IE and this is most important thing. Thank you very much! However the problem with Firefox remains. After clearing chronik while Pdf document is open if I click the link comes page expired, after refreshing the main page with link if I click link again comes empty page. 2010/10/28 Alex Zeit zeita...@googlemail.com Thanks a lot Stefan I will try it right now 2010/10/28 Stefan Lindner lind...@visionet.de Try this: public class MyResourceStreamWriter extends AbstractResourceStreamWriter { private static final long serialVersionUID = 1L; public MyResourceStreamWriter() { } @Override public void write(final OutputStream output) { // ! prduce output here and stream it to output try { output.flush(); } catch (Exception e) { e.printStackTrace(); } } @Override public String getContentType() { return application/pdf; } } LinkT pdfLink = new LinkT(pdf) { private static final long serialVersionUID = 1L; @Override public void onClick() { ResourceStreamRequestTarget rsrt = new ResourceStreamRequestTarget(new MyResourceStreamWriter()); //rsrt.setFileName(file.pdf); // use this if yout want your browser to ask you wheter you want to save the cownloaded PDF in fil efile.pdf getRequestCycle().setRequestTarget(rsrt); } }; pdfLink.setPopupSettings(new PopupSettings(PopupSettings.RESIZABLE | PopupSettings.SCROLLBARS)); add(pdfLink); Stefan -Ursprüngliche Nachricht- Von: Alex Zeit [mailto:zeita...@googlemail.com] Gesendet: Donnerstag, 28. Oktober 2010 15:21 An: users@wicket.apache.org Betreff: Re: Problems displaying a PDF from stream Yes 2010/10/28 Stefan Lindner lind...@visionet.de Do you want to open the PDF in a separate window? Klick on some button and open a new browser window with pdf? Stefan -Ursprüngliche Nachricht- Von: Alex Zeit [mailto:zeita...@googlemail.com] Gesendet: Donnerstag, 28. Oktober 2010 15:14 An: users@wicket.apache.org Betreff: Problems displaying a PDF from stream While trying to display a PDF document from stream following problems arrise: IE7: Resource can not be displaied at all. Firefox 3.6.12: PDF is displaied but if Chronk is cleared in Firefox while document is open then it cannot be displaied again. It is possible only after restarting Firefox. No errors in log. The code: public class PdfGen extends WebResource { public PdfGen() { setCacheable(false); } @Override public IResourceStream getResourceStream() { IResourceStream resourceStream = new AbstractResourceStreamWriter() { private static final long serialVersionUID = 1934248394380163944L; public void write(OutputStream output) { testItextDirect(output); } public String getContentType() { return application/pdf; } }; return resourceStream; } private void testItextDirect(OutputStream output){ try { Document document = new Document(); PdfWriter.getInstance(document, output); document.open(); document.add(new Paragraph(Hello World)); document.add(new Paragraph(new Date().toString())); document.close(); } catch (DocumentException de) { try { throw new IOException(de.getMessage()); } catch (IOException e) { e.printStackTrace(); } } } } in the init() of AuthenticatedWebApplication SharedResource added like this: getSharedResources().add(pdfGen, new PdfGen()); Any help would be highly appreciated Alex - 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
Disable button double-click without breaking Form.setDefaultButton
Hello, I have had problems with users double-clicking the Finish button in one of our wizards, which caused duplicate objects to be created. So I want to prevent the (non-ajax) buttons from being clicked more than once. I found what I thought was a good solution, using a SimpleAttributeModifier to add this to all the regular buttons input ... onclick=this.onclick=function(){return false;};/ This worked fine, until someone discovered pressing Enter in a textfield in a wizard stopped working, not only did it not submit the form, but it prevented clicking the button manually. Wizard makes uses of Form.setDefaultButton, which adds a hidden button at the start of the form, with an onclick handler that looks like this: input ... onclick=var b=document.getElementById('next2d'); if (b!=nullb.onclick!=nulltypeof(b.onclick) != 'undefined') { var r = b.onclick.bind(b)(); if (r != false) b.click(); } else { b.click(); }; return false; / This meant that the onclick() method of my button was invoked (disabling the button), and then the button was clicked (doing nothing). Has anyone found a way of disabling double-click on regular buttons without tripping over this? Thank you, Alex
RE: Disable button double-click without breaking Form.setDefaultButton
Thanks, That was actually me asking that question. :) That worked perfectly for AjaxButtons, but what I'm trying to do now is disable double-click for non-ajax buttons. Alex -Original Message- From: Alexander Morozov [mailto:alexander.v.moro...@gmail.com] Sent: Friday, 29 October 2010 3:31 p.m. To: users@wicket.apache.org Subject: Re: Disable button double-click without breaking Form.setDefaultButton Check this thread http://apache-wicket.1842946.n4.nabble.com/Preventing-double-click-of-AjaxButtons-in-ModalWindow-td2289480.html -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Disable-button-double-click-without-breaking-Form-setDefaultButton-tp3018140p3018370.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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Wicket 1.5 and GAE
Is there a way to make wicket-1.5 to work with Google App Engine? Thanks, Alex -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-1-5-and-GAE-tp3016185p3016185.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket 1.5 and GAE
I was expecting to have a PageStore already available, instead of implementing one from scratch. Is it possible to add one to the trunk? Thanks! Alex -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-1-5-and-GAE-tp3016185p3016212.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Mount a page to root path in wicket 1.5
No, it seems that if nothing is mount, it redirects to the following location: / - /wicket/bookmarkable/com.mycompany.page.HomePage What would I expect is to access the HomePage with /. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Mount-a-page-to-root-path-in-wicket-1-5-tp3003270p3003337.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Mount a page to root path in wicket 1.5
So you suggest to create something like CustomHomeMapper in order to be able to mount a page to root? If it is true, shouldn't it be possible to have this feature out of the box? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Mount-a-page-to-root-path-in-wicket-1-5-tp3003270p3003344.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Long running task with download
One small note about running a background thread is that inside that thread you cannot access the Application instance (Application.get()), because it is not an inheritable thread local. It may be a problem in some cases. Alex -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Long-running-task-with-download-tp3003232p3003347.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Mount a page to root path in wicket 1.5
Good to know, thanks! When a new milestone will be available? Thanks! Alex -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Mount-a-page-to-root-path-in-wicket-1-5-tp3003270p3003369.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
Mount a page to root path in wicket 1.5
Hi! Is it possible to mount a page to root path (/) in latest wicket 1.5 branch? Thanks! Alex -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Mount-a-page-to-root-path-in-wicket-1-5-tp3003270p3003270.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
urls after a form submission
Hi. After an on-page (wicket) form is submitted, the followed url doesn't follow the page's URL encoding strategy (QueryStringUrlCodingStrategy or any others). It just becomes http://site.com/?wicket...; and loses original page Could someone please tell me if there's a way to fix it easily? Is this a bug that should be fixed or a normal behavior? I REALLY need this working. Otherwise a 200 page site becomes a class nightmare. - Alex - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: urls after a form submission
But that breaks the common sense of strategy, doesn't it? And if it works special for HybridUrlCodingStrategy, then it should also work with the other ones, right? Consistency rule makes it a bug, right? HybridUrlCodingStrategy messes with the original name. I'd rather use QueryStringUrlCodingStrategy that keeps urls proper. It's almost there with using wicket parameter, shouldn't it be fully compliant with the strategy of the parent? It just makes sense (to me). - Alex -Original Message- From: Jeremy Thomerson [mailto:jer...@wickettraining.com] Sent: Wednesday, October 06, 2010 8:13 PM To: users@wicket.apache.org Subject: Re: urls after a form submission On Wed, Oct 6, 2010 at 6:59 PM, Alex Rass a...@itbsllc.com wrote: Hi. After an on-page (wicket) form is submitted, the followed url doesn't follow the page's URL encoding strategy (QueryStringUrlCodingStrategy or any others). It just becomes http://site.com/?wicket...; and loses original page Could someone please tell me if there's a way to fix it easily? Is this a bug that should be fixed or a normal behavior? I REALLY need this working. Otherwise a 200 page site becomes a class nightmare. - Alex - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org It's standard behavior. You're redirecting to a stateful page - with the state of the form - when you submit the form. If you want a bookmarkable URL that still has state, use HybridUrlCodingStrategy. -- Jeremy Thomerson http://www.wickettraining.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
PDF generation
We need to generate some PDFs containing formatted text, tables, and images in a certain layout from Wicket application. What PDF library work best with Wicket? FOP, iText, something else? Alex
Re: PDF generation
Martin, Josh, Thank you very much for your answers. iReport using iText, that is obviously plus for iText. 2010/9/28 Josh Kamau joshnet2...@gmail.com I use iReport and JasperReport library. regards. On Tue, Sep 28, 2010 at 3:49 PM, Alex Zeit zeita...@googlemail.com wrote: We need to generate some PDFs containing formatted text, tables, and images in a certain layout from Wicket application. What PDF library work best with Wicket? FOP, iText, something else? Alex
multiple html pages to 1 class
I know this has been raised tons of times, But has anyone ever figured out: how to do this and not screw up page versioning? Any sort of CMS would need this. I am ok with going to 1.5.M2 for this, btw, if that solves it. - Alex. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: multiple html pages to 1 class
Thanks, Igor. That's what I did. BUT as soon as I hit form submit - it does a round-trip and loses the page part in the URL, and I am down to site.com/?wicket... from having a nice site.com/page.html (and using getRequest() to grab the page name). So I have no way to know which page I am actually on anymore :) - Alex -Original Message- From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] Sent: Tuesday, September 28, 2010 11:46 AM To: users@wicket.apache.org Subject: Re: multiple html pages to 1 class let your page implement IMarkupResourceStreamProvider and IMarkupCacheKeyProvider and return whatever html you want, anything will do it as long as it matches component hierarchy. -igor On Tue, Sep 28, 2010 at 7:40 AM, Alex Rass a...@itbsllc.com wrote: I know this has been raised tons of times, But has anyone ever figured out: how to do this and not screw up page versioning? Any sort of CMS would need this. I am ok with going to 1.5.M2 for this, btw, if that solves it. - Alex. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: multiple html pages to 1 class
Yeah, smart approach, and I thought about that... It's no good because the URL becomes unusable right after. And I would need custom handling inside each form (or having to sub-class every form I use). And hitting reload or moving the tab to another window will most likely break it in some browsers. I even tried applying the QueryStringUrlCodingStrategy but it loses the page name as soon as you submit the form. Seems like a bug to me. One that prevents me from having a nice 1-class handler :( HybridUrlCodingStrategy has been used in some hacky tutorials, but you get the version at the end or the page name which makes everything fall apart. So I suspect solution is to fix the post form refresh of the url for the BookmarkablePageRequestTargetUrlCodingStrategy and/or for the QueryStringUrlCodingStrategy Or I am open to other suggestions. - Alex Rass -Original Message- From: Jeremy Thomerson [mailto:jer...@wickettraining.com] Sent: Tuesday, September 28, 2010 1:00 PM To: users@wicket.apache.org Subject: Re: multiple html pages to 1 class If you're getting what template to use from the PageParameters, and then submitting a form, save it in a field in the page when you pull it from the PageParameters. On Tue, Sep 28, 2010 at 11:53 AM, Alex Rass a...@itbsllc.com wrote: Thanks, Igor. That's what I did. BUT as soon as I hit form submit - it does a round-trip and loses the page part in the URL, and I am down to site.com/?wicket... from having a nice site.com/page.html (and using getRequest() to grab the page name). So I have no way to know which page I am actually on anymore :) - Alex -Original Message- From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] Sent: Tuesday, September 28, 2010 11:46 AM To: users@wicket.apache.org Subject: Re: multiple html pages to 1 class let your page implement IMarkupResourceStreamProvider and IMarkupCacheKeyProvider and return whatever html you want, anything will do it as long as it matches component hierarchy. -igor On Tue, Sep 28, 2010 at 7:40 AM, Alex Rass a...@itbsllc.com wrote: I know this has been raised tons of times, But has anyone ever figured out: how to do this and not screw up page versioning? Any sort of CMS would need this. I am ok with going to 1.5.M2 for this, btw, if that solves it. - Alex. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Jeremy Thomerson http://www.wickettraining.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: sanity check request for fix regarding the dreaded PageExpiredException
Igor's is 100% right Plus you are forgetting that if you use the default page url constructor - it goes by interface number which will/may change after a redeploy. So your lost url bullet can be fixed if you use some url creation strategy that solidifies in it enough of the path that you can recreate your last page location Then maybe add the important parts of the user state to the same strategy and you are there. There are a bunch of examples on how to do this, but I am feeling too lazy to go search ;) - Alex -Original Message- From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] Sent: Monday, September 27, 2010 11:28 AM To: users@wicket.apache.org Subject: Re: sanity check request for fix regarding the dreaded PageExpiredException you can try it and see if it works for your particular usecases. there may still be some edges that will break, like links you actually want to run against an older version of the page because they depend on the component hierarchy that existed then, etc. -igor On Fri, Sep 24, 2010 at 7:56 AM, Joe Hudson joe.hud...@clear2pay.com wrote: Hi, I know there have been several existing topics around this issue (http://apache-wicket.1842946.n4.nabble.com/debugging-PageExpiredExceptions- td1882040.html) for example. The reason that I am asking for a sanity check is because I plan to use an alternative approach to solving this issue and would like feedback to make sure there isn't a reason I shouldn't be doing this. The common approach is to catch the exception and return a new instance of the requested page. This seems to have some key drawbacks IMHO: 1) this only works with bookmarkable links 2) you lose any modifications to the model that happened after the page was originally loaded but before the exception occured 3) any data on the client may potentially be out of sync with the server state if not updated by the request that caused the exception (because the new page was loaded but that client representation is still a picture of the previous page with the previous model). Although this would be resolved by a form submit behavior - you would still have problems in the exceptional cases where the model is updated individually by input field ajax change events. It seems that the page version number is only necessary for a stateless application and in an ajax-oriented application you would always want to work with the latest page version. We seem to hit these issues when multiple ajax requests that target a particular page happen concurrently because the page version is incremented when the initial ajax request is made but all other ajax requests that are initiated before the initial ajax request response reference a now outdated page version number. So, after all that background - do you think this is a valid fix for an ajax-oriented application: Override the default SecondLevelCachePageMap and as long as the requested page id matches the page id of getLastPage() just return the last page. Your thoughts would be appreciated and sorry for the long email but I wanted to provide background to make sure that the fix was valid for my particular solution (because I know the fix would not be appropriate for a stateless application). Thanks Joe Hudson - 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
bookmarkablePage strategy change?
I have been doing: webApplication.mountBookmarkablePage(/bob, pageClass); for quite some time. And when things got dynamic, it was: http://site.com/bob?wicket:interface=:0 Did something change in recent releases? Bug? Or did I nuke some important encoding strategy line some place by accident? Because now, once things get dynamic, I get: http://site.com/?wicket:interface=:0 and lose my bob (which helped me keep sanity before). Can anyone help? - Alex Rass - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: bookmarkablePage strategy change?
Trying to debug my problem where after a form submission on a bookmarked URL, it loses the mountedPage part and just keeps the ?wicket parameter... ran into a new problem: Any reason that for build 4.12 source doesn't match the binaries? Set a breakpoint on WebRequestCodingStrategy in the encode method and try to step through - it will not match. - Alex Rass - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org