Re: Wicket/Eclipse/Maven/m2eclipse - HTML files not refreshing
No, I didn't mean the default output folder. For some reason, Maven added also the target/classes folder as a source folder. I noticed also that this was done only if I had a custom Maven plugin in the project (one of our plugins), even if I used the quickstart Maven artifact. If I removed that plugin from the pom.xml, everything worked ok. As a workaround, I have to delete the target/classes folder from the source list... I'll solve this problem of ours later... Good if you got your project working... :) tauren wrote: Noon, Do you mean the Default output folder in Properties--Java Build Path--Source tab? If so, what did you change it to? I can't just delete it as Eclipse says that it is required. Anyway, it is of no consequence any more. It seems that I got things working. I decided to try to start with a basic wicket quickstart from maven archetype, enable Maven dependency management on it, and debugged it. The quickstart worked just fine and I could edit html files and they would refresh without stopping the server. So I compared my project's pom with the quickstart one. My project's pom was modeled after another project's pom. There was a lot of extra stuff that I didn't need, so I removed it. After making my pom very close to the quickstart pom, and then debugging, my project too would refresh html files. Yay! I may follow up on this later as I start to add additional plugins and settings that I removed back into my pom. But at least I'll now be able to test things one at a time and isolate what caused the problem. So thanks everyone for the help! Tauren PS - Just in case anyone is trying to do this in the future, here are the steps I took to get the wicket quickstart working within eclipse with maven and m2eclipse: First make sure eclipse, maven, and m2eclipse are installed... Command line: cd workspace mvn archetype:create -DarchetypeGroupId=org.apache.wicket -DarchetypeArtifactId=wicket-archetype-quickstart -DarchetypeVersion=1.4-rc1 -DgroupId=test -DartifactId=mytest cd mytest mvn eclipse:eclipse Eclipse: File-Import Select General-Existing projects into Workspace Next Select root directory workspace/mytest Finish Right click onto mytest project Select Maven-Enable Dependency Management Right click onto src/test/java/test/Start.java Select Debug As - Java Application Web browser: http://localhost:8080/ In Eclipse, edit HomePage.html, save. Refresh browser, changes are there... On Thu, Jan 15, 2009 at 10:50 PM, noon rami.muurim...@gmail.com wrote: I had to remove the target/classes folder from the java source paths which Maven Eclipse plugin adds (project properties == java build path). After this, the markup files refreshed as expected. Tauren Mills-2 wrote: Thanks Igor, but I already looked there and the only thing listed in filtered resources is *.launch. Any other ideas? Tauren On Thu, Jan 15, 2009 at 4:05 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote: open the preferences window in the search box type filter this will show you java/compiler/building panel with FilteredREsources: textbox, remove *.html -igor On Thu, Jan 15, 2009 at 4:03 PM, Tauren Mills tau...@tauren.com wrote: Martijn, Thanks. But any clue how or where I do that? I've been poking around the preferences in eclipse and haven't found it. Tauren On Thu, Jan 15, 2009 at 3:51 PM, Martijn Dashorst martijn.dasho...@gmail.com wrote: iirc you have to turn off eclipse's filtering of html files (which is turned off default because of javadoc html which usually doesn't want to be packaged inside your war/jar) Martijn On Fri, Jan 16, 2009 at 12:31 AM, Tauren Mills tau...@tauren.com wrote: Are there any wicket/eclipse/maven/m2eclipse users out there? I'm trying to get my development environment working properly and need your help. Up until now, I've been developing WIcket applications in Eclipse and have not been using maven. As long as my web.xml is set to development rather than deployment mode, changes I made to HTML files while debugging were immediately applied. Not anymore... I am now managing my projects with maven, having just added a pom file to my project. I'm using the m2eclipse plugin in Eclipse and enabled dependency management on my project. Unfortunately, now my HTML file changes aren't being recognized any longer even with development mode turned on. I have to stop and start the app to see the HTML changes. My project's maven properties show these goals to invoke on resource changes: process-resources resources:testResources. My pom includes: build sourceDirectorysrc/main/java/sourceDirectory testSourceDirectorysrc/test/java/testSourceDirectory resources resource filteringfalse/filtering directorysrc/main/resources/directory includes
Re: access ServletOutputStream in wicket
I really doubt that such an exception may be fixed by upgrading jasperreport (NotSerializableException is pure wicket exception, not a jasper one). The stacktrace shows you that the problem is here: final java.io.InputStream com.homeaccount.web.jasper.JRResource$1.val$report [class=java.io.ByteArrayInputStream] - field that is not serializable so nothing to do with jasperreport. Just declare your streams as transient and lazy-init it in an initialisation method. And don't forget to close them as well... I you want to, here is how I've my generation of pdf: # Part that generate a PDF to a byte array public byte[] create(int orderid) { final JasperReport report; Order o = getOrder(orderid); try { report = (JasperReport) JRLoader.loadObject(InvoiceCreator.class .getResourceAsStream( /jasperreports/Invoice/Invoice.jasper)); } catch (JRException e) { throw new RuntimeException(e); } final Map params = new HashMap(); params.put(basedir, /jasperreports/Invoice/); params.put(curr, o.getCurrency()); params.put(orderid, o.getId()); params.put(shopid, o.getShops().getId()); params.put(REPORT_LOCALE, new Locale(fr); byte[] bytes; DataSource dataSource = Globals.getDataSource(); Connection connection = DataSourceUtils.getConnection(dataSource); try { bytes = JasperRunManager.runReportToPdf(report, params, connection); } catch (Exception e) { bytes = null; throw new RuntimeException(e); } finally { DataSourceUtils.releaseConnection(connection, dataSource); } return bytes; } # Part that write that data to the wicket's stream private static Link newInvoiceLink(String string, final Integer id) { return new Link(string) { @Override public void onClick() { getRequestCycle().setRequestTarget(new ResourceStreamRequestTarget(new AbstractResourceStream() { private static final long serialVersionUID = 1L; private transient InputStream is = null; public void close() throws IOException { if (is != null) { is.close(); } is = null; } public InputStream getInputStream() { if (is == null) { is = new ByteArrayInputStream(getInvoice(id)); } return is; } }, Invoice # + id + .pdf)); } }; } This way you won't have any serializableexception anymore. Hope this help noon wrote: I had some similar issues and I solved them by upgrading the JasperReports from 2.x to 3.0.0. novotny wrote: Hi, Ok I found in wicketstuff, a JRPdfResource class that does the jasper to pdf conversion for me and I added code to do this: InputStream is = getClass().getResourceAsStream(/test.jasper); JRResource pdfResource = new JRPdfResource(is); pdfResource.setReportParameters(new HashMapString, Object()); add(new ResourceLink(print, pdfResource)); But when I run it I get org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException: Unable to serialize class: java.io.ByteArrayInputStream Field hierarchy is: 2 [class=com.homeaccount.web.loanoptions.MortgageResultsPage, path=2] private java.lang.Object org.apache.wicket.MarkupContainer.children [class=[Ljava.lang.Object;] private java.lang.Object org.apache.wicket.MarkupContainer.children[8] [class=org.apache.wicket.markup.html.link.ResourceLink, path=2:print] private final org.apache.wicket.Resource org.apache.wicket.markup.html.link.ResourceLink.resource [class=com.homeaccount.web.jasper.JRPdfResource] private com.homeaccount.web.jasper.JRResource$JasperReportFactory com.homeaccount.web.jasper.JRResource.jasperReportFactory [class=com.homeaccount.web.jasper.JRResource$1] final java.io.InputStream com.homeaccount.web.jasper.JRResource$1.val$report [class=java.io.ByteArrayInputStream] - field that is not serializable at org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:349) at org.apache.wicket.util.io.SerializableChecker.checkFields(SerializableChecker.java:618) at org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:541) I checked and JRResources implements Serializable, is there a way I can get Wicket to avoid serializing this? I was also thinking maybe I could do something like this: add(new
Re: Wicket/Eclipse/Maven/m2eclipse - HTML files not refreshing
I've the same problem in one project but we are not using maven, instead of it we use ant. For starting/stopping tomcat inside eclipse we use wtp. In development mode we could change the java file but not the html. I've tried to remove the *.html to Filtered resources in java-compiler-building but without any luck. It doesn't work as expected and the html file is not reloaded. Also it seems that the reloading of the .class files is done by tomcat, not by eclipse maybe i could try to remove the context autoreloading. On Thu, 2009-01-15 at 15:31 -0800, Tauren Mills wrote: Are there any wicket/eclipse/maven/m2eclipse users out there? I'm trying to get my development environment working properly and need your help. Up until now, I've been developing WIcket applications in Eclipse and have not been using maven. As long as my web.xml is set to development rather than deployment mode, changes I made to HTML files while debugging were immediately applied. Not anymore... I am now managing my projects with maven, having just added a pom file to my project. I'm using the m2eclipse plugin in Eclipse and enabled dependency management on my project. Unfortunately, now my HTML file changes aren't being recognized any longer even with development mode turned on. I have to stop and start the app to see the HTML changes. My project's maven properties show these goals to invoke on resource changes: process-resources resources:testResources. My pom includes: build sourceDirectorysrc/main/java/sourceDirectory testSourceDirectorysrc/test/java/testSourceDirectory resources resource filteringfalse/filtering directorysrc/main/resources/directory includes include**/include /includes /resource resource filteringfalse/filtering directorysrc/main/java/directory includes include**/include /includes excludes exclude**/*.java/exclude /excludes /resource /resources ... /build So, I'm wondering, does eclipse not think that a resource has been changed because the HTML files are within src/main/java instead of src/main/resources? If I change my CSS files, which are in /src/main/webapp, the changes are reflected with a browser refresh. But if I change an HTML file, it is not. How do I configure this to work right? Everything else seems to be working right, just not HTML refreshing. Thanks, Tauren - 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: ModalWindow with DatePicker
Well, my fault. I use DojoDatePicker (1.3.0) inside a Modal Window (1.3.5). The Problem is, that the DatePicker stays in the background and is deactivated. Seems to be a z-index Problem. But changing z-index by wicket-head doesn't helped. Thats why i'm asking for an example. Greets What's the problem? Which wicket version? We use the date picker in Wicket 1.4 trunk inside modal windows and it works fine. Stefan -Ursprüngliche Nachricht- Von: wilson meier [mailto:wilson.me...@googlemail.com] Gesendet: Mittwoch, 14. Januar 2009 16:47 An: users@wicket.apache.org Betreff: ModalWindow with DatePicker Hy everyone, can someone give me an example on how to use ModalWindow with DatePicker component? Greets Wilson
Re: Re: Why you should not override isVisible
What's taking so long in your isVisible() method? The model object should be cached, and is isPositive() so expensive? Sven - Ursprüngliche Nachricht - Von: Scott Swank Gesendet: 16.01.09 02:06 Uhr An: users@wicket.apache.org Betreff: Re: Why you should not override isVisible We have implemented this, perhaps a dozen times or more across our application. For example, there are several payment options whose relevance is determined by whether the customer owes any money on their purchase (e.g. as opposed to using a gift card). These total the order and determine visibility methods were particular hot spots. @Override public boolean isVisible() { if (visible == null) visible = ((Money) getModelObject()).isPositive(); return visible; } While this is an idiosyncratic example, I can vouch for the fact that performance woes in isVisible() show up in profiling. On Thu, Jan 15, 2009 at 4:56 PM, Jonathan Locke jonathan.lo...@gmail.com wrote: oh i suppose you also need to reset the value in onBeforeRender(). it's a small pain, but how often does this really become a quantifiable problem and not just a worry? Jonathan Locke wrote: sure, that's the clean way to do it, but it comes at the expense of possibly breaking user code by surprise. i'm not sure how big of a deal this is. i've heard people talk about it, but i'd be interested in some examples of how performance of this method has been a problem for people. i've never run into it myself and if i did see it in a profiler, i'd probably just cache the value in a Boolean. it's literally just this little bit in your anonymous class: Boolean visible = null; public isVisible() { if (visible == null) { visible = // whatever boolean computation } return visible; } and then it disappears from the profiler and who cares about the rest. Scott Swank wrote: My idea what an inversion of that one: Add a method to Component, such as isVisibleInternal() [no I don't love the name] that would cache the results of isVisible(). Then all code that currently calls isVisible() would be changed to call isVisibleInternal() instead. Someone who really wanted non-cached visibility (seemingly the 1% case) could override isVisibleInternal(), but everyone else would get caching for free with their current code. On Thu, Jan 15, 2009 at 2:35 PM, Jonathan Locke jonathan.lo...@gmail.com wrote: well, one simple design that would avoid the reuse problem is: Boolean Component#isCachedVisible() { return null; } then override to use visibility caching and return true or false. if you don't override you get the current functionality. of course you need two more bits in Component to support this... one for whether isCachedVisible returned non-null and another for the value it returned. - 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/Why-you-should-not-override-isVisible-tp21474995p21490479.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: Things I miss in Wicket
Hi Sébastien, 1) and 2) are already implemented, or something very close exists. 3) may be a good improvement, maybe with a new wicket tag (wicket:component type=com.me.MyCustomComp /). let's see what think core developpers hehe - that one already exists, too! :D Best regards, --- Jan. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Things I miss in Wicket
Sure! sorry, missed that one... Well, all requirements were already implemented :D If I were naughty, I would write rtfm ;) Jan Kriesten wrote: Hi Sébastien, 1) and 2) are already implemented, or something very close exists. 3) may be a good improvement, maybe with a new wicket tag (wicket:component type=com.me.MyCustomComp /). let's see what think core developpers hehe - that one already exists, too! :D Best regards, --- Jan. - 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: skip item in populateItem of ListView
Does RepeatingView or RefreshingView allow me to skip an item once inside populateItem() ? thanks. On 15/01/2009, at 8:46 PM, Erik van Oosten wrote: Perhaps it would be more natural to use RepeatingView (or RefreshingView) in such cases. Regards, Erik. Steve Swinsburg wrote: Hi all, I have a situation whereby certain conditions mean I need to skip an item that is being rendered in a ListView. ie inside the populateItem() method I do some processing and if that item fails, it shouldn't be rendered so I'd like to skip to the next item. I know I *could* process the list before it reaches the ListView but I'd prefer not to iterate over the list twice. Is there some way of skipping this item or not showing the item (and making sure none of its content is output)? thanks, Steve -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Why you should not override isVisible
Martijn, I just went through the source (1.4-rc1) to trace a detach manually and find suspect callers of isVisible. I found none during detach, but I did find one call to isVisible /after/ detach. A simple run confirmed this. The call to isVisible /after/ detach can be found in method ComponentRequestTarget#respond(RequestCycle). That method initiates a detach and then calls page.endComponentRender. This leads to a call to Page#checkRendering which calls isVisibleInHierarchy() and from there isVisible(). Method checkRendering only does something when the debug setting 'componentUseCheck' is enabled (which according to the javadoc is true by default). I vividly remember the pain when I found out that isVisible was called /during/ detach. So I am certain the problem existed at some time in the past (1.2, 1.3?). I can bang my head against the wall for not having documented the problem more thoroughly back then. Anyways, a call to isVisible /after/ detach has similar problems to a call during detach. Regards, Erik. Martijn Dashorst wrote: A short test didn't uncover any calls to isVisible during detach phase (1.4). Might need more extensive tests though... Martijn -- Erik van Oosten http://day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: skip item in populateItem of ListView
There is no such method as populateItem. With these components you just add the sub-components you want to see. In other words, you do the iteration yourself. See the javadoc of RepeatingView (http://wicket.apache.org/docs/wicket-1.3.2/wicket/apidocs/org/apache/wicket/markup/repeater/RepeatingView.html). Regards, Erik. Stephen Swinsburg wrote: Does RepeatingView or RefreshingView allow me to skip an item once inside populateItem() ? thanks. On 15/01/2009, at 8:46 PM, Erik van Oosten wrote: Perhaps it would be more natural to use RepeatingView (or RefreshingView) in such cases. Regards, Erik. Steve Swinsburg wrote: Hi all, I have a situation whereby certain conditions mean I need to skip an item that is being rendered in a ListView. ie inside the populateItem() method I do some processing and if that item fails, it shouldn't be rendered so I'd like to skip to the next item. I know I *could* process the list before it reaches the ListView but I'd prefer not to iterate over the list twice. Is there some way of skipping this item or not showing the item (and making sure none of its content is output)? thanks, Steve -- Erik van Oosten http://day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Things I miss in Wicket
Hi Jan, Can you point to a place where this is documented? Its not on http://cwiki.apache.org/WICKET/wickets-xhtml-tags.html. Regards, Erik. Jan Kriesten wrote: 3) may be a good improvement, maybe with a new wicket tag (wicket:component type=com.me.MyCustomComp /). let's see what think core developpers hehe - that one already exists, too! : -- Erik van Oosten http://day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: JavaScript and Wicket
Thanx, I think I understand you, but still I'm not sure how to contribute client custom JS script with WebPage class. Additional code (JS) is: function showUpdate(id) { itemId = id; var maskDiv = document.getElementById('maskDiv'); var asModalWindow = document.getElementById('asModalUpdate'); if (maskDiv) { if (maskDiv.style.display == 'none' || maskDiv.style.display == ) { $(#maskDiv).fadeIn(fast, function() { var theTop=(document.height/2)-(250/2); var theLeft=(document.width/2)-(600/2); asModalWindow.style.top = theTop; asModalWindow.style.left = theLeft; $(#asModalUpdate).fadeIn(fast); }); } } return true; } asModalUpdate is : div id=asModalUpdate onclick=closeModal('asModalUpdate') ul li wicket:id=updateFirst Alle Arbeiten wurden erledigt /li li Moment kein Zeit hierfur /li li Warte auf info /li li In Bearbeitung /li li onclick=updateManual() Manuelles Update /li br li onclick=closeModal('asModalUpdate') Cancel /li /ul /div When first li tag is clicked which has wicket:id='updateFirst', I need to get request to server with already defined itemId value in showUpdate(id) function. How that is possible to do with Wicket?! Best regards, Aleksandar Cajic -- View this message in context: http://www.nabble.com/JavaScript-and-Wicket-tp21481992p21495435.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: Why you should not override isVisible
Hello. Pardon me for jumping into this topic as I did not go through previous posts. But I did notice that the isVisible() is called at least three time when a page is rendered I have a SQL call inside the method and the sql log shows multiple sqls were issued. I am running wicket 1.3.5. Sorry I could not provide sample to reproduce this. but I did see it happening. - Original Message - From: Erik van Oosten e.vanoos...@grons.nl To: users@wicket.apache.org Sent: Friday, January 16, 2009 4:18 AM Subject: Re: Why you should not override isVisible Martijn, I just went through the source (1.4-rc1) to trace a detach manually and find suspect callers of isVisible. I found none during detach, but I did find one call to isVisible /after/ detach. A simple run confirmed this. The call to isVisible /after/ detach can be found in method ComponentRequestTarget#respond(RequestCycle). That method initiates a detach and then calls page.endComponentRender. This leads to a call to Page#checkRendering which calls isVisibleInHierarchy() and from there isVisible(). Method checkRendering only does something when the debug setting 'componentUseCheck' is enabled (which according to the javadoc is true by default). I vividly remember the pain when I found out that isVisible was called /during/ detach. So I am certain the problem existed at some time in the past (1.2, 1.3?). I can bang my head against the wall for not having documented the problem more thoroughly back then. Anyways, a call to isVisible /after/ detach has similar problems to a call during detach. Regards, Erik. Martijn Dashorst wrote: A short test didn't uncover any calls to isVisible during detach phase (1.4). Might need more extensive tests though... Martijn -- Erik van Oosten http://day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Why you should not override isVisible
Thanks DVD, we already established that it is called more then once. This discussion is talking about: 1. caching the visible value during the render phase to prevent the potentially large performance hit of multiple invocations to isVisible 2. preventing calls to isVisible during or after the detach phase to allow caching in the first place Regards, Erik. DVD wrote: Hello. Pardon me for jumping into this topic as I did not go through previous posts. But I did notice that the isVisible() is called at least three time when a page is rendered I have a SQL call inside the method and the sql log shows multiple sqls were issued. I am running wicket 1.3.5. Sorry I could not provide sample to reproduce this. but I did see it happening. -- Erik van Oosten http://day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Re: Why you should not override isVisible
Nope, the problem is that the model object *possibly* gets reloaded if isVisible is called after the cached object got detached - and that's what started the whole bunch of messages Michael svenmeier wrote: What's taking so long in your isVisible() method? The model object should be cached, and is isPositive() so expensive? Sven - Ursprüngliche Nachricht - Von: Scott Swank Gesendet: 16.01.09 02:06 Uhr An: users@wicket.apache.org Betreff: Re: Why you should not override isVisible We have implemented this, perhaps a dozen times or more across our application. For example, there are several payment options whose relevance is determined by whether the customer owes any money on their purchase (e.g. as opposed to using a gift card). These total the order and determine visibility methods were particular hot spots. @Override public boolean isVisible() { if (visible == null) visible = ((Money) getModelObject()).isPositive(); return visible; } While this is an idiosyncratic example, I can vouch for the fact that performance woes in isVisible() show up in profiling. On Thu, Jan 15, 2009 at 4:56 PM, Jonathan Locke jonathan.lo...@gmail.com wrote: oh i suppose you also need to reset the value in onBeforeRender(). it's a small pain, but how often does this really become a quantifiable problem and not just a worry? Jonathan Locke wrote: sure, that's the clean way to do it, but it comes at the expense of possibly breaking user code by surprise. i'm not sure how big of a deal this is. i've heard people talk about it, but i'd be interested in some examples of how performance of this method has been a problem for people. i've never run into it myself and if i did see it in a profiler, i'd probably just cache the value in a Boolean. it's literally just this little bit in your anonymous class: Boolean visible = null; public isVisible() { if (visible == null) { visible = // whatever boolean computation } return visible; } and then it disappears from the profiler and who cares about the rest. Scott Swank wrote: My idea what an inversion of that one: Add a method to Component, such as isVisibleInternal() [no I don't love the name] that would cache the results of isVisible(). Then all code that currently calls isVisible() would be changed to call isVisibleInternal() instead. Someone who really wanted non-cached visibility (seemingly the 1% case) could override isVisibleInternal(), but everyone else would get caching for free with their current code. On Thu, Jan 15, 2009 at 2:35 PM, Jonathan Locke jonathan.lo...@gmail.com wrote: well, one simple design that would avoid the reuse problem is: Boolean Component#isCachedVisible() { return null; } then override to use visibility caching and return true or false. if you don't override you get the current functionality. of course you need two more bits in Component to support this... one for whether isCachedVisible returned non-null and another for the value it returned. - 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/Why-you-should-not-override-isVisible-tp21474995p21490479.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 - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/Why-you-should-not-override-isVisible-tp21474995p21496352.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: Things I miss in Wicket
Hi Erik, Can you point to a place where this is documented? Its not on http://cwiki.apache.org/WICKET/wickets-xhtml-tags.html. actually, it is there. :) ---8--- Element wicket:component wicket:component - Creates a Wicket component on the fly. Needs a class attribute. Though this has been in wicket for a long time, it is still kind of an unsupported feature, as most of the core developers believe that this may lead to misuse of the framework. Before heavily relying on this feature, you might want to contact the user list to discuss alternative strategies. (THIS TAG IS NOT SUPPORTED BY THE CORE TEAM) ---8--- Since wicket:component has some issues (e.g. HeaderContribution doesn't work) I build my own DynComponent some time ago (see my blog for details). Best regards, --- Jan. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Things I miss in Wicket
Yep, I did see that. However, it does not describe the type attribute Pills described: Pills wrote: 3) may be a good improvement, maybe with a new wicket tag (wicket:component type=com.me.MyCustomComp /). let's see what think core developpers Jan Kriesten wrote Hi Erik, Can you point to a place where this is documented? Its not on http://cwiki.apache.org/WICKET/wickets-xhtml-tags.html. actually, it is there. :) ---8--- Element wicket:component wicket:component - Creates a Wicket component on the fly. Needs a class attribute. Though this has been in wicket for a long time, it is still kind of an unsupported feature, as most of the core developers believe that this may lead to misuse of the framework. Before heavily relying on this feature, you might want to contact the user list to discuss alternative strategies. (THIS TAG IS NOT SUPPORTED BY THE CORE TEAM) ---8--- Since wicket:component has some issues (e.g. HeaderContribution doesn't work) I build my own DynComponent some time ago (see my blog for details). Best regards, --- Jan. -- Erik van Oosten http://day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Things I miss in Wicket
Hi Erik, Yep, I did see that. However, it does not describe the type attribute Pills described: just replace 'type' with 'class' and you're there. Also, any other attribute you put into the wicket:component tag is looked a setter on the class for, so you can pass parameters in from you html code. Best regards, --- Jan. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
How to serve different layouts for different screen resolutions and devices?
Hi, My subject sums up my question. I'm about to create a new web system and it will be accessed by clients using normal web browsers and mobile devices. The normal browsers have varying screen resolutions with the lowest still at 800x600. When it comes to the mobile devices and their web browsers the screen resolutions may be even smaller. I suspect that serving different CSS files for different screen resolutions will only get us part of the way. In the case of the mobile devices there might also be a need to reduce the amount of markup that is being sent as well as restructure it a bit. I'm interested in hearing if you have dealt with similar requirements and how you solved them? And more specifically I'm interested in how I would go about solving this using Wicket in a nice and structured manner? Best regards, Kent
Re: Technologies to use with large scale Wicket application
Your planing something quite impressive here ... or frightening ;) My comments: Lucene/Hibernate Search I'd strongly disagree in using neither Lucene directly nor Hibernate Search. I'd give +1000 to Compass (http://compass-project.org/) instead. I migrated my projects completely from Hibernate Search to Compass and didn't regret it a single second. Jackrabbit Doesn't Jackrabbit come wit Lucene integration itself? Terracotta I used Terracotta for a while. Don't know what you mean by all across the world, but I'd say that Terracotta was built with very low network latency in mind. However, You will need *a lot* of users and page impressions until you'll really need it (move stuff like search on dedicated machines, maybe clustered with terracotta (compass comes with terracotta support)). Facebook Connect I integrated a Wicket application with Facebook (http://www.setlist.fm/). Feel free to contact me, if you're interested into that stuff. Regards tauren wrote: Happy new year! My team is in the preliminary stages of designing a large social wicket web application and I'm trying to identify a good set of existing tools and technologies that can be leveraged to simplify the development of this application. I would love to hear the opinions and suggestions of other Wicket users. Note that I want to use open source tools as much as possible. Here are some of the tools that I feel might help. I realize this is a big list and may be off-topic, but am still interested in which technologies other Wicket developers have found work well with a Wicket app. I would appreciate any comments or opinions of these technologies as well as suggestions and alternatives that you feel would be worth my consideration. Wicket I assume no one here will object to this. I plan to use version 1.4. MySQL First choice for database. I've used it MySQL more than any other database and it hasn't let me down. PostgreSQL Second choice for database. I've used it less than MySQL, so additional time might be required to install, configure, and use it. Spring + Hibernate I'm comfortable with these technologies as I've been using them for a few years with Wicket. But I'm certainly open to suggestions, opinions, etc. Hibernate Annotations Ive been using HBM files, but I'm thinking I should look into getting rid of my mapping files and put the mapping right into the pojos. Is this the right call? Salve Never used it, but it appears many Wicket developers do. Is it worth looking into? WicketWebBeans Might use this for rapid back-end UI development. Besides rolling my own, are there other tools like this? Brix Jackrabbit Our application will need some heavy duty CMS features, and this project looks powerful enough to do the job. Jackrabbit is used by Brix to store content. Lucene Hibernate Search I will need site-wide and data-wide search that encompasses all of the content on the site as well as the data in the application. I'm not sure if these are the best tools for this job, as the content will be stored in Jackrabbit. So I need to be able to search jackrabbit and my data and produce unified search results. Ideas? ACEGI Spring Security I haven't used either of these before so I'm not sure if they will solve my problem: This application will have many levels of roles and permissions. Users will belong to groups and can be assigned roles for a group that allow them to perform actions. For instance, a standard user that belongs to a group can only view some data. But if a user has additional roles assigned to them, then they will gain the ability to see other data, edit data, and so forth. A user can belong to multiple groups, and may have different roles for each group. Shopping Cart Any good open source wicket shopping carts? I have a homemade one that I did for a customer that I plan to start with. But if something else exists, I'd love to hear about it. Amazon FPS This system provides a simple API that can be used to help one user pay another user for service, but allow the infrastructure provider (me) to take a cut out of the transaction. It also supports micro-payments which I could use. The service fits the needs of my business model really well. I've never used it, so does anyone have any horror stories, good things to say, alternative suggestions? Google Checkout PayPal Merchant account The system will also allow for the sale of products. I want to give users a choice of method for accepting payments. They can receive payments via Google Checkout, PayPal, or their own merchant account. If anyone knows of any tools that would help with this, please let me know. Otherwise, I'll just use the APIs directly available from the payment systems. I've already got Google Checkout integrated into another project. OpenID I want to be able to allow users to log in with an OpenID. I understand Spring
Re: Things I miss in Wicket
Jan Kriesten wrote: just replace 'type' with 'class' and you're there. Also, any other attribute you put into the wicket:component tag is looked a setter on the class for, so you can pass parameters in from you html code. Best regards, --- Jan. Ouch, that is ugly. Now I understand why it is deprecated. Erik. -- Erik van Oosten http://day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Things I miss in Wicket
Ouch, that is ugly. Now I understand why it is deprecated. It for sure is nothing meant to be used on a day-to-day basis, right. But there are use cases where you're happy it exists. Best regards, --- Jan. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
ERROR - DiskPageStore - Error flushing page
I am getting the above problem , can any one of please provide me the solution as to how to fix this issue ERROR - DiskPageStore - Error flushing page java.lang.RuntimeException: java.io.FileNotFoundException: /opt/jakarta-tomcat-5.0.25/work/Catalina/localhost/_/wicket.indiakhelo-filestore/63710B296A9918BCE0B2DD92747962AF/pm-null (No such file or directory) at org.apache.wicket.protocol.http.pagestore.FileChannelPool.newFileChannel(FileChannelPool.java:104) at org.apache.wicket.protocol.http.pagestore.FileChannelPool.getFileChannel(FileChannelPool.java:171) at org.apache.wicket.protocol.http.pagestore.DiskPageStore$SessionEntry.savePage(DiskPageStore.java:241) at org.apache.wicket.protocol.http.pagestore.DiskPageStore.flushPagesToSaveList(DiskPageStore.java:895) at org.apache.wicket.protocol.http.pagestore.DiskPageStore$PageSavingThread.run(DiskPageStore.java:965) at java.lang.Thread.run(Thread.java:619) Caused by: java.io.FileNotFoundException: /opt/jakarta-tomcat-5.0.25/work/Catalina/localhost/_/wicket.indiakhelo-filestore/63710B296A9918BCE0B2DD92747962AF/pm-null (No such file or directory) -- View this message in context: http://www.nabble.com/ERROR---DiskPageStoreError-flushing-page-tp21498004p21498004.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: Wicket/Eclipse/Maven/m2eclipse - HTML files not refreshing
The only time I have seen something under the target folder added as a source folder in Eclipse is if it specifically configured that way in the build section of the pom.xml. This is sometimes done if you are generating sources or resources using something like JAXB, e.g., target/generated-sources. -Richard On Fri, Jan 16, 2009 at 2:59 AM, noon rami.muurim...@gmail.com wrote: No, I didn't mean the default output folder. For some reason, Maven added also the target/classes folder as a source folder. I noticed also that this was done only if I had a custom Maven plugin in the project (one of our plugins), even if I used the quickstart Maven artifact. If I removed that plugin from the pom.xml, everything worked ok. As a workaround, I have to delete the target/classes folder from the source list... I'll solve this problem of ours later... Good if you got your project working... :) tauren wrote: Noon, Do you mean the Default output folder in Properties--Java Build Path--Source tab? If so, what did you change it to? I can't just delete it as Eclipse says that it is required. Anyway, it is of no consequence any more. It seems that I got things working. I decided to try to start with a basic wicket quickstart from maven archetype, enable Maven dependency management on it, and debugged it. The quickstart worked just fine and I could edit html files and they would refresh without stopping the server. So I compared my project's pom with the quickstart one. My project's pom was modeled after another project's pom. There was a lot of extra stuff that I didn't need, so I removed it. After making my pom very close to the quickstart pom, and then debugging, my project too would refresh html files. Yay! I may follow up on this later as I start to add additional plugins and settings that I removed back into my pom. But at least I'll now be able to test things one at a time and isolate what caused the problem. So thanks everyone for the help! Tauren PS - Just in case anyone is trying to do this in the future, here are the steps I took to get the wicket quickstart working within eclipse with maven and m2eclipse: First make sure eclipse, maven, and m2eclipse are installed... Command line: cd workspace mvn archetype:create -DarchetypeGroupId=org.apache.wicket -DarchetypeArtifactId=wicket-archetype-quickstart -DarchetypeVersion=1.4-rc1 -DgroupId=test -DartifactId=mytest cd mytest mvn eclipse:eclipse Eclipse: File-Import Select General-Existing projects into Workspace Next Select root directory workspace/mytest Finish Right click onto mytest project Select Maven-Enable Dependency Management Right click onto src/test/java/test/Start.java Select Debug As - Java Application Web browser: http://localhost:8080/ In Eclipse, edit HomePage.html, save. Refresh browser, changes are there... On Thu, Jan 15, 2009 at 10:50 PM, noon rami.muurim...@gmail.com wrote: I had to remove the target/classes folder from the java source paths which Maven Eclipse plugin adds (project properties == java build path). After this, the markup files refreshed as expected. Tauren Mills-2 wrote: Thanks Igor, but I already looked there and the only thing listed in filtered resources is *.launch. Any other ideas? Tauren On Thu, Jan 15, 2009 at 4:05 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote: open the preferences window in the search box type filter this will show you java/compiler/building panel with FilteredREsources: textbox, remove *.html -igor On Thu, Jan 15, 2009 at 4:03 PM, Tauren Mills tau...@tauren.com wrote: Martijn, Thanks. But any clue how or where I do that? I've been poking around the preferences in eclipse and haven't found it. Tauren On Thu, Jan 15, 2009 at 3:51 PM, Martijn Dashorst martijn.dasho...@gmail.com wrote: iirc you have to turn off eclipse's filtering of html files (which is turned off default because of javadoc html which usually doesn't want to be packaged inside your war/jar) Martijn On Fri, Jan 16, 2009 at 12:31 AM, Tauren Mills tau...@tauren.com wrote: Are there any wicket/eclipse/maven/m2eclipse users out there? I'm trying to get my development environment working properly and need your help. Up until now, I've been developing WIcket applications in Eclipse and have not been using maven. As long as my web.xml is set to development rather than deployment mode, changes I made to HTML files while debugging were immediately applied. Not anymore... I am now managing my projects with maven, having just added a pom file to my project. I'm using the m2eclipse plugin in Eclipse and enabled dependency management on my project. Unfortunately, now my HTML file changes aren't being recognized any longer even with development mode turned on. I have to
Re: Wicket/Eclipse/Maven/m2eclipse - HTML files not refreshing
Using m2eclipse, you can also create a new Maven project using an archetype from within Eclipse. Choose File New Maven Project Next, and select the archetype you want to use. See: http://books.sonatype.com/maven-book/reference/eclipse-sect-m2e-create-archetype.html -Richard On Fri, Jan 16, 2009 at 2:47 AM, Tauren Mills tau...@tauren.com wrote: Noon, Do you mean the Default output folder in Properties--Java Build Path--Source tab? If so, what did you change it to? I can't just delete it as Eclipse says that it is required. Anyway, it is of no consequence any more. It seems that I got things working. I decided to try to start with a basic wicket quickstart from maven archetype, enable Maven dependency management on it, and debugged it. The quickstart worked just fine and I could edit html files and they would refresh without stopping the server. So I compared my project's pom with the quickstart one. My project's pom was modeled after another project's pom. There was a lot of extra stuff that I didn't need, so I removed it. After making my pom very close to the quickstart pom, and then debugging, my project too would refresh html files. Yay! I may follow up on this later as I start to add additional plugins and settings that I removed back into my pom. But at least I'll now be able to test things one at a time and isolate what caused the problem. So thanks everyone for the help! Tauren PS - Just in case anyone is trying to do this in the future, here are the steps I took to get the wicket quickstart working within eclipse with maven and m2eclipse: First make sure eclipse, maven, and m2eclipse are installed... Command line: cd workspace mvn archetype:create -DarchetypeGroupId=org.apache.wicket -DarchetypeArtifactId=wicket-archetype-quickstart -DarchetypeVersion=1.4-rc1 -DgroupId=test -DartifactId=mytest cd mytest mvn eclipse:eclipse Eclipse: File-Import Select General-Existing projects into Workspace Next Select root directory workspace/mytest Finish Right click onto mytest project Select Maven-Enable Dependency Management Right click onto src/test/java/test/Start.java Select Debug As - Java Application Web browser: http://localhost:8080/ In Eclipse, edit HomePage.html, save. Refresh browser, changes are there... On Thu, Jan 15, 2009 at 10:50 PM, noon rami.muurim...@gmail.com wrote: I had to remove the target/classes folder from the java source paths which Maven Eclipse plugin adds (project properties == java build path). After this, the markup files refreshed as expected. Tauren Mills-2 wrote: Thanks Igor, but I already looked there and the only thing listed in filtered resources is *.launch. Any other ideas? Tauren On Thu, Jan 15, 2009 at 4:05 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote: open the preferences window in the search box type filter this will show you java/compiler/building panel with FilteredREsources: textbox, remove *.html -igor On Thu, Jan 15, 2009 at 4:03 PM, Tauren Mills tau...@tauren.com wrote: Martijn, Thanks. But any clue how or where I do that? I've been poking around the preferences in eclipse and haven't found it. Tauren On Thu, Jan 15, 2009 at 3:51 PM, Martijn Dashorst martijn.dasho...@gmail.com wrote: iirc you have to turn off eclipse's filtering of html files (which is turned off default because of javadoc html which usually doesn't want to be packaged inside your war/jar) Martijn On Fri, Jan 16, 2009 at 12:31 AM, Tauren Mills tau...@tauren.com wrote: Are there any wicket/eclipse/maven/m2eclipse users out there? I'm trying to get my development environment working properly and need your help. Up until now, I've been developing WIcket applications in Eclipse and have not been using maven. As long as my web.xml is set to development rather than deployment mode, changes I made to HTML files while debugging were immediately applied. Not anymore... I am now managing my projects with maven, having just added a pom file to my project. I'm using the m2eclipse plugin in Eclipse and enabled dependency management on my project. Unfortunately, now my HTML file changes aren't being recognized any longer even with development mode turned on. I have to stop and start the app to see the HTML changes. My project's maven properties show these goals to invoke on resource changes: process-resources resources:testResources. My pom includes: build sourceDirectorysrc/main/java/sourceDirectory testSourceDirectorysrc/test/java/testSourceDirectory resources resource filteringfalse/filtering directorysrc/main/resources/directory includes include**/include /includes /resource resource filteringfalse/filtering
Re: ERROR - DiskPageStore - Error flushing page
Hi, I am getting the above problem , can any one of please provide me the solution as to how to fix this issue since you didn't provide any further hints on what version of wicket you're using, I suppose this issue has already been resolved with 1.3.5: https://issues.apache.org/jira/browse/WICKET-1773 Regards, --- Jan. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: JavaScript and Wicket
See: http://cwiki.apache.org/WICKET/calling-wicket-from-javascript.html Or more generally: http://cwiki.apache.org/WICKET/ajax.html -Richard On Fri, Jan 16, 2009 at 4:29 AM, Sniffer cajic_aleksan...@yahoo.com wrote: Thanx, I think I understand you, but still I'm not sure how to contribute client custom JS script with WebPage class. Additional code (JS) is: function showUpdate(id) { itemId = id; var maskDiv = document.getElementById('maskDiv'); var asModalWindow = document.getElementById('asModalUpdate'); if (maskDiv) { if (maskDiv.style.display == 'none' || maskDiv.style.display == ) { $(#maskDiv).fadeIn(fast, function() { var theTop=(document.height/2)-(250/2); var theLeft=(document.width/2)-(600/2); asModalWindow.style.top = theTop; asModalWindow.style.left = theLeft; $(#asModalUpdate).fadeIn(fast); }); } } return true; } asModalUpdate is : div id=asModalUpdate onclick=closeModal('asModalUpdate') ul li wicket:id=updateFirst Alle Arbeiten wurden erledigt /li li Moment kein Zeit hierfur /li li Warte auf info /li li In Bearbeitung /li li onclick=updateManual() Manuelles Update /li br li onclick=closeModal('asModalUpdate') Cancel /li /ul /div When first li tag is clicked which has wicket:id='updateFirst', I need to get request to server with already defined itemId value in showUpdate(id) function. How that is possible to do with Wicket?! Best regards, Aleksandar Cajic -- View this message in context: http://www.nabble.com/JavaScript-and-Wicket-tp21481992p21495435.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: Why you should not override isVisible
Ok, IMHO it's a bug that wicket calls isVisible() after detachment. Thus caching isVisible() is not needed. Sven - Ursprüngliche Nachricht - Von: Michael Sparer Gesendet: 16.01.09 11:20 Uhr An: users@wicket.apache.org Betreff: Re: Re: Why you should not override isVisible Nope, the problem is that the model object *possibly* gets reloaded if isVisible is called after the cached object got detached - and that's what started the whole bunch of messages Michael svenmeier wrote: What's taking so long in your isVisible() method? The model object should be cached, and is isPositive() so expensive? Sven - Ursprüngliche Nachricht - Von: Scott Swank Gesendet: 16.01.09 02:06 Uhr An: users@wicket.apache.org Betreff: Re: Why you should not override isVisible We have implemented this, perhaps a dozen times or more across our application. For example, there are several payment options whose relevance is determined by whether the customer owes any money on their purchase (e.g. as opposed to using a gift card). These total the order and determine visibility methods were particular hot spots.
Re: Things I miss in Wicket
I think there already a lot of projects out there that try to optimize web-development in Java. Instead of starting yet another project I think it would be better to find out which framework is most flexible and has the best design architecture and philosophy and support this project. So far I have looked at Tapestry5 and Wicket. What I don't like about Tapestry is, that it is currently not possible to write web applications that allow you to create webapplications, meaning that you can not read the configuration of a form from the database and create all kinds of components dynamically. For example I wanted to implement an Admin page in which you can define custom fields (for a configurable community website)...but this is not what Tapestry5 was designed for. What I don't like about Wicket is, that it is like writing normal Java applications - although rich clients applications are being replaced with web-based solutions and there is a fundamental difference between web-applications and normal java applications. If you have a java application as a product, it is normal to employ software developers that work on bug fixes and new features all the time - they constantly develop and it is expensiveeverything has to be done by a software developer. An ideal web-application is developed once and the Java code is never touched again for 3-5 years until there are a lot of new features necessary but in this time there could be several small changes or complete re-designs...and in that time this should be a pure matter of HTMLing without the need of touching the Java code. If a new input field is added or some new strings.or whateveror maybe a new Flash component etcthis should still work without changing the -war file that carries the Java code...only changes in the templates or the database should be made. Wicket does does not really allow this. Or assume you have a web-application you want to sell - and don't want the customer to know Javathey would be really restricted in the changes that are possible. Another advantage of Wicket is that it creates a session for every visitor - no matter whether it is a crawler/search engine that does not need a session or a logged in user If there was a coding competition to write a web-application with as few lines of code as possibleI think Tapestry5 would win over Wicket. But with some changes in Wicket and some aspects of Tapestry5, this would be a lot better. What about merging Wicket and Tapestry? Similiar to Wicket with Tapestry templates? So far most of my projects are still good old PHP codestupid but efficient. It loads fast when you use file or memory based caching, you can always resolve any kind of bug within minutes and you never end up debugging for 5 days until you find out that it is not possible without any fundamental changes in the core of some Java framework you do not wish to know in detail.. So long... Toby Original-Nachricht Datum: Thu, 15 Jan 2009 21:46:08 -0500 Von: Trevor Burnham trevorburn...@gmail.com An: Tobias Marx superoverdr...@gmx.de Betreff: Re: Things I miss in Wicket Hi Toby, I've been considering creating a new project that would split away from Wicket, refine it and streamline it for similar reasons, particularly to reduce the number of lines of code that are needed for common use cases, to make things easier on designers, and to provide more seamless interoperability with other popular libraries (e.g. Spring). Do you think you might contribute to such a project? For now, I'm just testing to see if there's interest. Cheers, Trevor On Jan 15, 2009, at 4:44 PM, Tobias Marx wrote: Hi there! There are some things in Wicket I am missing and I think they could improve the framework a lot. But just some small background first: In my opinion the most important things in a web application are: - as few lines of code as possible, as many as really necessary - separation of design and web application code and logic - if a webapplication changes in the design or some small items are added this should be possible without needing a java developer Therefore I would like to suggest more intelligent templates in Wicket: 1. Pass parameters inside of wicket components eg: div wicket:id=myComponent paramA=blabla paramB=blabla2/div and make them accessible in the Java code. This is a way to customize and reuse components purely by editing templates 2. Make Strings/Labels accessible directly in templatesto avoid redundant code like this: add(new Label(indexTitle, .) and instead allow to add properties directly. 3. Pick up components automatically without needing to add them in the Java code: add(new LastPostsPanel(lastPostsPanel)); add(new NewsPanel(newsPanel)); This could be matched automatically I
Re: Things I miss in Wicket
All you need is a RAD IDE that co-operates well with the typesafe wicket. ** Martin 2009/1/16 Tobias Marx superoverdr...@gmx.de: I think there already a lot of projects out there that try to optimize web-development in Java. Instead of starting yet another project I think it would be better to find out which framework is most flexible and has the best design architecture and philosophy and support this project. So far I have looked at Tapestry5 and Wicket. What I don't like about Tapestry is, that it is currently not possible to write web applications that allow you to create webapplications, meaning that you can not read the configuration of a form from the database and create all kinds of components dynamically. For example I wanted to implement an Admin page in which you can define custom fields (for a configurable community website)...but this is not what Tapestry5 was designed for. What I don't like about Wicket is, that it is like writing normal Java applications - although rich clients applications are being replaced with web-based solutions and there is a fundamental difference between web-applications and normal java applications. If you have a java application as a product, it is normal to employ software developers that work on bug fixes and new features all the time - they constantly develop and it is expensiveeverything has to be done by a software developer. An ideal web-application is developed once and the Java code is never touched again for 3-5 years until there are a lot of new features necessary but in this time there could be several small changes or complete re-designs...and in that time this should be a pure matter of HTMLing without the need of touching the Java code. If a new input field is added or some new strings.or whateveror maybe a new Flash component etcthis should still work without changing the -war file that carries the Java code...only changes in the templates or the database should be made. Wicket does does not really allow this. Or assume you have a web-application you want to sell - and don't want the customer to know Javathey would be really restricted in the changes that are possible. Another advantage of Wicket is that it creates a session for every visitor - no matter whether it is a crawler/search engine that does not need a session or a logged in user If there was a coding competition to write a web-application with as few lines of code as possibleI think Tapestry5 would win over Wicket. But with some changes in Wicket and some aspects of Tapestry5, this would be a lot better. What about merging Wicket and Tapestry? Similiar to Wicket with Tapestry templates? So far most of my projects are still good old PHP codestupid but efficient. It loads fast when you use file or memory based caching, you can always resolve any kind of bug within minutes and you never end up debugging for 5 days until you find out that it is not possible without any fundamental changes in the core of some Java framework you do not wish to know in detail.. So long... Toby Original-Nachricht Datum: Thu, 15 Jan 2009 21:46:08 -0500 Von: Trevor Burnham trevorburn...@gmail.com An: Tobias Marx superoverdr...@gmx.de Betreff: Re: Things I miss in Wicket Hi Toby, I've been considering creating a new project that would split away from Wicket, refine it and streamline it for similar reasons, particularly to reduce the number of lines of code that are needed for common use cases, to make things easier on designers, and to provide more seamless interoperability with other popular libraries (e.g. Spring). Do you think you might contribute to such a project? For now, I'm just testing to see if there's interest. Cheers, Trevor On Jan 15, 2009, at 4:44 PM, Tobias Marx wrote: Hi there! There are some things in Wicket I am missing and I think they could improve the framework a lot. But just some small background first: In my opinion the most important things in a web application are: - as few lines of code as possible, as many as really necessary - separation of design and web application code and logic - if a webapplication changes in the design or some small items are added this should be possible without needing a java developer Therefore I would like to suggest more intelligent templates in Wicket: 1. Pass parameters inside of wicket components eg: div wicket:id=myComponent paramA=blabla paramB=blabla2/div and make them accessible in the Java code. This is a way to customize and reuse components purely by editing templates 2. Make Strings/Labels accessible directly in templatesto avoid redundant code like this: add(new Label(indexTitle, .) and instead allow to add properties directly. 3. Pick up components automatically without needing to add
RE: Why you should not override isVisible
+1 -Original Message- From: s...@meiers.net [mailto:s...@meiers.net] Sent: Friday, January 16, 2009 7:47 AM To: users@wicket.apache.org Subject: Re: Why you should not override isVisible Ok, IMHO it's a bug that wicket calls isVisible() after detachment. Thus caching isVisible() is not needed. Sven - Ursprüngliche Nachricht - Von: Michael Sparer Gesendet: 16.01.09 11:20 Uhr An: users@wicket.apache.org Betreff: Re: Re: Why you should not override isVisible Nope, the problem is that the model object *possibly* gets reloaded if isVisible is called after the cached object got detached - and that's what started the whole bunch of messages Michael svenmeier wrote: What's taking so long in your isVisible() method? The model object should be cached, and is isPositive() so expensive? Sven - Ursprüngliche Nachricht - Von: Scott Swank Gesendet: 16.01.09 02:06 Uhr An: users@wicket.apache.org Betreff: Re: Why you should not override isVisible We have implemented this, perhaps a dozen times or more across our application. For example, there are several payment options whose relevance is determined by whether the customer owes any money on their purchase (e.g. as opposed to using a gift card). These total the order and determine visibility methods were particular hot spots. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Things I miss in Wicket
I don't think so. It would help you to write lots of code faster - but still there is lots of code. The more code the longer it takes for a (new) developer / freelancer to find his way around ...and the more code you need to change if code changes are necessary, This is why I am not fan of Netbeans - if you know it well you can write code fast...with code generation and thousands of XML generating tools - but in the end you have a projects with lots of code..lots of redundant code that would not be necessary. For example Tapesty5 also picks up Components automaticallywithout having to define them in the code or some xml. Original-Nachricht Datum: Fri, 16 Jan 2009 06:31:39 +0200 Von: Martin Makundi martin.maku...@koodaripalvelut.com An: users@wicket.apache.org Betreff: Re: Things I miss in Wicket 3. Pick up components automatically without needing to add them in the Java code: add(new LastPostsPanel(lastPostsPanel)); add(new NewsPanel(newsPanel)); This could be matched automatically This should be accomplished using and IDE, not by default. I would not mind an IDE that could match the wicket:id's at when writing. ** Martin I think Wicket could be better without so much redundant copypaste code...by improving templates Thanks for listening... Toby - 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: Why you should not override isVisible
Please don't turn the logic around. Caching is only needed because isVisible can be a performance hit. /If/ you want caching /then/ isVisible should not be called after detach as detach is needed to clear the cache. Regards, Erik. s...@meiers.net wrote: Ok, IMHO it's a bug that wicket calls isVisible() after detachment. Thus caching isVisible() is not needed. Sven - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Things I miss in Wicket
What I don't like about Wicket is, that it is like writing normal Java applications - although rich clients applications are being replaced with web-based solutions and there is a fundamental difference between web-applications and normal java applications. If you have a java application as a product, it is normal to employ software developers that work on bug fixes and new features all the time - they constantly develop and it is expensiveeverything has to be done by a software developer. Being more like a normal Java application (whatever that is :) is precisely why some of us like Wicket. An ideal web-application is developed once and the Java code is never touched again for 3-5 years until there are a lot of new features necessary but in this time there could be several small changes or complete re-designs...and in that time this should be a pure matter of HTMLing without the need of touching the Java code. If a new input field is added or some new strings.or whateveror maybe a new Flash component etcthis should still work without changing the -war file that carries the Java code...only changes in the templates or the database should be made. This sounds quite unrealistic to me for most applications. But I think a CMS (such as Brix: http://code.google.com/p/brix-cms/) comes close to what you are asking for if I understand what you are trying to get at. Wicket does does not really allow this. Or assume you have a web-application you want to sell - and don't want the customer to know Javathey would be really restricted in the changes that are possible. Another advantage of Wicket is that it creates a session for every visitor - no matter whether it is a crawler/search engine that does not need a session or a logged in user Again, a CMS. -Richard
Re: Things I miss in Wicket
I think everyone should be allowed to use the tools they want to use..and I think people should do what they are supposed to be doing. Webdesigners/HTMLers should work on the templates and design and programmers on Java code. Webdesigners should work with the tools they know and are familiar with I don't want programmers to Slice HTML and I don't want designers to compile Java code. But if design changes make it necessary to touch the Java code there is an error by design Original-Nachricht Datum: Fri, 16 Jan 2009 14:53:05 +0200 Von: Martin Makundi martin.maku...@koodaripalvelut.com An: users@wicket.apache.org Betreff: Re: Things I miss in Wicket All you need is a RAD IDE that co-operates well with the typesafe wicket. ** Martin 2009/1/16 Tobias Marx superoverdr...@gmx.de: I think there already a lot of projects out there that try to optimize web-development in Java. Instead of starting yet another project I think it would be better to find out which framework is most flexible and has the best design architecture and philosophy and support this project. So far I have looked at Tapestry5 and Wicket. What I don't like about Tapestry is, that it is currently not possible to write web applications that allow you to create webapplications, meaning that you can not read the configuration of a form from the database and create all kinds of components dynamically. For example I wanted to implement an Admin page in which you can define custom fields (for a configurable community website)...but this is not what Tapestry5 was designed for. What I don't like about Wicket is, that it is like writing normal Java applications - although rich clients applications are being replaced with web-based solutions and there is a fundamental difference between web-applications and normal java applications. If you have a java application as a product, it is normal to employ software developers that work on bug fixes and new features all the time - they constantly develop and it is expensiveeverything has to be done by a software developer. An ideal web-application is developed once and the Java code is never touched again for 3-5 years until there are a lot of new features necessary but in this time there could be several small changes or complete re-designs...and in that time this should be a pure matter of HTMLing without the need of touching the Java code. If a new input field is added or some new strings.or whateveror maybe a new Flash component etcthis should still work without changing the -war file that carries the Java code...only changes in the templates or the database should be made. Wicket does does not really allow this. Or assume you have a web-application you want to sell - and don't want the customer to know Javathey would be really restricted in the changes that are possible. Another advantage of Wicket is that it creates a session for every visitor - no matter whether it is a crawler/search engine that does not need a session or a logged in user If there was a coding competition to write a web-application with as few lines of code as possibleI think Tapestry5 would win over Wicket. But with some changes in Wicket and some aspects of Tapestry5, this would be a lot better. What about merging Wicket and Tapestry? Similiar to Wicket with Tapestry templates? So far most of my projects are still good old PHP codestupid but efficient. It loads fast when you use file or memory based caching, you can always resolve any kind of bug within minutes and you never end up debugging for 5 days until you find out that it is not possible without any fundamental changes in the core of some Java framework you do not wish to know in detail.. So long... Toby Original-Nachricht Datum: Thu, 15 Jan 2009 21:46:08 -0500 Von: Trevor Burnham trevorburn...@gmail.com An: Tobias Marx superoverdr...@gmx.de Betreff: Re: Things I miss in Wicket Hi Toby, I've been considering creating a new project that would split away from Wicket, refine it and streamline it for similar reasons, particularly to reduce the number of lines of code that are needed for common use cases, to make things easier on designers, and to provide more seamless interoperability with other popular libraries (e.g. Spring). Do you think you might contribute to such a project? For now, I'm just testing to see if there's interest. Cheers, Trevor On Jan 15, 2009, at 4:44 PM, Tobias Marx wrote: Hi there! There are some things in Wicket I am missing and I think they could improve the framework a lot. But just some small background first: In my opinion the most important things in a web application are: - as few lines of code as possible, as many as really necessary - separation of design and web
Re: Things I miss in Wicket
I don't think so. It would help you to write lots of code faster - but still there is lots of code. Whether you get a lot of code depends on your particular design or wicketstuff/extensions library. The more code the longer it takes for a (new) developer / freelancer to find his way around ... and the more code you need to change if code changes are necessary, Well, wicket is not a CMS... if you need custom logic you need the code behind. There's no way around it except good design and good libraries. Ok, the alternative is making spaghetti. ** Martin Original-Nachricht Datum: Fri, 16 Jan 2009 06:31:39 +0200 Von: Martin Makundi martin.maku...@koodaripalvelut.com An: users@wicket.apache.org Betreff: Re: Things I miss in Wicket 3. Pick up components automatically without needing to add them in the Java code: add(new LastPostsPanel(lastPostsPanel)); add(new NewsPanel(newsPanel)); This could be matched automatically This should be accomplished using and IDE, not by default. I would not mind an IDE that could match the wicket:id's at when writing. ** Martin I think Wicket could be better without so much redundant copypaste code...by improving templates Thanks for listening... Toby - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Things I miss in Wicket
Hi Tobias, I don't agree on a couple of points you made on Wicket. Wicket is providing the GUI and you have to make sure your gluing to the backend is as transparent as it can be. So, if you have your interfaces untouched, you wont need to touch the Java code again for your 3-5 years. Also, wicket allows easy separation of your markup from your Java code, making redesign not that a big task as you suggest (given that the hierarchies need to be kept). But, I think a web /application/ is meant to evolve and not left untouched for years. Another thing about Wicket: It's all about reusability. If you design components, you can jar them up and just drop them into another project. That's one thing most frameworks don't allow. If you want to sell a product and don't want the customer to know Java: get your resources from a database and integrate some kind of templating. It just works with Wicket as well. I think I write my web applications at least as fast as you do with PHP. I have my established Wicket base and just put together the components I need: drop in authentication, localize things, complex wizards... I doubt you'll be that error-free in writing such code with PHP than you'd do with Wicket as a base. I never needed to debug much with Wicket at all. Most PHP I've seen mixes business logic and user interface so badly that - when you need to enhance things - you're really in trouble. My 2c, --- Jan. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Things I miss in Wicket
Brix only works the way it works because it does not need a database..with a flexible achitecture and a database this would not be possible without too many limitations either. The ultimate goal would be a web-application builder...or at least a highly configurable website (whatever kind of) that only needs to be written once and can be customized easily without changing the code. So far this does not existthe thing that comes closed is Typo3, Drupal or something like that...or the Dolphin community builder - but this is all at a very early stage and so far starting from scratch is often the better option in the long-term. Original-Nachricht Datum: Fri, 16 Jan 2009 07:59:11 -0500 Von: Richard Allen richard.l.al...@gmail.com An: users@wicket.apache.org Betreff: Re: Things I miss in Wicket What I don't like about Wicket is, that it is like writing normal Java applications - although rich clients applications are being replaced with web-based solutions and there is a fundamental difference between web-applications and normal java applications. If you have a java application as a product, it is normal to employ software developers that work on bug fixes and new features all the time - they constantly develop and it is expensiveeverything has to be done by a software developer. Being more like a normal Java application (whatever that is :) is precisely why some of us like Wicket. An ideal web-application is developed once and the Java code is never touched again for 3-5 years until there are a lot of new features necessary but in this time there could be several small changes or complete re-designs...and in that time this should be a pure matter of HTMLing without the need of touching the Java code. If a new input field is added or some new strings.or whateveror maybe a new Flash component etcthis should still work without changing the -war file that carries the Java code...only changes in the templates or the database should be made. This sounds quite unrealistic to me for most applications. But I think a CMS (such as Brix: http://code.google.com/p/brix-cms/) comes close to what you are asking for if I understand what you are trying to get at. Wicket does does not really allow this. Or assume you have a web-application you want to sell - and don't want the customer to know Javathey would be really restricted in the changes that are possible. Another advantage of Wicket is that it creates a session for every visitor - no matter whether it is a crawler/search engine that does not need a session or a logged in user Again, a CMS. -Richard - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Things I miss in Wicket
If only html dom was more flexible :) ** Martin 2009/1/16 Tobias Marx superoverdr...@gmx.de: I think everyone should be allowed to use the tools they want to use..and I think people should do what they are supposed to be doing. Webdesigners/HTMLers should work on the templates and design and programmers on Java code. Webdesigners should work with the tools they know and are familiar with I don't want programmers to Slice HTML and I don't want designers to compile Java code. But if design changes make it necessary to touch the Java code there is an error by design Original-Nachricht Datum: Fri, 16 Jan 2009 14:53:05 +0200 Von: Martin Makundi martin.maku...@koodaripalvelut.com An: users@wicket.apache.org Betreff: Re: Things I miss in Wicket All you need is a RAD IDE that co-operates well with the typesafe wicket. ** Martin 2009/1/16 Tobias Marx superoverdr...@gmx.de: I think there already a lot of projects out there that try to optimize web-development in Java. Instead of starting yet another project I think it would be better to find out which framework is most flexible and has the best design architecture and philosophy and support this project. So far I have looked at Tapestry5 and Wicket. What I don't like about Tapestry is, that it is currently not possible to write web applications that allow you to create webapplications, meaning that you can not read the configuration of a form from the database and create all kinds of components dynamically. For example I wanted to implement an Admin page in which you can define custom fields (for a configurable community website)...but this is not what Tapestry5 was designed for. What I don't like about Wicket is, that it is like writing normal Java applications - although rich clients applications are being replaced with web-based solutions and there is a fundamental difference between web-applications and normal java applications. If you have a java application as a product, it is normal to employ software developers that work on bug fixes and new features all the time - they constantly develop and it is expensiveeverything has to be done by a software developer. An ideal web-application is developed once and the Java code is never touched again for 3-5 years until there are a lot of new features necessary but in this time there could be several small changes or complete re-designs...and in that time this should be a pure matter of HTMLing without the need of touching the Java code. If a new input field is added or some new strings.or whateveror maybe a new Flash component etcthis should still work without changing the -war file that carries the Java code...only changes in the templates or the database should be made. Wicket does does not really allow this. Or assume you have a web-application you want to sell - and don't want the customer to know Javathey would be really restricted in the changes that are possible. Another advantage of Wicket is that it creates a session for every visitor - no matter whether it is a crawler/search engine that does not need a session or a logged in user If there was a coding competition to write a web-application with as few lines of code as possibleI think Tapestry5 would win over Wicket. But with some changes in Wicket and some aspects of Tapestry5, this would be a lot better. What about merging Wicket and Tapestry? Similiar to Wicket with Tapestry templates? So far most of my projects are still good old PHP codestupid but efficient. It loads fast when you use file or memory based caching, you can always resolve any kind of bug within minutes and you never end up debugging for 5 days until you find out that it is not possible without any fundamental changes in the core of some Java framework you do not wish to know in detail.. So long... Toby Original-Nachricht Datum: Thu, 15 Jan 2009 21:46:08 -0500 Von: Trevor Burnham trevorburn...@gmail.com An: Tobias Marx superoverdr...@gmx.de Betreff: Re: Things I miss in Wicket Hi Toby, I've been considering creating a new project that would split away from Wicket, refine it and streamline it for similar reasons, particularly to reduce the number of lines of code that are needed for common use cases, to make things easier on designers, and to provide more seamless interoperability with other popular libraries (e.g. Spring). Do you think you might contribute to such a project? For now, I'm just testing to see if there's interest. Cheers, Trevor On Jan 15, 2009, at 4:44 PM, Tobias Marx wrote: Hi there! There are some things in Wicket I am missing and I think they could improve the framework a lot. But just some small background first: In my opinion the most important things in a web application
Re: ERROR - DiskPageStore - Error flushing page
I am using wicket1.3.5 version only , but still getting the problem , any one please provide me the solution -- View this message in context: http://www.nabble.com/ERROR---DiskPageStoreError-flushing-page-tp21498004p21499158.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: Why you should not override isVisible
Sorry Sven, You of course meant to say: /If/ isVisible would no longer be called after detach /then/ it would be possible to do the caching yourself (as you can use detach to clear the cache). /If/ you can cache yourself /then/ Wicket does not need to cache the result of isVisible. Although I think that logic is completely correct, I also think it would be very convenient to remove the burden of caching the visible flag during render from the programmer. Regards, Erik. s...@meiers.net wrote: Ok, IMHO it's a bug that wicket calls isVisible() after detachment. Thus caching isVisible() is not needed. Sven -- Erik van Oosten http://day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Things I miss in Wicket
On Fri, Jan 16, 2009 at 7:47 AM, Tobias Marx superoverdr...@gmx.de wrote: What about merging Wicket and Tapestry? Similiar to Wicket with Tapestry templates? I don't think this would work very well. The Tapestry team's philosophy doesn't really work well with how the Wicket community works. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Things I miss in Wicket
An ideal web-application is developed once and the Java code is never touched again for 3-5 years until there are a lot of new features necessary where do you live? thats not my experience. Yes after a while the web app code is pretty done but then it did already run for 1 or 2 years in production Constantly changing so large parts of the development is done on trunk when there is already a tag thats in production. Thats how i think most do work. What some call design flaws we call design decisions
Re: Why you should not override isVisible
Created an issue: http://issues.apache.org/jira/browse/WICKET-2025 Regards, Erik. Erik van Oosten wrote: Martijn, I just went through the source (1.4-rc1) to trace a detach manually and find suspect callers of isVisible. I found none during detach, but I did find one call to isVisible /after/ detach. A simple run confirmed this. The call to isVisible /after/ detach can be found in method ComponentRequestTarget#respond(RequestCycle). That method initiates a detach and then calls page.endComponentRender. This leads to a call to Page#checkRendering which calls isVisibleInHierarchy() and from there isVisible(). Method checkRendering only does something when the debug setting 'componentUseCheck' is enabled (which according to the javadoc is true by default). I vividly remember the pain when I found out that isVisible was called /during/ detach. So I am certain the problem existed at some time in the past (1.2, 1.3?). I can bang my head against the wall for not having documented the problem more thoroughly back then. Anyways, a call to isVisible /after/ detach has similar problems to a call during detach. Regards, Erik. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to serve different layouts for different screen resolutions and devices?
Kent Larsson-3 wrote: Hi, My subject sums up my question. I'm about to create a new web system and it will be accessed by clients using normal web browsers and mobile devices. The normal browsers have varying screen resolutions with the lowest still at 800x600. When it comes to the mobile devices and their web browsers the screen resolutions may be even smaller. I think this might help: http://www.nabble.com/Screen-resolution-and-diffrent-markup-files-to13872387.html#a13872387 Best regards, Artur -- View this message in context: http://www.nabble.com/How-to-serve-different-layouts-for-different-screen-resolutions-and-devices--tp21497358p21500335.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: Things I miss in Wicket
... or conscious design debt... ;) ** Martin 2009/1/16 Johan Compagner jcompag...@gmail.com: An ideal web-application is developed once and the Java code is never touched again for 3-5 years until there are a lot of new features necessary where do you live? thats not my experience. Yes after a while the web app code is pretty done but then it did already run for 1 or 2 years in production Constantly changing so large parts of the development is done on trunk when there is already a tag thats in production. Thats how i think most do work. What some call design flaws we call design decisions - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: Things I miss in Wicket
Sure these kinds of things exist. In Hippo CMS 7, we're nesting panels that each have their own instance-specific configuration. Different document types have a corresponding (admittedly quite simple) plugin configuration that can be edited within the cms. The cms itself is mostly a (more involved) configuration of such loosely-coupled generic panels. This approach is actually opposite to Wickets philosophy (only Java + HTML). But the great thing about combining opposites is that there is a sliding scale for doing things. You can start out using the generic building blocks, giving you limited flexibility in terms of how these panels can interact, but at least they can be easily configured using a web interface. Then, as your needs transcend the possibilities of this simplistic solution, you can write your own plugins with the full power of Wicket at your disposal. Cheers, Frank -Original Message- From: Tobias Marx [mailto:superoverdr...@gmx.de] Sent: 16 January 2009 14:10 To: users@wicket.apache.org Subject: Re: Things I miss in Wicket Brix only works the way it works because it does not need a database..with a flexible achitecture and a database this would not be possible without too many limitations either. The ultimate goal would be a web-application builder...or at least a highly configurable website (whatever kind of) that only needs to be written once and can be customized easily without changing the code. So far this does not existthe thing that comes closed is Typo3, Drupal or something like that...or the Dolphin community builder - but this is all at a very early stage and so far starting from scratch is often the better option in the long-term. Original-Nachricht Datum: Fri, 16 Jan 2009 07:59:11 -0500 Von: Richard Allen richard.l.al...@gmail.com An: users@wicket.apache.org Betreff: Re: Things I miss in Wicket What I don't like about Wicket is, that it is like writing normal Java applications - although rich clients applications are being replaced with web-based solutions and there is a fundamental difference between web-applications and normal java applications. If you have a java application as a product, it is normal to employ software developers that work on bug fixes and new features all the time - they constantly develop and it is expensiveeverything has to be done by a software developer. Being more like a normal Java application (whatever that is :) is precisely why some of us like Wicket. An ideal web-application is developed once and the Java code is never touched again for 3-5 years until there are a lot of new features necessary but in this time there could be several small changes or complete re-designs...and in that time this should be a pure matter of HTMLing without the need of touching the Java code. If a new input field is added or some new strings.or whateveror maybe a new Flash component etcthis should still work without changing the -war file that carries the Java code...only changes in the templates or the database should be made. This sounds quite unrealistic to me for most applications. But I think a CMS (such as Brix: http://code.google.com/p/brix-cms/) comes close to what you are asking for if I understand what you are trying to get at. Wicket does does not really allow this. Or assume you have a web-application you want to sell - and don't want the customer to know Javathey would be really restricted in the changes that are possible. Another advantage of Wicket is that it creates a session for every visitor - no matter whether it is a crawler/search engine that does not need a session or a logged in user Again, a CMS. -Richard - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org f.vanlankv...@onehippo.com www.onehippo.com Amsterdam Hippo B.V. Oosteinde 11 1017 WT Amsterdam +31(0)20-5224466 San Francisco Hippo USA Inc. 101 H Street, suite Q Petaluma CA 94952-5100 +1-877-41-HIPPO - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
referencing page from panel?
Hi, I have a panel that is on a page and the panel needs to be able to reference another panel on the same page. The panel is a detail form. The detail form contains a link back to the search results. I want to put the link in the detail form since this is the only time that it will appear, but this link action needs a reference to the search results panel to toggle the visibility back to true. As I see it, here are my options: 1) Have all panels be anonymous subclasses so they can all reference each other. 2) Have the other panel passed in as constructor argument for the other panel. 3) Have the main application page passed into the constructor the controlling panel. Any thoughts on the options? BTW, wow- i am doing some amazing stuff with wicket and I am excited! Thanks. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: referencing page from panel?
The panel is a detail form. The detail form contains a link back to the search results. I want to put the link in the detail form since this is the only time that it will appear, but this link action needs a reference to the search results panel to toggle the visibility back to true. It is better not to toggle visibility. It is best if you override the isVisible method and evaluate whether it should be visible or not ('hollywood principle'). 1) Have all panels be anonymous subclasses so they can all reference each other. 2) Have the other panel passed in as constructor argument for the other panel. 3) Have the main application page passed into the constructor the controlling panel. You could also have a new ModelBoolean() that you pass to the object that is responsible for 'toggling'. The bottom line being not to reference using Wicket Components, instead try to reference across using models, if necessary. ** Martin Any thoughts on the options? BTW, wow- i am doing some amazing stuff with wicket and I am excited! 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
SV: referencing page from panel?
I have a panel that is on a page and the panel needs to be able to reference another panel on the same page. In the code, you can either keep instance variables pointing to the two panels in the page source (since they are on the same page they are in the same Page) and go via those in the action code, or use getPage().get(path:to:panel) and cast to the panel class. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: IBehaviors added to ComponentTag not detached
yes you are right. i was under the impression we were adding those behaviors to the component, but looks like we are not. fixed in 1.3.x.and trunk. thanks for finding it. -igor On Thu, Jan 15, 2009 at 11:43 PM, Jonas barney...@gmail.com wrote: Maybe I'm missing something, but looking at the code again (Wicket 1.3.5), Component#renderComponentTag(...) seems to be the only place where Behaviors added to ComponentTags are dealt with. I can't find any code where they would be added to the Component. I also verfied again, IBehavior#detach(...) seems never to be called if the behavior is added to the ComponentTag. I verified that using a MarkupFilter that adds a behavior to every tag that would log a debug text if detach (or isEnabled) was ever called. Thanks for your time. Jonas On Thu, Jan 15, 2009 at 5:19 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote: behaviors added to componenttag are in turn added to components, so they are detached and managed by components no the componenttag they are added to. -igor On Thu, Jan 15, 2009 at 8:16 AM, Jonas barney...@gmail.com wrote: While experimenting with MarkupFilters, I noticed that IBehaviors added to ComponentTag using ComponentTag#addBehavior(IBehavior behavior) are never detached. Is that a bug, or just not possible to do? As far as I can see you don't have ComponentTags available anymore when Components are detached... Furthermore, it seems that their enablement is also ignored, they're always treated as enabled in Component#renderComponentTag(...). cheers - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Re: Why you should not override isVisible
That comes from a CompoundPropertyModelCart and is bound to total. So getModelObject() corresponds to cart.getTotal(). From there, isPositive() is quite cheap. And we can, of course, keep implementing ad hoc caching of visibility. It's in no way complex, however it seems preferable to have this as the default behavior since only a very few components are likely to want to change their visibility over the course of rendering. Is this something that could be examined in 1.4 or 1.5 or is it simply inappropriate -- perhaps due to component details with which I'm unfamiliar? On Fri, Jan 16, 2009 at 12:53 AM, s...@meiers.net wrote: What's taking so long in your isVisible() method? The model object should be cached, and is isPositive() so expensive? Sven - Ursprüngliche Nachricht - Von: Scott Swank Gesendet: 16.01.09 02:06 Uhr An: users@wicket.apache.org Betreff: Re: Why you should not override isVisible We have implemented this, perhaps a dozen times or more across our application. For example, there are several payment options whose relevance is determined by whether the customer owes any money on their purchase (e.g. as opposed to using a gift card). These total the order and determine visibility methods were particular hot spots. @Override public boolean isVisible() { if (visible == null) visible = ((Money) getModelObject()).isPositive(); return visible; } While this is an idiosyncratic example, I can vouch for the fact that performance woes in isVisible() show up in profiling. On Thu, Jan 15, 2009 at 4:56 PM, Jonathan Locke jonathan.lo...@gmail.com wrote: oh i suppose you also need to reset the value in onBeforeRender(). it's a small pain, but how often does this really become a quantifiable problem and not just a worry? Jonathan Locke wrote: sure, that's the clean way to do it, but it comes at the expense of possibly breaking user code by surprise. i'm not sure how big of a deal this is. i've heard people talk about it, but i'd be interested in some examples of how performance of this method has been a problem for people. i've never run into it myself and if i did see it in a profiler, i'd probably just cache the value in a Boolean. it's literally just this little bit in your anonymous class: Boolean visible = null; public isVisible() { if (visible == null) { visible = // whatever boolean computation } return visible; } and then it disappears from the profiler and who cares about the rest. Scott Swank wrote: My idea what an inversion of that one: Add a method to Component, such as isVisibleInternal() [no I don't love the name] that would cache the results of isVisible(). Then all code that currently calls isVisible() would be changed to call isVisibleInternal() instead. Someone who really wanted non-cached visibility (seemingly the 1% case) could override isVisibleInternal(), but everyone else would get caching for free with their current code. On Thu, Jan 15, 2009 at 2:35 PM, Jonathan Locke jonathan.lo...@gmail.com wrote: well, one simple design that would avoid the reuse problem is: Boolean Component#isCachedVisible() { return null; } then override to use visibility caching and return true or false. if you don't override you get the current functionality. of course you need two more bits in Component to support this... one for whether isCachedVisible returned non-null and another for the value it returned. - 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/Why-you-should-not-override-isVisible-tp21474995p21490479.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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: WicketForge 0.5.0 Available for IDEA 8
Hello Nick, The new plugin installs fine. This is what works on my systems: (a) ALT + SHIFT + W = switching between java and html files (b) in the html file clicking on a wicket:id value = jumps to corresponding Java code (c) CTRL + SPACEBAR when inside a wicket:id value in the html file = dropdown box for completion (d) in html file: warning Wicket ID missing in Java source when using an invalid wicket:id value not working: (e) clicking on a wicket:id in the Java code, expected to jump to correspondig wicket:id in html file, but nothing happens I saw same results on these two machines: Fedora 8 IDEA 8.0.1 EAP build 9164 JDK 1.6.0_11 Fedora 9 IDEA 8.0 build #9572 JDK 1.6.0_11 If I remember correctly, (e) used to work on IDEA 7. Nothing interesting in ~/.IntelliJIdea80/system/log/idea.log Except maybe this: 2009-01-16 17:10:33,433 [ 3126] INFO - api.vfs.impl.local.FileWatcher - Native file watcher failed to startup. Let me know what I can do to help you fix this because your plugin totally rocks ! Thanks, Maarten On Wed, Jan 14, 2009 at 5:28 PM, Nick Heudecker nheudec...@gmail.comwrote: That's what I get for trying to rush things. You can download it from here: http://www.systemmobile.com/code/WicketForge-0.5.0.zip And rename the zip to a jar. I'll update the instructions page next. On Wed, Jan 14, 2009 at 7:40 AM, Don Hass donh...@gmail.com wrote: Ditto. That's just teasing Nick! Maarten Bosteels wrote: Hello, I tried to download http://www.systemmobile.com/code/WicketForge-0.5.0.jar but it's an empty file (zero bytes) Thanks, Maarten On Wed, Jan 14, 2009 at 6:42 AM, Nick Heudecker nheudec...@gmail.comwrote: I'm looking for some people to test WicketForge 0.5.0 with IDEA 8. As far as I can tell, everything seems to be working, but I'd like to get more people testing before I publish it to the IDEA plugin site. Instructions and download here: http://www.systemmobile.com/?page_id=283 -- Nick Heudecker Professional Wicket Training Consulting http://www.systemmobile.com Eventful - Intelligent Event Management http://www.eventfulhq.com -- View this message in context: http://www.nabble.com/WicketForge-0.5.0-Available-for-IDEA-8-tp21450424p21458486.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 -- Nick Heudecker Professional Wicket Training Consulting http://www.systemmobile.com Eventful - Intelligent Event Management http://www.eventfulhq.com
Re: WicketForge 0.5.0 Available for IDEA 8
Thanks for the feedback Maarten. I'm going to publish the plugin today to the IDEA site then work on fixing that bug as soon as I can. On Fri, Jan 16, 2009 at 8:46 AM, Maarten Bosteels mbosteels@gmail.comwrote: Hello Nick, The new plugin installs fine. This is what works on my systems: (a) ALT + SHIFT + W = switching between java and html files (b) in the html file clicking on a wicket:id value = jumps to corresponding Java code (c) CTRL + SPACEBAR when inside a wicket:id value in the html file = dropdown box for completion (d) in html file: warning Wicket ID missing in Java source when using an invalid wicket:id value not working: (e) clicking on a wicket:id in the Java code, expected to jump to correspondig wicket:id in html file, but nothing happens I saw same results on these two machines: Fedora 8 IDEA 8.0.1 EAP build 9164 JDK 1.6.0_11 Fedora 9 IDEA 8.0 build #9572 JDK 1.6.0_11 If I remember correctly, (e) used to work on IDEA 7. Nothing interesting in ~/.IntelliJIdea80/system/log/idea.log Except maybe this: 2009-01-16 17:10:33,433 [ 3126] INFO - api.vfs.impl.local.FileWatcher - Native file watcher failed to startup. Let me know what I can do to help you fix this because your plugin totally rocks ! Thanks, Maarten On Wed, Jan 14, 2009 at 5:28 PM, Nick Heudecker nheudec...@gmail.com wrote: That's what I get for trying to rush things. You can download it from here: http://www.systemmobile.com/code/WicketForge-0.5.0.zip And rename the zip to a jar. I'll update the instructions page next. On Wed, Jan 14, 2009 at 7:40 AM, Don Hass donh...@gmail.com wrote: Ditto. That's just teasing Nick! Maarten Bosteels wrote: Hello, I tried to download http://www.systemmobile.com/code/WicketForge-0.5.0.jar but it's an empty file (zero bytes) Thanks, Maarten On Wed, Jan 14, 2009 at 6:42 AM, Nick Heudecker nheudec...@gmail.comwrote: I'm looking for some people to test WicketForge 0.5.0 with IDEA 8. As far as I can tell, everything seems to be working, but I'd like to get more people testing before I publish it to the IDEA plugin site. Instructions and download here: http://www.systemmobile.com/?page_id=283 -- Nick Heudecker Professional Wicket Training Consulting http://www.systemmobile.com Eventful - Intelligent Event Management http://www.eventfulhq.com -- View this message in context: http://www.nabble.com/WicketForge-0.5.0-Available-for-IDEA-8-tp21450424p21458486.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 -- Nick Heudecker Professional Wicket Training Consulting http://www.systemmobile.com Eventful - Intelligent Event Management http://www.eventfulhq.com -- Nick Heudecker Professional Wicket Training Consulting http://www.systemmobile.com Eventful - Intelligent Event Management http://www.eventfulhq.com
I missing method newPage() for setResponsePage(.....);
Hallo, i miss the (old) method newPage() in Release 1.4-rc1. Is it substituted by another method? my Save-Process: New Order - Save - modal window (feedback) - goTo HomePage with table of my orders. Problem: Linking is ok, but on HomePage the new Order is not visible. After Refresh the Site (F5) the Homepage is actual with the new Order! Any Idea? Thanks M.K -- View this message in context: http://www.nabble.com/I-missing-method-newPage%28%29-for-setResponsePage%28.%29--tp21503893p21503893.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: Why you should not override isVisible
But the model's value is accessed by many other methods, not just isVisible(). If you want to save the reflection overhead why don't you put a caching model between your component and the CompoundPropertyModel? Or access the model of the containing component if this is applicable: public void CartPanel(IModel cart) { super(new CompoundPropertyModel(cart)); add(new Label(total) { public boolean isVisible() { ((Cart)CartPanel.this.getModelObject()).getTotal().isPositive(); } }); } I still don't see the need to introduce visibility caching into Wicket core. Sven Scott Swank schrieb: That comes from a CompoundPropertyModelCart and is bound to total. So getModelObject() corresponds to cart.getTotal(). From there, isPositive() is quite cheap. And we can, of course, keep implementing ad hoc caching of visibility. It's in no way complex, however it seems preferable to have this as the default behavior since only a very few components are likely to want to change their visibility over the course of rendering. Is this something that could be examined in 1.4 or 1.5 or is it simply inappropriate -- perhaps due to component details with which I'm unfamiliar? On Fri, Jan 16, 2009 at 12:53 AM, s...@meiers.net wrote: What's taking so long in your isVisible() method? The model object should be cached, and is isPositive() so expensive? Sven - Ursprüngliche Nachricht - Von: Scott Swank Gesendet: 16.01.09 02:06 Uhr An: users@wicket.apache.org Betreff: Re: Why you should not override isVisible We have implemented this, perhaps a dozen times or more across our application. For example, there are several payment options whose relevance is determined by whether the customer owes any money on their purchase (e.g. as opposed to using a gift card). These total the order and determine visibility methods were particular hot spots. @Override public boolean isVisible() { if (visible == null) visible = ((Money) getModelObject()).isPositive(); return visible; } While this is an idiosyncratic example, I can vouch for the fact that performance woes in isVisible() show up in profiling. On Thu, Jan 15, 2009 at 4:56 PM, Jonathan Locke jonathan.lo...@gmail.com wrote: oh i suppose you also need to reset the value in onBeforeRender(). it's a small pain, but how often does this really become a quantifiable problem and not just a worry? Jonathan Locke wrote: sure, that's the clean way to do it, but it comes at the expense of possibly breaking user code by surprise. i'm not sure how big of a deal this is. i've heard people talk about it, but i'd be interested in some examples of how performance of this method has been a problem for people. i've never run into it myself and if i did see it in a profiler, i'd probably just cache the value in a Boolean. it's literally just this little bit in your anonymous class: Boolean visible = null; public isVisible() { if (visible == null) { visible = // whatever boolean computation } return visible; } and then it disappears from the profiler and who cares about the rest. Scott Swank wrote: My idea what an inversion of that one: Add a method to Component, such as isVisibleInternal() [no I don't love the name] that would cache the results of isVisible(). Then all code that currently calls isVisible() would be changed to call isVisibleInternal() instead. Someone who really wanted non-cached visibility (seemingly the 1% case) could override isVisibleInternal(), but everyone else would get caching for free with their current code. On Thu, Jan 15, 2009 at 2:35 PM, Jonathan Locke jonathan.lo...@gmail.com wrote: well, one simple design that would avoid the reuse problem is: Boolean Component#isCachedVisible() { return null; } then override to use visibility caching and return true or false. if you don't override you get the current functionality. of course you need two more bits in Component to support this... one for whether isCachedVisible returned non-null and another for the value it returned. - 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/Why-you-should-not-override-isVisible-tp21474995p21490479.html Sent from the Wicket - User mailing list archive at Nabble.com.
Re: Why you should not override isVisible
Probably our model should cache the result of cart.getTotal() since that's the expensive bit. That said, I see value in introducing visibility caching into Wicket core. Others do not. I make my case, the core developers decide, we move on. :) Scott On Fri, Jan 16, 2009 at 9:05 AM, Sven Meier s...@meiers.net wrote: But the model's value is accessed by many other methods, not just isVisible(). If you want to save the reflection overhead why don't you put a caching model between your component and the CompoundPropertyModel? Or access the model of the containing component if this is applicable: public void CartPanel(IModel cart) { super(new CompoundPropertyModel(cart)); add(new Label(total) { public boolean isVisible() { ((Cart)CartPanel.this.getModelObject()).getTotal().isPositive(); } }); } I still don't see the need to introduce visibility caching into Wicket core. Sven Scott Swank schrieb: That comes from a CompoundPropertyModelCart and is bound to total. So getModelObject() corresponds to cart.getTotal(). From there, isPositive() is quite cheap. And we can, of course, keep implementing ad hoc caching of visibility. It's in no way complex, however it seems preferable to have this as the default behavior since only a very few components are likely to want to change their visibility over the course of rendering. Is this something that could be examined in 1.4 or 1.5 or is it simply inappropriate -- perhaps due to component details with which I'm unfamiliar? On Fri, Jan 16, 2009 at 12:53 AM, s...@meiers.net wrote: What's taking so long in your isVisible() method? The model object should be cached, and is isPositive() so expensive? Sven - Ursprüngliche Nachricht - Von: Scott Swank Gesendet: 16.01.09 02:06 Uhr An: users@wicket.apache.org Betreff: Re: Why you should not override isVisible We have implemented this, perhaps a dozen times or more across our application. For example, there are several payment options whose relevance is determined by whether the customer owes any money on their purchase (e.g. as opposed to using a gift card). These total the order and determine visibility methods were particular hot spots. @Override public boolean isVisible() { if (visible == null) visible = ((Money) getModelObject()).isPositive(); return visible; } While this is an idiosyncratic example, I can vouch for the fact that performance woes in isVisible() show up in profiling. On Thu, Jan 15, 2009 at 4:56 PM, Jonathan Locke jonathan.lo...@gmail.com wrote: oh i suppose you also need to reset the value in onBeforeRender(). it's a small pain, but how often does this really become a quantifiable problem and not just a worry? Jonathan Locke wrote: sure, that's the clean way to do it, but it comes at the expense of possibly breaking user code by surprise. i'm not sure how big of a deal this is. i've heard people talk about it, but i'd be interested in some examples of how performance of this method has been a problem for people. i've never run into it myself and if i did see it in a profiler, i'd probably just cache the value in a Boolean. it's literally just this little bit in your anonymous class: Boolean visible = null; public isVisible() { if (visible == null) { visible = // whatever boolean computation } return visible; } and then it disappears from the profiler and who cares about the rest. Scott Swank wrote: My idea what an inversion of that one: Add a method to Component, such as isVisibleInternal() [no I don't love the name] that would cache the results of isVisible(). Then all code that currently calls isVisible() would be changed to call isVisibleInternal() instead. Someone who really wanted non-cached visibility (seemingly the 1% case) could override isVisibleInternal(), but everyone else would get caching for free with their current code. On Thu, Jan 15, 2009 at 2:35 PM, Jonathan Locke jonathan.lo...@gmail.com wrote: well, one simple design that would avoid the reuse problem is: Boolean Component#isCachedVisible() { return null; } then override to use visibility caching and return true or false. if you don't override you get the current functionality. of course you need two more bits in Component to support this... one for whether isCachedVisible returned non-null and another for the value it returned. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail:
setEnabled() adds markup. Another way of disabling a link?
Hi all, I have a link which, depending on certain conditions, I need unlinked (ie disabled). //link (if allowed, or none, just the label) Link link = new Link(link) { public void onClick() { setResponsePage(new ViewProfile((String)getModelObject())); } }; // if(isAllowed) { link.setModel(new Model(someValue)); } else { link.setEnabled(false); } link.add(new Label(label, labelValue)); item.add(link); with simple markup: a href=# wicket:id=linkspan wicket:id=label[label]/span/a The problem is that link.setEnabled(false) adds em tags around my link: output: spanemspanthis is the label/span/em/span Is there another way of disabling a link, or removing these em tags. Or even adding the link dynamically and having a normal label when there is to be no link? cheers, Steve smime.p7s Description: S/MIME cryptographic signature
Re: setEnabled() adds markup. Another way of disabling a link?
Override isVisible()? Or, do you want it to show text, just not be clickable? On Fri, Jan 16, 2009 at 12:51 PM, Steve Swinsburg s.swinsb...@lancaster.ac.uk wrote: Hi all, I have a link which, depending on certain conditions, I need unlinked (ie disabled). //link (if allowed, or none, just the label) Link link = new Link(link) { public void onClick() { setResponsePage(new ViewProfile((String)getModelObject())); } }; // if(isAllowed) { link.setModel(new Model(someValue)); } else { link.setEnabled(false); } link.add(new Label(label, labelValue)); item.add(link); with simple markup: a href=# wicket:id=linkspan wicket:id=label[label]/span/a The problem is that link.setEnabled(false) adds em tags around my link: output: spanemspanthis is the label/span/em/span Is there another way of disabling a link, or removing these em tags. Or even adding the link dynamically and having a normal label when there is to be no link? cheers, Steve - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: setEnabled() adds markup. Another way of disabling a link?
Yeah It needs to show the label and not be clickable if there is no link, or link and the label if there is to be a link e.g. in Facebook, a search shows a user's name but it may or may not be clickable depending on their privacy settings. thanks, Steve On 16 Jan 2009, at 17:54, James Carman wrote: Override isVisible()? Or, do you want it to show text, just not be clickable? On Fri, Jan 16, 2009 at 12:51 PM, Steve Swinsburg s.swinsb...@lancaster.ac.uk wrote: Hi all, I have a link which, depending on certain conditions, I need unlinked (ie disabled). //link (if allowed, or none, just the label) Link link = new Link(link) { public void onClick() { setResponsePage(new ViewProfile((String)getModelObject())); } }; // if(isAllowed) { link.setModel(new Model(someValue)); } else { link.setEnabled(false); } link.add(new Label(label, labelValue)); item.add(link); with simple markup: a href=# wicket:id=linkspan wicket:id=label[label]/ span/a The problem is that link.setEnabled(false) adds em tags around my link: output: spanemspanthis is the label/span/em/span Is there another way of disabling a link, or removing these em tags. Or even adding the link dynamically and having a normal label when there is to be no link? cheers, Steve - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org smime.p7s Description: S/MIME cryptographic signature
Re: onmouseover image
I am seeking a solution and found this mail. This is a very useful implementation. I strongly suggest future wicket to include this Component. Thank you , Jeremy -- smallufo 2008/10/8 Jeremy Thomerson jer...@wickettraining.com This doesn't preload the images, but it is a simple way to do a Mouseover. You could easily add a header contributor within the constructor of this class that outputs some javascript to preload the images. public class MouseoverImage extends Image { private static final long serialVersionUID = 1L; private final ResourceReference mImage; private final ResourceReference mMouseoverImage; public MouseoverImage(String id, ResourceReference image, ResourceReference mouseoverImage) { super(id, image); mImage = image; mMouseoverImage = mouseoverImage; add(new AttributeModifier(onmouseover, null, true, new LoadableDetachableModelString() { private static final long serialVersionUID = 1L; @Override protected String load() { return this.src=' + urlFor(mMouseoverImage) + ';; } })); add(new AttributeModifier(onmouseout, null, true, new LoadableDetachableModelString() { private static final long serialVersionUID = 1L; @Override protected String load() { return this.src=' + urlFor(mImage) + ';; } })); } }
Re: setEnabled() adds markup. Another way of disabling a link?
Check out AbstractLink#setBeforeDisabledLink() and AbstractLink#setAfterDisabledLink(). I believe you can set the markup you want to appear there. This defaults to em. Or just go directly to AbstractLink#disableLink() and get the behaviour you want there. I think you can also do it application wide in Application#init(). MarkupSettings I think. Regards, Matt. On Fri, Jan 16, 2009 at 11:57 AM, Steve Swinsburg s.swinsb...@lancaster.ac.uk wrote: Yeah It needs to show the label and not be clickable if there is no link, or link and the label if there is to be a link e.g. in Facebook, a search shows a user's name but it may or may not be clickable depending on their privacy settings. thanks, Steve On 16 Jan 2009, at 17:54, James Carman wrote: Override isVisible()? Or, do you want it to show text, just not be clickable? On Fri, Jan 16, 2009 at 12:51 PM, Steve Swinsburg s.swinsb...@lancaster.ac.uk wrote: Hi all, I have a link which, depending on certain conditions, I need unlinked (ie disabled). //link (if allowed, or none, just the label) Link link = new Link(link) { public void onClick() { setResponsePage(new ViewProfile((String)getModelObject())); } }; // if(isAllowed) { link.setModel(new Model(someValue)); } else { link.setEnabled(false); } link.add(new Label(label, labelValue)); item.add(link); with simple markup: a href=# wicket:id=linkspan wicket:id=label[label]/span/a The problem is that link.setEnabled(false) adds em tags around my link: output: spanemspanthis is the label/span/em/span Is there another way of disabling a link, or removing these em tags. Or even adding the link dynamically and having a normal label when there is to be no link? cheers, Steve - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Matthew Rollins Hanlon http://squareoftwo.org _ Hanlon's Razor: Never attribute to malice that which can be adequately explained by stupidity. http://wikipedia.org/wiki/Hanlon's_razor
Re: WicketForge 0.5.0 Available for IDEA 8
Here is what I see in Diana #9647 build on Windows XP. Class/HTML Switching (WORKS) Alt + Shift + W switch between class and markup/html. Inspections (PARTLY WORKS) It seems to work in markup/html files, but not in source files for missing Wicket IDs. Goto (DOES NOT APPEAR TO WORK AT ALL) Control+Clicking on a Wicket ID in the Java or markup takes you to the corresponding Wicket ID in the accompanying file. Jumps between files, but not to correct locations. Completion (WORKS) When editing an HTML file, popup completion data provides Wicket IDs in the corresponding Java source file. Progress and thank you Nick. /Don Nick Heudecker wrote: Thanks for the feedback Maarten. I'm going to publish the plugin today to the IDEA site then work on fixing that bug as soon as I can. On Fri, Jan 16, 2009 at 8:46 AM, Maarten Bosteels mbosteels@gmail.comwrote: Hello Nick, The new plugin installs fine. This is what works on my systems: (a) ALT + SHIFT + W = switching between java and html files (b) in the html file clicking on a wicket:id value = jumps to corresponding Java code (c) CTRL + SPACEBAR when inside a wicket:id value in the html file = dropdown box for completion (d) in html file: warning Wicket ID missing in Java source when using an invalid wicket:id value not working: (e) clicking on a wicket:id in the Java code, expected to jump to correspondig wicket:id in html file, but nothing happens I saw same results on these two machines: Fedora 8 IDEA 8.0.1 EAP build 9164 JDK 1.6.0_11 Fedora 9 IDEA 8.0 build #9572 JDK 1.6.0_11 If I remember correctly, (e) used to work on IDEA 7. Nothing interesting in ~/.IntelliJIdea80/system/log/idea.log Except maybe this: 2009-01-16 17:10:33,433 [ 3126] INFO - api.vfs.impl.local.FileWatcher - Native file watcher failed to startup. Let me know what I can do to help you fix this because your plugin totally rocks ! Thanks, Maarten On Wed, Jan 14, 2009 at 5:28 PM, Nick Heudecker nheudec...@gmail.com wrote: That's what I get for trying to rush things. You can download it from here: http://www.systemmobile.com/code/WicketForge-0.5.0.zip And rename the zip to a jar. I'll update the instructions page next. On Wed, Jan 14, 2009 at 7:40 AM, Don Hass donh...@gmail.com wrote: Ditto. That's just teasing Nick! Maarten Bosteels wrote: Hello, I tried to download http://www.systemmobile.com/code/WicketForge-0.5.0.jar but it's an empty file (zero bytes) Thanks, Maarten On Wed, Jan 14, 2009 at 6:42 AM, Nick Heudecker nheudec...@gmail.comwrote: I'm looking for some people to test WicketForge 0.5.0 with IDEA 8. As far as I can tell, everything seems to be working, but I'd like to get more people testing before I publish it to the IDEA plugin site. Instructions and download here: http://www.systemmobile.com/?page_id=283 -- Nick Heudecker Professional Wicket Training Consulting http://www.systemmobile.com Eventful - Intelligent Event Management http://www.eventfulhq.com -- View this message in context: http://www.nabble.com/WicketForge-0.5.0-Available-for-IDEA-8-tp21450424p21458486.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 -- Nick Heudecker Professional Wicket Training Consulting http://www.systemmobile.com Eventful - Intelligent Event Management http://www.eventfulhq.com -- Nick Heudecker Professional Wicket Training Consulting http://www.systemmobile.com Eventful - Intelligent Event Management http://www.eventfulhq.com -- View this message in context: http://www.nabble.com/WicketForge-0.5.0-Available-for-IDEA-8-tp21450424p21505093.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: setEnabled() adds markup. Another way of disabling a link?
Thanks, this did the trick: getMarkupSettings().setDefaultBeforeDisabledLink(null); getMarkupSettings().setDefaultAfterDisabledLink(null); cheers, Steve On 16 Jan 2009, at 18:05, Matthew Hanlon wrote: Check out AbstractLink#setBeforeDisabledLink() and AbstractLink#setAfterDisabledLink(). I believe you can set the markup you want to appear there. This defaults to em. Or just go directly to AbstractLink#disableLink() and get the behaviour you want there. I think you can also do it application wide in Application#init(). MarkupSettings I think. Regards, Matt. On Fri, Jan 16, 2009 at 11:57 AM, Steve Swinsburg s.swinsb...@lancaster.ac.uk wrote: Yeah It needs to show the label and not be clickable if there is no link, or link and the label if there is to be a link e.g. in Facebook, a search shows a user's name but it may or may not be clickable depending on their privacy settings. thanks, Steve On 16 Jan 2009, at 17:54, James Carman wrote: Override isVisible()? Or, do you want it to show text, just not be clickable? On Fri, Jan 16, 2009 at 12:51 PM, Steve Swinsburg s.swinsb...@lancaster.ac.uk wrote: Hi all, I have a link which, depending on certain conditions, I need unlinked (ie disabled). //link (if allowed, or none, just the label) Link link = new Link(link) { public void onClick() { setResponsePage(new ViewProfile((String)getModelObject())); } }; // if(isAllowed) { link.setModel(new Model(someValue)); } else { link.setEnabled(false); } link.add(new Label(label, labelValue)); item.add(link); with simple markup: a href=# wicket:id=linkspan wicket:id=label[label]/ span/a The problem is that link.setEnabled(false) adds em tags around my link: output: spanemspanthis is the label/span/em/span Is there another way of disabling a link, or removing these em tags. Or even adding the link dynamically and having a normal label when there is to be no link? cheers, Steve - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Matthew Rollins Hanlon http://squareoftwo.org _ Hanlon's Razor: Never attribute to malice that which can be adequately explained by stupidity. http://wikipedia.org/wiki/Hanlon's_razor smime.p7s Description: S/MIME cryptographic signature
Re: JavaScriptReference with TextTemplate only returns the first retrieved value
Yes, it sounds like caching. But it's not my browser: even if someone hits the page from a totally different computer or another browser, I get the same results: whatever was served first from that file is stuck, and nobody ever gets any different result. (If the first browser was not logged in to the app, then the value is ${password} for everyone.) Yes, I tested my cache as you say. We've now tested with Tomcat as well, so it's not caching in the app server. We've also done Linux vs Windows servers, and with and without Apache in the middle, running from Eclipse and from scripted startup. I'm fairly sure I'm taking advantage of something in Wicket inadvertently; I've moved this stuff around into the session and a base page and the page constructor, and with and without any of the final keywords that I had at the beginning, all to no avail. My latest guess is that one of my shortcut methods that call a static method (eg. Session.get()) is getting the same one every time (though that's a stretch because all other pages show dynamics data correctly.) It's just the .js file that's always gives the same result, no matter who hits it and no matter where they're from. BTW, the URL of the .js resource is this: .../resources/com.max.backoffice.page.BasePage/sensitive.js I must have changed something, because I swear it worked a month ago. Erg. I'll try any wild ideas. Thanks! Trent PS: Yes, you're absolutely right about the password security! It hurts me to even show this as my example. On Thu, Jan 15, 2009 at 5:13 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote: sounds like your browser is caching it. try this: hit the page check the value empty browser cache refresh the page see if the value changed... other then that i hope you know that storing a password in cleartext inside a js file might not be the best idea :) -igor On Thu, Jan 15, 2009 at 4:02 PM, Trent Larson larsontr...@gmail.com wrote: Some time ago, I wrote the following code to generate a javascript resource with values that are unique to each user. I would have sworn that it worked, and that it would return a different value depending on which user was logged in. However, I've just found that it is now always returning the same value, whichever value was first retrieved. Any ideas? Here's the javascript file (named sensitive.js): function getInfoTraxPassword() { return ${password}; } Here is the Java code: HashMapString,Object vars = new HashMapString,Object(); vars.put(password, currentUser.getPassword()); TextTemplateResourceReference ref = new TextTemplateResourceReference( BasePage.class, sensitive.js, text/javascript, new Model(vars)){ @Override public Time lastModifiedTime() { return Time.now(); } }; add(new JavaScriptReference(sensitiveJavascript, ref)); I'm including it in the HTML HEAD this way: script wicket:id=sensitiveJavascript/script I'm currently running the Java code inside the Page class, and with my debugger I see it getting the right value as it steps through the code. Ask me anything else, I dare you! I swear I've been through every combination of logic, but once I hit that javascript file the first time, I can never get any other value for the ${password}. I'm currently using Jetty for the app server, with nothing (like Apache) in between. Any brainstorms are welcome. Thanks! Trent - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Trying to ignore page expiration on selected bookmarkable pages
Hi! I would like to ignore page expired on certain pages. What I mean is that in general it is ok to follow the instruction: getApplicationSettings().setPageExpiredErrorPage(LoginPage.class); However, on certain pages where the session is not so important, I would like to redirect back to the ongoing page (without RestartResponseException) because there is no harm (I can check some @SafeExpired annotation or something, to make sure). I found the following piece from AbstractRequestCycleProcessor: if (e instanceof PageExpiredException) { Class? extends Page pageExpiredErrorPageClass = application.getApplicationSettings() .getPageExpiredErrorPage(); boolean mounted = isPageMounted(pageExpiredErrorPageClass); RequestCycle.get().setRedirect(mounted); throw new RestartResponseException(pageExpiredErrorPageClass); } I could extend WebRequestCycleProcessor and override the method public void respond(RuntimeException e, RequestCycle requestCycle); with the intention of Catching the RestartResponseException and analyzing whether the target page meets the special conditions. If it does meet, I consume the RestartResponseException... Will this do the trick properly? Is this a good approach? Anybody done this before? It feels a bit like hacking into the wicket bloodlines, if the internals change the hack might not work in the future. Is there a more proper way to do this or should there be a new feature in Wicket to support selecting which pages care about expiration (or maybe there already is?)? These pages in question have only some plain forms and do not require login. Now if such a page expires, it redirects to login, which is really not the purpose. ** Martin - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: JavaScriptReference with TextTemplate only returns the first retrieved value
how about class varsmodel extends abstractreadonlymodel { object getobject() { user currentUser=session.get().getuser(); HashMapString,Object vars = new HashMapString,Object(); vars.put(password, currentUser.getPassword()); return vars; } } TextTemplateResourceReference ref = new TextTemplateResourceReference( BasePage.class, sensitive.js, text/javascript, new varsmodel()){ @Override public Time lastModifiedTime() { return Time.now(); } }; -igor On Fri, Jan 16, 2009 at 11:09 AM, Trent Larson larsontr...@gmail.com wrote: Yes, it sounds like caching. But it's not my browser: even if someone hits the page from a totally different computer or another browser, I get the same results: whatever was served first from that file is stuck, and nobody ever gets any different result. (If the first browser was not logged in to the app, then the value is ${password} for everyone.) Yes, I tested my cache as you say. We've now tested with Tomcat as well, so it's not caching in the app server. We've also done Linux vs Windows servers, and with and without Apache in the middle, running from Eclipse and from scripted startup. I'm fairly sure I'm taking advantage of something in Wicket inadvertently; I've moved this stuff around into the session and a base page and the page constructor, and with and without any of the final keywords that I had at the beginning, all to no avail. My latest guess is that one of my shortcut methods that call a static method (eg. Session.get()) is getting the same one every time (though that's a stretch because all other pages show dynamics data correctly.) It's just the .js file that's always gives the same result, no matter who hits it and no matter where they're from. BTW, the URL of the .js resource is this: .../resources/com.max.backoffice.page.BasePage/sensitive.js I must have changed something, because I swear it worked a month ago. Erg. I'll try any wild ideas. Thanks! Trent PS: Yes, you're absolutely right about the password security! It hurts me to even show this as my example. On Thu, Jan 15, 2009 at 5:13 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote: sounds like your browser is caching it. try this: hit the page check the value empty browser cache refresh the page see if the value changed... other then that i hope you know that storing a password in cleartext inside a js file might not be the best idea :) -igor On Thu, Jan 15, 2009 at 4:02 PM, Trent Larson larsontr...@gmail.com wrote: Some time ago, I wrote the following code to generate a javascript resource with values that are unique to each user. I would have sworn that it worked, and that it would return a different value depending on which user was logged in. However, I've just found that it is now always returning the same value, whichever value was first retrieved. Any ideas? Here's the javascript file (named sensitive.js): function getInfoTraxPassword() { return ${password}; } Here is the Java code: HashMapString,Object vars = new HashMapString,Object(); vars.put(password, currentUser.getPassword()); TextTemplateResourceReference ref = new TextTemplateResourceReference( BasePage.class, sensitive.js, text/javascript, new Model(vars)){ @Override public Time lastModifiedTime() { return Time.now(); } }; add(new JavaScriptReference(sensitiveJavascript, ref)); I'm including it in the HTML HEAD this way: script wicket:id=sensitiveJavascript/script I'm currently running the Java code inside the Page class, and with my debugger I see it getting the right value as it steps through the code. Ask me anything else, I dare you! I swear I've been through every combination of logic, but once I hit that javascript file the first time, I can never get any other value for the ${password}. I'm currently using Jetty for the app server, with nothing (like Apache) in between. Any brainstorms are welcome. Thanks! Trent - 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: Trying to ignore page expiration on selected bookmarkable pages
when you hit pageexpired exception you do not know which page caused it -igor On Fri, Jan 16, 2009 at 11:18 AM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: Hi! I would like to ignore page expired on certain pages. What I mean is that in general it is ok to follow the instruction: getApplicationSettings().setPageExpiredErrorPage(LoginPage.class); However, on certain pages where the session is not so important, I would like to redirect back to the ongoing page (without RestartResponseException) because there is no harm (I can check some @SafeExpired annotation or something, to make sure). I found the following piece from AbstractRequestCycleProcessor: if (e instanceof PageExpiredException) { Class? extends Page pageExpiredErrorPageClass = application.getApplicationSettings() .getPageExpiredErrorPage(); boolean mounted = isPageMounted(pageExpiredErrorPageClass); RequestCycle.get().setRedirect(mounted); throw new RestartResponseException(pageExpiredErrorPageClass); } I could extend WebRequestCycleProcessor and override the method public void respond(RuntimeException e, RequestCycle requestCycle); with the intention of Catching the RestartResponseException and analyzing whether the target page meets the special conditions. If it does meet, I consume the RestartResponseException... Will this do the trick properly? Is this a good approach? Anybody done this before? It feels a bit like hacking into the wicket bloodlines, if the internals change the hack might not work in the future. Is there a more proper way to do this or should there be a new feature in Wicket to support selecting which pages care about expiration (or maybe there already is?)? These pages in question have only some plain forms and do not require login. Now if such a page expires, it redirects to login, which is really not the purpose. ** Martin - 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: RE: Things I miss in Wicket
Great! Are there any demo/reference websites that run Hippo CMS or Hippo Portal? Original-Nachricht Datum: Fri, 16 Jan 2009 16:12:13 +0100 Von: Frank van Lankvelt f.vanlankv...@onehippo.com An: users@wicket.apache.org Betreff: RE: Things I miss in Wicket Sure these kinds of things exist. In Hippo CMS 7, we're nesting panels that each have their own instance-specific configuration. Different document types have a corresponding (admittedly quite simple) plugin configuration that can be edited within the cms. The cms itself is mostly a (more involved) configuration of such loosely-coupled generic panels. This approach is actually opposite to Wickets philosophy (only Java + HTML). But the great thing about combining opposites is that there is a sliding scale for doing things. You can start out using the generic building blocks, giving you limited flexibility in terms of how these panels can interact, but at least they can be easily configured using a web interface. Then, as your needs transcend the possibilities of this simplistic solution, you can write your own plugins with the full power of Wicket at your disposal. Cheers, Frank -Original Message- From: Tobias Marx [mailto:superoverdr...@gmx.de] Sent: 16 January 2009 14:10 To: users@wicket.apache.org Subject: Re: Things I miss in Wicket Brix only works the way it works because it does not need a database..with a flexible achitecture and a database this would not be possible without too many limitations either. The ultimate goal would be a web-application builder...or at least a highly configurable website (whatever kind of) that only needs to be written once and can be customized easily without changing the code. So far this does not existthe thing that comes closed is Typo3, Drupal or something like that...or the Dolphin community builder - but this is all at a very early stage and so far starting from scratch is often the better option in the long-term. Original-Nachricht Datum: Fri, 16 Jan 2009 07:59:11 -0500 Von: Richard Allen richard.l.al...@gmail.com An: users@wicket.apache.org Betreff: Re: Things I miss in Wicket What I don't like about Wicket is, that it is like writing normal Java applications - although rich clients applications are being replaced with web-based solutions and there is a fundamental difference between web-applications and normal java applications. If you have a java application as a product, it is normal to employ software developers that work on bug fixes and new features all the time - they constantly develop and it is expensiveeverything has to be done by a software developer. Being more like a normal Java application (whatever that is :) is precisely why some of us like Wicket. An ideal web-application is developed once and the Java code is never touched again for 3-5 years until there are a lot of new features necessary but in this time there could be several small changes or complete re-designs...and in that time this should be a pure matter of HTMLing without the need of touching the Java code. If a new input field is added or some new strings.or whateveror maybe a new Flash component etcthis should still work without changing the -war file that carries the Java code...only changes in the templates or the database should be made. This sounds quite unrealistic to me for most applications. But I think a CMS (such as Brix: http://code.google.com/p/brix-cms/) comes close to what you are asking for if I understand what you are trying to get at. Wicket does does not really allow this. Or assume you have a web-application you want to sell - and don't want the customer to know Javathey would be really restricted in the changes that are possible. Another advantage of Wicket is that it creates a session for every visitor - no matter whether it is a crawler/search engine that does not need a session or a logged in user Again, a CMS. -Richard - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org f.vanlankv...@onehippo.com www.onehippo.com Amsterdam Hippo B.V. Oosteinde 11 1017 WT Amsterdam +31(0)20-5224466 San Francisco Hippo USA Inc. 101 H Street, suite Q Petaluma CA 94952-5100 +1-877-41-HIPPO - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Things I miss in Wicket
i dont think you have ever had a designer go in and edit php scripts from your applications :) in the old times i have worked on tons of jsp projects where, even though we tried very hard to keep logic down to a minimum inside the jsp itself, the designers went in and completely foobarred it, often beyond repair. at least with wicket there is just the raw markup. the only things the designers have to watch out for is not to change any nesting of tags with wicket:id, but that is a trivial thing to to teach a dreamweaver monkey compared to all the idiosyncrasies of a jsp. i think what you are getting at is that there are two types of code: application and ui. and you prefer the ui code to be interpreted rather then compiled/deployed. that might work for simple apps, but wicket is usually used for intranets with complex uis where advantages of abstraction and compile time checkings outweigh that of a lightweight deployment. just my two cents. -igor On Fri, Jan 16, 2009 at 4:47 AM, Tobias Marx superoverdr...@gmx.de wrote: I think there already a lot of projects out there that try to optimize web-development in Java. Instead of starting yet another project I think it would be better to find out which framework is most flexible and has the best design architecture and philosophy and support this project. So far I have looked at Tapestry5 and Wicket. What I don't like about Tapestry is, that it is currently not possible to write web applications that allow you to create webapplications, meaning that you can not read the configuration of a form from the database and create all kinds of components dynamically. For example I wanted to implement an Admin page in which you can define custom fields (for a configurable community website)...but this is not what Tapestry5 was designed for. What I don't like about Wicket is, that it is like writing normal Java applications - although rich clients applications are being replaced with web-based solutions and there is a fundamental difference between web-applications and normal java applications. If you have a java application as a product, it is normal to employ software developers that work on bug fixes and new features all the time - they constantly develop and it is expensiveeverything has to be done by a software developer. An ideal web-application is developed once and the Java code is never touched again for 3-5 years until there are a lot of new features necessary but in this time there could be several small changes or complete re-designs...and in that time this should be a pure matter of HTMLing without the need of touching the Java code. If a new input field is added or some new strings.or whateveror maybe a new Flash component etcthis should still work without changing the -war file that carries the Java code...only changes in the templates or the database should be made. Wicket does does not really allow this. Or assume you have a web-application you want to sell - and don't want the customer to know Javathey would be really restricted in the changes that are possible. Another advantage of Wicket is that it creates a session for every visitor - no matter whether it is a crawler/search engine that does not need a session or a logged in user If there was a coding competition to write a web-application with as few lines of code as possibleI think Tapestry5 would win over Wicket. But with some changes in Wicket and some aspects of Tapestry5, this would be a lot better. What about merging Wicket and Tapestry? Similiar to Wicket with Tapestry templates? So far most of my projects are still good old PHP codestupid but efficient. It loads fast when you use file or memory based caching, you can always resolve any kind of bug within minutes and you never end up debugging for 5 days until you find out that it is not possible without any fundamental changes in the core of some Java framework you do not wish to know in detail.. So long... Toby Original-Nachricht Datum: Thu, 15 Jan 2009 21:46:08 -0500 Von: Trevor Burnham trevorburn...@gmail.com An: Tobias Marx superoverdr...@gmx.de Betreff: Re: Things I miss in Wicket Hi Toby, I've been considering creating a new project that would split away from Wicket, refine it and streamline it for similar reasons, particularly to reduce the number of lines of code that are needed for common use cases, to make things easier on designers, and to provide more seamless interoperability with other popular libraries (e.g. Spring). Do you think you might contribute to such a project? For now, I'm just testing to see if there's interest. Cheers, Trevor On Jan 15, 2009, at 4:44 PM, Tobias Marx wrote: Hi there! There are some things in Wicket I am missing and I think they could improve the framework a lot. But just some small background first: In my
Re: building extensible components
by class proliferation you mean having to extend a base class? well, I mean using three classes to do what I've been accomplishing with one - it struck me as off, but I'm sure you guys know what you're about :) Jonathan, thanks for the advise.
Re: Trying to ignore page expiration on selected bookmarkable pages
when you hit pageexpired exception you do not know which page caused it Is it possible that there could be some query parameters that could be used to deduce such information? ** Martin On Fri, Jan 16, 2009 at 11:18 AM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: Hi! I would like to ignore page expired on certain pages. What I mean is that in general it is ok to follow the instruction: getApplicationSettings().setPageExpiredErrorPage(LoginPage.class); However, on certain pages where the session is not so important, I would like to redirect back to the ongoing page (without RestartResponseException) because there is no harm (I can check some @SafeExpired annotation or something, to make sure). I found the following piece from AbstractRequestCycleProcessor: if (e instanceof PageExpiredException) { Class? extends Page pageExpiredErrorPageClass = application.getApplicationSettings() .getPageExpiredErrorPage(); boolean mounted = isPageMounted(pageExpiredErrorPageClass); RequestCycle.get().setRedirect(mounted); throw new RestartResponseException(pageExpiredErrorPageClass); } I could extend WebRequestCycleProcessor and override the method public void respond(RuntimeException e, RequestCycle requestCycle); with the intention of Catching the RestartResponseException and analyzing whether the target page meets the special conditions. If it does meet, I consume the RestartResponseException... Will this do the trick properly? Is this a good approach? Anybody done this before? It feels a bit like hacking into the wicket bloodlines, if the internals change the hack might not work in the future. Is there a more proper way to do this or should there be a new feature in Wicket to support selecting which pages care about expiration (or maybe there already is?)? These pages in question have only some plain forms and do not require login. Now if such a page expires, it redirects to login, which is really not the purpose. ** Martin - 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: Trying to ignore page expiration on selected bookmarkable pages
Specifically, if it is a Mounted Bookmarkable page, the page name should be available in the url? ** Martin 2009/1/16 Martin Makundi martin.maku...@koodaripalvelut.com: when you hit pageexpired exception you do not know which page caused it Is it possible that there could be some query parameters that could be used to deduce such information? ** Martin On Fri, Jan 16, 2009 at 11:18 AM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: Hi! I would like to ignore page expired on certain pages. What I mean is that in general it is ok to follow the instruction: getApplicationSettings().setPageExpiredErrorPage(LoginPage.class); However, on certain pages where the session is not so important, I would like to redirect back to the ongoing page (without RestartResponseException) because there is no harm (I can check some @SafeExpired annotation or something, to make sure). I found the following piece from AbstractRequestCycleProcessor: if (e instanceof PageExpiredException) { Class? extends Page pageExpiredErrorPageClass = application.getApplicationSettings() .getPageExpiredErrorPage(); boolean mounted = isPageMounted(pageExpiredErrorPageClass); RequestCycle.get().setRedirect(mounted); throw new RestartResponseException(pageExpiredErrorPageClass); } I could extend WebRequestCycleProcessor and override the method public void respond(RuntimeException e, RequestCycle requestCycle); with the intention of Catching the RestartResponseException and analyzing whether the target page meets the special conditions. If it does meet, I consume the RestartResponseException... Will this do the trick properly? Is this a good approach? Anybody done this before? It feels a bit like hacking into the wicket bloodlines, if the internals change the hack might not work in the future. Is there a more proper way to do this or should there be a new feature in Wicket to support selecting which pages care about expiration (or maybe there already is?)? These pages in question have only some plain forms and do not require login. Now if such a page expires, it redirects to login, which is really not the purpose. ** Martin - 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: Trying to ignore page expiration on selected bookmarkable pages
bookmarkable urls do not generate a page expired error, the urls that do generally look like this: ?wicket:interface=2:ff.sdfsdf.sdf:ILinkListener where the only information you have about the page is 2. you can write your own coding strategy that always appends the class name of the last bookmarkable page to all the urls...that way you can recover it but it sure wont look pretty. -igor On Fri, Jan 16, 2009 at 12:09 PM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: Specifically, if it is a Mounted Bookmarkable page, the page name should be available in the url? ** Martin 2009/1/16 Martin Makundi martin.maku...@koodaripalvelut.com: when you hit pageexpired exception you do not know which page caused it Is it possible that there could be some query parameters that could be used to deduce such information? ** Martin On Fri, Jan 16, 2009 at 11:18 AM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: Hi! I would like to ignore page expired on certain pages. What I mean is that in general it is ok to follow the instruction: getApplicationSettings().setPageExpiredErrorPage(LoginPage.class); However, on certain pages where the session is not so important, I would like to redirect back to the ongoing page (without RestartResponseException) because there is no harm (I can check some @SafeExpired annotation or something, to make sure). I found the following piece from AbstractRequestCycleProcessor: if (e instanceof PageExpiredException) { Class? extends Page pageExpiredErrorPageClass = application.getApplicationSettings() .getPageExpiredErrorPage(); boolean mounted = isPageMounted(pageExpiredErrorPageClass); RequestCycle.get().setRedirect(mounted); throw new RestartResponseException(pageExpiredErrorPageClass); } I could extend WebRequestCycleProcessor and override the method public void respond(RuntimeException e, RequestCycle requestCycle); with the intention of Catching the RestartResponseException and analyzing whether the target page meets the special conditions. If it does meet, I consume the RestartResponseException... Will this do the trick properly? Is this a good approach? Anybody done this before? It feels a bit like hacking into the wicket bloodlines, if the internals change the hack might not work in the future. Is there a more proper way to do this or should there be a new feature in Wicket to support selecting which pages care about expiration (or maybe there already is?)? These pages in question have only some plain forms and do not require login. Now if such a page expires, it redirects to login, which is really not the purpose. ** Martin - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
example of opening ModalWindow with submit button ?
I would like to open a modelwindow, but not with a link since I do not want any form data to be lost. Does anyone have an example or pointer? I did manage to open a modalwindow using an ajaxsubmit button, but the content of my dialog gets written to my page and the dialog is empty! Thanks! - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: unit test for dropdownchoice with ajax
I am having the same issue with multiple drop downs with ajax, when trying to unit test. tbt wrote: Hi I have coded two dropdown boxes similar to the example provided at http://http://www.wicket-library.com/wicket-examples/ajax/choice.1 The hotel dropdown is populated once a country is selected via ajax. This works fine and now i am writing a unit test for it. The code is as follows WicketTester wicketTester = getWicketTester(); wicketTester.startPage(SearchHotelsPage.class); FormTester formTester = wicketTester.newFormTester(searchHotelsForm,false); formTester.select(countryDropDown, 6); DropDownChoice countryDropDownChoice = (DropDownChoice) wicketTester.getComponentFromLastRenderedPage(searchHotelsForm:countryDropDown); assertEquals(countryDropDownChoice.getChoices().size(), 41); wicketTester.executeAjaxEvent(searchHotelsForm:countryDropDown, onchange); wicketTester.assertComponentOnAjaxResponse(searchHotelsForm:hotelDropDown); formTester.select(hotelDropDown, 12); formTester.submit(); wicketTester.assertRenderedPage(EditHotelsPage.class); but the following line fails the unit test wicketTester.assertRenderedPage(EditHotelsPage.class); the stack trace is as follows junit.framework.AssertionFailedError: expected:EditHotelsPage but was:HomePage at org.apache.wicket.util.tester.WicketTester.assertResult(WicketTester.java:575) at org.apache.wicket.util.tester.WicketTester.assertRenderedPage(WicketTester.java:522) at ogn.forms.SearchHotelsFormTest.testAjaxDropdownComponent(SearchHotelsFormTest.java:28) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at junit.framework.TestCase.runTest(TestCase.java:164) at junit.framework.TestCase.runBare(TestCase.java:130) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:120) at junit.framework.TestSuite.runTest(TestSuite.java:230) at junit.framework.TestSuite.run(TestSuite.java:225) at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196) Why does the page get rendered to the HomePage when the form is submitted. Am I testing the ajax dropdown component correctly. Please help. Thanks -- View this message in context: http://www.nabble.com/unit-test-for-dropdownchoice-with-ajax-tp21141772p21509601.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: Class aliases for shared resources
Nobody here with an answer? Problem still open here. Marc S. wrote: I have the same problem now with Wicket 1.4-rc1. Anyone knows if this is a bug or am I doing something wrong? Thanks, Marc hbf wrote: I have a shared resource that I add in my application's init() method via SharedResources sharedResources = getSharedResources(); sharedResources.add(repo, new MyResouce()); sharedResources.putClassAlias(Application.class, app); sharedResources.putClassAlias(MyResouce.class, tmp); I can access my resource via e.g. http://localhost:8080/app/resources/org.apache.wicket.Application/repo?nid=12 but both http://localhost:8080/app/resources/app/repo?nid=12 http://localhost:8080/app/resources/tmp/repo?nid=12 do not work. Any ideas why? Thanks! Kaspar -- View this message in context: http://www.nabble.com/Class-aliases-for-shared-resources-tp15954706p21510200.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: example of opening ModalWindow with submit button?
I think you'll need to use the ajax submit, or else dig into the wicket JS to see if there's another way. But - ajax submit should be fine - you won't lose any form data - it will be submitted. What was the problem with using it? (caveat: unless you have a file upload - which doesn't work in ajax submits). -- Jeremy Thomerson http://www.wickettraining.com On Fri, Jan 16, 2009 at 3:30 PM, Phillip Rhodes spamsu...@rhoderunner.comwrote: I would like to open a modelwindow, but not with a link since I do not want any form data to be lost. Does anyone have an example or pointer? I did manage to open a modalwindow using an ajaxsubmit button, but the content of my dialog gets written to my page and the dialog is empty! Thanks! - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket/Eclipse/Maven/m2eclipse - HTML files not refreshing
That seems consistent with the problem I was having. I removed several plugins from the pom and got things working. Like you, for now I'm leaving adding those plugins back in until another day. Tauren On Thu, Jan 15, 2009 at 11:59 PM, noon rami.muurim...@gmail.com wrote: No, I didn't mean the default output folder. For some reason, Maven added also the target/classes folder as a source folder. I noticed also that this was done only if I had a custom Maven plugin in the project (one of our plugins), even if I used the quickstart Maven artifact. If I removed that plugin from the pom.xml, everything worked ok. As a workaround, I have to delete the target/classes folder from the source list... I'll solve this problem of ours later... Good if you got your project working... :) tauren wrote: Noon, Do you mean the Default output folder in Properties--Java Build Path--Source tab? If so, what did you change it to? I can't just delete it as Eclipse says that it is required. Anyway, it is of no consequence any more. It seems that I got things working. I decided to try to start with a basic wicket quickstart from maven archetype, enable Maven dependency management on it, and debugged it. The quickstart worked just fine and I could edit html files and they would refresh without stopping the server. So I compared my project's pom with the quickstart one. My project's pom was modeled after another project's pom. There was a lot of extra stuff that I didn't need, so I removed it. After making my pom very close to the quickstart pom, and then debugging, my project too would refresh html files. Yay! I may follow up on this later as I start to add additional plugins and settings that I removed back into my pom. But at least I'll now be able to test things one at a time and isolate what caused the problem. So thanks everyone for the help! Tauren PS - Just in case anyone is trying to do this in the future, here are the steps I took to get the wicket quickstart working within eclipse with maven and m2eclipse: First make sure eclipse, maven, and m2eclipse are installed... Command line: cd workspace mvn archetype:create -DarchetypeGroupId=org.apache.wicket -DarchetypeArtifactId=wicket-archetype-quickstart -DarchetypeVersion=1.4-rc1 -DgroupId=test -DartifactId=mytest cd mytest mvn eclipse:eclipse Eclipse: File-Import Select General-Existing projects into Workspace Next Select root directory workspace/mytest Finish Right click onto mytest project Select Maven-Enable Dependency Management Right click onto src/test/java/test/Start.java Select Debug As - Java Application Web browser: http://localhost:8080/ In Eclipse, edit HomePage.html, save. Refresh browser, changes are there... On Thu, Jan 15, 2009 at 10:50 PM, noon rami.muurim...@gmail.com wrote: I had to remove the target/classes folder from the java source paths which Maven Eclipse plugin adds (project properties == java build path). After this, the markup files refreshed as expected. Tauren Mills-2 wrote: Thanks Igor, but I already looked there and the only thing listed in filtered resources is *.launch. Any other ideas? Tauren On Thu, Jan 15, 2009 at 4:05 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote: open the preferences window in the search box type filter this will show you java/compiler/building panel with FilteredREsources: textbox, remove *.html -igor On Thu, Jan 15, 2009 at 4:03 PM, Tauren Mills tau...@tauren.com wrote: Martijn, Thanks. But any clue how or where I do that? I've been poking around the preferences in eclipse and haven't found it. Tauren On Thu, Jan 15, 2009 at 3:51 PM, Martijn Dashorst martijn.dasho...@gmail.com wrote: iirc you have to turn off eclipse's filtering of html files (which is turned off default because of javadoc html which usually doesn't want to be packaged inside your war/jar) Martijn On Fri, Jan 16, 2009 at 12:31 AM, Tauren Mills tau...@tauren.com wrote: Are there any wicket/eclipse/maven/m2eclipse users out there? I'm trying to get my development environment working properly and need your help. Up until now, I've been developing WIcket applications in Eclipse and have not been using maven. As long as my web.xml is set to development rather than deployment mode, changes I made to HTML files while debugging were immediately applied. Not anymore... I am now managing my projects with maven, having just added a pom file to my project. I'm using the m2eclipse plugin in Eclipse and enabled dependency management on my project. Unfortunately, now my HTML file changes aren't being recognized any longer even with development mode turned on. I have to stop and start the app to see the HTML changes. My project's maven properties show these goals to invoke on resource changes: process-resources resources:testResources. My pom includes: build
Re: Wicket/Eclipse/Maven/m2eclipse - HTML files not refreshing
Richard, Thanks for your comments. I'm still used to using maven on the command line, but it is good to know that I can do it all within the eclipse UI. Tauren On Fri, Jan 16, 2009 at 4:29 AM, Richard Allen richard.l.al...@gmail.com wrote: Using m2eclipse, you can also create a new Maven project using an archetype from within Eclipse. Choose File New Maven Project Next, and select the archetype you want to use. See: http://books.sonatype.com/maven-book/reference/eclipse-sect-m2e-create-archetype.html -Richard On Fri, Jan 16, 2009 at 2:47 AM, Tauren Mills tau...@tauren.com wrote: Noon, Do you mean the Default output folder in Properties--Java Build Path--Source tab? If so, what did you change it to? I can't just delete it as Eclipse says that it is required. Anyway, it is of no consequence any more. It seems that I got things working. I decided to try to start with a basic wicket quickstart from maven archetype, enable Maven dependency management on it, and debugged it. The quickstart worked just fine and I could edit html files and they would refresh without stopping the server. So I compared my project's pom with the quickstart one. My project's pom was modeled after another project's pom. There was a lot of extra stuff that I didn't need, so I removed it. After making my pom very close to the quickstart pom, and then debugging, my project too would refresh html files. Yay! I may follow up on this later as I start to add additional plugins and settings that I removed back into my pom. But at least I'll now be able to test things one at a time and isolate what caused the problem. So thanks everyone for the help! Tauren PS - Just in case anyone is trying to do this in the future, here are the steps I took to get the wicket quickstart working within eclipse with maven and m2eclipse: First make sure eclipse, maven, and m2eclipse are installed... Command line: cd workspace mvn archetype:create -DarchetypeGroupId=org.apache.wicket -DarchetypeArtifactId=wicket-archetype-quickstart -DarchetypeVersion=1.4-rc1 -DgroupId=test -DartifactId=mytest cd mytest mvn eclipse:eclipse Eclipse: File-Import Select General-Existing projects into Workspace Next Select root directory workspace/mytest Finish Right click onto mytest project Select Maven-Enable Dependency Management Right click onto src/test/java/test/Start.java Select Debug As - Java Application Web browser: http://localhost:8080/ In Eclipse, edit HomePage.html, save. Refresh browser, changes are there... On Thu, Jan 15, 2009 at 10:50 PM, noon rami.muurim...@gmail.com wrote: I had to remove the target/classes folder from the java source paths which Maven Eclipse plugin adds (project properties == java build path). After this, the markup files refreshed as expected. Tauren Mills-2 wrote: Thanks Igor, but I already looked there and the only thing listed in filtered resources is *.launch. Any other ideas? Tauren On Thu, Jan 15, 2009 at 4:05 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote: open the preferences window in the search box type filter this will show you java/compiler/building panel with FilteredREsources: textbox, remove *.html -igor On Thu, Jan 15, 2009 at 4:03 PM, Tauren Mills tau...@tauren.com wrote: Martijn, Thanks. But any clue how or where I do that? I've been poking around the preferences in eclipse and haven't found it. Tauren On Thu, Jan 15, 2009 at 3:51 PM, Martijn Dashorst martijn.dasho...@gmail.com wrote: iirc you have to turn off eclipse's filtering of html files (which is turned off default because of javadoc html which usually doesn't want to be packaged inside your war/jar) Martijn On Fri, Jan 16, 2009 at 12:31 AM, Tauren Mills tau...@tauren.com wrote: Are there any wicket/eclipse/maven/m2eclipse users out there? I'm trying to get my development environment working properly and need your help. Up until now, I've been developing WIcket applications in Eclipse and have not been using maven. As long as my web.xml is set to development rather than deployment mode, changes I made to HTML files while debugging were immediately applied. Not anymore... I am now managing my projects with maven, having just added a pom file to my project. I'm using the m2eclipse plugin in Eclipse and enabled dependency management on my project. Unfortunately, now my HTML file changes aren't being recognized any longer even with development mode turned on. I have to stop and start the app to see the HTML changes. My project's maven properties show these goals to invoke on resource changes: process-resources resources:testResources. My pom includes: build sourceDirectorysrc/main/java/sourceDirectory testSourceDirectorysrc/test/java/testSourceDirectory resources resource
Re: Wicket/Eclipse/Maven/m2eclipse - HTML files not refreshing
That seems consistent with the problem I was having. I removed several plugins from the pom and got things working. Like you, for now I'm leaving adding those plugins back in until another day. Thanks, Tauren On Thu, Jan 15, 2009 at 11:59 PM, noon rami.muurim...@gmail.com wrote: No, I didn't mean the default output folder. For some reason, Maven added also the target/classes folder as a source folder. I noticed also that this was done only if I had a custom Maven plugin in the project (one of our plugins), even if I used the quickstart Maven artifact. If I removed that plugin from the pom.xml, everything worked ok. As a workaround, I have to delete the target/classes folder from the source list... I'll solve this problem of ours later... Good if you got your project working... :) tauren wrote: Noon, Do you mean the Default output folder in Properties--Java Build Path--Source tab? If so, what did you change it to? I can't just delete it as Eclipse says that it is required. Anyway, it is of no consequence any more. It seems that I got things working. I decided to try to start with a basic wicket quickstart from maven archetype, enable Maven dependency management on it, and debugged it. The quickstart worked just fine and I could edit html files and they would refresh without stopping the server. So I compared my project's pom with the quickstart one. My project's pom was modeled after another project's pom. There was a lot of extra stuff that I didn't need, so I removed it. After making my pom very close to the quickstart pom, and then debugging, my project too would refresh html files. Yay! I may follow up on this later as I start to add additional plugins and settings that I removed back into my pom. But at least I'll now be able to test things one at a time and isolate what caused the problem. So thanks everyone for the help! Tauren PS - Just in case anyone is trying to do this in the future, here are the steps I took to get the wicket quickstart working within eclipse with maven and m2eclipse: First make sure eclipse, maven, and m2eclipse are installed... Command line: cd workspace mvn archetype:create -DarchetypeGroupId=org.apache.wicket -DarchetypeArtifactId=wicket-archetype-quickstart -DarchetypeVersion=1.4-rc1 -DgroupId=test -DartifactId=mytest cd mytest mvn eclipse:eclipse Eclipse: File-Import Select General-Existing projects into Workspace Next Select root directory workspace/mytest Finish Right click onto mytest project Select Maven-Enable Dependency Management Right click onto src/test/java/test/Start.java Select Debug As - Java Application Web browser: http://localhost:8080/ In Eclipse, edit HomePage.html, save. Refresh browser, changes are there... On Thu, Jan 15, 2009 at 10:50 PM, noon rami.muurim...@gmail.com wrote: I had to remove the target/classes folder from the java source paths which Maven Eclipse plugin adds (project properties == java build path). After this, the markup files refreshed as expected. Tauren Mills-2 wrote: Thanks Igor, but I already looked there and the only thing listed in filtered resources is *.launch. Any other ideas? Tauren On Thu, Jan 15, 2009 at 4:05 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote: open the preferences window in the search box type filter this will show you java/compiler/building panel with FilteredREsources: textbox, remove *.html -igor On Thu, Jan 15, 2009 at 4:03 PM, Tauren Mills tau...@tauren.com wrote: Martijn, Thanks. But any clue how or where I do that? I've been poking around the preferences in eclipse and haven't found it. Tauren On Thu, Jan 15, 2009 at 3:51 PM, Martijn Dashorst martijn.dasho...@gmail.com wrote: iirc you have to turn off eclipse's filtering of html files (which is turned off default because of javadoc html which usually doesn't want to be packaged inside your war/jar) Martijn On Fri, Jan 16, 2009 at 12:31 AM, Tauren Mills tau...@tauren.com wrote: Are there any wicket/eclipse/maven/m2eclipse users out there? I'm trying to get my development environment working properly and need your help. Up until now, I've been developing WIcket applications in Eclipse and have not been using maven. As long as my web.xml is set to development rather than deployment mode, changes I made to HTML files while debugging were immediately applied. Not anymore... I am now managing my projects with maven, having just added a pom file to my project. I'm using the m2eclipse plugin in Eclipse and enabled dependency management on my project. Unfortunately, now my HTML file changes aren't being recognized any longer even with development mode turned on. I have to stop and start the app to see the HTML changes. My project's maven properties show these goals to invoke on resource changes: process-resources resources:testResources. My pom includes: build
Re: Technologies to use with large scale Wicket application
Hi Stefan, Your planing something quite impressive here ... or frightening ;) It does sound quite ambitious, doesn't it? Truthfully, I am a bit frightened... :) In reality, we aren't planning to roll out all of these features all at once. But we are trying to create a roadmap for future enhancements and are get a grasp on the technologies we might use or integrate down the road. We just don't want to create a design that can't be easily extended to support the features we intend to add later. I mean, I know that things will change and there will be refactoring necessary with each iteration, but I still would like to have an overall picture of our direction. My comments: Lucene/Hibernate Search I'd strongly disagree in using neither Lucene directly nor Hibernate Search. I'd give +1000 to Compass (http://compass-project.org/) instead. I migrated my projects completely from Hibernate Search to Compass and didn't regret it a single second. Ahhh, yes! Thanks for reminding me of Compass. I looked into it a while back, but forgot about it. I'll definitely check it out again. Jackrabbit Doesn't Jackrabbit come wit Lucene integration itself? Do you know if Jackrabbit supports Compass too? I guess I can look into that. Terracotta I used Terracotta for a while. Don't know what you mean by all across the world, but I'd say that Terracotta was built with very low network latency in mind. However, You will need *a lot* of users and page impressions until you'll really need it (move stuff like search on dedicated machines, maybe clustered with terracotta (compass comes with terracotta support)). I wasn't really thinking that I'd use Terracotta for the across the world stuff, although re-reading my post does sound like that. I just meant that it might come into play when and if the app ever grows to the point where we need to start clustering things. And if that happens, then at that point we will also need to be thinking about how to support hosting our app in the cloud and having hosting locations that are in different parts of the world. Facebook Connect I integrated a Wicket application with Facebook (http://www.setlist.fm/). Feel free to contact me, if you're interested into that stuff. Great! Thanks for the offer. When the time comes, I will keep you in mind. Tauren Regards tauren wrote: Happy new year! My team is in the preliminary stages of designing a large social wicket web application and I'm trying to identify a good set of existing tools and technologies that can be leveraged to simplify the development of this application. I would love to hear the opinions and suggestions of other Wicket users. Note that I want to use open source tools as much as possible. Here are some of the tools that I feel might help. I realize this is a big list and may be off-topic, but am still interested in which technologies other Wicket developers have found work well with a Wicket app. I would appreciate any comments or opinions of these technologies as well as suggestions and alternatives that you feel would be worth my consideration. Wicket I assume no one here will object to this. I plan to use version 1.4. MySQL First choice for database. I've used it MySQL more than any other database and it hasn't let me down. PostgreSQL Second choice for database. I've used it less than MySQL, so additional time might be required to install, configure, and use it. Spring + Hibernate I'm comfortable with these technologies as I've been using them for a few years with Wicket. But I'm certainly open to suggestions, opinions, etc. Hibernate Annotations Ive been using HBM files, but I'm thinking I should look into getting rid of my mapping files and put the mapping right into the pojos. Is this the right call? Salve Never used it, but it appears many Wicket developers do. Is it worth looking into? WicketWebBeans Might use this for rapid back-end UI development. Besides rolling my own, are there other tools like this? Brix Jackrabbit Our application will need some heavy duty CMS features, and this project looks powerful enough to do the job. Jackrabbit is used by Brix to store content. Lucene Hibernate Search I will need site-wide and data-wide search that encompasses all of the content on the site as well as the data in the application. I'm not sure if these are the best tools for this job, as the content will be stored in Jackrabbit. So I need to be able to search jackrabbit and my data and produce unified search results. Ideas? ACEGI Spring Security I haven't used either of these before so I'm not sure if they will solve my problem: This application will have many levels of roles and permissions. Users will belong to groups and can be assigned roles for a group that allow them to perform actions. For instance, a standard user that belongs to a group can only view some data. But if a user has additional roles
Re: Trying to ignore page expiration on selected bookmarkable pages
Is it possible that it occurs when a user stays on a bookmarkable page for a long time (the page having forms) and then clicks trying to submit the form after the session has expired? Could I just nest a hidden form field that I could use to determine the page? What would be the right place to process the hidden field in case of page expiration? AbstractRequestCycleProcessor? ** Martin 2009/1/16 Igor Vaynberg igor.vaynb...@gmail.com: bookmarkable urls do not generate a page expired error, the urls that do generally look like this: ?wicket:interface=2:ff.sdfsdf.sdf:ILinkListener where the only information you have about the page is 2. you can write your own coding strategy that always appends the class name of the last bookmarkable page to all the urls...that way you can recover it but it sure wont look pretty. -igor On Fri, Jan 16, 2009 at 12:09 PM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: Specifically, if it is a Mounted Bookmarkable page, the page name should be available in the url? ** Martin 2009/1/16 Martin Makundi martin.maku...@koodaripalvelut.com: when you hit pageexpired exception you do not know which page caused it Is it possible that there could be some query parameters that could be used to deduce such information? ** Martin On Fri, Jan 16, 2009 at 11:18 AM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: Hi! I would like to ignore page expired on certain pages. What I mean is that in general it is ok to follow the instruction: getApplicationSettings().setPageExpiredErrorPage(LoginPage.class); However, on certain pages where the session is not so important, I would like to redirect back to the ongoing page (without RestartResponseException) because there is no harm (I can check some @SafeExpired annotation or something, to make sure). I found the following piece from AbstractRequestCycleProcessor: if (e instanceof PageExpiredException) { Class? extends Page pageExpiredErrorPageClass = application.getApplicationSettings() .getPageExpiredErrorPage(); boolean mounted = isPageMounted(pageExpiredErrorPageClass); RequestCycle.get().setRedirect(mounted); throw new RestartResponseException(pageExpiredErrorPageClass); } I could extend WebRequestCycleProcessor and override the method public void respond(RuntimeException e, RequestCycle requestCycle); with the intention of Catching the RestartResponseException and analyzing whether the target page meets the special conditions. If it does meet, I consume the RestartResponseException... Will this do the trick properly? Is this a good approach? Anybody done this before? It feels a bit like hacking into the wicket bloodlines, if the internals change the hack might not work in the future. Is there a more proper way to do this or should there be a new feature in Wicket to support selecting which pages care about expiration (or maybe there already is?)? These pages in question have only some plain forms and do not require login. Now if such a page expires, it redirects to login, which is really not the purpose. ** Martin - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org