Re: Leg Up for Wicket, Spring, Guice, JPA, Warp, EclipseLink, Hibernate ... projects
Perhaps he is using a maven proxy repository and the archetype repository is not added to it? On Thu, Oct 8, 2009 at 21:49, jWeekend jweekend_for...@cabouge.com wrote: Danisevsky, This has been used by loads of people and on all sorts of OSs and versions. I also just successfully tried it on XP, Vista Ubuntu in case you had come across something that has been missed. Paste what you copy from Leg Up into a text editor to see what's causing that exception on your box and let us know what you find to help others that may hit a similar issue with copy 'n' paste or whatever else it turns out to be specific to your environment (possibly a proxy issue - ie you haven't told Maven about your proxy, but your browser is set up properly to use it). Regards - Cemal jWeekend OO Java Technologies, Wicket Training and Development http://jWeekend.com danisevsky danisevsky wrote: I can access this file in web browser and it seems that there is no break line. I will try it later in linux. thank you 2009/10/8 richardwilko richardjohnwilkin...@gmail.com hi, The error is saying that maven cannot find the archetype catalog file, please make sure you can access this file in a web browser [1], and ensure that you do not have any line breaks in your maven command (not sure if it is just how the command appears on nabble but it looks like there is a line break in the middle of the url) [1] - http://legup.googlecode.com/svn/repo/archetype-catalog.xml Hope this helps Regards - Richard Wilkinson Developer, jWeekend: OO Java Technologies - Development and Training http://jWeekend.com danisevsky danisevsky wrote: Hello, I was trying generate Wicket - Spring - JPA project and I get following error: C:\projects\testmvn archetype:generate -B -DarchetypeCatalog= http://legup.googl ecode.com/svn/repo/archetype-catalog.xml-DarchetypeArtifactId=wicket-spring-jpa -archetype -DarchetypeGroupId=com.jweekend -DarchetypeVersion=0.8.0 -DgroupId=co m.mycompany -DartifactId=mycompany -Dversion=1.0-SNAPSHOT -Dpackage=com.mycompan y [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'archetype'. [INFO] [INFO] Building Maven Default Project [INFO] task-segment: [archetype:generate] (aggregator-style) [INFO] [INFO] Preparing archetype:generate [INFO] No goals needed for project - skipping [INFO] Setting property: classpath.resource.loader.class = 'org.codehaus.plexus .velocity.ContextClassLoaderResourceLoader'. [INFO] Setting property: velocimacro.messages.on = 'false'. [INFO] Setting property: resource.loader = 'classpath'. [INFO] Setting property: resource.manager.logwhenfound = 'false'. [INFO] [archetype:generate] [INFO] Generating project in Batch mode [WARNING] Error reading archetype catalog http://legup.googlecode.com/svn/repo/a rchetype-catalog.xml org.apache.maven.wagon.ResourceDoesNotExistException: Unable to locate resource in repository at org.apache.maven.wagon.providers.http.LightweightHttpWagon.fillInputD ata(LightweightHttpWagon.java:100) at org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:68) at org.apache.maven.archetype.source.RemoteCatalogArchetypeDataSource.ge tArchetypeCatalog(RemoteCatalogArchetypeDataSource.java:74) at org.apache.maven.archetype.DefaultArchetype.getRemoteCatalog(DefaultA rchetype.java:203) at org.apache.maven.archetype.ui.DefaultArchetypeSelector.getArchetypesB yCatalog(DefaultArchetypeSelector.java:249) at org.apache.maven.archetype.ui.DefaultArchetypeSelector.selectArchetyp e(DefaultArchetypeSelector.java:74) at org.apache.maven.archetype.mojos.CreateProjectFromArchetypeMojo.execu te(CreateProjectFromArchetypeMojo.java:180) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi nManager.java:453) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa ultLifecycleExecutor.java:559) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone Goal(DefaultLifecycleExecutor.java:513) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau ltLifecycleExecutor.java:483) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan dleFailures(DefaultLifecycleExecutor.java:331) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen ts(DefaultLifecycleExecutor.java:228) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi fecycleExecutor.java:142) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
Re: Ajax DropDownChoice and null values
Finally, I don't know why it didn't work. I had some problems with the defaultFormProcessing. Now I only set this parameter to false if I don't want to retrieve any form data on the server, and I do not get null values in my models anymore. -- View this message in context: http://www.nabble.com/Ajax-DropDownChoice-and-null-values-tp16473687p25816039.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
FileUpload and events
Hi all, I am implementing a form where I need to upload 2 different files. I want to block the second upload until the user added the first file and I validated on the server. In my Java code I have: fileUploadFieldSello = new FileUploadField(fileUploadFieldSello); fileUploadFieldSello.setRequired(true); AjaxFormComponentUpdatingBehavior update = new AjaxFormComponentUpdatingBehavior( onchange) { @Override protected void onUpdate(AjaxRequestTarget target) { // Here goes the call to my business logic for validation System.out.println(onchange event triggered); fileUploadFieldPdf.setEnabled(true); fileUploadFieldSello.setEnabled(false); target.addComponent(fileUploadFieldPdf); } }; fileUploadFieldSello.add(update); // Add one file input field (sello) add(fileUploadFieldSello); ... Now in my html I have: form wicket:id=ajax-simpleUpload fieldset legendValidación/legend p label for=uploadSello/label input wicket:id=fileUploadFieldSello id=uploadSello type=file/ /p p label for=uploadPDF/label input wicket:id=fileUploadFieldPdf id=uploadPdf type=file/ /p input type=submit value=Validate/ span wicket:id=progress[[ajax upload progressbar]]/span /fieldset /form My problem is that the onchange event seems to never got triggered. This raises the question whether I need to trigger another event? Further somebody knows a good tool to see which the input typefile element is triggering when I select a file? TIA for any infos. salu2 -- Thorsten Scherler thorsten.at.apache.org Open Source Java consulting, training and solutions Sociedad Andaluza para el Desarrollo de la Sociedad de la Información, S.A.U. (SADESI) - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: artwork mootip conflict
It could, Artwork uses the http://www.codesmell.org/blog/2009/08/best-practice-for-building-wicket-components/, cant remember if mootip does and don't know it the others do. However it would probably only give a runtime exception, Can't remember if it has a utils to evaluate and put in a specific merged resource if the components have a common ground.. If you just are adding JS and not requesting through Jeremeys wicketstuff component then youre on your own.. 2009/10/8 Stefan Jozsa stefan_...@yahoo.com Yes, you right, if jquery.js not added then no artwork, no jwicket, no jgrowl. But, at that time I knew that artwork/jwicket included jquery.js, so the JS was available even if I removed inclusion from jgrowl. Anyway, I don't know the way such kind of isue(s) can be avoided transparenly (that is, NOT like my brutal workaround). Stefan --- On Thu, 10/8/09, vineet semwal vineetsemwal1...@gmail.com wrote: From: vineet semwal vineetsemwal1...@gmail.com Subject: Re: artwork mootip conflict To: users@wicket.apache.org Date: Thursday, October 8, 2009, 5:20 PM Stefan, thank you, your fix works but if the required js files are not added the plugin will not work as good as it should :( Nino, thank you for creating the wiki ;) i am attaching the example project for the issue which shows a page where stefan's fix is used and other page where it's not used . -- regards, Vineet Semwal On Thu, Oct 8, 2009 at 1:59 PM, nino martinez wael nino.martinez.w...@gmail.com wrote: I've created a wiki here http://wicketstuff.org/confluence/display/STUFFWIKI/WicketStuff+Artwork so we can accumulate information like this. 2009/10/8 Stefan Jozsa stefan_...@yahoo.com Had similar issue when used artwork and jgrowl in the same time. Workaround: I removed Javascript (reference) inclusion in JGrowlFeedbackPanel, that is: @Override public void renderHead(final IHeaderResponse response) { /* response.renderJavascriptReference(new JavascriptResourceReference(JGrowlFeedbackPanel.class, jquery-1.3.2.js)); */ // ... } Stefan --- On Thu, 10/8/09, nino martinez wael nino.martinez.w...@gmail.com wrote: From: nino martinez wael nino.martinez.w...@gmail.com Subject: Re: artwork mootip conflict To: users@wicket.apache.org Date: Thursday, October 8, 2009, 9:53 AM Hi Vinnet Interesting, could you provide a quickstart project that shows this behaviour.. It's a lot easier for me to help.. Otherwise I might not have the time to do so. regards Nino 2009/10/7 vineet semwal vineetsemwal1...@gmail.com I can't say what exactly is causing problem but when i am using liquid canvas with mootip(minis) in a page, the liquid canvas fails to render .. -- regards, Vineet Semwal - 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: artwork mootip conflict
2009/10/8 vineet semwal vineetsemwal1...@gmail.com Stefan, thank you, your fix works but if the required js files are not added the plugin will not work as good as it should :( Nino, thank you for creating the wiki ;) i am attaching the example project for the issue which shows a page where stefan's fix is used and other page where it's not used . No problem, please add the file yourself, you should be able todo so afaik.. :) -- regards, Vineet Semwal On Thu, Oct 8, 2009 at 1:59 PM, nino martinez wael nino.martinez.w...@gmail.com wrote: I've created a wiki here http://wicketstuff.org/confluence/display/STUFFWIKI/WicketStuff+Artworkso we can accumulate information like this. 2009/10/8 Stefan Jozsa stefan_...@yahoo.com Had similar issue when used artwork and jgrowl in the same time. Workaround: I removed Javascript (reference) inclusion in JGrowlFeedbackPanel, that is: @Override public void renderHead(final IHeaderResponse response) { /* response.renderJavascriptReference(new JavascriptResourceReference(JGrowlFeedbackPanel.class, jquery-1.3.2.js)); */ // ... } Stefan --- On Thu, 10/8/09, nino martinez wael nino.martinez.w...@gmail.com wrote: From: nino martinez wael nino.martinez.w...@gmail.com Subject: Re: artwork mootip conflict To: users@wicket.apache.org Date: Thursday, October 8, 2009, 9:53 AM Hi Vinnet Interesting, could you provide a quickstart project that shows this behaviour.. It's a lot easier for me to help.. Otherwise I might not have the time to do so. regards Nino 2009/10/7 vineet semwal vineetsemwal1...@gmail.com I can't say what exactly is causing problem but when i am using liquid canvas with mootip(minis) in a page, the liquid canvas fails to render .. -- regards, Vineet Semwal - 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
Changing the page charset ???
Hi, What's the up-to-date method to change the default UTF-8 charset set in the page. I saw the page in the wiki but it is old and it has a header sayingthis is going to change So I am not sure and could not find something useful on the search. I need to set it for a specific page or panel and not for the whole application through the defaults. Thanks, Arie
RE: wicket log4j MDC
You can extend WicketFilter like this public class ImpactServletFilter extends WicketFilter { @Override public void init(FilterConfig filterConfig) throws ServletException { super.init(filterConfig); } @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { try { super.doFilter(request, response, chain); } finally { // put is done in onBeginRequest where I have the ApplicationSession of wicket with my user MDCHelper.get().remove(MDCHelper.ID); } } @Override public void destroy() { super.destroy(); } } Don't forget to change also your web.xml : filter filter-nameImpactApplication/filter-name filter-classcom.tsquare.impact.util.ImpactServletFilter/filter-class init-param param-nameapplicationClassName/param-name param-valuecom.tsquare.impact.ImpactApplication/param-value /init-param /filter filter-mapping filter-nameImpactApplication/filter-name url-pattern/*/url-pattern dispatcherREQUEST/dispatcher dispatcherERROR/dispatcher /filter-mapping Regards, Fabrice m00kie wrote: Hi, I would like to add some MDC information to logs of wicket RequestLogger. Unfortunatelly these MDC information are missed as RequestLogger invokes it's logging after invocation of WebRequestCycle.onEndRequest method which removes MDC entires. Is it a workaround for doing that? -- View this message in context: http://www.nabble.com/wicket---log4j-MDC-tp22784121p25818319.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
DropDownChoice and onSelectionChanged error.
Hi; I have a problem with DropDownChoice; The code block is here : ListFaaliyetfaaliyetListesi = // data comes final DropDownChoiceFaaliyet faaliyetler = new DropDownChoiceFaaliyet(Faaliyetler, new Model((Serializable) faaliyetListesi), faaliyetlerRenderer) { @Override protected boolean wantOnSelectionChangedNotifications() { return true; } @Override protected void onSelectionChanged(Faaliyet newSelection) { super.onSelectionChanged(newSelection); PageParameters params = new PageParameters(); params.add(ay, finalAy + ); params.add(yil, finalYil + ); params.add(faaliyetId, newSelection.getId() + ); setResponsePage(ActionPage.class, params); } }; add(faaliyetler); The error message is : wicketMessage: Method onSelectionChanged of interface org.apache.wicket.markup.html.form.IOnChangeListener targeted at component [MarkupContainer [Component id = Faaliyetler]] threw an exception Root cause: java.lang.IllegalStateException: Attempt to set model object on null model of component: Faaliyetler at org.apache.wicket.Component.setDefaultModelObject(Component.java:3038) at org.apache.wicket.markup.html.form.FormComponent.updateModel(FormComponent.java:1168) at org.apache.wicket.markup.html.form.DropDownChoice.onSelectionChanged(DropDownChoice.java:158) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:182) at org.apache.wicket.request.target.component.listener.ListenerInterfaceRequestTarget.processEvents(ListenerInterfaceRequestTarget.java:73) at org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.j -- Any suggestions ? Altuğ.
Re: DropDownChoice and onSelectionChanged error.
If you use the below constrcutor, it should solve your problem. DropDownChoice(java.lang.String id, IModel model, IModel choices, IChoiceRenderer renderer) 2009/10/9 Altuğ B. Altıntaş alt...@gmail.com: Hi; I have a problem with DropDownChoice; The code block is here : ListFaaliyetfaaliyetListesi = // data comes final DropDownChoiceFaaliyet faaliyetler = new DropDownChoiceFaaliyet(Faaliyetler, new Model((Serializable) faaliyetListesi), faaliyetlerRenderer) { �...@override protected boolean wantOnSelectionChangedNotifications() { return true; } �...@override protected void onSelectionChanged(Faaliyet newSelection) { super.onSelectionChanged(newSelection); PageParameters params = new PageParameters(); params.add(ay, finalAy + ); params.add(yil, finalYil + ); params.add(faaliyetId, newSelection.getId() + ); setResponsePage(ActionPage.class, params); } }; add(faaliyetler); The error message is : wicketMessage: Method onSelectionChanged of interface org.apache.wicket.markup.html.form.IOnChangeListener targeted at component [MarkupContainer [Component id = Faaliyetler]] threw an exception Root cause: java.lang.IllegalStateException: Attempt to set model object on null model of component: Faaliyetler at org.apache.wicket.Component.setDefaultModelObject(Component.java:3038) at org.apache.wicket.markup.html.form.FormComponent.updateModel(FormComponent.java:1168) at org.apache.wicket.markup.html.form.DropDownChoice.onSelectionChanged(DropDownChoice.java:158) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:182) at org.apache.wicket.request.target.component.listener.ListenerInterfaceRequestTarget.processEvents(ListenerInterfaceRequestTarget.java:73) at org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.j -- Any suggestions ? Altuğ. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
javscript header contribution in lazy load panels
Dear wicket users, I have a lazy loading panel. The components inside the generated panel (i.e. the panel that is generated inside the getLazyLoadComponent method) have some header contributing ajax behaviors (jQuery etc.). The lazyly loaded components render javascript resources to the head section oft he page. When the page is created, the header does not contain any script src=... tags. That's clear because wicket does not know which resources are needed by the lazyly loaded panel. The script src=... tags are part of the ajax answer. IN IE this works well but in other Browsers (Firefox, Chrome, Safari) the javascript functionality does not work. We have to put the script src=... manually into the parent page. Is this a known behavior? Does anybody know a magic trick to get the javascript librarys working that are part oft he ajax response?
Highlighting selected row in AjaxFallbackDefaultDataTable
Hello *, is it possible to highlight selected row without rewrithing populateItem() or something similar? If not then what is the best method to override? Regards Roman - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Highlighting selected row in AjaxFallbackDefaultDataTable
I solved this problem by switching over to the inmethod datagrid. Which has, of course, given me other problems that I still need to solve. Regards, Linda Roman Ilin wrote: Hello *, is it possible to highlight selected row without rewrithing populateItem() or something similar? If not then what is the best method to override? Regards Roman - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.421 / Virus Database: 270.14.8/2423 - Release Date: 10/08/09 18:33:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Ajax: Updating component outside Panel
Hi, I have Index.java that displays a shopping cart from a custom shopping cart panel (ShoppingCartPanel.java). This custom panel has a remove link for each item, and clicking this removes the item from the list using Ajax. In Index.java I also have a Checkout button that is set to visible when there's items in the shopping cart. I need to refresh this component also using Ajax when I press the remove link in the shopping cart panel, so that it is hidden when the cart is empty. How do I update this component from my custom shopping cart panel? Do I have to make the Checkout button a public variable and refresh it using target.addComponent(Index.checkout) in ShoppingCartPanel.java, or is there an easier and more elegant way to do this? .. you can visit each component on the current page and tell (interface) it, that someone has changed something.. the component can now decide to redraw itself. Ignore the text, the code should tell the story: http://books.google.de/books?id=9esdx8R-fJAClpg=PA104ots=ajkIysVFupdq=wicket%20AbstractAjaxEventpg=PA103#v=onepageq=wicket%20AbstractAjaxEventf=false mm:) - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: javscript header contribution in lazy load panels
How do you add the JavaScript? I have pages where components are added via AJAX, which include JavaScript and CSS via add(JavascriptPackageResource.getHeaderContribution(ResourceReference...)); and this works fine in any browser I have tested (IE, FF, Chrome, etc). Best, Ernesto On Fri, Oct 9, 2009 at 2:25 PM, Stefan Lindner lind...@visionet.de wrote: Dear wicket users, I have a lazy loading panel. The components inside the generated panel (i.e. the panel that is generated inside the getLazyLoadComponent method) have some header contributing ajax behaviors (jQuery etc.). The lazyly loaded components render javascript resources to the head section oft he page. When the page is created, the header does not contain any script src=... tags. That's clear because wicket does not know which resources are needed by the lazyly loaded panel. The script src=... tags are part of the ajax answer. IN IE this works well but in other Browsers (Firefox, Chrome, Safari) the javascript functionality does not work. We have to put the script src=... manually into the parent page. Is this a known behavior? Does anybody know a magic trick to get the javascript librarys working that are part oft he ajax response?
RE: Showing Modal window within a wizard step
Thank Jeremy. The LDM was causing the problem. It does make sense given your explanation. What do you intend with this code? public MyWizard(IModelFoo model) { super(new Model(model.getObject())); } The Wizard can only accept an IWizardModel and not the model I am going to back it with. Unless I am completely twisted up. Did you intend this to be the WizardStep? How then can I get my modal popup to store the values entered into it when the user presses a save button and discard them and keep the values from the model in the WizardStep if the user presses cancel. Thanks. Jeff -Original Message- From: Jeremy Thomerson [mailto:jer...@wickettraining.com] Sent: Thursday, October 08, 2009 11:03 PM To: users@wicket.apache.org Subject: Re: Showing Modal window within a wizard step Jeff, Sorry I have not had time to read the entire post and that you have not found better documentation on this issue. However, your problem on this is almost certainly caused by the LoadableDetachableModel that is backing your CompoundPropertyModel in your wizard. Since a wizard is a multi-page process, you can not really use an LDM to back it unless you persist changes after every step. With an LDM (and not persisting changes at every step), you end up with something like this flow: WizardPageOne - load model from LDM (presumably DB) - display page with form - submit page - load model from LDM (presumably DB) - stick values onto model object - redirect to page two WizardPageTwo - load model from LDM (presumably DB) This is where the problem is - because those changes weren't persisted, the model was detached, and when page two was rendered, reloaded. The changes were lost. So, in your situation, substitute the modal window for page two - the changes weren't making it into the model object that was used in the modal. So, in any multi-page process, you either need to persist the changes back down to wherever the LDM is loading from, or simply remove the LDM when the wizard (or other multi-page process) is started, OR pass the model object directly onto the other steps. I find it easiest to do something similar to this: public MyWizard(IModelFoo model) { super(new Model(model.getObject())); } Since the model holds on to the actual object between requests, your changes stay on the model object without persisting to your data store between each request. This goes against the standard use of models where you want something to detach after every request, so it is counter-intuitive, but it is actually very similar in thought to most any framework - where you will need to hold a transient object in session during a multi-page process or persist a partially-completed model object to the data store on every request. Hope this helps! -- Jeremy Thomerson http://www.wickettraining.com On Thu, Oct 8, 2009 at 3:43 PM, Jeffrey Schneller jeffrey.schnel...@envisa.com wrote: I am completely lost. I have no idea what this means. How can the resolution to my problem be a JIRA issue that was created earlier today? To find out how to do something who would think to look in the issue tracking system which contains bugs and enhancement requests. Anyhow, I resolved my loading of the modal with data by ditching the LoadableDetachableModel for the time being and using a CompoundPropertyModel. I know it is not correct but it works for now. Now I am attempting to get the data back into the form that the modal is called from. You would think this is easy. But again I am stuck. Wizard WizardStep == data show is read only with a modify link which brings the modal up. Modal == shows the data as editable. Allows user to press submit button which closes window and updates the data in the WizardStep Please, any help with a simple real example will be appreciated. Pointing someone to a past post which may touch on the topic in the context of another question is not help. I am sure someone knows how to solve my issue. Thanks. PS: I need to stick with Wicket because I am at the point of no return on this project. -Original Message- From: Pedro Santos [mailto:pedros...@gmail.com] Sent: Thursday, October 08, 2009 4:01 PM To: users@wicket.apache.org Subject: Re: Showing Modal window within a wizard step I disagree, at the moment a got this trouble, few minutes was necessary to I understand what was happening... any way: https://issues.apache.org/jira/browse/WICKET-2515 On Thu, Oct 8, 2009 at 2:32 PM, Jeffrey Schneller jeffrey.schnel...@envisa.com wrote: We are using wicket to have clean html void of jsp tags. Because they cause maintenance problems as the sites evolve over time. Wicket was suggested as a possible solution for this. Which it is but the lack of decent documentation/examples of real world issues is getting to be an issue. -Original Message- From:
Re: hide pagination
Yes please send me the code . Douglas Ferguson-2 wrote: I override the onRender and set visibility conditionally. However, you have to remember to set visible in your page redraws or else wicket won't even bother calling the onRender method If you need, I can send you code. On Oct 8, 2009, at 7:18 PM, tubin gen wrote: I am using dataview which comes with pagination , if the total records are less than records per page is there away I can hide pagination bar ? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/hide-pagination-tp25813802p25821878.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: javscript header contribution in lazy load panels
I have some Behaviors that extend AbstractDefaultAjaxBehavior. In the renderHead method of the Behaviors I use public void renderHead(IHeaderResponse response) { response.renderJavascriptReference(WicketEventReference.INSTANCE); } But that's not the problem. When I look into Ajax debug output I can see that the resource references are rendered correct. AND: in IE this works. This must be some sort of jQuery internal problem or some security problem in FF. Stefan -Ursprüngliche Nachricht- Von: Ernesto Reinaldo Barreiro [mailto:reier...@gmail.com] Gesendet: Freitag, 9. Oktober 2009 15:36 An: users@wicket.apache.org Betreff: Re: javscript header contribution in lazy load panels How do you add the JavaScript? I have pages where components are added via AJAX, which include JavaScript and CSS via add(JavascriptPackageResource.getHeaderContribution(ResourceReference...)); and this works fine in any browser I have tested (IE, FF, Chrome, etc). Best, Ernesto On Fri, Oct 9, 2009 at 2:25 PM, Stefan Lindner lind...@visionet.de wrote: Dear wicket users, I have a lazy loading panel. The components inside the generated panel (i.e. the panel that is generated inside the getLazyLoadComponent method) have some header contributing ajax behaviors (jQuery etc.). The lazyly loaded components render javascript resources to the head section oft he page. When the page is created, the header does not contain any script src=... tags. That's clear because wicket does not know which resources are needed by the lazyly loaded panel. The script src=... tags are part of the ajax answer. IN IE this works well but in other Browsers (Firefox, Chrome, Safari) the javascript functionality does not work. We have to put the script src=... manually into the parent page. Is this a known behavior? Does anybody know a magic trick to get the javascript librarys working that are part oft he ajax response? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
streaming charts in wicket
Hi there, another problem on my way... I want to implement a dynamic chart, ie. refreshing its model every 5 sec and showing updated values. I found nice solution for charts - open flash charts and would be great if i use it. There is wicket integration solution over here: http://cwiki.apache.org/WICKET/open-flash-chart-and-wicket.html. The problem is that it just generates the chart once, doesn't update its model. I can imagine it needs to comunicate via ajax but no idea how to do it. Did anyone face sth similar? I was trying to use dumb solution - ajax updating of swf panel, but of course it didn't worked out. Any help appreciated. Regards, Wojtek - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Highlighting selected row in AjaxFallbackDefaultDataTable
http://wicketstuff.org/wicket/repeater/?wicket:bookmarkablePage=:org.apache.wicket.examples.repeater.OIRPage -igor On Fri, Oct 9, 2009 at 5:43 AM, Roman Ilin roman.i...@gmail.com wrote: Hello *, is it possible to highlight selected row without rewrithing populateItem() or something similar? If not then what is the best method to override? Regards Roman - 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: Highlighting selected row in AjaxFallbackDefaultDataTable
Thank you Igor, but I cant find where 'toggle highlight' Link/Action is added to ActionPanel. Regards Roman On Fri, Oct 9, 2009 at 5:21 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote: http://wicketstuff.org/wicket/repeater/?wicket:bookmarkablePage=:org.apache.wicket.examples.repeater.OIRPage -igor On Fri, Oct 9, 2009 at 5:43 AM, Roman Ilin roman.i...@gmail.com wrote: Hello *, is it possible to highlight selected row without rewrithing populateItem() or something similar? If not then what is the best method to override? Regards Roman - 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: Highlighting selected row in AjaxFallbackDefaultDataTable
I have being looking on wrong Page. I found what you mean. Thank you one more time. On Fri, Oct 9, 2009 at 5:41 PM, Roman Ilin roman.i...@gmail.com wrote: Thank you Igor, but I cant find where 'toggle highlight' Link/Action is added to ActionPanel. Regards Roman On Fri, Oct 9, 2009 at 5:21 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote: http://wicketstuff.org/wicket/repeater/?wicket:bookmarkablePage=:org.apache.wicket.examples.repeater.OIRPage -igor On Fri, Oct 9, 2009 at 5:43 AM, Roman Ilin roman.i...@gmail.com wrote: Hello *, is it possible to highlight selected row without rewrithing populateItem() or something similar? If not then what is the best method to override? Regards Roman - 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
Modal inside a WizardStep
I have a modal inside a wizard step. The modal is displaying and showing data. The modal is using a panel and not a page. The panel for the modal contains a form with text fields. The wizard step contains labels. I want to have a save and a cancel button in the modal. The save should take the values from the text fields and update the model in the wizard step. The wizard step should now show the updated values in the label. I tried implementing an AjaxButton in the panel for the modal but it never does anything. How would one do this? Example code, pseudo-code? Thanks.
Re: Modal inside a WizardStep
Some very brief pseudo code. Let us know if you need more detail. public MyWizard(IModelFoo model) { setModel(new ModelFoo(model.getObject()); initialize wizard steps - passing them this.getModel() so they all use the same model } make sure to pass all of your wizard steps AND the form inside your modal the same model. Then, in your wizard step and form, use property models (or a compound property model): new MyStep(IModelFoo model) { setModel(model); add(new Label(firstName, new PropertyModel(model, firstName)); .. or .. setModel(new CompoundPropertyModel(model)); add(new Label(firstName); } new MyForm(IModelFoo model) { setModel(model); add(new TextField(firstName, new PropertyModel(model, firstName)); .. or .. setModel(new CompoundPropertyModel(model)); add(new TextField(firstName); } By doing this, your modal form will actually update the object that is also backing the wizard. Then, you should just be able to submit the form, close the modal, and add the wizard step components to the ajax request (so that they will be repainted). When they are repainted, they will pull the values from the model object, which was updated by your form. If you hit a wall with that, you *may* have to set the model on your wizard step to the model from your form. For instance: // in your ajax submit: MyStep.this.setModel(form.getModel()) target.addComponent(MyStep.this.panelThatShowsYourStuff) // close modal -- Jeremy Thomerson http://www.wickettraining.com On Fri, Oct 9, 2009 at 11:24 AM, Jeffrey Schneller jeffrey.schnel...@envisa.com wrote: I have a modal inside a wizard step. The modal is displaying and showing data. The modal is using a panel and not a page. The panel for the modal contains a form with text fields. The wizard step contains labels. I want to have a save and a cancel button in the modal. The save should take the values from the text fields and update the model in the wizard step. The wizard step should now show the updated values in the label. I tried implementing an AjaxButton in the panel for the modal but it never does anything. How would one do this? Example code, pseudo-code? Thanks.
Re: Modal inside a WizardStep
I keep wondering, too, what you are doing in the wizard that needs an editing modal popup. Typically, wizards are used for multi-step forms. So to me it's weird to have a wizard that isn't the form - but displays values that you are then editing from a modal. Just curious -- Jeremy Thomerson http://www.wickettraining.com On Fri, Oct 9, 2009 at 11:35 AM, Jeremy Thomerson jer...@wickettraining.com wrote: Some very brief pseudo code. Let us know if you need more detail. public MyWizard(IModelFoo model) { setModel(new ModelFoo(model.getObject()); initialize wizard steps - passing them this.getModel() so they all use the same model } make sure to pass all of your wizard steps AND the form inside your modal the same model. Then, in your wizard step and form, use property models (or a compound property model): new MyStep(IModelFoo model) { setModel(model); add(new Label(firstName, new PropertyModel(model, firstName)); .. or .. setModel(new CompoundPropertyModel(model)); add(new Label(firstName); } new MyForm(IModelFoo model) { setModel(model); add(new TextField(firstName, new PropertyModel(model, firstName)); .. or .. setModel(new CompoundPropertyModel(model)); add(new TextField(firstName); } By doing this, your modal form will actually update the object that is also backing the wizard. Then, you should just be able to submit the form, close the modal, and add the wizard step components to the ajax request (so that they will be repainted). When they are repainted, they will pull the values from the model object, which was updated by your form. If you hit a wall with that, you *may* have to set the model on your wizard step to the model from your form. For instance: // in your ajax submit: MyStep.this.setModel(form.getModel()) target.addComponent(MyStep.this.panelThatShowsYourStuff) // close modal -- Jeremy Thomerson http://www.wickettraining.com On Fri, Oct 9, 2009 at 11:24 AM, Jeffrey Schneller jeffrey.schnel...@envisa.com wrote: I have a modal inside a wizard step. The modal is displaying and showing data. The modal is using a panel and not a page. The panel for the modal contains a form with text fields. The wizard step contains labels. I want to have a save and a cancel button in the modal. The save should take the values from the text fields and update the model in the wizard step. The wizard step should now show the updated values in the label. I tried implementing an AjaxButton in the panel for the modal but it never does anything. How would one do this? Example code, pseudo-code? Thanks.
Transaction filters and redirection problem
Hi, I'm working on a Wicket / Hibernate / Spring app, with a configuration that uses spring's OSIV filter and my own transaction filter (basically a transaction per-request pattern). I've run into a problem involving the order of transaction commits and redirect reponses (triggered by setResponsePage()). The problem state is shown below: 1. User submits a form to create a new entity 2. Submit handler calls service to save new entity 3. Submit handler calls setResponsePage for page showing overview of new entity 4. Wicket request cycle completes (I'm assuming this is where wicket does the response.redirect()) 5. Redirect is sent to browser 6. Browser requests new page, which fails as backing entity hasn't been persisted yet 7. Transaction is commited, and new entity is persisted This is obviously a race condition between 6 and 7 (i.e. if 6 and 7 are reversed, everything is OK). Now, I'm aware that this isn't a wicket-specific issue, but the way wicket works as a framework means that this situation is much more likely than in a model 2 style framework. Is transaction per-request using filters a reasonable configuration to use with wicket and, if so, how can I ensure that any redirects occur after my transaction has been committed? (My guess is to use onBeginRequest and onEndRequest, but that assumes that onEndRequest happens before redirection) iainr - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: streaming charts in wicket
IIRC working with OFC, you can either specify the data directly in the page when it's loaded, or tell it how to call back to your server to get it's data. So, you can either: 1 - tell it to call back to your server for data, and then, IF it has a method for telling it to reload it's data, call that from a JavaScript setTimeout 2 - do what you said and reload the entire swf every X seconds - should work as long as you also refresh the data source -- Jeremy Thomerson http://www.wickettraining.com 2009/10/9 zabian zabia...@gmail.com Hi there, another problem on my way... I want to implement a dynamic chart, ie. refreshing its model every 5 sec and showing updated values. I found nice solution for charts - open flash charts and would be great if i use it. There is wicket integration solution over here: http://cwiki.apache.org/WICKET/open-flash-chart-and-wicket.html. The problem is that it just generates the chart once, doesn't update its model. I can imagine it needs to comunicate via ajax but no idea how to do it. Did anyone face sth similar? I was trying to use dumb solution - ajax updating of swf panel, but of course it didn't worked out. Any help appreciated. Regards, Wojtek - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: hide pagination
WebMarkupContainer wmcNavHead = new WebMarkupContainer(wmcNavHead); WebMarkupContainer wmcNavFoot = new WebMarkupContainer(wmcNavFoot); wmcNavHead.add(new PagingNavigator(navigatorHead, eachProject)); if (dp.size() ROWS_TO_DISPLAY) { wmcNavHead.setVisible(false); } div align=center wicket:id=navigatorHead/div fachhoch wrote: Yes please send me the code . Douglas Ferguson-2 wrote: I override the onRender and set visibility conditionally. However, you have to remember to set visible in your page redraws or else wicket won't even bother calling the onRender method If you need, I can send you code. On Oct 8, 2009, at 7:18 PM, tubin gen wrote: I am using dataview which comes with pagination , if the total records are less than records per page is there away I can hide pagination bar ? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/hide-pagination-tp25813802p25824385.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Showing Modal window within a wizard step
Sorry - typo on that step. The intent was that you use new Model(model.getObject()) to pull an object out of any potential loadable / detachable model that may be passed in. -- Jeremy Thomerson http://www.wickettraining.com On Fri, Oct 9, 2009 at 9:09 AM, Jeffrey Schneller jeffrey.schnel...@envisa.com wrote: Thank Jeremy. The LDM was causing the problem. It does make sense given your explanation. What do you intend with this code? public MyWizard(IModelFoo model) { super(new Model(model.getObject())); } The Wizard can only accept an IWizardModel and not the model I am going to back it with. Unless I am completely twisted up. Did you intend this to be the WizardStep? How then can I get my modal popup to store the values entered into it when the user presses a save button and discard them and keep the values from the model in the WizardStep if the user presses cancel. Thanks. Jeff -Original Message- From: Jeremy Thomerson [mailto:jer...@wickettraining.com] Sent: Thursday, October 08, 2009 11:03 PM To: users@wicket.apache.org Subject: Re: Showing Modal window within a wizard step Jeff, Sorry I have not had time to read the entire post and that you have not found better documentation on this issue. However, your problem on this is almost certainly caused by the LoadableDetachableModel that is backing your CompoundPropertyModel in your wizard. Since a wizard is a multi-page process, you can not really use an LDM to back it unless you persist changes after every step. With an LDM (and not persisting changes at every step), you end up with something like this flow: WizardPageOne - load model from LDM (presumably DB) - display page with form - submit page - load model from LDM (presumably DB) - stick values onto model object - redirect to page two WizardPageTwo - load model from LDM (presumably DB) This is where the problem is - because those changes weren't persisted, the model was detached, and when page two was rendered, reloaded. The changes were lost. So, in your situation, substitute the modal window for page two - the changes weren't making it into the model object that was used in the modal. So, in any multi-page process, you either need to persist the changes back down to wherever the LDM is loading from, or simply remove the LDM when the wizard (or other multi-page process) is started, OR pass the model object directly onto the other steps. I find it easiest to do something similar to this: public MyWizard(IModelFoo model) { super(new Model(model.getObject())); } Since the model holds on to the actual object between requests, your changes stay on the model object without persisting to your data store between each request. This goes against the standard use of models where you want something to detach after every request, so it is counter-intuitive, but it is actually very similar in thought to most any framework - where you will need to hold a transient object in session during a multi-page process or persist a partially-completed model object to the data store on every request. Hope this helps! -- Jeremy Thomerson http://www.wickettraining.com On Thu, Oct 8, 2009 at 3:43 PM, Jeffrey Schneller jeffrey.schnel...@envisa.com wrote: I am completely lost. I have no idea what this means. How can the resolution to my problem be a JIRA issue that was created earlier today? To find out how to do something who would think to look in the issue tracking system which contains bugs and enhancement requests. Anyhow, I resolved my loading of the modal with data by ditching the LoadableDetachableModel for the time being and using a CompoundPropertyModel. I know it is not correct but it works for now. Now I am attempting to get the data back into the form that the modal is called from. You would think this is easy. But again I am stuck. Wizard WizardStep == data show is read only with a modify link which brings the modal up. Modal == shows the data as editable. Allows user to press submit button which closes window and updates the data in the WizardStep Please, any help with a simple real example will be appreciated. Pointing someone to a past post which may touch on the topic in the context of another question is not help. I am sure someone knows how to solve my issue. Thanks. PS: I need to stick with Wicket because I am at the point of no return on this project. -Original Message- From: Pedro Santos [mailto:pedros...@gmail.com] Sent: Thursday, October 08, 2009 4:01 PM To: users@wicket.apache.org Subject: Re: Showing Modal window within a wizard step I disagree, at the moment a got this trouble, few minutes was necessary to I understand what was happening... any way: https://issues.apache.org/jira/browse/WICKET-2515
Re: hide pagination
opps forgot the the wmc html div align=center wicket:id=navigatorHead/div rmattler wrote: WebMarkupContainer wmcNavHead = new WebMarkupContainer(wmcNavHead); WebMarkupContainer wmcNavFoot = new WebMarkupContainer(wmcNavFoot); wmcNavHead.add(new PagingNavigator(navigatorHead, eachProject)); if (dp.size() ROWS_TO_DISPLAY) { wmcNavHead.setVisible(false); } div align=center wicket:id=navigatorHead/div fachhoch wrote: Yes please send me the code . Douglas Ferguson-2 wrote: I override the onRender and set visibility conditionally. However, you have to remember to set visible in your page redraws or else wicket won't even bother calling the onRender method If you need, I can send you code. On Oct 8, 2009, at 7:18 PM, tubin gen wrote: I am using dataview which comes with pagination , if the total records are less than records per page is there away I can hide pagination bar ? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/hide-pagination-tp25813802p25824479.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Showing Modal window within a wizard step
I am completely lost. I have no idea what this means. How can the resolution to my problem be a JIRA issue that was created earlier today? It is just an wish for javadoc improvements, not the solution. Sending an example attached On Fri, Oct 9, 2009 at 1:49 PM, Jeremy Thomerson jer...@wickettraining.comwrote: Sorry - typo on that step. The intent was that you use new Model(model.getObject()) to pull an object out of any potential loadable / detachable model that may be passed in. -- Jeremy Thomerson http://www.wickettraining.com On Fri, Oct 9, 2009 at 9:09 AM, Jeffrey Schneller jeffrey.schnel...@envisa.com wrote: Thank Jeremy. The LDM was causing the problem. It does make sense given your explanation. What do you intend with this code? public MyWizard(IModelFoo model) { super(new Model(model.getObject())); } The Wizard can only accept an IWizardModel and not the model I am going to back it with. Unless I am completely twisted up. Did you intend this to be the WizardStep? How then can I get my modal popup to store the values entered into it when the user presses a save button and discard them and keep the values from the model in the WizardStep if the user presses cancel. Thanks. Jeff -Original Message- From: Jeremy Thomerson [mailto:jer...@wickettraining.com] Sent: Thursday, October 08, 2009 11:03 PM To: users@wicket.apache.org Subject: Re: Showing Modal window within a wizard step Jeff, Sorry I have not had time to read the entire post and that you have not found better documentation on this issue. However, your problem on this is almost certainly caused by the LoadableDetachableModel that is backing your CompoundPropertyModel in your wizard. Since a wizard is a multi-page process, you can not really use an LDM to back it unless you persist changes after every step. With an LDM (and not persisting changes at every step), you end up with something like this flow: WizardPageOne - load model from LDM (presumably DB) - display page with form - submit page - load model from LDM (presumably DB) - stick values onto model object - redirect to page two WizardPageTwo - load model from LDM (presumably DB) This is where the problem is - because those changes weren't persisted, the model was detached, and when page two was rendered, reloaded. The changes were lost. So, in your situation, substitute the modal window for page two - the changes weren't making it into the model object that was used in the modal. So, in any multi-page process, you either need to persist the changes back down to wherever the LDM is loading from, or simply remove the LDM when the wizard (or other multi-page process) is started, OR pass the model object directly onto the other steps. I find it easiest to do something similar to this: public MyWizard(IModelFoo model) { super(new Model(model.getObject())); } Since the model holds on to the actual object between requests, your changes stay on the model object without persisting to your data store between each request. This goes against the standard use of models where you want something to detach after every request, so it is counter-intuitive, but it is actually very similar in thought to most any framework - where you will need to hold a transient object in session during a multi-page process or persist a partially-completed model object to the data store on every request. Hope this helps! -- Jeremy Thomerson http://www.wickettraining.com On Thu, Oct 8, 2009 at 3:43 PM, Jeffrey Schneller jeffrey.schnel...@envisa.com wrote: I am completely lost. I have no idea what this means. How can the resolution to my problem be a JIRA issue that was created earlier today? To find out how to do something who would think to look in the issue tracking system which contains bugs and enhancement requests. Anyhow, I resolved my loading of the modal with data by ditching the LoadableDetachableModel for the time being and using a CompoundPropertyModel. I know it is not correct but it works for now. Now I am attempting to get the data back into the form that the modal is called from. You would think this is easy. But again I am stuck. Wizard WizardStep == data show is read only with a modify link which brings the modal up. Modal == shows the data as editable. Allows user to press submit button which closes window and updates the data in the WizardStep Please, any help with a simple real example will be appreciated. Pointing someone to a past post which may touch on the topic in the context of another question is not help. I am sure someone knows how to solve my issue. Thanks. PS: I need to stick
Re: [tinymce] problem adding/removing TinyMceBehavior dinamically
I start from the end: I need fine control over the order javascript is executed. What is the javascript to call a refresh on a component like is done when I use target.addComponent()? From the start. I make that work with bgooren suggestion, using the javascript to remove the editor. No need to remove the behavior on java side. That works for the checkbox that dynamically adds and removes the Rich Editor. Now, the problem on refreshing a list of fields. What happens: to add a new field, click on ADD and I add my ListView is added to be refreshed via a target.addComponent(). In doing this, the markupId of the component changes, so tinyMce lose reference to it's existing editors. My solution: on the ADD callback, I remove the editors and let them be re-added during repainting. Works? NO! Why? because the listView is repainted before the mceControlRemove is executed, even if they are added to the same AjaxRequestTarget in the ADD callback. So happens that: 1. the remove fails because the old component is found no more 2. after, the submit fails because tinyMCE still have the old editor reference. -- ;( On Mon, Oct 5, 2009 at 11:44 AM, Daniele Dellafiore ilde...@gmail.com wrote: Hey Bas, thanks for answering. Unfortunately it does not work. Even if I run: String removeEditor = tinyMCE.execCommand('mceRemoveControl', false, ' + propertyPanel.getValueMarkupId() + ');; target.appendJavascript(removeEditor); or simply remove the TinyMceBehavior from my TextField, the result is the same: mce editor disappear correclty, but remains in tinyMCE.editors list so Tiny tries to process it in a successive iteration. I try to find help on tinyMCE forum On Mon, Oct 5, 2009 at 10:59 AM, bgooren b...@iswd.nl wrote: I'll show you some parts of my code so you get an idea of how I do things. First of all, I have used AjaxEditableLabel from wicket-extensions as a starting point. TinyMCE's javascripts should always be loaded: // Preload TinyMCE add( new AbstractBehavior() { �...@override public void renderHead( IHeaderResponse response ) { if( !tinyMCELoaded ) { response.renderJavascriptReference( TinyMCESettings.javaScriptReference() ); settings = buildTinyMCESettings(); tinyMCELoaded = true; } } } ); In my case TinyMCE is loaded through an AJAX call: @SuppressWarnings(unchecked) �...@override protected void onEdit( AjaxRequestTarget target ) { super.onEdit( target ); final String id = editor.getMarkupId( true ); final StringBuilder buf = new StringBuilder(); // Load plugins buf.append( settings.getLoadPluginJavaScript() ).append( ;\n ); // Initialize tinyMCE buf.append( tinyMCE.init({ ).append( settings.toJavaScript( Mode.none, Collections.EMPTY_LIST ) ).append( });\n ); buf.append( settings.getAdditionalPluginJavaScript() ).append( ;\n ); // Setup editor buf.append( tinyMCE.execCommand('mceAddControl',true,' ).append( id ).append( '); ); // Request focus on editor buf.append( setTimeout( function() {tinyMCE.execCommand('mceFocus',true,' ).append( id ).append( ');}, 500 ); ); target.appendJavascript( buf.toString() ); } As you can see I initialize TinyMCE, and then perform an mceAddControl command on the textarea I want to convert to a TinyMCE editor. Finally, I need to switch back to a textarea before unloading, so the correct contents are POSTed. To do so, I have added an AjaxCallDecorator to the close request, and allow implementations to override it: @Override protected IAjaxCallDecorator getCloseDecorator() { return new AjaxCallDecorator() { �...@override public CharSequence decorateScript( CharSequence script ) { return tinyMCE.execCommand('mceRemoveControl', false, ' + editor.getMarkupId() + '); + super.decorateOnSuccessScript( script ); // Call to save contents back to textarea // return tinyMCE.get(' + editor.getMarkupId() + ').save(); + // super.decorateScript( script ); } }; } The above code removes TinyMCE from the given textarea, and saves the HTML back into the textarea. I have commented out the call to save(), since it was not necessary. Bas Daniele Dellafiore wrote: I get what the real problem is: tinyMce saves internally each editor that is added to a page in a list called, well, editors. When I remove the behavior from a textField, I should also call tinyMce.remove passing the editors as a parameter. I will try to do this but any help is appreciated :) This is for the checkbox that enable/disable the
Re: [tinymce] problem adding/removing TinyMceBehavior dinamically
Did you get the response.renderJavascriptReference(TinyMCESettings.javaScriptReference()); ? In my code it goes like this (as per http://wicketbyexample.com/wicket-tinymce-some-advanced-tips/): add(new HeaderContributor(new IHeaderContributor() { public void renderHead(IHeaderResponse response) { response.renderJavascriptReference(TinyMCESettings.javaScriptReference()); } })); Dane On Fri, Oct 9, 2009 at 10:17 AM, Daniele Dellafiore ilde...@gmail.comwrote: I start from the end: I need fine control over the order javascript is executed. What is the javascript to call a refresh on a component like is done when I use target.addComponent()? From the start. I make that work with bgooren suggestion, using the javascript to remove the editor. No need to remove the behavior on java side. That works for the checkbox that dynamically adds and removes the Rich Editor. Now, the problem on refreshing a list of fields. What happens: to add a new field, click on ADD and I add my ListView is added to be refreshed via a target.addComponent(). In doing this, the markupId of the component changes, so tinyMce lose reference to it's existing editors. My solution: on the ADD callback, I remove the editors and let them be re-added during repainting. Works? NO! Why? because the listView is repainted before the mceControlRemove is executed, even if they are added to the same AjaxRequestTarget in the ADD callback. So happens that: 1. the remove fails because the old component is found no more 2. after, the submit fails because tinyMCE still have the old editor reference. -- ;( On Mon, Oct 5, 2009 at 11:44 AM, Daniele Dellafiore ilde...@gmail.com wrote: Hey Bas, thanks for answering. Unfortunately it does not work. Even if I run: String removeEditor = tinyMCE.execCommand('mceRemoveControl', false, ' + propertyPanel.getValueMarkupId() + ');; target.appendJavascript(removeEditor); or simply remove the TinyMceBehavior from my TextField, the result is the same: mce editor disappear correclty, but remains in tinyMCE.editors list so Tiny tries to process it in a successive iteration. I try to find help on tinyMCE forum On Mon, Oct 5, 2009 at 10:59 AM, bgooren b...@iswd.nl wrote: I'll show you some parts of my code so you get an idea of how I do things. First of all, I have used AjaxEditableLabel from wicket-extensions as a starting point. TinyMCE's javascripts should always be loaded: // Preload TinyMCE add( new AbstractBehavior() { @Override public void renderHead( IHeaderResponse response ) { if( !tinyMCELoaded ) { response.renderJavascriptReference( TinyMCESettings.javaScriptReference() ); settings = buildTinyMCESettings(); tinyMCELoaded = true; } } } ); In my case TinyMCE is loaded through an AJAX call: @SuppressWarnings(unchecked) @Override protected void onEdit( AjaxRequestTarget target ) { super.onEdit( target ); final String id = editor.getMarkupId( true ); final StringBuilder buf = new StringBuilder(); // Load plugins buf.append( settings.getLoadPluginJavaScript() ).append( ;\n ); // Initialize tinyMCE buf.append( tinyMCE.init({ ).append( settings.toJavaScript( Mode.none, Collections.EMPTY_LIST ) ).append( });\n ); buf.append( settings.getAdditionalPluginJavaScript() ).append( ;\n ); // Setup editor buf.append( tinyMCE.execCommand('mceAddControl',true,' ).append( id ).append( '); ); // Request focus on editor buf.append( setTimeout( function() {tinyMCE.execCommand('mceFocus',true,' ).append( id ).append( ');}, 500 ); ); target.appendJavascript( buf.toString() ); } As you can see I initialize TinyMCE, and then perform an mceAddControl command on the textarea I want to convert to a TinyMCE editor. Finally, I need to switch back to a textarea before unloading, so the correct contents are POSTed. To do so, I have added an AjaxCallDecorator to the close request, and allow implementations to override it: @Override protected IAjaxCallDecorator getCloseDecorator() { return new AjaxCallDecorator() { @Override public CharSequence decorateScript( CharSequence script ) { return tinyMCE.execCommand('mceRemoveControl', false, ' + editor.getMarkupId() + '); + super.decorateOnSuccessScript( script ); // Call to save contents back to textarea // return tinyMCE.get(' + editor.getMarkupId() + ').save(); + //
Re: TinyMCE Spellcheck
I've made a little progress toward getting the spell checker working. In my TinyMCESettings I've added: tinyMCESettings.addCustomSetting(spellchecker_rpc_url : \someURL\); That takes care of the alert, but now I need to know what URL I'm supposed to put there. The SpellCheckPlugin class has the following code: private static final String resourceKey = tiny_mce/plugins/spellchecker/tinyspell.php; ... Application.get().getSharedResources().add(TinyMceBehavior.class, resourceKey, null, null, new JazzySpellChecker()); So my guess is that I need to have spellchecker_rpc_url hit the URL of the SharedResource added above. When I debug the app, the line WicketApplication.get().getSharedResources().get(TinyMceBehavior.class, tiny_mce/plugins/spellchecker/tinyspell.php, null, null, true) does return the JazzySpellChecker, so I hoped that the following crazy line would get me the URL: WicketRequestCycle.get().urlFor(new ResourceStreamRequestTarget(WicketApplication.get().getSharedResources().get(TinyMceBehavior.class, tiny_mce/plugins/spellchecker/tinyspell.php, null, null, true).getResourceStream())) However, that just gives me null. I feel like I must be making this more difficult than it should be. Nothing I've seen anywhere mentions setting the spellchecker_rpc_url. Is there an easier way to do this? thanks, Dane On Thu, Oct 8, 2009 at 6:24 PM, Dane Laverty danelave...@gmail.com wrote: I've added TinyMCE to my application, but I can't get the spellchecker to work. When I click the button, I get a JavaScript alert that says, Please specify: spellchecker_rpc_url. I checked it out in the example application, but I get the same error there. I've installed the Jazzy spell checker, but apparently I need something else as well. Has anyone gotten this to work?
Re: javscript header contribution in lazy load panels
Why not use firebug and see your script section is added the head of the page? Ernesto On Fri, Oct 9, 2009 at 4:51 PM, Stefan Lindner lind...@visionet.de wrote: I have some Behaviors that extend AbstractDefaultAjaxBehavior. In the renderHead method of the Behaviors I use public void renderHead(IHeaderResponse response) { response.renderJavascriptReference(WicketEventReference.INSTANCE); } But that's not the problem. When I look into Ajax debug output I can see that the resource references are rendered correct. AND: in IE this works. This must be some sort of jQuery internal problem or some security problem in FF. Stefan -Ursprüngliche Nachricht- Von: Ernesto Reinaldo Barreiro [mailto:reier...@gmail.com] Gesendet: Freitag, 9. Oktober 2009 15:36 An: users@wicket.apache.org Betreff: Re: javscript header contribution in lazy load panels How do you add the JavaScript? I have pages where components are added via AJAX, which include JavaScript and CSS via add(JavascriptPackageResource.getHeaderContribution(ResourceReference...)); and this works fine in any browser I have tested (IE, FF, Chrome, etc). Best, Ernesto On Fri, Oct 9, 2009 at 2:25 PM, Stefan Lindner lind...@visionet.de wrote: Dear wicket users, I have a lazy loading panel. The components inside the generated panel (i.e. the panel that is generated inside the getLazyLoadComponent method) have some header contributing ajax behaviors (jQuery etc.). The lazyly loaded components render javascript resources to the head section oft he page. When the page is created, the header does not contain any script src=... tags. That's clear because wicket does not know which resources are needed by the lazyly loaded panel. The script src=... tags are part of the ajax answer. IN IE this works well but in other Browsers (Firefox, Chrome, Safari) the javascript functionality does not work. We have to put the script src=... manually into the parent page. Is this a known behavior? Does anybody know a magic trick to get the javascript librarys working that are part oft he ajax response? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Leg Up for Wicket, Spring, Guice, JPA, Warp, EclipseLink, Hibernate ... projects
Hello, I was trying it on Linux with no proxy and I got the same error. In text editor is see, that there is no line breaks. I do not know where is problem. 2009/10/9 Bert taser...@gmail.com Perhaps he is using a maven proxy repository and the archetype repository is not added to it? On Thu, Oct 8, 2009 at 21:49, jWeekend jweekend_for...@cabouge.com wrote: Danisevsky, This has been used by loads of people and on all sorts of OSs and versions. I also just successfully tried it on XP, Vista Ubuntu in case you had come across something that has been missed. Paste what you copy from Leg Up into a text editor to see what's causing that exception on your box and let us know what you find to help others that may hit a similar issue with copy 'n' paste or whatever else it turns out to be specific to your environment (possibly a proxy issue - ie you haven't told Maven about your proxy, but your browser is set up properly to use it). Regards - Cemal jWeekend OO Java Technologies, Wicket Training and Development http://jWeekend.com danisevsky danisevsky wrote: I can access this file in web browser and it seems that there is no break line. I will try it later in linux. thank you 2009/10/8 richardwilko richardjohnwilkin...@gmail.com hi, The error is saying that maven cannot find the archetype catalog file, please make sure you can access this file in a web browser [1], and ensure that you do not have any line breaks in your maven command (not sure if it is just how the command appears on nabble but it looks like there is a line break in the middle of the url) [1] - http://legup.googlecode.com/svn/repo/archetype-catalog.xml Hope this helps Regards - Richard Wilkinson Developer, jWeekend: OO Java Technologies - Development and Training http://jWeekend.com danisevsky danisevsky wrote: Hello, I was trying generate Wicket - Spring - JPA project and I get following error: C:\projects\testmvn archetype:generate -B -DarchetypeCatalog= http://legup.googl ecode.com/svn/repo/archetype-catalog.xml-DarchetypeArtifactId=wicket-spring-jpa -archetype -DarchetypeGroupId=com.jweekend -DarchetypeVersion=0.8.0 -DgroupId=co m.mycompany -DartifactId=mycompany -Dversion=1.0-SNAPSHOT -Dpackage=com.mycompan y [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'archetype'. [INFO] [INFO] Building Maven Default Project [INFO]task-segment: [archetype:generate] (aggregator-style) [INFO] [INFO] Preparing archetype:generate [INFO] No goals needed for project - skipping [INFO] Setting property: classpath.resource.loader.class = 'org.codehaus.plexus .velocity.ContextClassLoaderResourceLoader'. [INFO] Setting property: velocimacro.messages.on = 'false'. [INFO] Setting property: resource.loader = 'classpath'. [INFO] Setting property: resource.manager.logwhenfound = 'false'. [INFO] [archetype:generate] [INFO] Generating project in Batch mode [WARNING] Error reading archetype catalog http://legup.googlecode.com/svn/repo/a rchetype-catalog.xml org.apache.maven.wagon.ResourceDoesNotExistException: Unable to locate resource in repository at org.apache.maven.wagon.providers.http.LightweightHttpWagon.fillInputD ata(LightweightHttpWagon.java:100) at org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:68) at org.apache.maven.archetype.source.RemoteCatalogArchetypeDataSource.ge tArchetypeCatalog(RemoteCatalogArchetypeDataSource.java:74) at org.apache.maven.archetype.DefaultArchetype.getRemoteCatalog(DefaultA rchetype.java:203) at org.apache.maven.archetype.ui.DefaultArchetypeSelector.getArchetypesB yCatalog(DefaultArchetypeSelector.java:249) at org.apache.maven.archetype.ui.DefaultArchetypeSelector.selectArchetyp e(DefaultArchetypeSelector.java:74) at org.apache.maven.archetype.mojos.CreateProjectFromArchetypeMojo.execu te(CreateProjectFromArchetypeMojo.java:180) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi nManager.java:453) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa ultLifecycleExecutor.java:559) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone Goal(DefaultLifecycleExecutor.java:513) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau ltLifecycleExecutor.java:483) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan dleFailures(DefaultLifecycleExecutor.java:331) at
RE: Modal inside a WizardStep
Think of an order form. Step 1 you enter the products you want to order. Step 2 based on your account it pulls up a list of billing addresses. In step 2 you choose your billing address and the details of the billing address are shown in step 2 with a modify link. The modify link allows you to modify the information and then when done the modified information is shown as the billing address in step 2. Step 3 is the shipping information with the same idea as step 2. Step 4 would be a confirmation of everything entered. Then 'Finish'. This to me is a very common way to use a wizard and modal windows. -Original Message- From: Jeremy Thomerson [mailto:jer...@wickettraining.com] Sent: Friday, October 09, 2009 12:37 PM To: users@wicket.apache.org Subject: Re: Modal inside a WizardStep I keep wondering, too, what you are doing in the wizard that needs an editing modal popup. Typically, wizards are used for multi-step forms. So to me it's weird to have a wizard that isn't the form - but displays values that you are then editing from a modal. Just curious -- Jeremy Thomerson http://www.wickettraining.com On Fri, Oct 9, 2009 at 11:35 AM, Jeremy Thomerson jer...@wickettraining.com wrote: Some very brief pseudo code. Let us know if you need more detail. public MyWizard(IModelFoo model) { setModel(new ModelFoo(model.getObject()); initialize wizard steps - passing them this.getModel() so they all use the same model } make sure to pass all of your wizard steps AND the form inside your modal the same model. Then, in your wizard step and form, use property models (or a compound property model): new MyStep(IModelFoo model) { setModel(model); add(new Label(firstName, new PropertyModel(model, firstName)); .. or .. setModel(new CompoundPropertyModel(model)); add(new Label(firstName); } new MyForm(IModelFoo model) { setModel(model); add(new TextField(firstName, new PropertyModel(model, firstName)); .. or .. setModel(new CompoundPropertyModel(model)); add(new TextField(firstName); } By doing this, your modal form will actually update the object that is also backing the wizard. Then, you should just be able to submit the form, close the modal, and add the wizard step components to the ajax request (so that they will be repainted). When they are repainted, they will pull the values from the model object, which was updated by your form. If you hit a wall with that, you *may* have to set the model on your wizard step to the model from your form. For instance: // in your ajax submit: MyStep.this.setModel(form.getModel()) target.addComponent(MyStep.this.panelThatShowsYourStuff) // close modal -- Jeremy Thomerson http://www.wickettraining.com On Fri, Oct 9, 2009 at 11:24 AM, Jeffrey Schneller jeffrey.schnel...@envisa.com wrote: I have a modal inside a wizard step. The modal is displaying and showing data. The modal is using a panel and not a page. The panel for the modal contains a form with text fields. The wizard step contains labels. I want to have a save and a cancel button in the modal. The save should take the values from the text fields and update the model in the wizard step. The wizard step should now show the updated values in the label. I tried implementing an AjaxButton in the panel for the modal but it never does anything. How would one do this? Example code, pseudo-code? Thanks. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: Showing Modal window within a wizard step
Thanks for the example. It makes perfect sense now that I see it. I can even run the sample as its own project and see it working. Now, I took your example and put it into my project's codebase and the submit button in the modal panel does not cause the form to be submitted. Obviously I have something wrong with my code. Any ideas on why the submit button does not cause any code to fire. The ajax debugger is showing that my button is not returning any data. In the Ajax Debugger for my app I see: INFO: Initiating Ajax POST request on ?wicket:interface=:2:irf:form:view:modalWindow:content:modifyPerson:save ::IActivePageBehaviorListener:0:1wicket:ignoreIfNotActive=truerandom=0 .6665615341811421 INFO: Invoking pre-call handler(s)... INFO: Received ajax response (69 characters) INFO: ?xml version=1.0 encoding=UTF-8?ajax-response/ajax-response INFO: Response parsed. Now invoking steps... In the Ajax Debugger for the sample app I see: INFO: Initiating Ajax POST request on ?wicket:interface=:0:wizard:form:view:modalWindow:content:form:submit::I ActivePageBehaviorListener:0:-1wicket:ignoreIfNotActive=truerandom=0.3 515502192017532 INFO: Invoking pre-call handler(s)... INFO: Received ajax response (1985 characters) INFO: ?xml version=1.0 encoding=UTF-8?ajax-responseheader-contribution encoding=wicket1 ![CDATA[head xmlns:wicket=http://wicket.apache.org;script type=text/javascript src=resources/org.apache.wicket.markup.html.WicketEventReference/wicket -event.js/script script type=text/javascript src=resources/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js /script script type=text/javascript src=resources/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket -ajax-debug.js/script script type=text/javascript id=wicket-ajax-debug-enable!--/*--![CDATA[/*!--*/ wicketAjaxDebugEnable=true; /*--]^]^*//script script type=text/javascript src=resources/org.apache.wicket.extensions.ajax.markup.html.modal.Modal Window/res/modal.js/script link rel=stylesheet type=text/css href=resources/org.apache.wicket.extensions.ajax.markup.html.modal.Moda lWindow/res/modal.css / /head]]/header-contributioncomponent id=view3 ![CDATA[div class=wicketExtensionsWizardViewInner id=view3 name: labelt/labelbr / description: labelt/labelbr / span id=modalWindow4 style=display:none div id=content5 style=display:none/div /spanbr / a id=showModal6 href=# onclick=var wcall=wicketAjaxGet('?wicket:interface=:0:wizard:form:view:showModal::IB ehaviorListener:0:-1',null,null, function() {return Wicket.$('showModal6') != null;}.bind(this));return !wcall;show modal/a /div]]/componentevaluate![CDATA[var win; try { win = window.parent.Wicket.Window; } catch (ignore) { } if (typeof(win) == undefined || typeof(win.current) == undefined) { try { win = window.Wicket.Window; } catch (ignore) { } } if (typeof(win) != undefined typeof(win.current) != undefined) { var close = function(w) { w.setTimeout(function() { win.current.close(); }, 0); } try { close(window.parent); } catch (ignore) { close(window); }; }]]/evaluate/ajax-response INFO: Response parsed. Now invoking steps... From: Pedro Santos [mailto:pedros...@gmail.com] Sent: Friday, October 09, 2009 1:15 PM To: users@wicket.apache.org Subject: Re: Showing Modal window within a wizard step I am completely lost. I have no idea what this means. How can the resolution to my problem be a JIRA issue that was created earlier today? It is just an wish for javadoc improvements, not the solution. Sending an example attached On Fri, Oct 9, 2009 at 1:49 PM, Jeremy Thomerson jer...@wickettraining.com wrote: Sorry - typo on that step. The intent was that you use new Model(model.getObject()) to pull an object out of any potential loadable / detachable model that may be passed in. -- Jeremy Thomerson http://www.wickettraining.com
RE: javscript header contribution in lazy load panels
It is added and a test script with an alert command tells me that it is executed too. But things like jQuery don't work. When I drop the lazy loading and replace it with the lazy loaded panel everything works. When I redraw the wohle panel in an Ajax call, everything works too. It's just the fact 1. having the javascript librarys loaded in the pages header section one time on the first page rendering heals all 2. having the javascript librarys loaded in the lazy loading ajax dom replacement it works only in IE. Even if the scripts are executed. I know, this may be a jquery/otherlib problem but perhaps someone else ever had this effect and found a workaround. Stefan. -Ursprüngliche Nachricht- Von: Ernesto Reinaldo Barreiro [mailto:reier...@gmail.com] Gesendet: Freitag, 9. Oktober 2009 20:14 An: users@wicket.apache.org Betreff: Re: javscript header contribution in lazy load panels Why not use firebug and see your script section is added the head of the page? Ernesto On Fri, Oct 9, 2009 at 4:51 PM, Stefan Lindner lind...@visionet.de wrote: I have some Behaviors that extend AbstractDefaultAjaxBehavior. In the renderHead method of the Behaviors I use public void renderHead(IHeaderResponse response) { response.renderJavascriptReference(WicketEventReference.INSTANCE); } But that's not the problem. When I look into Ajax debug output I can see that the resource references are rendered correct. AND: in IE this works. This must be some sort of jQuery internal problem or some security problem in FF. Stefan -Ursprüngliche Nachricht- Von: Ernesto Reinaldo Barreiro [mailto:reier...@gmail.com] Gesendet: Freitag, 9. Oktober 2009 15:36 An: users@wicket.apache.org Betreff: Re: javscript header contribution in lazy load panels How do you add the JavaScript? I have pages where components are added via AJAX, which include JavaScript and CSS via add(JavascriptPackageResource.getHeaderContribution(ResourceReference...)); and this works fine in any browser I have tested (IE, FF, Chrome, etc). Best, Ernesto On Fri, Oct 9, 2009 at 2:25 PM, Stefan Lindner lind...@visionet.de wrote: Dear wicket users, I have a lazy loading panel. The components inside the generated panel (i.e. the panel that is generated inside the getLazyLoadComponent method) have some header contributing ajax behaviors (jQuery etc.). The lazyly loaded components render javascript resources to the head section oft he page. When the page is created, the header does not contain any script src=... tags. That's clear because wicket does not know which resources are needed by the lazyly loaded panel. The script src=... tags are part of the ajax answer. IN IE this works well but in other Browsers (Firefox, Chrome, Safari) the javascript functionality does not work. We have to put the script src=... manually into the parent page. Is this a known behavior? Does anybody know a magic trick to get the javascript librarys working that are part oft he ajax response? - 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: Showing Modal window within a wizard step
The only difference I can see in the code is that I extend the wizard to be MyWizard and create the model, wizard model, and steps in the constructor. I then use MyWizard in the page rather than the generic Wizard. I don't think anything should be different because I extended the same Wizard that is used. So close, yet still so far from working -Original Message- From: Jeffrey Schneller [mailto:jeffrey.schnel...@envisa.com] Sent: Friday, October 09, 2009 3:04 PM To: users@wicket.apache.org Subject: RE: Showing Modal window within a wizard step Thanks for the example. It makes perfect sense now that I see it. I can even run the sample as its own project and see it working. Now, I took your example and put it into my project's codebase and the submit button in the modal panel does not cause the form to be submitted. Obviously I have something wrong with my code. Any ideas on why the submit button does not cause any code to fire. The ajax debugger is showing that my button is not returning any data. In the Ajax Debugger for my app I see: INFO: Initiating Ajax POST request on ?wicket:interface=:2:irf:form:view:modalWindow:content:modifyPerson:save ::IActivePageBehaviorListener:0:1wicket:ignoreIfNotActive=truerandom=0 .6665615341811421 INFO: Invoking pre-call handler(s)... INFO: Received ajax response (69 characters) INFO: ?xml version=1.0 encoding=UTF-8?ajax-response/ajax-response INFO: Response parsed. Now invoking steps... In the Ajax Debugger for the sample app I see: INFO: Initiating Ajax POST request on ?wicket:interface=:0:wizard:form:view:modalWindow:content:form:submit::I ActivePageBehaviorListener:0:-1wicket:ignoreIfNotActive=truerandom=0.3 515502192017532 INFO: Invoking pre-call handler(s)... INFO: Received ajax response (1985 characters) INFO: ?xml version=1.0 encoding=UTF-8?ajax-responseheader-contribution encoding=wicket1 ![CDATA[head xmlns:wicket=http://wicket.apache.org;script type=text/javascript src=resources/org.apache.wicket.markup.html.WicketEventReference/wicket -event.js/script script type=text/javascript src=resources/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js /script script type=text/javascript src=resources/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket -ajax-debug.js/script script type=text/javascript id=wicket-ajax-debug-enable!--/*--![CDATA[/*!--*/ wicketAjaxDebugEnable=true; /*--]^]^*//script script type=text/javascript src=resources/org.apache.wicket.extensions.ajax.markup.html.modal.Modal Window/res/modal.js/script link rel=stylesheet type=text/css href=resources/org.apache.wicket.extensions.ajax.markup.html.modal.Moda lWindow/res/modal.css / /head]]/header-contributioncomponent id=view3 ![CDATA[div class=wicketExtensionsWizardViewInner id=view3 name: labelt/labelbr / description: labelt/labelbr / span id=modalWindow4 style=display:none div id=content5 style=display:none/div /spanbr / a id=showModal6 href=# onclick=var wcall=wicketAjaxGet('?wicket:interface=:0:wizard:form:view:showModal::IB ehaviorListener:0:-1',null,null, function() {return Wicket.$('showModal6') != null;}.bind(this));return !wcall;show modal/a /div]]/componentevaluate![CDATA[var win; try { win = window.parent.Wicket.Window; } catch (ignore) { } if (typeof(win) == undefined || typeof(win.current) == undefined) { try { win = window.Wicket.Window; } catch (ignore) { } } if (typeof(win) != undefined typeof(win.current) != undefined) { var close = function(w) { w.setTimeout(function() { win.current.close(); }, 0); } try { close(window.parent); } catch (ignore) { close(window); }; }]]/evaluate/ajax-response INFO: Response parsed. Now invoking steps... From: Pedro Santos [mailto:pedros...@gmail.com] Sent: Friday, October 09, 2009 1:15 PM To: users@wicket.apache.org Subject: Re: Showing Modal window within a wizard step I am completely lost. I have no idea what this means. How can the resolution to my problem be a JIRA issue that was created earlier today? It is just an wish for javadoc improvements, not the solution. Sending an example attached On Fri, Oct 9, 2009 at 1:49 PM, Jeremy Thomerson jer...@wickettraining.com wrote: Sorry - typo on that step. The intent was that you use new Model(model.getObject()) to pull an object out of any potential loadable / detachable model that may be passed in. -- 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: Modal inside a WizardStep
Makes sense. I've done a similar process in the past but showed the edit forms within the wizard step (hidden until add/edit clicked). But this makes sense, too. I'm just not a big fan of modals, preferring instead to generally show stuff inline on the original page. Just depends on what your UI requirements are. Jeremy Thomerson http://www.wickettraining.com -- sent from a wireless device -Original Message- From: Jeffrey Schneller jeffrey.schnel...@envisa.com Sent: Friday, October 09, 2009 1:49 PM To: users@wicket.apache.org Subject: RE: Modal inside a WizardStep Think of an order form. Step 1 you enter the products you want to order. Step 2 based on your account it pulls up a list of billing addresses. In step 2 you choose your billing address and the details of the billing address are shown in step 2 with a modify link. The modify link allows you to modify the information and then when done the modified information is shown as the billing address in step 2. Step 3 is the shipping information with the same idea as step 2. Step 4 would be a confirmation of everything entered. Then 'Finish'. This to me is a very common way to use a wizard and modal windows. -Original Message- From: Jeremy Thomerson [mailto:jer...@wickettraining.com] Sent: Friday, October 09, 2009 12:37 PM To: users@wicket.apache.org Subject: Re: Modal inside a WizardStep I keep wondering, too, what you are doing in the wizard that needs an editing modal popup. Typically, wizards are used for multi-step forms. So to me it's weird to have a wizard that isn't the form - but displays values that you are then editing from a modal. Just curious -- Jeremy Thomerson http://www.wickettraining.com On Fri, Oct 9, 2009 at 11:35 AM, Jeremy Thomerson jer...@wickettraining.com wrote: Some very brief pseudo code. Let us know if you need more detail. public MyWizard(IModelFoo model) { setModel(new ModelFoo(model.getObject()); initialize wizard steps - passing them this.getModel() so they all use the same model } make sure to pass all of your wizard steps AND the form inside your modal the same model. Then, in your wizard step and form, use property models (or a compound property model): new MyStep(IModelFoo model) { setModel(model); add(new Label(firstName, new PropertyModel(model, firstName)); .. or .. setModel(new CompoundPropertyModel(model)); add(new Label(firstName); } new MyForm(IModelFoo model) { setModel(model); add(new TextField(firstName, new PropertyModel(model, firstName)); .. or .. setModel(new CompoundPropertyModel(model)); add(new TextField(firstName); } By doing this, your modal form will actually update the object that is also backing the wizard. Then, you should just be able to submit the form, close the modal, and add the wizard step components to the ajax request (so that they will be repainted). When they are repainted, they will pull the values from the model object, which was updated by your form. If you hit a wall with that, you *may* have to set the model on your wizard step to the model from your form. For instance: // in your ajax submit: MyStep.this.setModel(form.getModel()) target.addComponent(MyStep.this.panelThatShowsYourStuff) // close modal -- Jeremy Thomerson http://www.wickettraining.com On Fri, Oct 9, 2009 at 11:24 AM, Jeffrey Schneller jeffrey.schnel...@envisa.com wrote: I have a modal inside a wizard step. The modal is displaying and showing data. The modal is using a panel and not a page. The panel for the modal contains a form with text fields. The wizard step contains labels. I want to have a save and a cancel button in the modal. The save should take the values from the text fields and update the model in the wizard step. The wizard step should now show the updated values in the label. I tried implementing an AjaxButton in the panel for the modal but it never does anything. How would one do this? Example code, pseudo-code? Thanks. - 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: Showing Modal window within a wizard step
I figured it out, the form is not submitting because of Required Field validations. I have a FeedbackPanel in the modal window panel. However the messages are not appearing in the feedback panel. If I change the fields to required in the example and add a FeedbackPanel the same thing happens. The messages are never shown. Ideas? -Original Message- From: Jeffrey Schneller [mailto:jeffrey.schnel...@envisa.com] Sent: Friday, October 09, 2009 3:21 PM To: users@wicket.apache.org Subject: RE: Showing Modal window within a wizard step The only difference I can see in the code is that I extend the wizard to be MyWizard and create the model, wizard model, and steps in the constructor. I then use MyWizard in the page rather than the generic Wizard. I don't think anything should be different because I extended the same Wizard that is used. So close, yet still so far from working -Original Message- From: Jeffrey Schneller [mailto:jeffrey.schnel...@envisa.com] Sent: Friday, October 09, 2009 3:04 PM To: users@wicket.apache.org Subject: RE: Showing Modal window within a wizard step Thanks for the example. It makes perfect sense now that I see it. I can even run the sample as its own project and see it working. Now, I took your example and put it into my project's codebase and the submit button in the modal panel does not cause the form to be submitted. Obviously I have something wrong with my code. Any ideas on why the submit button does not cause any code to fire. The ajax debugger is showing that my button is not returning any data. In the Ajax Debugger for my app I see: INFO: Initiating Ajax POST request on ?wicket:interface=:2:irf:form:view:modalWindow:content:modifyPerson:save ::IActivePageBehaviorListener:0:1wicket:ignoreIfNotActive=truerandom=0 .6665615341811421 INFO: Invoking pre-call handler(s)... INFO: Received ajax response (69 characters) INFO: ?xml version=1.0 encoding=UTF-8?ajax-response/ajax-response INFO: Response parsed. Now invoking steps... In the Ajax Debugger for the sample app I see: INFO: Initiating Ajax POST request on ?wicket:interface=:0:wizard:form:view:modalWindow:content:form:submit::I ActivePageBehaviorListener:0:-1wicket:ignoreIfNotActive=truerandom=0.3 515502192017532 INFO: Invoking pre-call handler(s)... INFO: Received ajax response (1985 characters) INFO: ?xml version=1.0 encoding=UTF-8?ajax-responseheader-contribution encoding=wicket1 ![CDATA[head xmlns:wicket=http://wicket.apache.org;script type=text/javascript src=resources/org.apache.wicket.markup.html.WicketEventReference/wicket -event.js/script script type=text/javascript src=resources/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js /script script type=text/javascript src=resources/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket -ajax-debug.js/script script type=text/javascript id=wicket-ajax-debug-enable!--/*--![CDATA[/*!--*/ wicketAjaxDebugEnable=true; /*--]^]^*//script script type=text/javascript src=resources/org.apache.wicket.extensions.ajax.markup.html.modal.Modal Window/res/modal.js/script link rel=stylesheet type=text/css href=resources/org.apache.wicket.extensions.ajax.markup.html.modal.Moda lWindow/res/modal.css / /head]]/header-contributioncomponent id=view3 ![CDATA[div class=wicketExtensionsWizardViewInner id=view3 name: labelt/labelbr / description: labelt/labelbr / span id=modalWindow4 style=display:none div id=content5 style=display:none/div /spanbr / a id=showModal6 href=# onclick=var wcall=wicketAjaxGet('?wicket:interface=:0:wizard:form:view:showModal::IB ehaviorListener:0:-1',null,null, function() {return Wicket.$('showModal6') != null;}.bind(this));return !wcall;show modal/a /div]]/componentevaluate![CDATA[var win; try { win = window.parent.Wicket.Window; } catch (ignore) { } if (typeof(win) == undefined || typeof(win.current) == undefined) { try { win = window.Wicket.Window; } catch (ignore) { } } if (typeof(win) != undefined typeof(win.current) != undefined) { var close = function(w) { w.setTimeout(function() { win.current.close(); }, 0); } try { close(window.parent); } catch (ignore) { close(window); }; }]]/evaluate/ajax-response INFO: Response parsed. Now invoking steps... From: Pedro Santos [mailto:pedros...@gmail.com] Sent: Friday, October 09, 2009 1:15 PM To: users@wicket.apache.org Subject: Re: Showing Modal window within a wizard step I am completely lost. I have no idea what this means. How can the resolution to my problem be a JIRA issue that was created earlier today? It is just an wish for javadoc improvements, not the solution. Sending an example attached On Fri, Oct 9, 2009 at 1:49 PM, Jeremy Thomerson jer...@wickettraining.com wrote: Sorry - typo on that step. The intent was that you use new Model(model.getObject()) to pull an object out of any potential loadable / detachable model that may be passed in. --
RE: Showing Modal window within a wizard step
I figured it out. I needed to have the feedback panel added back in the onError of the AjaxButton. Jeff From: Pedro Santos [mailto:pedros...@gmail.com] Sent: Friday, October 09, 2009 1:15 PM To: users@wicket.apache.org Subject: Re: Showing Modal window within a wizard step I am completely lost. I have no idea what this means. How can the resolution to my problem be a JIRA issue that was created earlier today? It is just an wish for javadoc improvements, not the solution. Sending an example attached On Fri, Oct 9, 2009 at 1:49 PM, Jeremy Thomerson jer...@wickettraining.com wrote: Sorry - typo on that step. The intent was that you use new Model(model.getObject()) to pull an object out of any potential loadable / detachable model that may be passed in. -- Jeremy Thomerson http://www.wickettraining.com On Fri, Oct 9, 2009 at 9:09 AM, Jeffrey Schneller jeffrey.schnel...@envisa.com wrote: Thank Jeremy. The LDM was causing the problem. It does make sense given your explanation. What do you intend with this code? public MyWizard(IModelFoo model) { super(new Model(model.getObject())); } The Wizard can only accept an IWizardModel and not the model I am going to back it with. Unless I am completely twisted up. Did you intend this to be the WizardStep? How then can I get my modal popup to store the values entered into it when the user presses a save button and discard them and keep the values from the model in the WizardStep if the user presses cancel. Thanks. Jeff -Original Message- From: Jeremy Thomerson [mailto:jer...@wickettraining.com] Sent: Thursday, October 08, 2009 11:03 PM To: users@wicket.apache.org Subject: Re: Showing Modal window within a wizard step Jeff, Sorry I have not had time to read the entire post and that you have not found better documentation on this issue. However, your problem on this is almost certainly caused by the LoadableDetachableModel that is backing your CompoundPropertyModel in your wizard. Since a wizard is a multi-page process, you can not really use an LDM to back it unless you persist changes after every step. With an LDM (and not persisting changes at every step), you end up with something like this flow: WizardPageOne - load model from LDM (presumably DB) - display page with form - submit page - load model from LDM (presumably DB) - stick values onto model object - redirect to page two WizardPageTwo - load model from LDM (presumably DB) This is where the problem is - because those changes weren't persisted, the model was detached, and when page two was rendered, reloaded. The changes were lost. So, in your situation, substitute the modal window for page two - the changes weren't making it into the model object that was used in the modal. So, in any multi-page process, you either need to persist the changes back down to wherever the LDM is loading from, or simply remove the LDM when the wizard (or other multi-page process) is started, OR pass the model object directly onto the other steps. I find it easiest to do something similar to this: public MyWizard(IModelFoo model) { super(new Model(model.getObject())); } Since the model holds on to the actual object between requests, your changes stay on the model object without persisting to your data store between each request. This goes against the standard use of models where you want something to detach after every request, so it is counter-intuitive, but it is actually very similar in thought to most any framework - where you will need to hold a transient object in session during a multi-page process or persist a partially-completed model object to the data store on every request. Hope this helps! -- Jeremy Thomerson http://www.wickettraining.com On Thu, Oct 8, 2009 at 3:43 PM, Jeffrey Schneller jeffrey.schnel...@envisa.com wrote: I am completely lost. I have no idea what this means. How can the resolution to my problem be a JIRA issue that was created earlier today? To find out how to do something who would think to look in the issue tracking system which contains bugs and enhancement requests. Anyhow, I resolved my loading of the modal with data by ditching the LoadableDetachableModel for the time being and using a CompoundPropertyModel. I know it is not correct but it works for now. Now I am attempting to get the data back into the form that the modal is called from. You would think this is easy. But again I am stuck. Wizard WizardStep == data show is read only with a modify link which brings the modal up. Modal == shows the data as editable. Allows user to press submit button which closes window and updates the data in the WizardStep Please, any help with a simple real example will be appreciated. Pointing someone to a past post which may touch on
Re: javscript header contribution in lazy load panels
Maybe you can post additional details... and then maybe someone can spot what's happening. Best, Ernesto On Fri, Oct 9, 2009 at 9:08 PM, Stefan Lindner lind...@visionet.de wrote: It is added and a test script with an alert command tells me that it is executed too. But things like jQuery don't work. When I drop the lazy loading and replace it with the lazy loaded panel everything works. When I redraw the wohle panel in an Ajax call, everything works too. It's just the fact 1. having the javascript librarys loaded in the pages header section one time on the first page rendering heals all 2. having the javascript librarys loaded in the lazy loading ajax dom replacement it works only in IE. Even if the scripts are executed. I know, this may be a jquery/otherlib problem but perhaps someone else ever had this effect and found a workaround. Stefan. -Ursprüngliche Nachricht- Von: Ernesto Reinaldo Barreiro [mailto:reier...@gmail.com] Gesendet: Freitag, 9. Oktober 2009 20:14 An: users@wicket.apache.org Betreff: Re: javscript header contribution in lazy load panels Why not use firebug and see your script section is added the head of the page? Ernesto On Fri, Oct 9, 2009 at 4:51 PM, Stefan Lindner lind...@visionet.de wrote: I have some Behaviors that extend AbstractDefaultAjaxBehavior. In the renderHead method of the Behaviors I use public void renderHead(IHeaderResponse response) { response.renderJavascriptReference(WicketEventReference.INSTANCE); } But that's not the problem. When I look into Ajax debug output I can see that the resource references are rendered correct. AND: in IE this works. This must be some sort of jQuery internal problem or some security problem in FF. Stefan -Ursprüngliche Nachricht- Von: Ernesto Reinaldo Barreiro [mailto:reier...@gmail.com] Gesendet: Freitag, 9. Oktober 2009 15:36 An: users@wicket.apache.org Betreff: Re: javscript header contribution in lazy load panels How do you add the JavaScript? I have pages where components are added via AJAX, which include JavaScript and CSS via add(JavascriptPackageResource.getHeaderContribution(ResourceReference...)); and this works fine in any browser I have tested (IE, FF, Chrome, etc). Best, Ernesto On Fri, Oct 9, 2009 at 2:25 PM, Stefan Lindner lind...@visionet.de wrote: Dear wicket users, I have a lazy loading panel. The components inside the generated panel (i.e. the panel that is generated inside the getLazyLoadComponent method) have some header contributing ajax behaviors (jQuery etc.). The lazyly loaded components render javascript resources to the head section oft he page. When the page is created, the header does not contain any script src=... tags. That's clear because wicket does not know which resources are needed by the lazyly loaded panel. The script src=... tags are part of the ajax answer. IN IE this works well but in other Browsers (Firefox, Chrome, Safari) the javascript functionality does not work. We have to put the script src=... manually into the parent page. Is this a known behavior? Does anybody know a magic trick to get the javascript librarys working that are part oft he ajax response? - 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
SerializableChecker$WicketNotSerializableException:
Hello all, I have a working wicket application but I see the follwowing output on my console. 22:28:23.921 ERROR org.apache.wicket.util.lang.Objects - Error serializing object class \ ch.qos.mistletoe.wicket.Tree [object=[Page class = ch.qos.mistletoe.wicket.Tree, id = 4 version = 0]] org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException: \ Unable to serialize class: org.junit.runner.Description Field hierarchy is: 4 [class=ch.qos.mistletoe.wicket.Tree, path=4] private java.lang.Object org.apache.wicket.MarkupContainer.children [class=ch.qos.mistletoe.wicket.DescriptionPanel, path=4:node] private java.lang.Object org.apache.wicket.MarkupContainer.children [class=[Ljava.lang.Object;] java.lang.Object org.apache.wicket.Component.data[3] [class=ch.qos.mistletoe.wicket.DescriptionPanel$1, path=4:node:payload] java.lang.Object org.apache.wicket.Component.data [class=org.apache.wicket.model.util.WildcardListModel] private java.lang.Object org.apache.wicket.model.util.GenericBaseModel.object [class=java.util.ArrayList] private java.lang.Object org.apache.wicket.model.util.GenericBaseModel.object[write:1] [class=org.junit.runner.Description] - field that is not serializable at org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:346) [wicket-1.4.2.jar:1.4.2] at org.apache.wicket.util.io.SerializableChecker.access$500(SerializableChecker.java:63) [wicket-1.4.2.jar:1.4.2] at org.apache.wicket.util.io.SerializableChecker$1InterceptingObjectOutputStream.replaceObject(SerializableChecker.java:494) [wicket-1.4.2.jar:1.4.2] at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1116) [na:1.6.0_05] By the way, if you are wondering where the [wicket-1.4.2.jar:1.4.2] suffix comes from, it is automatically generated by logback, log4j's successor.. Anyway, my application handles a complex tree-like structure, with almost all of the contents non-serializable and outside my control. I don't think I can use a Loadable Detachable Model, because loading the tree may take several minutes. Can I just ignore the serializable exception? If I don't what are the risks? -- Ceki Gülcü Logback: The reliable, generic, fast and flexible logging framework for Java. http://logback.qos.ch - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: SerializableChecker$WicketNotSerializableException:
Hi, It looks like GenericBaseModel has a reference to a JUnit Description? Maybe you can paste your GenericBaseModel class here? If that's something you'll have a runtime you shouldn't ignore it if you want to support history (the backbutton). If it's just during testing, you can ignore it if you like. Eelco ch.qos.mistletoe.wicket.Tree [object=[Page class = ch.qos.mistletoe.wicket.Tree, id = 4 version = 0]] org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException: \ Unable to serialize class: org.junit.runner.Description Field hierarchy is: 4 [class=ch.qos.mistletoe.wicket.Tree, path=4] private java.lang.Object org.apache.wicket.MarkupContainer.children [class=ch.qos.mistletoe.wicket.DescriptionPanel, path=4:node] private java.lang.Object org.apache.wicket.MarkupContainer.children [class=[Ljava.lang.Object;] java.lang.Object org.apache.wicket.Component.data[3] [class=ch.qos.mistletoe.wicket.DescriptionPanel$1, path=4:node:payload] java.lang.Object org.apache.wicket.Component.data [class=org.apache.wicket.model.util.WildcardListModel] private java.lang.Object org.apache.wicket.model.util.GenericBaseModel.object [class=java.util.ArrayList] private java.lang.Object org.apache.wicket.model.util.GenericBaseModel.object[write:1] [class=org.junit.runner.Description] - field that is not serializable at org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:346) [wicket-1.4.2.jar:1.4.2] at org.apache.wicket.util.io.SerializableChecker.access$500(SerializableChecker.java:63) [wicket-1.4.2.jar:1.4.2] at org.apache.wicket.util.io.SerializableChecker$1InterceptingObjectOutputStream.replaceObject(SerializableChecker.java:494) [wicket-1.4.2.jar:1.4.2] at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1116) [na:1.6.0_05] By the way, if you are wondering where the [wicket-1.4.2.jar:1.4.2] suffix comes from, it is automatically generated by logback, log4j's successor.. Anyway, my application handles a complex tree-like structure, with almost all of the contents non-serializable and outside my control. I don't think I can use a Loadable Detachable Model, because loading the tree may take several minutes. Can I just ignore the serializable exception? If I don't what are the risks? -- Ceki Gülcü Logback: The reliable, generic, fast and flexible logging framework for Java. http://logback.qos.ch - 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: SerializableChecker$WicketNotSerializableException:
Eelco Hillenius wrote: Hi, It looks like GenericBaseModel has a reference to a JUnit Description? Maybe you can paste your GenericBaseModel class here? Fortunately, my application is open source. You can find its source code at http://github.com/ceki/mistletoe If you look at the DescriptionPanel class [1] you'll see that it essentially presents a junit.Description and a junit.Failure instance both of which are non-serializable. [1] http://tinyurl.com/yha75x8 If that's something you'll have a runtime you shouldn't ignore it if you want to support history (the backbutton). If it's just during testing, you can ignore it if you like. My application is a testing platform so I can't ignore junit nor testing. :-) The backbutton, doh! Thanks. Eelco -- Ceki Gülcü Logback: The reliable, generic, fast and flexible logging framework for Java. http://logback.qos.ch - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: SerializableChecker$WicketNotSerializableException:
I've looked at it briefly. The main thing you need to keep in mind is that it unfortunately is a limitation of Wicket that you can't have references in Components that aren't serializable (unless you don't care about back button support and turn of the second level session cache, OR you plug in your own serialization support that doesn't need classes to be serializable). In this case though, you don't really need those members, right? All the members are used in methods that are called during construction of the panel, so why not just pass them through those methods (or if you don't like that, make the members transient)? Eelco On Fri, Oct 9, 2009 at 2:16 PM, Ceki Gulcu c...@qos.ch wrote: Eelco Hillenius wrote: Hi, It looks like GenericBaseModel has a reference to a JUnit Description? Maybe you can paste your GenericBaseModel class here? Fortunately, my application is open source. You can find its source code at http://github.com/ceki/mistletoe If you look at the DescriptionPanel class [1] you'll see that it essentially presents a junit.Description and a junit.Failure instance both of which are non-serializable. [1] http://tinyurl.com/yha75x8 If that's something you'll have a runtime you shouldn't ignore it if you want to support history (the backbutton). If it's just during testing, you can ignore it if you like. My application is a testing platform so I can't ignore junit nor testing. :-) The backbutton, doh! Thanks. Eelco -- Ceki Gülcü Logback: The reliable, generic, fast and flexible logging framework for Java. http://logback.qos.ch - 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: SerializableChecker$WicketNotSerializableException:
Btw, this whole serialization problem is exactly why we have detachable models (though they obviously don't solve every problem out there. Be sure to read up on those while you're at it. Eelco On Fri, Oct 9, 2009 at 3:12 PM, Eelco Hillenius eelco.hillen...@gmail.com wrote: I've looked at it briefly. The main thing you need to keep in mind is that it unfortunately is a limitation of Wicket that you can't have references in Components that aren't serializable (unless you don't care about back button support and turn of the second level session cache, OR you plug in your own serialization support that doesn't need classes to be serializable). In this case though, you don't really need those members, right? All the members are used in methods that are called during construction of the panel, so why not just pass them through those methods (or if you don't like that, make the members transient)? Eelco On Fri, Oct 9, 2009 at 2:16 PM, Ceki Gulcu c...@qos.ch wrote: Eelco Hillenius wrote: Hi, It looks like GenericBaseModel has a reference to a JUnit Description? Maybe you can paste your GenericBaseModel class here? Fortunately, my application is open source. You can find its source code at http://github.com/ceki/mistletoe If you look at the DescriptionPanel class [1] you'll see that it essentially presents a junit.Description and a junit.Failure instance both of which are non-serializable. [1] http://tinyurl.com/yha75x8 If that's something you'll have a runtime you shouldn't ignore it if you want to support history (the backbutton). If it's just during testing, you can ignore it if you like. My application is a testing platform so I can't ignore junit nor testing. :-) The backbutton, doh! Thanks. Eelco -- Ceki Gülcü Logback: The reliable, generic, fast and flexible logging framework for Java. http://logback.qos.ch - 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
Date Picker in Editable TreeTable in IE7 and IE8
Hi, I'm new to Wicket this week, so not familiar with the expected format or structure of emails to this mailing list. I picked Wicket after trawling around for a framework that would enable UI programming on the Web make sense again. It's been an absolute pleasure so far. Compared to the pain I've felt for some time now battling with web application frameworks where most of the code of the applications was in XML, JS, JSP etc. etc. and a light sprinkling of actual Java, the elegance of Wicket as a natural UI programming environment makes everything seem possible and even enjoyable again. Thanks. But, (there always is a but:-) ), I'm struggling with an issue I've hit with the DatePicker and can't seem to resolve it. I'm using Wicket 1.4.1. I used the Editable TreeTable example from the Wicket site as a starter for the very small app I needed to write. Rather than just text editable columns though, I'm making them more type specific, so one of them is for Dates and shows a DateTextField and a DatePicker. The app is working fine in Firefox but the DatePicker is always caught behind the rows above and below when I run the app in IE7 or 8. The attached screen snippets show the difference. I've dug deep into the css and used the developer tools in IE8 which give you something akin to Firebug but couldn't find any css change would fix it. Is there a way to fix this or an alternative date picker? Thanks John - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: post a form to external website
thanks, let me try that and see what happens Date: Sat, 19 Sep 2009 20:55:07 -0500 Subject: Re: post a form to external website From: jer...@wickettraining.com To: users@wicket.apache.org; mcgreg...@e-card.bg If you actually want to redirect them to the other site (with a post, and not just a get), you will just need to render a form and rely on javascript to auto-submit it for you (likely with a click here if not redirected link). The hidden fields could be rendered with attribute modifiers on webmarkupcontainers for example. Or you could use an actual form and override the action URL, but that's probably a little heavy-handed for this. -- Jeremy Thomerson http://www.wickettraining.com On Fri, Sep 18, 2009 at 7:21 AM, Martin Grigorov mcgreg...@e-card.bgwrote: El vie, 18-09-2009 a las 10:51 +, Vadim Tesis escribió: all, i have a form with some input fields. after the user populates the form and hits submit button, i'd like to do some processing on my website and then redirect the user to external website by posting another form with dynamically generated hidden fields. what's the best way to do it in wicket 1.4? There is no automatic Wicket way to do this. You could forward the data with UrlConnection or apache-httpclient in your onSubmit() callback method. Thanks, Vadim _ Hotmail: Powerful Free email with security by Microsoft. http://clk.atdmt.com/GBL/go/171222986/direct/01/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org _ Hotmail: Powerful Free email with security by Microsoft. http://clk.atdmt.com/GBL/go/171222986/direct/01/
Re: hide pagination
if (getpagecount()2) { setvisible(false); } -igor On Fri, Oct 9, 2009 at 9:48 AM, rmattler robertmatt...@gmail.com wrote: WebMarkupContainer wmcNavHead = new WebMarkupContainer(wmcNavHead); WebMarkupContainer wmcNavFoot = new WebMarkupContainer(wmcNavFoot); wmcNavHead.add(new PagingNavigator(navigatorHead, eachProject)); if (dp.size() ROWS_TO_DISPLAY) { wmcNavHead.setVisible(false); } div align=center wicket:id=navigatorHead/div fachhoch wrote: Yes please send me the code . Douglas Ferguson-2 wrote: I override the onRender and set visibility conditionally. However, you have to remember to set visible in your page redraws or else wicket won't even bother calling the onRender method If you need, I can send you code. On Oct 8, 2009, at 7:18 PM, tubin gen wrote: I am using dataview which comes with pagination , if the total records are less than records per page is there away I can hide pagination bar ? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/hide-pagination-tp25813802p25824385.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Date Picker in Editable TreeTable in IE7 and IE8
you can always roll your own datepicker if the YUI one does not work properly. -igor On Fri, Oct 9, 2009 at 5:13 PM, John MacEnri john.mace...@gmail.com wrote: Hi, I'm new to Wicket this week, so not familiar with the expected format or structure of emails to this mailing list. I picked Wicket after trawling around for a framework that would enable UI programming on the Web make sense again. It's been an absolute pleasure so far. Compared to the pain I've felt for some time now battling with web application frameworks where most of the code of the applications was in XML, JS, JSP etc. etc. and a light sprinkling of actual Java, the elegance of Wicket as a natural UI programming environment makes everything seem possible and even enjoyable again. Thanks. But, (there always is a but:-) ), I'm struggling with an issue I've hit with the DatePicker and can't seem to resolve it. I'm using Wicket 1.4.1. I used the Editable TreeTable example from the Wicket site as a starter for the very small app I needed to write. Rather than just text editable columns though, I'm making them more type specific, so one of them is for Dates and shows a DateTextField and a DatePicker. The app is working fine in Firefox but the DatePicker is always caught behind the rows above and below when I run the app in IE7 or 8. The attached screen snippets show the difference. I've dug deep into the css and used the developer tools in IE8 which give you something akin to Firebug but couldn't find any css change would fix it. Is there a way to fix this or an alternative date picker? Thanks John - 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: SerializableChecker$WicketNotSerializableException:
On Fri, Oct 9, 2009 at 1:41 PM, Ceki Gulcu c...@qos.ch wrote: Anyway, my application handles a complex tree-like structure, with almost all of the contents non-serializable and outside my control. I don't think I can use a Loadable Detachable Model, because loading the tree may take several minutes. you would use an LDM per node - the LDM should load the object represented by that node only, not the entire tree. does that make sense? -igor - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org