Re: table columns ajax update
Pedro, eagerly waiting for next version ;) thank you , -- regards, Vineet Semwal On Mon, Oct 5, 2009 at 4:25 AM, Pedro Santos pedros...@gmail.com wrote: Hi Semwal, it has capability to update some columns. I update HomePage on table-example to show how it can be done now. But it makes no sense, since the model on non editable cells table are static, so the values on table model will not be queried every ajax update. In next version, all table cells will have dynamic models. On Sun, Oct 4, 2009 at 3:04 AM, vineet semwal vineetsemwal1...@gmail.com wrote: Pedro, does it have or will it have capability to update some columns in a table with ajax timer ? table still is good but good to hear that you are doing major improvement in design ;) thank you ! -- regards, Vineet Semwal On Sun, Oct 4, 2009 at 3:57 AM, Pedro Santos pedros...@gmail.com wrote: Hi Semwal, I'm currently working on Table class design to turn simple this kind of extension. On Sat, Oct 3, 2009 at 10:38 AM, vineet semwal vineetsemwal1...@gmail.comwrote: can i update some columns in wicket-stuff table with ajax timer ? i have seen wicket-stuff table example but can't understand how to do it .. -- regards, Vineet Semwal -- Pedro Henrique Oliveira dos Santos -- Pedro Henrique Oliveira dos Santos
server push
Hi, We need server push for one of our web application. Is there something that you can suggest? The requirement is, it should work on any server (Tomcat, jetty, jboss,). is there any wicket component that does this? I have heard about wicketstuff-push, but i also heard that it only works with jetty. any kind of suggestion is welcome. thanks in advance. //jahid - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: server push
Hi Jahid, We need server push for one of our web application. Is there something that you can suggest? The requirement is, it should work on any server (Tomcat, jetty, jboss,). is there any wicket component that does this? as far as I know there isn't any standard yet which works on any servlet container. This is on the roadmap for the servlet api 3.0. Tomcat has a different API than Jetty than resin. I'm going for pull ATM, which works fine for my purposes. But your mileage may vary. Best regards, --- Jan. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: server push
Take a look at http://atmosphere.dev.java.net/ Its goal is what you are looking for. P.S. Maybe we already discussed this with you in ##wicket. El lun, 05-10-2009 a las 09:08 +0200, Md. Jahid Shohel escribió: Hi, We need server push for one of our web application. Is there something that you can suggest? The requirement is, it should work on any server (Tomcat, jetty, jboss,). is there any wicket component that does this? I have heard about wicketstuff-push, but i also heard that it only works with jetty. any kind of suggestion is welcome. thanks in advance. //jahid - 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: Start a panel, border, or page with an XML declaration?
2009/10/4 David Chang david_q_zh...@yahoo.com: Phil, Thanks very much for your reply. By XML declaration, you mean something like: ?xml version=1.0 encoding=UTF-8 ? Correct? I found this piece and it may be interesting to all: That's right. http://learningtheworld.eu/2008/farewell-xml-declaration/ Well, it might make sense to skip the xml declaration when the output is being pushed straight the user agent (as with JSP, PHP etc), but with Wicket you require a full parsing of the xhtml data on the server side, so I would go with the best practice approach and keep the declaration. Wicket is much more able to transform xhtml than other frameworks, so the arguments aren't really the same. I prefer to include it in my source, and then have Wicket strip it out at the last moment - at least when I'm forced to be IE6 compatible I am interested in this solution. Could you please share with us the detailed how-to? There's no particular secret, just call this.getMarkupSettings().setStripXmlDeclarationFromOutput(true); in your Application.init() method. Regards. --- On Sun, 10/4/09, Phil Housley undeconstruc...@gmail.com wrote: From: Phil Housley undeconstruc...@gmail.com Subject: Re: Start a panel, border, or page with an XML declaration? To: users@wicket.apache.org Date: Sunday, October 4, 2009, 6:59 AM 2009/10/4 David Chang david_q_zh...@yahoo.com: Hello, I am reading Wicket in Action. The Tip on page 291 says it is good practice to start your panels and borders (possibly your pages) with an XML declaration to force Wicket to work with them using the proper encoding. Does this mean that starting a panel, border, or page with something such as the following: -- !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; html xmlns=http://www.w3.org/1999/xhtml; lang=en xml:lang=en head meta http-equiv=content-type content=text/html; charset=utf-8 / ... /head -- Actually, the xml declaration is the one starting ?xml, which includes your encoding as soon as possible in the file, before any actual content. Adding the doctype is also good practice, as it makes sure wicket/the browser/anything else that reads the file understands it exactly as you wrote it, but is a separate issue. is better than with: -- html head ... /head -- If yes, why do all the examples of the WIA book start simply with htmlhead.../head? To save space I assume. Thanks for your help! One final thing to note is that IE6 will screw up any page with an ?xml declaration. I prefer to include it in my source, and then have Wicket strip it out at the last moment - at least when I'm forced to be IE6 compatible. -- Phil Housley - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: [tinymce] problem adding/removing TinyMceBehavior dinamically
I'll show you some parts of my code so you get an idea of how I do things. First of all, I have used AjaxEditableLabel from wicket-extensions as a starting point. TinyMCE's javascripts should always be loaded: // Preload TinyMCE add( new AbstractBehavior() { @Override public void renderHead( IHeaderResponse response ) { if( !tinyMCELoaded ) { response.renderJavascriptReference( TinyMCESettings.javaScriptReference() ); settings = buildTinyMCESettings(); tinyMCELoaded = true; } } } ); In my case TinyMCE is loaded through an AJAX call: @SuppressWarnings(unchecked) @Override protected void onEdit( AjaxRequestTarget target ) { super.onEdit( target ); final String id = editor.getMarkupId( true ); final StringBuilder buf = new StringBuilder(); // Load plugins buf.append( settings.getLoadPluginJavaScript() ).append( ;\n ); // Initialize tinyMCE buf.append( tinyMCE.init({ ).append( settings.toJavaScript( Mode.none, Collections.EMPTY_LIST ) ).append( });\n ); buf.append( settings.getAdditionalPluginJavaScript() ).append( ;\n ); // Setup editor buf.append( tinyMCE.execCommand('mceAddControl',true,' ).append( id ).append( '); ); // Request focus on editor buf.append( setTimeout( function() {tinyMCE.execCommand('mceFocus',true,' ).append( id ).append( ');}, 500 ); ); target.appendJavascript( buf.toString() ); } As you can see I initialize TinyMCE, and then perform an mceAddControl command on the textarea I want to convert to a TinyMCE editor. Finally, I need to switch back to a textarea before unloading, so the correct contents are POSTed. To do so, I have added an AjaxCallDecorator to the close request, and allow implementations to override it: @Override protected IAjaxCallDecorator getCloseDecorator() { return new AjaxCallDecorator() { @Override public CharSequence decorateScript( CharSequence script ) { return tinyMCE.execCommand('mceRemoveControl', false, ' + editor.getMarkupId() + '); + super.decorateOnSuccessScript( script ); // Call to save contents back to textarea // return tinyMCE.get(' + editor.getMarkupId() + ').save(); + // super.decorateScript( script ); } }; } The above code removes TinyMCE from the given textarea, and saves the HTML back into the textarea. I have commented out the call to save(), since it was not necessary. Bas Daniele Dellafiore wrote: I get what the real problem is: tinyMce saves internally each editor that is added to a page in a list called, well, editors. When I remove the behavior from a textField, I should also call tinyMce.remove passing the editors as a parameter. I will try to do this but any help is appreciated :) This is for the checkbox that enable/disable the tinyMce behavior. I have a more subtle situation: I have a list of textFields and a button to add more. When I add a new field, I refresh the list via AJAX to show the new field. But, refreshing the list also causes the html id of any element in the list to change! So, when in the end I submit the form, tinyMce cannot find its editors anymore cause the parent DIV of the INPUT field that has an associated tinyMce editor just changed it's html id. Given that the id will change and there is no alternatives, I have to find a way to keep the associations or to clean all editors and recreate them at every list refresh. What is your suggesions? -- Daniele Dellafiore http://blog.ildella.net http://twitter.com/ildella -- View this message in context: http://www.nabble.com/-tinymce--problem-adding-removing-TinyMceBehavior-dinamically-tp25681833p25747314.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: [tinymce] problem adding/removing TinyMceBehavior dinamically
Hey Bas, thanks for answering. Unfortunately it does not work. Even if I run: String removeEditor = tinyMCE.execCommand('mceRemoveControl', false, ' + propertyPanel.getValueMarkupId() + ');; target.appendJavascript(removeEditor); or simply remove the TinyMceBehavior from my TextField, the result is the same: mce editor disappear correclty, but remains in tinyMCE.editors list so Tiny tries to process it in a successive iteration. I try to find help on tinyMCE forum On Mon, Oct 5, 2009 at 10:59 AM, bgooren b...@iswd.nl wrote: I'll show you some parts of my code so you get an idea of how I do things. First of all, I have used AjaxEditableLabel from wicket-extensions as a starting point. TinyMCE's javascripts should always be loaded: // Preload TinyMCE add( new AbstractBehavior() { @Override public void renderHead( IHeaderResponse response ) { if( !tinyMCELoaded ) { response.renderJavascriptReference( TinyMCESettings.javaScriptReference() ); settings = buildTinyMCESettings(); tinyMCELoaded = true; } } } ); In my case TinyMCE is loaded through an AJAX call: @SuppressWarnings(unchecked) @Override protected void onEdit( AjaxRequestTarget target ) { super.onEdit( target ); final String id = editor.getMarkupId( true ); final StringBuilder buf = new StringBuilder(); // Load plugins buf.append( settings.getLoadPluginJavaScript() ).append( ;\n ); // Initialize tinyMCE buf.append( tinyMCE.init({ ).append( settings.toJavaScript( Mode.none, Collections.EMPTY_LIST ) ).append( });\n ); buf.append( settings.getAdditionalPluginJavaScript() ).append( ;\n ); // Setup editor buf.append( tinyMCE.execCommand('mceAddControl',true,' ).append( id ).append( '); ); // Request focus on editor buf.append( setTimeout( function() {tinyMCE.execCommand('mceFocus',true,' ).append( id ).append( ');}, 500 ); ); target.appendJavascript( buf.toString() ); } As you can see I initialize TinyMCE, and then perform an mceAddControl command on the textarea I want to convert to a TinyMCE editor. Finally, I need to switch back to a textarea before unloading, so the correct contents are POSTed. To do so, I have added an AjaxCallDecorator to the close request, and allow implementations to override it: @Override protected IAjaxCallDecorator getCloseDecorator() { return new AjaxCallDecorator() { @Override public CharSequence decorateScript( CharSequence script ) { return tinyMCE.execCommand('mceRemoveControl', false, ' + editor.getMarkupId() + '); + super.decorateOnSuccessScript( script ); // Call to save contents back to textarea // return tinyMCE.get(' + editor.getMarkupId() + ').save(); + // super.decorateScript( script ); } }; } The above code removes TinyMCE from the given textarea, and saves the HTML back into the textarea. I have commented out the call to save(), since it was not necessary. Bas Daniele Dellafiore wrote: I get what the real problem is: tinyMce saves internally each editor that is added to a page in a list called, well, editors. When I remove the behavior from a textField, I should also call tinyMce.remove passing the editors as a parameter. I will try to do this but any help is appreciated :) This is for the checkbox that enable/disable the tinyMce behavior. I have a more subtle situation: I have a list of textFields and a button to add more. When I add a new field, I refresh the list via AJAX to show the new field. But, refreshing the list also causes the html id of any element in the list to change! So, when in the end I submit the form, tinyMce cannot find its editors anymore cause the parent DIV of the INPUT field that has an associated tinyMce editor just changed it's html id. Given that the id will change and there is no alternatives, I have to find a way to keep the associations or to clean all editors and recreate them at every list refresh. What is your suggesions? -- Daniele Dellafiore http://blog.ildella.net http://twitter.com/ildella -- View this message in context: http://www.nabble.com/-tinymce--problem-adding-removing-TinyMceBehavior-dinamically-tp25681833p25747314.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 -- Daniele Dellafiore
wicket default locale
Hello, How to set a default locale for the application? It works for me, but I guess it should be more common: @Override public Session newSession(Request request, Response response) { Session session = super.newSession(request, response); session.setLocale(new Locale(et)); return session; } Thank you
Re: Wicket + Hibernate without Spring for lazy loading
Google for a wicket london weekend presentation and follow up blog on loading jpa entity managers on demand. There have also been various posts relating to using the open session in view Hibernate filter. The JPA blog entry uses the requestcycle to prepare a thread local. The first call to use it creates the entity manager and keeps it in the thread local. The request cycle end request and exception methods handle the cleanup and close. Very brief description but if you google for the topics above it is all very well explained. HTH Adrian On Mon, Oct 5, 2009 at 6:22 PM, Petr Fejfar petr.fej...@gmail.com wrote: On Mon, Oct 5, 2009 at 5:12 AM, Jeffrey Schneller jeffrey.schnel...@envisa.com wrote: I really don't want to bloat my code to implement Spring but if it is the only way to do it then I will. When I've started learning of Wicket few month ago, my position was the similiar: I'd like to avoid stuff like Maven, Spring etc... I found out Databinder as well and tried it. But I was not able to make it running with Hibernate, just with HSQLDB. So we've decided to continue with Spring, Maven... We've increased our overhead little bit, but once we define beans, we do not care about them any more. There was only one pitfall: manually invoking injection of non-visual components. After few month I must say that Spring seems to be the least problematic part of our projects. Petr - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket default locale
Hi The default implementation pulls the used locale from the servlet request (meaning the requested locale by the browser). If you want to override that, we do it exactly as you do it. Matt Gatos wrote: Hello, How to set a default locale for the application? It works for me, but I guess it should be more common: @Override public Session newSession(Request request, Response response) { Session session = super.newSession(request, response); session.setLocale(new Locale(et)); return session; } Thank you smime.p7s Description: S/MIME Cryptographic Signature
Re: wicket default locale
I think the more common method is to override newSession in your application class to return your own session (that extends WebSession) and then in your own session class override getLocale(). Very happy to be corrected though. HTH, Adrian On Mon, Oct 5, 2009 at 10:59 PM, Gatos ega...@gmail.com wrote: Hello, How to set a default locale for the application? It works for me, but I guess it should be more common: @Override public Session newSession(Request request, Response response) { Session session = super.newSession(request, response); session.setLocale(new Locale(et)); return session; } Thank you
SV: Move shared wicket components to a base page?
WicketMessage: The component(s) below failed to render. A common problem is that you have added a component in code but forgot to reference it in the markup (thus the component will never be rendered). This indicates to me you are not using wicket:child / in the parent's markup and/or not using wicket:extend.../wicket:extend in the child page's markup. - Tor Iver - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket default locale
Hi Adrian You could do that but what he wants is to set a default locale, not a fixed-forever locale. When you set it in newSession, you get exactly that - a default locale which might get changed any time by the application. Matt Adrian Merrall wrote: I think the more common method is to override newSession in your application class to return your own session (that extends WebSession) and then in your own session class override getLocale(). Very happy to be corrected though. HTH, Adrian On Mon, Oct 5, 2009 at 10:59 PM, Gatos ega...@gmail.com wrote: Hello, How to set a default locale for the application? It works for me, but I guess it should be more common: @Override public Session newSession(Request request, Response response) { Session session = super.newSession(request, response); session.setLocale(new Locale(et)); return session; } Thank you smime.p7s Description: S/MIME Cryptographic Signature
Nav bar - stateful
Hi Another newbie question, sorry! Is there any way of making a nav bar like this: wicket:link a href=HomePage.htmlBrowse/a | a href=Search.htmlSearch/a /wicket:link Stateful, i.e. only one instance of each page is created. So if you were on the home page and clicked the 'Search' link, then clicked the 'Browse' link, the state of all your components would be remembered. Alternately, is there an easy or best-practice way of accomplishing this? Thanks, Phill This message is for the designated recipient only and may contain privileged or confidential information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Pagemap locked
The thread that keeps the lock is TP-Processor17, so check the request log for that thread after the time of the thread dump. Martijn On Sun, Oct 4, 2009 at 6:05 AM, Douglas Ferguson doug...@douglasferguson.us wrote: I am getting seeing the following stack, but I'm not sure what the client is doing to cause this. Is there anyway I can tie this to the request logger to try and determine what they were doing that locked the pagemap? Thanks, java.io.FileOutputStream MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit org.apache.wicket.WicketRuntimeException: After 1 minute the Pagemap null is still locked by: Thread[TP-Processor17,5,main], giving up trying to get the page for path: 24 Begin of stack trace of Thread[TP-Processor17,5,main] java.io.FileOutputStream org.apache.wicket.protocol.http.request.InvalidUrlException:org.apache.wicket.WicketRuntimeException : After 1 minute the Pagemap null is still locked by: Thread[TP- Processor17,5,main], giving up trying to get the page for path: 24 Begin of stack trace of Thread[TP-Processor17,5,main] java.io.FileOutputStream.writeBytes(Native Method) java.io.FileOutputStream.write(Unknown Source) sun.nio.cs.StreamEncoder.writeBytes(Unknown Source) sun.nio.cs.StreamEncoder.implWrite(Unknown Source) sun.nio.cs.StreamEncoder.write(Unknown Source) sun.nio.cs.StreamEncoder.write(Unknown Source) java.io.OutputStreamWriter.write(Unknown Source) java.io.PrintWriter.write(Unknown Source) java.io.PrintWriter.write(Unknown Source) org.apache.juli.FileHandler.publish(FileHandler.java:136) java.util.logging.Logger.log(Unknown Source) java.util.logging.Logger.doLog(Unknown Source) java.util.logging.Logger.log(Unknown Source) com.steadystate.css.parser.SACParser.styleRuleDeclarations (SACParser.java:1331) com.steadystate.css.parser.SACParser.styleRuleDeclarations (SACParser.java:1334) com.steadystate.css.parser.SACParser.styleRuleDeclarations (SACParser.java:1334) com.steadystate.css.parser.SACParser.styleRuleDeclarations (SACParser.java:1334) com.steadystate.css.parser.SACParser.styleRuleDeclarations (SACParser.java:1334) com.steadystate.css.parser.SACParser.styleRuleDeclarations (SACParser.java:1334) com.steadystate.css.parser.SACParser.styleRuleDeclarations (SACParser.java:1334) com.steadystate.css.parser.SACParser.styleRuleDeclarations (SACParser.java:1334) com.steadystate.css.parser.SACParser.styleRuleDeclarations (SACParser.java:1334) com.steadystate.css.parser.SACParser.styleRuleDeclarations (SACParser.java:1334) com.steadystate.css.parser.SACParser.styleRuleDeclarations (SACParser.java:1334) com.steadystate.css.parser.SACParser.styleRuleDeclarations (SACParser.java:1334) com.steadystate.css.parser.SACParser.styleRuleDeclarations (SACParser.java:1334) com.steadystate.css.parser.SACParser.styleRuleDeclarations (SACParser.java:1334) com.steadystate.css.parser.SACParser.styleRuleDeclarations (SACParser.java:1334) com.steadystate.css.parser.SACParser.styleRuleDeclarations (SACParser.java:1334) com.steadystate.css.parser.SACParser.styleRuleDeclarations (SACParser.java:1334) com.steadystate.css.parser.SACParser.styleRuleDeclarations (SACParser.java:1334) com.steadystate.css.parser.SACParser.styleRuleDeclarations (SACParser.java:1334) com.steadystate.css.parser.SACParser.styleRuleDeclarations (SACParser.java:1334) com.steadystate.css.parser.SACParser.styleRuleDeclarations (SACParser.java:1334) com.steadystate.css.parser.SACParser.styleRuleDeclarations (SACParser.java:1334) com.steadystate.css.parser.SACParser.styleRuleDeclarations (SACParser.java:1334) com.steadystate.css.parser.SACParser.styleRuleDeclarations (SACParser.java:1334) com.steadystate.css.parser.SACParser.styleRuleDeclarations (SACParser.java:1334) com.steadystate.css.parser.SACParser.styleRuleDeclarations (SACParser.java:1334) com.steadystate.css.parser.SACParser.styleRuleDeclarations (SACParser.java:1334) com.steadystate.css.parser.SACParser.styleRuleDeclarations (SACParser.java:1334) com.steadystate.css.parser.SACParser.styleRuleDeclarations (SACParser.java:1334) com.steadystate.css.parser.SACParser.styleRuleDeclarations (SACParser.java:1334) com.steadystate.css.parser.SACParser.styleRuleDeclarations (SACParser.java:1334) com.steadystate.css.parser.SACParser.styleRuleDeclarations (SACParser.java:1334) com.steadystate.css.parser.SACParser.styleRuleDeclarations (SACParser.java:1334) com.steadystate.css.parser.SACParser.styleRuleDeclarations (SACParser.java:1334) com.steadystate.css.parser.SACParser.styleRuleDeclarations (SACParser.java:1334) com.steadystate.css.parser.SACParser.styleRuleDeclarations (SACParser.java:1334)
WebSession Casting unable
Hi, why can't I cast a Websession to a SecurePageSession-Class which extends Websession?! java.lang.ClassCastException: org.apache.wicket.protocol.http.WebSession cannot be cast to org.omikron.test.SecurePageSession In the book I bought (Wicket in Praxis, a german book for wicket 1.4) the author does it like that. Thats my source: public class SecurePageSession extends WebSession{ Integer administratorId; public SecurePageSession(Request request) { super(request); } public synchronized void setAdministrator(Administrator administrator) { administratorId = administrator.getId(); dirty(); } public synchronized void clearAdministrator() { administratorId = null; dirty(); } public synchronized Administrator getAdministrator() { if (administratorId != null ) return AdministratorDataProvider.getAdministrator(administratorId); return null; } public synchronized boolean isAdministratorLogin() { return administratorId != null ? true:false; } public static SecurePageSession get() { return (SecurePageSession) Session.get(); } } - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Nav bar - stateful
You can keep page instances on session. On Mon, Oct 5, 2009 at 7:57 AM, Phillip Sacre psa...@clifford-thames.comwrote: Hi Another newbie question, sorry! Is there any way of making a nav bar like this: wicket:link a href=HomePage.htmlBrowse/a | a href=Search.htmlSearch/a /wicket:link Stateful, i.e. only one instance of each page is created. So if you were on the home page and clicked the 'Search' link, then clicked the 'Browse' link, the state of all your components would be remembered. Alternately, is there an easy or best-practice way of accomplishing this? Thanks, Phill This message is for the designated recipient only and may contain privileged or confidential information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Pedro Henrique Oliveira dos Santos
Re: WebSession Casting unable
Not each Websession is a SecurePageSession. (but each SecurePageSession IS a WebSession) So, it means that you probably are dealing with a normal WebSession. Is your Application creating the correct Session instance (override the newSession()) On Mon, Oct 5, 2009 at 1:19 PM, Peter Arnulf Lustig u...@yahoo.dewrote: Hi, why can't I cast a Websession to a SecurePageSession-Class which extends Websession?! java.lang.ClassCastException: org.apache.wicket.protocol.http.WebSession cannot be cast to org.omikron.test.SecurePageSession In the book I bought (Wicket in Praxis, a german book for wicket 1.4) the author does it like that. Thats my source: public class SecurePageSession extends WebSession{ Integer administratorId; public SecurePageSession(Request request) { super(request); } public synchronized void setAdministrator(Administrator administrator) { administratorId = administrator.getId(); dirty(); } public synchronized void clearAdministrator() { administratorId = null; dirty(); } public synchronized Administrator getAdministrator() { if (administratorId != null ) return AdministratorDataProvider.getAdministrator(administratorId); return null; } public synchronized boolean isAdministratorLogin() { return administratorId != null ? true:false; } public static SecurePageSession get() { return (SecurePageSession) Session.get(); } } - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Pieter Degraeuwe Systemworks bvba Belgiëlaan 61 9070 Destelbergen GSM: +32 (0)485/68.60.85 Email: pieter.degrae...@systemworks.be visit us at http://www.systemworks.be
Re: SV: Move shared wicket components to a base page?
Tor, you are right. I found a coding error in my program. Yes, this whole thing is doable. Wicket is great! Thanks! --- On Mon, 10/5/09, Wilhelmsen Tor Iver toriv...@arrive.no wrote: From: Wilhelmsen Tor Iver toriv...@arrive.no Subject: SV: Move shared wicket components to a base page? To: users@wicket.apache.org users@wicket.apache.org Date: Monday, October 5, 2009, 6:24 AM WicketMessage: The component(s) below failed to render. A common problem is that you have added a component in code but forgot to reference it in the markup (thus the component will never be rendered). This indicates to me you are not using wicket:child / in the parent's markup and/or not using wicket:extend.../wicket:extend in the child page's markup. - Tor Iver - 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: Start a panel, border, or page with an XML declaration?
Thanks for sharing your thought and trick with me! The wicket user community is so helpful and friendly. Cheers! --- On Mon, 10/5/09, Phil Housley undeconstruc...@gmail.com wrote: From: Phil Housley undeconstruc...@gmail.com Subject: Re: Start a panel, border, or page with an XML declaration? To: users@wicket.apache.org Date: Monday, October 5, 2009, 4:27 AM 2009/10/4 David Chang david_q_zh...@yahoo.com: Phil, Thanks very much for your reply. By XML declaration, you mean something like: ?xml version=1.0 encoding=UTF-8 ? Correct? I found this piece and it may be interesting to all: That's right. http://learningtheworld.eu/2008/farewell-xml-declaration/ Well, it might make sense to skip the xml declaration when the output is being pushed straight the user agent (as with JSP, PHP etc), but with Wicket you require a full parsing of the xhtml data on the server side, so I would go with the best practice approach and keep the declaration. Wicket is much more able to transform xhtml than other frameworks, so the arguments aren't really the same. I prefer to include it in my source, and then have Wicket strip it out at the last moment - at least when I'm forced to be IE6 compatible I am interested in this solution. Could you please share with us the detailed how-to? There's no particular secret, just call this.getMarkupSettings().setStripXmlDeclarationFromOutput(true); in your Application.init() method. Regards. --- On Sun, 10/4/09, Phil Housley undeconstruc...@gmail.com wrote: From: Phil Housley undeconstruc...@gmail.com Subject: Re: Start a panel, border, or page with an XML declaration? To: users@wicket.apache.org Date: Sunday, October 4, 2009, 6:59 AM 2009/10/4 David Chang david_q_zh...@yahoo.com: Hello, I am reading Wicket in Action. The Tip on page 291 says it is good practice to start your panels and borders (possibly your pages) with an XML declaration to force Wicket to work with them using the proper encoding. Does this mean that starting a panel, border, or page with something such as the following: -- !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; html xmlns=http://www.w3.org/1999/xhtml; lang=en xml:lang=en head meta http-equiv=content-type content=text/html; charset=utf-8 / ... /head -- Actually, the xml declaration is the one starting ?xml, which includes your encoding as soon as possible in the file, before any actual content. Adding the doctype is also good practice, as it makes sure wicket/the browser/anything else that reads the file understands it exactly as you wrote it, but is a separate issue. is better than with: -- html head ... /head -- If yes, why do all the examples of the WIA book start simply with htmlhead.../head? To save space I assume. Thanks for your help! One final thing to note is that IE6 will screw up any page with an ?xml declaration. I prefer to include it in my source, and then have Wicket strip it out at the last moment - at least when I'm forced to be IE6 compatible. -- Phil Housley - 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
AW: WebSession Casting unable
I have overwritten the newSession Method: public class Application extends WebApplication { @Override protected void init() { super.init(); getSecuritySettings().setAuthorizationStrategy(new AdministratorLoginSimplePageAuthStrategy(LoginPage.class)); } @Override public org.apache.wicket.Session newSession(Request request, Response response) { return super.newSession(request, response); } @Override public Class? extends Page getHomePage() { return Backend.class; } } Is this what you mean? - Ursprüngliche Mail Von: Pieter Degraeuwe pieter.degrae...@systemworks.be An: users@wicket.apache.org Gesendet: Montag, den 5. Oktober 2009, 13:29:28 Uhr Betreff: Re: WebSession Casting unable Not each Websession is a SecurePageSession. (but each SecurePageSession IS a WebSession) So, it means that you probably are dealing with a normal WebSession. Is your Application creating the correct Session instance (override the newSession()) On Mon, Oct 5, 2009 at 1:19 PM, Peter Arnulf Lustig u...@yahoo.dewrote: Hi, why can't I cast a Websession to a SecurePageSession-Class which extends Websession?! java.lang.ClassCastException: org.apache.wicket.protocol.http.WebSession cannot be cast to org.omikron.test.SecurePageSession In the book I bought (Wicket in Praxis, a german book for wicket 1.4) the author does it like that. Thats my source: public class SecurePageSession extends WebSession{ Integer administratorId; public SecurePageSession(Request request) { super(request); } public synchronized void setAdministrator(Administrator administrator) { administratorId = administrator.getId(); dirty(); } public synchronized void clearAdministrator() { administratorId = null; dirty(); } public synchronized Administrator getAdministrator() { if (administratorId != null ) return AdministratorDataProvider.getAdministrator(administratorId); return null; } public synchronized boolean isAdministratorLogin() { return administratorId != null ? true:false; } public static SecurePageSession get() { return (SecurePageSession) Session.get(); } } - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Pieter Degraeuwe Systemworks bvba Belgiëlaan 61 9070 Destelbergen GSM: +32 (0)485/68.60.85 Email: pieter.degrae...@systemworks.be visit us at http://www.systemworks.be - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
AW: WebSession Casting unable
ah sorry I got it: @Override public org.apache.wicket.Session newSession(Request request, Response response) { return new SecurePageSession(request); } Thank you. I had the auto-fixed solution from netbeans :) - Ursprüngliche Mail Von: Pieter Degraeuwe pieter.degrae...@systemworks.be An: users@wicket.apache.org Gesendet: Montag, den 5. Oktober 2009, 13:29:28 Uhr Betreff: Re: WebSession Casting unable Not each Websession is a SecurePageSession. (but each SecurePageSession IS a WebSession) So, it means that you probably are dealing with a normal WebSession. Is your Application creating the correct Session instance (override the newSession()) On Mon, Oct 5, 2009 at 1:19 PM, Peter Arnulf Lustig u...@yahoo.dewrote: Hi, why can't I cast a Websession to a SecurePageSession-Class which extends Websession?! java.lang.ClassCastException: org.apache.wicket.protocol.http.WebSession cannot be cast to org.omikron.test.SecurePageSession In the book I bought (Wicket in Praxis, a german book for wicket 1.4) the author does it like that. Thats my source: public class SecurePageSession extends WebSession{ Integer administratorId; public SecurePageSession(Request request) { super(request); } public synchronized void setAdministrator(Administrator administrator) { administratorId = administrator.getId(); dirty(); } public synchronized void clearAdministrator() { administratorId = null; dirty(); } public synchronized Administrator getAdministrator() { if (administratorId != null ) return AdministratorDataProvider.getAdministrator(administratorId); return null; } public synchronized boolean isAdministratorLogin() { return administratorId != null ? true:false; } public static SecurePageSession get() { return (SecurePageSession) Session.get(); } } - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Pieter Degraeuwe Systemworks bvba Belgiëlaan 61 9070 Destelbergen GSM: +32 (0)485/68.60.85 Email: pieter.degrae...@systemworks.be visit us at http://www.systemworks.be - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: WebSession Casting unable
your implementation needs to return an instance of SecurePageSession On Mon, Oct 5, 2009 at 8:43 AM, Peter Arnulf Lustig u...@yahoo.dewrote: I have overwritten the newSession Method: public class Application extends WebApplication { @Override protected void init() { super.init(); getSecuritySettings().setAuthorizationStrategy(new AdministratorLoginSimplePageAuthStrategy(LoginPage.class)); } @Override public org.apache.wicket.Session newSession(Request request, Response response) { return super.newSession(request, response); } @Override public Class? extends Page getHomePage() { return Backend.class; } } Is this what you mean? - Ursprüngliche Mail Von: Pieter Degraeuwe pieter.degrae...@systemworks.be An: users@wicket.apache.org Gesendet: Montag, den 5. Oktober 2009, 13:29:28 Uhr Betreff: Re: WebSession Casting unable Not each Websession is a SecurePageSession. (but each SecurePageSession IS a WebSession) So, it means that you probably are dealing with a normal WebSession. Is your Application creating the correct Session instance (override the newSession()) On Mon, Oct 5, 2009 at 1:19 PM, Peter Arnulf Lustig u...@yahoo.de wrote: Hi, why can't I cast a Websession to a SecurePageSession-Class which extends Websession?! java.lang.ClassCastException: org.apache.wicket.protocol.http.WebSession cannot be cast to org.omikron.test.SecurePageSession In the book I bought (Wicket in Praxis, a german book for wicket 1.4) the author does it like that. Thats my source: public class SecurePageSession extends WebSession{ Integer administratorId; public SecurePageSession(Request request) { super(request); } public synchronized void setAdministrator(Administrator administrator) { administratorId = administrator.getId(); dirty(); } public synchronized void clearAdministrator() { administratorId = null; dirty(); } public synchronized Administrator getAdministrator() { if (administratorId != null ) return AdministratorDataProvider.getAdministrator(administratorId); return null; } public synchronized boolean isAdministratorLogin() { return administratorId != null ? true:false; } public static SecurePageSession get() { return (SecurePageSession) Session.get(); } } - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Pieter Degraeuwe Systemworks bvba Belgiëlaan 61 9070 Destelbergen GSM: +32 (0)485/68.60.85 Email: pieter.degrae...@systemworks.be visit us at http://www.systemworks.be - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Pedro Henrique Oliveira dos Santos
AW: WebSession Casting unable
yeah you are right. Thank you for your help. - Ursprüngliche Mail Von: Pedro Santos pedros...@gmail.com An: users@wicket.apache.org Gesendet: Montag, den 5. Oktober 2009, 13:50:32 Uhr Betreff: Re: WebSession Casting unable your implementation needs to return an instance of SecurePageSession On Mon, Oct 5, 2009 at 8:43 AM, Peter Arnulf Lustig u...@yahoo.dewrote: I have overwritten the newSession Method: public class Application extends WebApplication { @Override protected void init() { super.init(); getSecuritySettings().setAuthorizationStrategy(new AdministratorLoginSimplePageAuthStrategy(LoginPage.class)); } @Override public org.apache.wicket.Session newSession(Request request, Response response) { return super.newSession(request, response); } @Override public Class? extends Page getHomePage() { return Backend.class; } } Is this what you mean? - Ursprüngliche Mail Von: Pieter Degraeuwe pieter.degrae...@systemworks.be An: users@wicket.apache.org Gesendet: Montag, den 5. Oktober 2009, 13:29:28 Uhr Betreff: Re: WebSession Casting unable Not each Websession is a SecurePageSession. (but each SecurePageSession IS a WebSession) So, it means that you probably are dealing with a normal WebSession. Is your Application creating the correct Session instance (override the newSession()) On Mon, Oct 5, 2009 at 1:19 PM, Peter Arnulf Lustig u...@yahoo.de wrote: Hi, why can't I cast a Websession to a SecurePageSession-Class which extends Websession?! java.lang.ClassCastException: org.apache.wicket.protocol.http.WebSession cannot be cast to org.omikron.test.SecurePageSession In the book I bought (Wicket in Praxis, a german book for wicket 1.4) the author does it like that. Thats my source: public class SecurePageSession extends WebSession{ Integer administratorId; public SecurePageSession(Request request) { super(request); } public synchronized void setAdministrator(Administrator administrator) { administratorId = administrator.getId(); dirty(); } public synchronized void clearAdministrator() { administratorId = null; dirty(); } public synchronized Administrator getAdministrator() { if (administratorId != null ) return AdministratorDataProvider.getAdministrator(administratorId); return null; } public synchronized boolean isAdministratorLogin() { return administratorId != null ? true:false; } public static SecurePageSession get() { return (SecurePageSession) Session.get(); } } - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Pieter Degraeuwe Systemworks bvba Belgiëlaan 61 9070 Destelbergen GSM: +32 (0)485/68.60.85 Email: pieter.degrae...@systemworks.be visit us at http://www.systemworks.be - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Pedro Henrique Oliveira dos Santos - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Nav bar - stateful
Is there any way of making a nav bar like this: wicket:link a href=HomePage.htmlBrowse/a | a href=Search.htmlSearch/a /wicket:link Stateful, i.e. only one instance of each page is created. So if you were on the home page and clicked the 'Search' link, then clicked the 'Browse' link, the state of all your components would be remembered. You probably need a custom AutoLinkResolver which creates links that check an internal map for an existing page of that type, or creates it (and puts it in a map) if absent. - Tor Iver - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to list files by name in Eclipe's Package Explorer?
Does anybody know the trick for this task? Thanks! --- On Sun, 10/4/09, David Chang david_q_zh...@yahoo.com wrote: From: David Chang david_q_zh...@yahoo.com Subject: How to list files by name in Eclipe's Package Explorer? To: users@wicket.apache.org Date: Sunday, October 4, 2009, 4:44 PM Hello, I am using Eclipse for devleopment. The files in its Package Explorer are listed by extensions: java files first. This is good for non-wicket development. Now each page's java and markup files are in the same directory and I hope to see them naturally stay together, which means making Package Explorer to list files by name. How to do this? Thank you! - 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: How to store/load strings shared by many (but not all) pages?
Wicket uses a chain of resolvers, by default these are: (see Settings class) ComponentStringResourceLoader, PackageStringResourceLoader, ClassStringResourceLoader and ValidatorStringResourceLoader. So besides the component specific resource you may define respources per package (e.g. 'package_de.properties') and for the whole application, the latter named like your application class (e.g. MyApp.properties) On Oct 4, 2009, at 05:32, David Chang wrote: I am reading Wicket in Action and have this i18n/i10n-related question : Suppose that I have a string that is used on multiple (but NOT ALL) pages. One solution is that I can put this string in the property files for each page on which the string is used. Any other better solutions? Thanks for your input! - 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: SV: Move shared wicket components to a base page?
On Mon, Oct 5, 2009 at 1:36 PM, David Chang david_q_zh...@yahoo.com wrote: Wicket is great! Now you're just preaching to the choir... :) Martijn - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to store/load strings shared by many (but not all) pages?
I was thinking about this yesterday... This is a very common scenario, specially for i18n messages related to exceptions. Thanks for the info =) On Mon, Oct 5, 2009 at 9:52 AM, Robin Sander robin.san...@gmx.net wrote: Wicket uses a chain of resolvers, by default these are: (see Settings class) ComponentStringResourceLoader, PackageStringResourceLoader, ClassStringResourceLoader and ValidatorStringResourceLoader. So besides the component specific resource you may define respources per package (e.g. 'package_de.properties') and for the whole application, the latter named like your application class (e.g. MyApp.properties) On Oct 4, 2009, at 05:32, David Chang wrote: I am reading Wicket in Action and have this i18n/i10n-related question : Suppose that I have a string that is used on multiple (but NOT ALL) pages. One solution is that I can put this string in the property files for each page on which the string is used. Any other better solutions? Thanks for your input! - 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 -- /** * Pedro Sena * Systems Architect * Sun Certified Java Programmer * Sun Certified Web Component Developer */
Re: ProgressBar demo doesn't work for firefox 3.5.3
Op vrijdag 02-10-2009 om 18:58 uur [tijdzone +0300], schreef Altuğ B. Altıntaş: You are right; it doesn't work properly. I am using swfupload tool. it is flash and it works great. Only if you are willing to put up with requiring a buggy and proprietary browser plugin for functionality that existed long before the World Wide Web was invented. -- Reinout van Schouwen - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Send file to client via Ajax
Hi all, simple question :) how to send a dynamicly generated file (as byte array) through an ajaxfallbackbutton tot he client? Mit freundlichen Grüßen Christian Giambalvo -- Fachinformatiker für Anwendungsentwicklung EXCELSIS Informationssysteme GmbH Wilhelmsplatz 8 - 70182 Stuttgart Mobile +49 176 196 32 406 Office +49 711 6 20 30 406 christian.giamba...@excelsisnet.com www.excelsisnet.com Sitz Stuttgart Amtsgericht Stuttgart, HRB 21104 Geschäftsführer: Christian Sauter, Dr. Nils Herda, Frank Wolf
Re: Send file to client via Ajax
why do you want to use AjaxFallbackButton ? you will not re-paint part of the page use ResourceLink to download the file El lun, 05-10-2009 a las 15:36 +0200, Giambalvo, Christian escribió: Hi all, simple question :) how to send a dynamicly generated file (as byte array) through an ajaxfallbackbutton tot he client? Mit freundlichen Grüßen Christian Giambalvo -- Fachinformatiker für Anwendungsentwicklung EXCELSIS Informationssysteme GmbH Wilhelmsplatz 8 - 70182 Stuttgart Mobile +49 176 196 32 406 Office +49 711 6 20 30 406 christian.giamba...@excelsisnet.com www.excelsisnet.com Sitz Stuttgart Amtsgericht Stuttgart, HRB 21104 Geschäftsführer: Christian Sauter, Dr. Nils Herda, Frank Wolf - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
AW: Send file to client via Ajax
It's more general question. Maybe i need to repaint some parts and send a file. Mit freundlichen Grüßen Christian Giambalvo -- Fachinformatiker für Anwendungsentwicklung EXCELSIS Informationssysteme GmbH Wilhelmsplatz 8 - 70182 Stuttgart Mobile +49 176 196 32 406 Office +49 711 6 20 30 406 christian.giamba...@excelsisnet.com www.excelsisnet.com Sitz Stuttgart Amtsgericht Stuttgart, HRB 21104 Geschäftsführer: Christian Sauter, Dr. Nils Herda, Frank Wolf -Ursprüngliche Nachricht- Von: Martin Grigorov [mailto:mcgreg...@e-card.bg] Gesendet: Montag, 5. Oktober 2009 15:56 An: users@wicket.apache.org Betreff: Re: Send file to client via Ajax why do you want to use AjaxFallbackButton ? you will not re-paint part of the page use ResourceLink to download the file El lun, 05-10-2009 a las 15:36 +0200, Giambalvo, Christian escribió: Hi all, simple question :) how to send a dynamicly generated file (as byte array) through an ajaxfallbackbutton tot he client? Mit freundlichen Grüßen Christian Giambalvo -- Fachinformatiker für Anwendungsentwicklung EXCELSIS Informationssysteme GmbH Wilhelmsplatz 8 - 70182 Stuttgart Mobile +49 176 196 32 406 Office +49 711 6 20 30 406 christian.giamba...@excelsisnet.com www.excelsisnet.com Sitz Stuttgart Amtsgericht Stuttgart, HRB 21104 Geschäftsführer: Christian Sauter, Dr. Nils Herda, Frank Wolf - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Send file to client via Ajax
Maybe you could repaint via AJAX and then use target.appendJavascript(window.location.href=´URL´); Where the URL is the URL of an ILinkListener generating you file... There was someone asking something similar not long ago. Best, Ernesto On Mon, Oct 5, 2009 at 4:10 PM, Giambalvo, Christian christian.giamba...@excelsisnet.com wrote: It's more general question. Maybe i need to repaint some parts and send a file. Mit freundlichen Grüßen Christian Giambalvo -- Fachinformatiker für Anwendungsentwicklung EXCELSIS Informationssysteme GmbH Wilhelmsplatz 8 - 70182 Stuttgart Mobile +49 176 196 32 406 Office +49 711 6 20 30 406 christian.giamba...@excelsisnet.com www.excelsisnet.com Sitz Stuttgart Amtsgericht Stuttgart, HRB 21104 Geschäftsführer: Christian Sauter, Dr. Nils Herda, Frank Wolf -Ursprüngliche Nachricht- Von: Martin Grigorov [mailto:mcgreg...@e-card.bg] Gesendet: Montag, 5. Oktober 2009 15:56 An: users@wicket.apache.org Betreff: Re: Send file to client via Ajax why do you want to use AjaxFallbackButton ? you will not re-paint part of the page use ResourceLink to download the file El lun, 05-10-2009 a las 15:36 +0200, Giambalvo, Christian escribió: Hi all, simple question :) how to send a dynamicly generated file (as byte array) through an ajaxfallbackbutton tot he client? Mit freundlichen Grüßen Christian Giambalvo -- Fachinformatiker für Anwendungsentwicklung EXCELSIS Informationssysteme GmbH Wilhelmsplatz 8 - 70182 Stuttgart Mobile +49 176 196 32 406 Office +49 711 6 20 30 406 christian.giamba...@excelsisnet.com www.excelsisnet.com Sitz Stuttgart Amtsgericht Stuttgart, HRB 21104 Geschäftsführer: Christian Sauter, Dr. Nils Herda, Frank Wolf - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to list files by name in Eclipe's Package Explorer?
Your question should be Is it possible to? I have not found a way. I have gotten used to it. On Mon, Oct 5, 2009 at 8:48 AM, David Chang david_q_zh...@yahoo.com wrote: Does anybody know the trick for this task? Thanks! --- On Sun, 10/4/09, David Chang david_q_zh...@yahoo.com wrote: From: David Chang david_q_zh...@yahoo.com Subject: How to list files by name in Eclipe's Package Explorer? To: users@wicket.apache.org Date: Sunday, October 4, 2009, 4:44 PM Hello, I am using Eclipse for devleopment. The files in its Package Explorer are listed by extensions: java files first. This is good for non-wicket development. Now each page's java and markup files are in the same directory and I hope to see them naturally stay together, which means making Package Explorer to list files by name. How to do this? Thank you! - 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: How to list files by name in Eclipe's Package Explorer?
Package explorer? At least here, Ctrl+Shift+R using wildcard (*) have replaced the Package Explorer Tab =) Regards, On Mon, Oct 5, 2009 at 11:26 AM, T Ames tamesw...@gmail.com wrote: Your question should be Is it possible to? I have not found a way. I have gotten used to it. On Mon, Oct 5, 2009 at 8:48 AM, David Chang david_q_zh...@yahoo.com wrote: Does anybody know the trick for this task? Thanks! --- On Sun, 10/4/09, David Chang david_q_zh...@yahoo.com wrote: From: David Chang david_q_zh...@yahoo.com Subject: How to list files by name in Eclipe's Package Explorer? To: users@wicket.apache.org Date: Sunday, October 4, 2009, 4:44 PM Hello, I am using Eclipse for devleopment. The files in its Package Explorer are listed by extensions: java files first. This is good for non-wicket development. Now each page's java and markup files are in the same directory and I hope to see them naturally stay together, which means making Package Explorer to list files by name. How to do this? Thank you! - 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 -- /** * Pedro Sena * Systems Architect * Sun Certified Java Programmer * Sun Certified Web Component Developer */
wicket forum api
Hello, Is there a wicket base forum API? thanks a lot. cheers.
RE: Wicket + Hibernate without Spring for lazy loading
I looked into the wicket London presentation/code and databinder.net and it all makes sense but it looks like then my wicket forms/components are tied directly to the database. When I submit a form then the data is persisted but I don't want this. I want to be able to call the data layer to retrieve data or to persist data and not care that a form is tied to it or not. I also need to be able to get data to populate lists or tables on a page. I currently have my project set up like: Data objects - POJOs to hold data that comes from or will be persisted to the db Data Access Objects - objects to get and persistent data using hibernate using the data objects Business Logic - helper classes to access the data access objects if additional logic needs to be performed before persisting to the db. Wicket Pages - all my wicket pages. The pages call the data access objects to retrieve data to display on pages and forms. The pages also handle the form submits and call the Data Access Objects to persistent to the db. In some cases I call the Business Logic layer to do the persistence. In the end I have data layer which I can re-use. The business logic layer which I can change as needed. Then the wicket pages which once they work I shouldn't need to touch if the logic changes or the data layer changes. This is what I think of as a true 3-tier architecture. I also am not using maven. I have eclipse running and added the jars to the project myself. If I need to use maven then I will but it seems like adding more stuff to something that should be very simple. Should I be doing something different in terms of my architecture to implement wicket? Everything is running fine for me except the lazy loading of data from hibernate. Not sure how my session size is going to look doing it this way either. Would prefer to have the smallest session size possible but this is a small app with little traffic for now so not that big of a deal. I am a wicket newbie and want to get this right as this is the first wicket project which will lead to a much larger higher traffic project that is currently planned to be developed using wicket. Thanks. -Original Message- From: Adrian Merrall [mailto:pigeonra...@gmail.com] Sent: Monday, October 05, 2009 6:17 AM To: users@wicket.apache.org Subject: Re: Wicket + Hibernate without Spring for lazy loading Google for a wicket london weekend presentation and follow up blog on loading jpa entity managers on demand. There have also been various posts relating to using the open session in view Hibernate filter. The JPA blog entry uses the requestcycle to prepare a thread local. The first call to use it creates the entity manager and keeps it in the thread local. The request cycle end request and exception methods handle the cleanup and close. Very brief description but if you google for the topics above it is all very well explained. HTH Adrian On Mon, Oct 5, 2009 at 6:22 PM, Petr Fejfar petr.fej...@gmail.com wrote: On Mon, Oct 5, 2009 at 5:12 AM, Jeffrey Schneller jeffrey.schnel...@envisa.com wrote: I really don't want to bloat my code to implement Spring but if it is the only way to do it then I will. When I've started learning of Wicket few month ago, my position was the similiar: I'd like to avoid stuff like Maven, Spring etc... I found out Databinder as well and tried it. But I was not able to make it running with Hibernate, just with HSQLDB. So we've decided to continue with Spring, Maven... We've increased our overhead little bit, but once we define beans, we do not care about them any more. There was only one pitfall: manually invoking injection of non-visual components. After few month I must say that Spring seems to be the least problematic part of our projects. Petr - 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: How to list files by name in Eclipe's Package Explorer?
Pedro, thanks for the tip! Cheers! --- On Mon, 10/5/09, Pedro Sena sena.pe...@gmail.com wrote: From: Pedro Sena sena.pe...@gmail.com Subject: Re: How to list files by name in Eclipe's Package Explorer? To: David Chang david_q_zh...@yahoo.com Date: Monday, October 5, 2009, 10:52 AM Hmmm. I understood what you are looking for. I believe that eclipse does not provide what you want. I always use Ctrl+Shift+R, that opens a window where I can type part of the file name and show all the matching files. It is not exactly what you want, but I believe that is the best that can be done. Having this shortcut, personally I don't see reasons to use Package Explorer to search for files(I believe that is what you want) Regards On Mon, Oct 5, 2009 at 11:45 AM, David Chang david_q_zh...@yahoo.com wrote: confused by your post. --- On Mon, 10/5/09, Pedro Sena sena.pe...@gmail.com wrote: From: Pedro Sena sena.pe...@gmail.com Subject: Re: How to list files by name in Eclipe's Package Explorer? To: users@wicket.apache.org Date: Monday, October 5, 2009, 10:33 AM Package explorer? At least here, Ctrl+Shift+R using wildcard (*) have replaced the Package Explorer Tab =) Regards, On Mon, Oct 5, 2009 at 11:26 AM, T Ames tamesw...@gmail.com wrote: Your question should be Is it possible to? I have not found a way. I have gotten used to it. On Mon, Oct 5, 2009 at 8:48 AM, David Chang david_q_zh...@yahoo.com wrote: Does anybody know the trick for this task? Thanks! --- On Sun, 10/4/09, David Chang david_q_zh...@yahoo.com wrote: From: David Chang david_q_zh...@yahoo.com Subject: How to list files by name in Eclipe's Package Explorer? To: users@wicket.apache.org Date: Sunday, October 4, 2009, 4:44 PM Hello, I am using Eclipse for devleopment. The files in its Package Explorer are listed by extensions: java files first. This is good for non-wicket development. Now each page's java and markup files are in the same directory and I hope to see them naturally stay together, which means making Package Explorer to list files by name. How to do this? Thank you! - 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 -- /** * Pedro Sena * Systems Architect * Sun Certified Java Programmer * Sun Certified Web Component Developer */ -- /** * Pedro Sena * Systems Architect * Sun Certified Java Programmer * Sun Certified Web Component Developer */ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
AW: Send file to client via Ajax
Could you give me an example? Mit freundlichen Grüßen Christian Giambalvo -- Fachinformatiker für Anwendungsentwicklung EXCELSIS Informationssysteme GmbH Wilhelmsplatz 8 - 70182 Stuttgart Mobile +49 176 196 32 406 Office +49 711 6 20 30 406 christian.giamba...@excelsisnet.com www.excelsisnet.com Sitz Stuttgart Amtsgericht Stuttgart, HRB 21104 Geschäftsführer: Christian Sauter, Dr. Nils Herda, Frank Wolf -Ursprüngliche Nachricht- Von: Ernesto Reinaldo Barreiro [mailto:reier...@gmail.com] Gesendet: Montag, 5. Oktober 2009 16:22 An: users@wicket.apache.org Betreff: Re: Send file to client via Ajax Maybe you could repaint via AJAX and then use target.appendJavascript(window.location.href=´URL´); Where the URL is the URL of an ILinkListener generating you file... There was someone asking something similar not long ago. Best, Ernesto On Mon, Oct 5, 2009 at 4:10 PM, Giambalvo, Christian christian.giamba...@excelsisnet.com wrote: It's more general question. Maybe i need to repaint some parts and send a file. Mit freundlichen Grüßen Christian Giambalvo -- Fachinformatiker für Anwendungsentwicklung EXCELSIS Informationssysteme GmbH Wilhelmsplatz 8 - 70182 Stuttgart Mobile +49 176 196 32 406 Office +49 711 6 20 30 406 christian.giamba...@excelsisnet.com www.excelsisnet.com Sitz Stuttgart Amtsgericht Stuttgart, HRB 21104 Geschäftsführer: Christian Sauter, Dr. Nils Herda, Frank Wolf -Ursprüngliche Nachricht- Von: Martin Grigorov [mailto:mcgreg...@e-card.bg] Gesendet: Montag, 5. Oktober 2009 15:56 An: users@wicket.apache.org Betreff: Re: Send file to client via Ajax why do you want to use AjaxFallbackButton ? you will not re-paint part of the page use ResourceLink to download the file El lun, 05-10-2009 a las 15:36 +0200, Giambalvo, Christian escribió: Hi all, simple question :) how to send a dynamicly generated file (as byte array) through an ajaxfallbackbutton tot he client? Mit freundlichen Grüßen Christian Giambalvo -- Fachinformatiker für Anwendungsentwicklung EXCELSIS Informationssysteme GmbH Wilhelmsplatz 8 - 70182 Stuttgart Mobile +49 176 196 32 406 Office +49 711 6 20 30 406 christian.giamba...@excelsisnet.com www.excelsisnet.com Sitz Stuttgart Amtsgericht Stuttgart, HRB 21104 Geschäftsführer: Christian Sauter, Dr. Nils Herda, Frank Wolf - 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: urls with localization
Question regarding your code in wiki page: RequestDecorator, this seems to be class in your package? Could it be posted too? Regards, Vytautas Alex Objelean wrote: I've created a draft version of the page in wiki: http://cwiki.apache.org/confluence/display/WICKET/Wicket+and+localized+URLs http://cwiki.apache.org/confluence/display/WICKET/Wicket+and+localized+URLs Now it will not expire ;). Alex Objelean Vytautas C(ivilis wrote: Hi, Alex. Could you repost LocaleUrlCodingStrategyDecorator to pastebin, as it has been expired? Thanks! Vytautas Alex Objelean wrote: RequestDecorator is nothing but a decorator implementation of Request class... [CODE] public class RequestDecorator extends Request { /** * Decorated request. */ private final Request request; /** * Constructor. * * @param request to decorate. */ public RequestDecorator(final Request request) { if (request == null) { throw new IllegalArgumentException(Decorated Request cannot be NULL!); } this.request = request; } /** * {...@inheritdoc} */ @Override public Locale getLocale() { return request.getLocale(); } /** * {...@inheritdoc} */ @Override public String getParameter(final String key) { return request.getParameter(key); } /** * {...@inheritdoc} */ @Override public MapString, String[] getParameterMap() { return request.getParameterMap(); } /** * {...@inheritdoc} */ @Override public String[] getParameters(final String key) { return request.getParameters(key); } /** * {...@inheritdoc} */ @Override public String getPath() { return request.getPath(); } /** * {...@inheritdoc} */ @Override public String getQueryString() { return request.getQueryString(); } /** * {...@inheritdoc} */ @Override public String getRelativePathPrefixToContextRoot() { return request.getRelativePathPrefixToContextRoot(); } /** * {...@inheritdoc} */ @Override public String getRelativePathPrefixToWicketHandler() { return request.getRelativePathPrefixToWicketHandler(); } /** * {...@inheritdoc} */ @Override public String getURL() { return request.getURL(); } } [/CODE] Gatos wrote: I'm using wicket 1.3.5 and RequestDecorator could not be found. On Mon, Jul 27, 2009 at 1:05 PM, Alex Objelean alex_objel...@yahoo.comwrote: There is another thread where I have posted a link with implementation (which is currently in production)... so, you can just reuse it: http://www.nabble.com/Is-IRequestTargetUrlCodingStrategy-needed-for-mapping-bookmarkable--URLs--td24407411.html#a24409330 Alex Objelean Gatos wrote: Hello, How is it possible to use such urls in wicket? If users clicks that link then appropriate page with defined locale will be shown. www.domain.com/uk/home www.domain.com/nl/home Thank you -- View this message in context: http://www.nabble.com/urls-with-localization-tp24676709p24677616.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: Wicket + Hibernate without Spring for lazy loading
Well you can use your business logic objects inside Wicket but you have to ensure that you you hold one, and only one, instance for each business object (assuming these objects are stateless) and that you do not accidentally serialize these objects and their dependencies within your Wicket pages. If you don't want to use Spring, have a look at Google Guice - which is a very simple, elegant yet powerful DI framework. Wicket provides support for Guice so you don't have to worry about accidental serialization. Once you have got to grips with Wicket and Guice then you can get really creative to enable Guice to inject Wicket components in your Wicket application. Cheers, James. On Mon, Oct 5, 2009 at 3:49 PM, Jeffrey Schneller jeffrey.schnel...@envisa.com wrote: I looked into the wicket London presentation/code and databinder.net and it all makes sense but it looks like then my wicket forms/components are tied directly to the database. When I submit a form then the data is persisted but I don't want this. I want to be able to call the data layer to retrieve data or to persist data and not care that a form is tied to it or not. I also need to be able to get data to populate lists or tables on a page. I currently have my project set up like: Data objects - POJOs to hold data that comes from or will be persisted to the db Data Access Objects - objects to get and persistent data using hibernate using the data objects Business Logic - helper classes to access the data access objects if additional logic needs to be performed before persisting to the db. Wicket Pages - all my wicket pages. The pages call the data access objects to retrieve data to display on pages and forms. The pages also handle the form submits and call the Data Access Objects to persistent to the db. In some cases I call the Business Logic layer to do the persistence. In the end I have data layer which I can re-use. The business logic layer which I can change as needed. Then the wicket pages which once they work I shouldn't need to touch if the logic changes or the data layer changes. This is what I think of as a true 3-tier architecture. I also am not using maven. I have eclipse running and added the jars to the project myself. If I need to use maven then I will but it seems like adding more stuff to something that should be very simple. Should I be doing something different in terms of my architecture to implement wicket? Everything is running fine for me except the lazy loading of data from hibernate. Not sure how my session size is going to look doing it this way either. Would prefer to have the smallest session size possible but this is a small app with little traffic for now so not that big of a deal. I am a wicket newbie and want to get this right as this is the first wicket project which will lead to a much larger higher traffic project that is currently planned to be developed using wicket. Thanks. -Original Message- From: Adrian Merrall [mailto:pigeonra...@gmail.com] Sent: Monday, October 05, 2009 6:17 AM To: users@wicket.apache.org Subject: Re: Wicket + Hibernate without Spring for lazy loading Google for a wicket london weekend presentation and follow up blog on loading jpa entity managers on demand. There have also been various posts relating to using the open session in view Hibernate filter. The JPA blog entry uses the requestcycle to prepare a thread local. The first call to use it creates the entity manager and keeps it in the thread local. The request cycle end request and exception methods handle the cleanup and close. Very brief description but if you google for the topics above it is all very well explained. HTH Adrian On Mon, Oct 5, 2009 at 6:22 PM, Petr Fejfar petr.fej...@gmail.com wrote: On Mon, Oct 5, 2009 at 5:12 AM, Jeffrey Schneller jeffrey.schnel...@envisa.com wrote: I really don't want to bloat my code to implement Spring but if it is the only way to do it then I will. When I've started learning of Wicket few month ago, my position was the similiar: I'd like to avoid stuff like Maven, Spring etc... I found out Databinder as well and tried it. But I was not able to make it running with Hibernate, just with HSQLDB. So we've decided to continue with Spring, Maven... We've increased our overhead little bit, but once we define beans, we do not care about them any more. There was only one pitfall: manually invoking injection of non-visual components. After few month I must say that Spring seems to be the least problematic part of our projects. Petr - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail:
Re: urls with localization
My guess it's just simple delegateable class? Vytautas Vytautas C wrote: Question regarding your code in wiki page: RequestDecorator, this seems to be class in your package? Could it be posted too? Regards, Vytautas Alex Objelean wrote: I've created a draft version of the page in wiki: http://cwiki.apache.org/confluence/display/WICKET/Wicket+and+localized+URLs http://cwiki.apache.org/confluence/display/WICKET/Wicket+and+localized+URLs Now it will not expire ;). Alex Objelean Vytautas C(ivilis wrote: Hi, Alex. Could you repost LocaleUrlCodingStrategyDecorator to pastebin, as it has been expired? Thanks! Vytautas Alex Objelean wrote: RequestDecorator is nothing but a decorator implementation of Request class... [CODE] public class RequestDecorator extends Request { /** * Decorated request. */ private final Request request; /** * Constructor. * * @param request to decorate. */ public RequestDecorator(final Request request) { if (request == null) { throw new IllegalArgumentException(Decorated Request cannot be NULL!); } this.request = request; } /** * {...@inheritdoc} */ @Override public Locale getLocale() { return request.getLocale(); } /** * {...@inheritdoc} */ @Override public String getParameter(final String key) { return request.getParameter(key); } /** * {...@inheritdoc} */ @Override public MapString, String[] getParameterMap() { return request.getParameterMap(); } /** * {...@inheritdoc} */ @Override public String[] getParameters(final String key) { return request.getParameters(key); } /** * {...@inheritdoc} */ @Override public String getPath() { return request.getPath(); } /** * {...@inheritdoc} */ @Override public String getQueryString() { return request.getQueryString(); } /** * {...@inheritdoc} */ @Override public String getRelativePathPrefixToContextRoot() { return request.getRelativePathPrefixToContextRoot(); } /** * {...@inheritdoc} */ @Override public String getRelativePathPrefixToWicketHandler() { return request.getRelativePathPrefixToWicketHandler(); } /** * {...@inheritdoc} */ @Override public String getURL() { return request.getURL(); } } [/CODE] Gatos wrote: I'm using wicket 1.3.5 and RequestDecorator could not be found. On Mon, Jul 27, 2009 at 1:05 PM, Alex Objelean alex_objel...@yahoo.comwrote: There is another thread where I have posted a link with implementation (which is currently in production)... so, you can just reuse it: http://www.nabble.com/Is-IRequestTargetUrlCodingStrategy-needed-for-mapping-bookmarkable--URLs--td24407411.html#a24409330 Alex Objelean Gatos wrote: Hello, How is it possible to use such urls in wicket? If users clicks that link then appropriate page with defined locale will be shown. www.domain.com/uk/home www.domain.com/nl/home Thank you -- View this message in context: http://www.nabble.com/urls-with-localization-tp24676709p24677616.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: urls with localization
Thanks again, works perfectly. Vytautas Vytautas C wrote: My guess it's just simple delegateable class? Vytautas Vytautas C wrote: Question regarding your code in wiki page: RequestDecorator, this seems to be class in your package? Could it be posted too? Regards, Vytautas Alex Objelean wrote: I've created a draft version of the page in wiki: http://cwiki.apache.org/confluence/display/WICKET/Wicket+and+localized+URLs http://cwiki.apache.org/confluence/display/WICKET/Wicket+and+localized+URLs Now it will not expire ;). Alex Objelean Vytautas C(ivilis wrote: Hi, Alex. Could you repost LocaleUrlCodingStrategyDecorator to pastebin, as it has been expired? Thanks! Vytautas Alex Objelean wrote: RequestDecorator is nothing but a decorator implementation of Request class... [CODE] public class RequestDecorator extends Request { /** * Decorated request. */ private final Request request; /** * Constructor. * * @param request to decorate. */ public RequestDecorator(final Request request) { if (request == null) { throw new IllegalArgumentException(Decorated Request cannot be NULL!); } this.request = request; } /** * {...@inheritdoc} */ @Override public Locale getLocale() { return request.getLocale(); } /** * {...@inheritdoc} */ @Override public String getParameter(final String key) { return request.getParameter(key); } /** * {...@inheritdoc} */ @Override public MapString, String[] getParameterMap() { return request.getParameterMap(); } /** * {...@inheritdoc} */ @Override public String[] getParameters(final String key) { return request.getParameters(key); } /** * {...@inheritdoc} */ @Override public String getPath() { return request.getPath(); } /** * {...@inheritdoc} */ @Override public String getQueryString() { return request.getQueryString(); } /** * {...@inheritdoc} */ @Override public String getRelativePathPrefixToContextRoot() { return request.getRelativePathPrefixToContextRoot(); } /** * {...@inheritdoc} */ @Override public String getRelativePathPrefixToWicketHandler() { return request.getRelativePathPrefixToWicketHandler(); } /** * {...@inheritdoc} */ @Override public String getURL() { return request.getURL(); } } [/CODE] Gatos wrote: I'm using wicket 1.3.5 and RequestDecorator could not be found. On Mon, Jul 27, 2009 at 1:05 PM, Alex Objelean alex_objel...@yahoo.comwrote: There is another thread where I have posted a link with implementation (which is currently in production)... so, you can just reuse it: http://www.nabble.com/Is-IRequestTargetUrlCodingStrategy-needed-for-mapping-bookmarkable--URLs--td24407411.html#a24409330 Alex Objelean Gatos wrote: Hello, How is it possible to use such urls in wicket? If users clicks that link then appropriate page with defined locale will be shown. www.domain.com/uk/home www.domain.com/nl/home Thank you -- View this message in context: http://www.nabble.com/urls-with-localization-tp24676709p24677616.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
AW: Send file to client via Ajax
How do i get the url for the ILinkListener? There is no corresponding urlFor() method. Mit freundlichen Grüßen Christian Giambalvo -- Fachinformatiker für Anwendungsentwicklung EXCELSIS Informationssysteme GmbH Wilhelmsplatz 8 - 70182 Stuttgart Mobile +49 176 196 32 406 Office +49 711 6 20 30 406 christian.giamba...@excelsisnet.com www.excelsisnet.com Sitz Stuttgart Amtsgericht Stuttgart, HRB 21104 Geschäftsführer: Christian Sauter, Dr. Nils Herda, Frank Wolf -Ursprüngliche Nachricht- Von: Ernesto Reinaldo Barreiro [mailto:reier...@gmail.com] Gesendet: Montag, 5. Oktober 2009 16:22 An: users@wicket.apache.org Betreff: Re: Send file to client via Ajax Maybe you could repaint via AJAX and then use target.appendJavascript(window.location.href=´URL´); Where the URL is the URL of an ILinkListener generating you file... There was someone asking something similar not long ago. Best, Ernesto On Mon, Oct 5, 2009 at 4:10 PM, Giambalvo, Christian christian.giamba...@excelsisnet.com wrote: It's more general question. Maybe i need to repaint some parts and send a file. Mit freundlichen Grüßen Christian Giambalvo -- Fachinformatiker für Anwendungsentwicklung EXCELSIS Informationssysteme GmbH Wilhelmsplatz 8 - 70182 Stuttgart Mobile +49 176 196 32 406 Office +49 711 6 20 30 406 christian.giamba...@excelsisnet.com www.excelsisnet.com Sitz Stuttgart Amtsgericht Stuttgart, HRB 21104 Geschäftsführer: Christian Sauter, Dr. Nils Herda, Frank Wolf -Ursprüngliche Nachricht- Von: Martin Grigorov [mailto:mcgreg...@e-card.bg] Gesendet: Montag, 5. Oktober 2009 15:56 An: users@wicket.apache.org Betreff: Re: Send file to client via Ajax why do you want to use AjaxFallbackButton ? you will not re-paint part of the page use ResourceLink to download the file El lun, 05-10-2009 a las 15:36 +0200, Giambalvo, Christian escribió: Hi all, simple question :) how to send a dynamicly generated file (as byte array) through an ajaxfallbackbutton tot he client? Mit freundlichen Grüßen Christian Giambalvo -- Fachinformatiker für Anwendungsentwicklung EXCELSIS Informationssysteme GmbH Wilhelmsplatz 8 - 70182 Stuttgart Mobile +49 176 196 32 406 Office +49 711 6 20 30 406 christian.giamba...@excelsisnet.com www.excelsisnet.com Sitz Stuttgart Amtsgericht Stuttgart, HRB 21104 Geschäftsführer: Christian Sauter, Dr. Nils Herda, Frank Wolf - 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: How to list files by name in Eclipe's Package Explorer?
Would it work for you to just use the Navigator view instead of Package Explorer? On Mon, Oct 5, 2009 at 11:01 AM, David Chang david_q_zh...@yahoo.comwrote: Pedro, thanks for the tip! Cheers! --- On Mon, 10/5/09, Pedro Sena sena.pe...@gmail.com wrote: From: Pedro Sena sena.pe...@gmail.com Subject: Re: How to list files by name in Eclipe's Package Explorer? To: David Chang david_q_zh...@yahoo.com Date: Monday, October 5, 2009, 10:52 AM Hmmm. I understood what you are looking for. I believe that eclipse does not provide what you want. I always use Ctrl+Shift+R, that opens a window where I can type part of the file name and show all the matching files. It is not exactly what you want, but I believe that is the best that can be done. Having this shortcut, personally I don't see reasons to use Package Explorer to search for files(I believe that is what you want) Regards On Mon, Oct 5, 2009 at 11:45 AM, David Chang david_q_zh...@yahoo.com wrote: confused by your post. --- On Mon, 10/5/09, Pedro Sena sena.pe...@gmail.com wrote: From: Pedro Sena sena.pe...@gmail.com Subject: Re: How to list files by name in Eclipe's Package Explorer? To: users@wicket.apache.org Date: Monday, October 5, 2009, 10:33 AM Package explorer? At least here, Ctrl+Shift+R using wildcard (*) have replaced the Package Explorer Tab =) Regards, On Mon, Oct 5, 2009 at 11:26 AM, T Ames tamesw...@gmail.com wrote: Your question should be Is it possible to? I have not found a way. I have gotten used to it. On Mon, Oct 5, 2009 at 8:48 AM, David Chang david_q_zh...@yahoo.com wrote: Does anybody know the trick for this task? Thanks! --- On Sun, 10/4/09, David Chang david_q_zh...@yahoo.com wrote: From: David Chang david_q_zh...@yahoo.com Subject: How to list files by name in Eclipe's Package Explorer? To: users@wicket.apache.org Date: Sunday, October 4, 2009, 4:44 PM Hello, I am using Eclipse for devleopment. The files in its Package Explorer are listed by extensions: java files first. This is good for non-wicket development. Now each page's java and markup files are in the same directory and I hope to see them naturally stay together, which means making Package Explorer to list files by name. How to do this? Thank you! - 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 -- /** * Pedro Sena * Systems Architect * Sun Certified Java Programmer * Sun Certified Web Component Developer */ -- /** * Pedro Sena * Systems Architect * Sun Certified Java Programmer * Sun Certified Web Component Developer */ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to list files by name in Eclipe's Package Explorer?
Thanks for your input! It seems to does the trick. The only thing I don't like is that it shows all the levels of directories, which is unnecessary and makes the Navigator view quite wide. --- On Mon, 10/5/09, Ramakrishnan Srinivasan devfac...@gmail.com wrote: From: Ramakrishnan Srinivasan devfac...@gmail.com Subject: Re: How to list files by name in Eclipe's Package Explorer? To: users@wicket.apache.org Date: Monday, October 5, 2009, 12:06 PM Would it work for you to just use the Navigator view instead of Package Explorer? On Mon, Oct 5, 2009 at 11:01 AM, David Chang david_q_zh...@yahoo.comwrote: Pedro, thanks for the tip! Cheers! --- On Mon, 10/5/09, Pedro Sena sena.pe...@gmail.com wrote: From: Pedro Sena sena.pe...@gmail.com Subject: Re: How to list files by name in Eclipe's Package Explorer? To: David Chang david_q_zh...@yahoo.com Date: Monday, October 5, 2009, 10:52 AM Hmmm. I understood what you are looking for. I believe that eclipse does not provide what you want. I always use Ctrl+Shift+R, that opens a window where I can type part of the file name and show all the matching files. It is not exactly what you want, but I believe that is the best that can be done. Having this shortcut, personally I don't see reasons to use Package Explorer to search for files(I believe that is what you want) Regards On Mon, Oct 5, 2009 at 11:45 AM, David Chang david_q_zh...@yahoo.com wrote: confused by your post. --- On Mon, 10/5/09, Pedro Sena sena.pe...@gmail.com wrote: From: Pedro Sena sena.pe...@gmail.com Subject: Re: How to list files by name in Eclipe's Package Explorer? To: users@wicket.apache.org Date: Monday, October 5, 2009, 10:33 AM Package explorer? At least here, Ctrl+Shift+R using wildcard (*) have replaced the Package Explorer Tab =) Regards, On Mon, Oct 5, 2009 at 11:26 AM, T Ames tamesw...@gmail.com wrote: Your question should be Is it possible to? I have not found a way. I have gotten used to it. On Mon, Oct 5, 2009 at 8:48 AM, David Chang david_q_zh...@yahoo.com wrote: Does anybody know the trick for this task? Thanks! --- On Sun, 10/4/09, David Chang david_q_zh...@yahoo.com wrote: From: David Chang david_q_zh...@yahoo.com Subject: How to list files by name in Eclipe's Package Explorer? To: users@wicket.apache.org Date: Sunday, October 4, 2009, 4:44 PM Hello, I am using Eclipse for devleopment. The files in its Package Explorer are listed by extensions: java files first. This is good for non-wicket development. Now each page's java and markup files are in the same directory and I hope to see them naturally stay together, which means making Package Explorer to list files by name. How to do this? Thank you! - 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 -- /** * Pedro Sena * Systems Architect * Sun Certified Java Programmer * Sun Certified Web Component Developer */ -- /** * Pedro Sena * Systems Architect * Sun Certified Java Programmer * Sun Certified Web Component Developer */ - 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: urls with localization
It is indeed a simple decorator of the Request object... nothing special.. Alex Objelean Vytautas C(ivilis wrote: Question regarding your code in wiki page: RequestDecorator, this seems to be class in your package? Could it be posted too? Regards, Vytautas Alex Objelean wrote: I've created a draft version of the page in wiki: http://cwiki.apache.org/confluence/display/WICKET/Wicket+and+localized+URLs http://cwiki.apache.org/confluence/display/WICKET/Wicket+and+localized+URLs Now it will not expire ;). Alex Objelean Vytautas C(ivilis wrote: Hi, Alex. Could you repost LocaleUrlCodingStrategyDecorator to pastebin, as it has been expired? Thanks! Vytautas Alex Objelean wrote: RequestDecorator is nothing but a decorator implementation of Request class... [CODE] public class RequestDecorator extends Request { /** * Decorated request. */ private final Request request; /** * Constructor. * * @param request to decorate. */ public RequestDecorator(final Request request) { if (request == null) { throw new IllegalArgumentException(Decorated Request cannot be NULL!); } this.request = request; } /** * {...@inheritdoc} */ @Override public Locale getLocale() { return request.getLocale(); } /** * {...@inheritdoc} */ @Override public String getParameter(final String key) { return request.getParameter(key); } /** * {...@inheritdoc} */ @Override public MapString, String[] getParameterMap() { return request.getParameterMap(); } /** * {...@inheritdoc} */ @Override public String[] getParameters(final String key) { return request.getParameters(key); } /** * {...@inheritdoc} */ @Override public String getPath() { return request.getPath(); } /** * {...@inheritdoc} */ @Override public String getQueryString() { return request.getQueryString(); } /** * {...@inheritdoc} */ @Override public String getRelativePathPrefixToContextRoot() { return request.getRelativePathPrefixToContextRoot(); } /** * {...@inheritdoc} */ @Override public String getRelativePathPrefixToWicketHandler() { return request.getRelativePathPrefixToWicketHandler(); } /** * {...@inheritdoc} */ @Override public String getURL() { return request.getURL(); } } [/CODE] Gatos wrote: I'm using wicket 1.3.5 and RequestDecorator could not be found. On Mon, Jul 27, 2009 at 1:05 PM, Alex Objelean alex_objel...@yahoo.comwrote: There is another thread where I have posted a link with implementation (which is currently in production)... so, you can just reuse it: http://www.nabble.com/Is-IRequestTargetUrlCodingStrategy-needed-for-mapping-bookmarkable--URLs--td24407411.html#a24409330 Alex Objelean Gatos wrote: Hello, How is it possible to use such urls in wicket? If users clicks that link then appropriate page with defined locale will be shown. www.domain.com/uk/home www.domain.com/nl/home Thank you -- View this message in context: http://www.nabble.com/urls-with-localization-tp24676709p24677616.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 -- View this message in context: http://www.nabble.com/urls-with-localization-tp24676709p25754194.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 forum api
Cant remember if one ever got kicked off, otherwise I've intregrate with jforum in the past.. 2009/10/5 Eman Nollase eman.noll...@gmail.com Hello, Is there a wicket base forum API? thanks a lot. cheers.
Re: wicket forum api
I don't think one was ever created. There is Brix [1], a CMS, which could be used. [1] - http://code.google.com/p/brix-cms/ -- Jeremy Thomerson http://www.wickettraining.com On Mon, Oct 5, 2009 at 12:56 PM, nino martinez wael nino.martinez.w...@gmail.com wrote: Cant remember if one ever got kicked off, otherwise I've intregrate with jforum in the past.. 2009/10/5 Eman Nollase eman.noll...@gmail.com Hello, Is there a wicket base forum API? thanks a lot. cheers.
Re: Send file to client via Ajax
Hi, I was trying to build and Example at work but I had to live... I'll try to get it working tomorrow and post it here. Essentially I was trying something similar to this. http://cwiki.apache.org/WICKET/displaying-content-eg-pdf-excel-word-in-an-iframe.html I was trying to have a component in a page that implements IResourceListener and then on the onclick on AJX link have something like if(target != null) { target.addComponent(theComponentYouWantToRepaint); String url = urlFor(ComponentImplementingIResourceListener); target.appendJavaScript(window.location.href=+url); } so, that once component is repaint you get a request back to you page asking for the resource. This is somehow similar to the example above.. Best, Ernesto On Mon, Oct 5, 2009 at 6:08 PM, Giambalvo, Christian christian.giamba...@excelsisnet.com wrote: How do i get the url for the ILinkListener? There is no corresponding urlFor() method. Mit freundlichen Grüßen Christian Giambalvo -- Fachinformatiker für Anwendungsentwicklung EXCELSIS Informationssysteme GmbH Wilhelmsplatz 8 - 70182 Stuttgart Mobile +49 176 196 32 406 Office +49 711 6 20 30 406 christian.giamba...@excelsisnet.com www.excelsisnet.com Sitz Stuttgart Amtsgericht Stuttgart, HRB 21104 Geschäftsführer: Christian Sauter, Dr. Nils Herda, Frank Wolf -Ursprüngliche Nachricht- Von: Ernesto Reinaldo Barreiro [mailto:reier...@gmail.com] Gesendet: Montag, 5. Oktober 2009 16:22 An: users@wicket.apache.org Betreff: Re: Send file to client via Ajax Maybe you could repaint via AJAX and then use target.appendJavascript(window.location.href=´URL´); Where the URL is the URL of an ILinkListener generating you file... There was someone asking something similar not long ago. Best, Ernesto On Mon, Oct 5, 2009 at 4:10 PM, Giambalvo, Christian christian.giamba...@excelsisnet.com wrote: It's more general question. Maybe i need to repaint some parts and send a file. Mit freundlichen Grüßen Christian Giambalvo -- Fachinformatiker für Anwendungsentwicklung EXCELSIS Informationssysteme GmbH Wilhelmsplatz 8 - 70182 Stuttgart Mobile +49 176 196 32 406 Office +49 711 6 20 30 406 christian.giamba...@excelsisnet.com www.excelsisnet.com Sitz Stuttgart Amtsgericht Stuttgart, HRB 21104 Geschäftsführer: Christian Sauter, Dr. Nils Herda, Frank Wolf -Ursprüngliche Nachricht- Von: Martin Grigorov [mailto:mcgreg...@e-card.bg] Gesendet: Montag, 5. Oktober 2009 15:56 An: users@wicket.apache.org Betreff: Re: Send file to client via Ajax why do you want to use AjaxFallbackButton ? you will not re-paint part of the page use ResourceLink to download the file El lun, 05-10-2009 a las 15:36 +0200, Giambalvo, Christian escribió: Hi all, simple question :) how to send a dynamicly generated file (as byte array) through an ajaxfallbackbutton tot he client? Mit freundlichen Grüßen Christian Giambalvo -- Fachinformatiker für Anwendungsentwicklung EXCELSIS Informationssysteme GmbH Wilhelmsplatz 8 - 70182 Stuttgart Mobile +49 176 196 32 406 Office +49 711 6 20 30 406 christian.giamba...@excelsisnet.com www.excelsisnet.com Sitz Stuttgart Amtsgericht Stuttgart, HRB 21104 Geschäftsführer: Christian Sauter, Dr. Nils Herda, Frank Wolf - 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: table columns ajax update
I just commit the new version: - Refactoring the OrderingImage class - Using TableColumns and default renders per class to resolve the cell component creation - Remove the static cell model version - Css separation for selectableListView, since this class can to be used for direferent purposes than Table - Development of columns components that use ajax timing behavior On the table-example you can notes the line: table.getColumnModel().addColumn(new SelfUpdateColumn(1, Duration.seconds(5))); Hope it is what you looking for, best regards On Mon, Oct 5, 2009 at 3:19 AM, vineet semwal vineetsemwal1...@gmail.comwrote: Pedro, eagerly waiting for next version ;) thank you , -- regards, Vineet Semwal On Mon, Oct 5, 2009 at 4:25 AM, Pedro Santos pedros...@gmail.com wrote: Hi Semwal, it has capability to update some columns. I update HomePage on table-example to show how it can be done now. But it makes no sense, since the model on non editable cells table are static, so the values on table model will not be queried every ajax update. In next version, all table cells will have dynamic models. On Sun, Oct 4, 2009 at 3:04 AM, vineet semwal vineetsemwal1...@gmail.com wrote: Pedro, does it have or will it have capability to update some columns in a table with ajax timer ? table still is good but good to hear that you are doing major improvement in design ;) thank you ! -- regards, Vineet Semwal On Sun, Oct 4, 2009 at 3:57 AM, Pedro Santos pedros...@gmail.com wrote: Hi Semwal, I'm currently working on Table class design to turn simple this kind of extension. On Sat, Oct 3, 2009 at 10:38 AM, vineet semwal vineetsemwal1...@gmail.comwrote: can i update some columns in wicket-stuff table with ajax timer ? i have seen wicket-stuff table example but can't understand how to do it .. -- regards, Vineet Semwal -- Pedro Henrique Oliveira dos Santos -- Pedro Henrique Oliveira dos Santos -- Pedro Henrique Oliveira dos Santos
Generics and SortableDataProvider
Hi, Working on my first application using 1.4.x and generics and have a question regarding the use of SortableDataProvider. Within my extensions of this class I quite commonly obtain the id of an object within the iterator method and then load the object via a LoadableDetchableModel within the model method. My question is how to implement such an approach using the new generic classes. For example, the generic model method has the signature public IModelT model(T object) but using the id based approach I would pass in a Long and return a model containing my domain model. The signature assumes the method parameter and model returned operate on the same type. Anyone tell me what I'm missing or if my approach is flawed? Thanks, Jonny This email message and any attached files are for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution of this email message is prohibited. If you are not the intended recipient, please inform the sender by reply email and destroy all copies of the original message and your reply. If you are the intended recipient, please be advised that the content of this message is subject to access, review and disclosure by the sender's Email System Administrator.
Re: wicket forum api
Nino, Have you published an example integration with JForum? cheers On Mon, Oct 5, 2009 at 2:56 PM, nino martinez wael nino.martinez.w...@gmail.com wrote: Cant remember if one ever got kicked off, otherwise I've intregrate with jforum in the past.. 2009/10/5 Eman Nollase eman.noll...@gmail.com Hello, Is there a wicket base forum API? thanks a lot. cheers. -- Fernando Wermus. www.linkedin.com/in/fernandowermus
Re: wicket forum api
No not really, just modified some code(to be used in wicket) to push a session cookie towards jforum for singlesignon.. If needed I could digg it up.. 2009/10/5 Fernando Wermus fernando.wer...@gmail.com Nino, Have you published an example integration with JForum? cheers On Mon, Oct 5, 2009 at 2:56 PM, nino martinez wael nino.martinez.w...@gmail.com wrote: Cant remember if one ever got kicked off, otherwise I've intregrate with jforum in the past.. 2009/10/5 Eman Nollase eman.noll...@gmail.com Hello, Is there a wicket base forum API? thanks a lot. cheers. -- Fernando Wermus. www.linkedin.com/in/fernandowermus
Re: Generics and SortableDataProvider
Hi John, I believe the consensus on this list is that you should change your approach: Why don't you just iterate over your domain objects in the first place? They will be loaded anyway to be displayed on your component. So your approach triggers 1+n selects instead of 1 select for all required objects at once. Sven jonny.w...@fiveprime.com wrote: Hi, Working on my first application using 1.4.x and generics and have a question regarding the use of SortableDataProvider. Within my extensions of this class I quite commonly obtain the id of an object within the iterator method and then load the object via a LoadableDetchableModel within the model method. My question is how to implement such an approach using the new generic classes. For example, the generic model method has the signature public IModelT model(T object) but using the id based approach I would pass in a Long and return a model containing my domain model. The signature assumes the method parameter and model returned operate on the same type. Anyone tell me what I'm missing or if my approach is flawed? Thanks, Jonny This email message and any attached files are for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution of this email message is prohibited. If you are not the intended recipient, please inform the sender by reply email and destroy all copies of the original message and your reply. If you are the intended recipient, please be advised that the content of this message is subject to access, review and disclosure by the sender's Email System Administrator - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket + Hibernate without Spring for lazy loading
Guice / warp persist and dynamic finders + wicket are a killer combo:) 2009/10/5 James Perry james.austin.pe...@gmail.com Well you can use your business logic objects inside Wicket but you have to ensure that you you hold one, and only one, instance for each business object (assuming these objects are stateless) and that you do not accidentally serialize these objects and their dependencies within your Wicket pages. If you don't want to use Spring, have a look at Google Guice - which is a very simple, elegant yet powerful DI framework. Wicket provides support for Guice so you don't have to worry about accidental serialization. Once you have got to grips with Wicket and Guice then you can get really creative to enable Guice to inject Wicket components in your Wicket application. Cheers, James. On Mon, Oct 5, 2009 at 3:49 PM, Jeffrey Schneller jeffrey.schnel...@envisa.com wrote: I looked into the wicket London presentation/code and databinder.net and it all makes sense but it looks like then my wicket forms/components are tied directly to the database. When I submit a form then the data is persisted but I don't want this. I want to be able to call the data layer to retrieve data or to persist data and not care that a form is tied to it or not. I also need to be able to get data to populate lists or tables on a page. I currently have my project set up like: Data objects - POJOs to hold data that comes from or will be persisted to the db Data Access Objects - objects to get and persistent data using hibernate using the data objects Business Logic - helper classes to access the data access objects if additional logic needs to be performed before persisting to the db. Wicket Pages - all my wicket pages. The pages call the data access objects to retrieve data to display on pages and forms. The pages also handle the form submits and call the Data Access Objects to persistent to the db. In some cases I call the Business Logic layer to do the persistence. In the end I have data layer which I can re-use. The business logic layer which I can change as needed. Then the wicket pages which once they work I shouldn't need to touch if the logic changes or the data layer changes. This is what I think of as a true 3-tier architecture. I also am not using maven. I have eclipse running and added the jars to the project myself. If I need to use maven then I will but it seems like adding more stuff to something that should be very simple. Should I be doing something different in terms of my architecture to implement wicket? Everything is running fine for me except the lazy loading of data from hibernate. Not sure how my session size is going to look doing it this way either. Would prefer to have the smallest session size possible but this is a small app with little traffic for now so not that big of a deal. I am a wicket newbie and want to get this right as this is the first wicket project which will lead to a much larger higher traffic project that is currently planned to be developed using wicket. Thanks. -Original Message- From: Adrian Merrall [mailto:pigeonra...@gmail.com] Sent: Monday, October 05, 2009 6:17 AM To: users@wicket.apache.org Subject: Re: Wicket + Hibernate without Spring for lazy loading Google for a wicket london weekend presentation and follow up blog on loading jpa entity managers on demand. There have also been various posts relating to using the open session in view Hibernate filter. The JPA blog entry uses the requestcycle to prepare a thread local. The first call to use it creates the entity manager and keeps it in the thread local. The request cycle end request and exception methods handle the cleanup and close. Very brief description but if you google for the topics above it is all very well explained. HTH Adrian On Mon, Oct 5, 2009 at 6:22 PM, Petr Fejfar petr.fej...@gmail.com wrote: On Mon, Oct 5, 2009 at 5:12 AM, Jeffrey Schneller jeffrey.schnel...@envisa.com wrote: I really don't want to bloat my code to implement Spring but if it is the only way to do it then I will. When I've started learning of Wicket few month ago, my position was the similiar: I'd like to avoid stuff like Maven, Spring etc... I found out Databinder as well and tried it. But I was not able to make it running with Hibernate, just with HSQLDB. So we've decided to continue with Spring, Maven... We've increased our overhead little bit, but once we define beans, we do not care about them any more. There was only one pitfall: manually invoking injection of non-visual components. After few month I must say that Spring seems to be the least problematic part of our projects. Petr - To unsubscribe,
how to map 2 html files to 1 class?
Hi. Spent hours now trying to figure out how to map 2 html files to 1 class. If someone knows the answer - please help. I need to map 10 similar html pages to same class (for same behavior). Doing this: webApplication.mountBookmarkablePage(/page1.html, pageClass); Gets wicket to associate set url with the class. But then when the ResourceStreamLocator is called, it's given A reference to class and a reference to the path. Where class is set correctly (pageClass). But the PATH is set wrong. It is what Wicket THINKS it should try PageClass_en.html. (class name + locale + default extension) While *I* would like to load my own class. I was thinking about completely rewriting ResourceStreamLocator to know my own paths, BUT it's not aware of what real page is being loaded (as the path is set to PageClass_en.html). I could also break down and load my own stuff in beforeRender, but I was hoping there's a better way to handle this. Lastly, I could overwrite onRender() in my PageClass... Any advice would be much appreciated. - Alex. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: how to map 2 html files to 1 class?
Hi! I did not exactly understand what you are after, but you can always do like this: CommonPage.html: blabla ... CommonPage.java: public class CommonPage extends WebPage { public CommonPage() { if (A-mode) { new PageVersionAContantHandler(this); } else { new PageVersionAContantHandler(this); } } } Maybe you wanted something different? ** Martin 2009/10/6 Alex Rass a...@itbsllc.com: Hi. Spent hours now trying to figure out how to map 2 html files to 1 class. If someone knows the answer - please help. I need to map 10 similar html pages to same class (for same behavior). Doing this: webApplication.mountBookmarkablePage(/page1.html, pageClass); Gets wicket to associate set url with the class. But then when the ResourceStreamLocator is called, it's given A reference to class and a reference to the path. Where class is set correctly (pageClass). But the PATH is set wrong. It is what Wicket THINKS it should try PageClass_en.html. (class name + locale + default extension) While *I* would like to load my own class. I was thinking about completely rewriting ResourceStreamLocator to know my own paths, BUT it's not aware of what real page is being loaded (as the path is set to PageClass_en.html). I could also break down and load my own stuff in beforeRender, but I was hoping there's a better way to handle this. Lastly, I could overwrite onRender() in my PageClass... Any advice would be much appreciated. - Alex. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: how to map 2 html files to 1 class?
Meant to say if (A-mode) { new PageVersionAContantHandler(this); } else { new PageVersionBContantHandler(this); // B ofcourse } ** Martin 2009/10/6 Martin Makundi martin.maku...@koodaripalvelut.com: Hi! I did not exactly understand what you are after, but you can always do like this: CommonPage.html: blabla ... CommonPage.java: public class CommonPage extends WebPage { public CommonPage() { if (A-mode) { new PageVersionAContantHandler(this); } else { new PageVersionAContantHandler(this); } } } Maybe you wanted something different? ** Martin 2009/10/6 Alex Rass a...@itbsllc.com: Hi. Spent hours now trying to figure out how to map 2 html files to 1 class. If someone knows the answer - please help. I need to map 10 similar html pages to same class (for same behavior). Doing this: webApplication.mountBookmarkablePage(/page1.html, pageClass); Gets wicket to associate set url with the class. But then when the ResourceStreamLocator is called, it's given A reference to class and a reference to the path. Where class is set correctly (pageClass). But the PATH is set wrong. It is what Wicket THINKS it should try PageClass_en.html. (class name + locale + default extension) While *I* would like to load my own class. I was thinking about completely rewriting ResourceStreamLocator to know my own paths, BUT it's not aware of what real page is being loaded (as the path is set to PageClass_en.html). I could also break down and load my own stuff in beforeRender, but I was hoping there's a better way to handle this. Lastly, I could overwrite onRender() in my PageClass... Any advice would be much appreciated. - Alex. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: how to map 2 html files to 1 class?
It's too late :) Apparently you wanted just the opposite. Well.. you could have: PageA.html: PageB.html: PageC.html: Page?.java: public class CommonPage extends WebPage { public CommonPage() { new PageContantHandler(this); } } ** Martin 2009/10/6 Martin Makundi martin.maku...@koodaripalvelut.com: Hi! I did not exactly understand what you are after, but you can always do like this: CommonPage.html: blabla ... CommonPage.java: public class CommonPage extends WebPage { public CommonPage() { if (A-mode) { new PageVersionAContantHandler(this); } else { new PageVersionAContantHandler(this); } } } Maybe you wanted something different? ** Martin 2009/10/6 Alex Rass a...@itbsllc.com: Hi. Spent hours now trying to figure out how to map 2 html files to 1 class. If someone knows the answer - please help. I need to map 10 similar html pages to same class (for same behavior). Doing this: webApplication.mountBookmarkablePage(/page1.html, pageClass); Gets wicket to associate set url with the class. But then when the ResourceStreamLocator is called, it's given A reference to class and a reference to the path. Where class is set correctly (pageClass). But the PATH is set wrong. It is what Wicket THINKS it should try PageClass_en.html. (class name + locale + default extension) While *I* would like to load my own class. I was thinking about completely rewriting ResourceStreamLocator to know my own paths, BUT it's not aware of what real page is being loaded (as the path is set to PageClass_en.html). I could also break down and load my own stuff in beforeRender, but I was hoping there's a better way to handle this. Lastly, I could overwrite onRender() in my PageClass... Any advice would be much appreciated. - Alex. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: how to map 2 html files to 1 class?
And ofcourse you could have polymorphism. AbstractPageWithDesiredCommonFunctionality.java with all your common logic, Page1Design extends AbstractPageWithDesiredCommonFunctionality Page2Design extends AbstractPageWithDesiredCommonFunctionality : : : Page-n-Design extends AbstractPageWithDesiredCommonFunctionality And also the html would be Page1Design.html Page2Design.html : : : Page-n-Design.html ** Martin 2009/10/6 Martin Makundi martin.maku...@koodaripalvelut.com: It's too late :) Apparently you wanted just the opposite. Well.. you could have: PageA.html: PageB.html: PageC.html: Page?.java: public class CommonPage extends WebPage { public CommonPage() { new PageContantHandler(this); } } ** Martin 2009/10/6 Martin Makundi martin.maku...@koodaripalvelut.com: Hi! I did not exactly understand what you are after, but you can always do like this: CommonPage.html: blabla ... CommonPage.java: public class CommonPage extends WebPage { public CommonPage() { if (A-mode) { new PageVersionAContantHandler(this); } else { new PageVersionAContantHandler(this); } } } Maybe you wanted something different? ** Martin 2009/10/6 Alex Rass a...@itbsllc.com: Hi. Spent hours now trying to figure out how to map 2 html files to 1 class. If someone knows the answer - please help. I need to map 10 similar html pages to same class (for same behavior). Doing this: webApplication.mountBookmarkablePage(/page1.html, pageClass); Gets wicket to associate set url with the class. But then when the ResourceStreamLocator is called, it's given A reference to class and a reference to the path. Where class is set correctly (pageClass). But the PATH is set wrong. It is what Wicket THINKS it should try PageClass_en.html. (class name + locale + default extension) While *I* would like to load my own class. I was thinking about completely rewriting ResourceStreamLocator to know my own paths, BUT it's not aware of what real page is being loaded (as the path is set to PageClass_en.html). I could also break down and load my own stuff in beforeRender, but I was hoping there's a better way to handle this. Lastly, I could overwrite onRender() in my PageClass... Any advice would be much appreciated. - Alex. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: how to map 2 html files to 1 class?
Yeah, that's what I had before. (Many fake classes that do nothing but extend default one). But I have multiple sites. With lots of pages. I don't want to have 200 classes that serve no purpose! (I already have 30 like that for my first couple sites :) was hoping to stop this silly practice) (hold the jokes about there aren't many classes that can claim to have a purpose :) ) This thing about PageContantHandler intrigues me as this is exactly what I need, but I don't understand how this would work. Unless this is your way of asking the question. If so, here's what I want: domain.com/PageA.html domain.com/PageB.html domain.com/PageC.html (all files are locally on my site, just to keep it clear.) PageHandler.java, that handles all 3. mountBookmarkablePage(/PageA.html, PageHandler.class); mountBookmarkablePage(/PageB.html, PageHandler.class); mountBookmarkablePage(/PageC.html, PageHandler.class); -Original Message- From: Martin Makundi [mailto:martin.maku...@koodaripalvelut.com] Sent: Monday, October 05, 2009 5:23 PM To: users@wicket.apache.org Subject: Re: how to map 2 html files to 1 class? And ofcourse you could have polymorphism. AbstractPageWithDesiredCommonFunctionality.java with all your common logic, Page1Design extends AbstractPageWithDesiredCommonFunctionality Page2Design extends AbstractPageWithDesiredCommonFunctionality : : : Page-n-Design extends AbstractPageWithDesiredCommonFunctionality And also the html would be Page1Design.html Page2Design.html : : : Page-n-Design.html ** Martin 2009/10/6 Martin Makundi martin.maku...@koodaripalvelut.com: It's too late :) Apparently you wanted just the opposite. Well.. you could have: PageA.html: PageB.html: PageC.html: Page?.java: public class CommonPage extends WebPage { public CommonPage() { new PageContantHandler(this); } } ** Martin 2009/10/6 Martin Makundi martin.maku...@koodaripalvelut.com: Hi! I did not exactly understand what you are after, but you can always do like this: CommonPage.html: blabla ... CommonPage.java: public class CommonPage extends WebPage { public CommonPage() { if (A-mode) { new PageVersionAContantHandler(this); } else { new PageVersionAContantHandler(this); } } } Maybe you wanted something different? ** Martin 2009/10/6 Alex Rass a...@itbsllc.com: Hi. Spent hours now trying to figure out how to map 2 html files to 1 class. If someone knows the answer - please help. I need to map 10 similar html pages to same class (for same behavior). Doing this: webApplication.mountBookmarkablePage(/page1.html, pageClass); Gets wicket to associate set url with the class. But then when the ResourceStreamLocator is called, it's given A reference to class and a reference to the path. Where class is set correctly (pageClass). But the PATH is set wrong. It is what Wicket THINKS it should try PageClass_en.html. (class name + locale + default extension) While *I* would like to load my own class. I was thinking about completely rewriting ResourceStreamLocator to know my own paths, BUT it's not aware of what real page is being loaded (as the path is set to PageClass_en.html). I could also break down and load my own stuff in beforeRender, but I was hoping there's a better way to handle this. Lastly, I could overwrite onRender() in my PageClass... Any advice would be much appreciated. - Alex. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: how to map 2 html files to 1 class?
Have you considered using variant or style? http://cwiki.apache.org/WICKET/localization-and-skinning-of-applications.html Scott On Mon, Oct 5, 2009 at 2:35 PM, Alex Rass a...@itbsllc.com wrote: Yeah, that's what I had before. (Many fake classes that do nothing but extend default one). But I have multiple sites. With lots of pages. I don't want to have 200 classes that serve no purpose! (I already have 30 like that for my first couple sites :) was hoping to stop this silly practice) (hold the jokes about there aren't many classes that can claim to have a purpose :) ) This thing about PageContantHandler intrigues me as this is exactly what I need, but I don't understand how this would work. Unless this is your way of asking the question. If so, here's what I want: domain.com/PageA.html domain.com/PageB.html domain.com/PageC.html (all files are locally on my site, just to keep it clear.) PageHandler.java, that handles all 3. mountBookmarkablePage(/PageA.html, PageHandler.class); mountBookmarkablePage(/PageB.html, PageHandler.class); mountBookmarkablePage(/PageC.html, PageHandler.class); -Original Message- From: Martin Makundi [mailto:martin.maku...@koodaripalvelut.com] Sent: Monday, October 05, 2009 5:23 PM To: users@wicket.apache.org Subject: Re: how to map 2 html files to 1 class? And ofcourse you could have polymorphism. AbstractPageWithDesiredCommonFunctionality.java with all your common logic, Page1Design extends AbstractPageWithDesiredCommonFunctionality Page2Design extends AbstractPageWithDesiredCommonFunctionality : : : Page-n-Design extends AbstractPageWithDesiredCommonFunctionality And also the html would be Page1Design.html Page2Design.html : : : Page-n-Design.html ** Martin 2009/10/6 Martin Makundi martin.maku...@koodaripalvelut.com: It's too late :) Apparently you wanted just the opposite. Well.. you could have: PageA.html: PageB.html: PageC.html: Page?.java: public class CommonPage extends WebPage { public CommonPage() { new PageContantHandler(this); } } ** Martin 2009/10/6 Martin Makundi martin.maku...@koodaripalvelut.com: Hi! I did not exactly understand what you are after, but you can always do like this: CommonPage.html: blabla ... CommonPage.java: public class CommonPage extends WebPage { public CommonPage() { if (A-mode) { new PageVersionAContantHandler(this); } else { new PageVersionAContantHandler(this); } } } Maybe you wanted something different? ** Martin 2009/10/6 Alex Rass a...@itbsllc.com: Hi. Spent hours now trying to figure out how to map 2 html files to 1 class. If someone knows the answer - please help. I need to map 10 similar html pages to same class (for same behavior). Doing this: webApplication.mountBookmarkablePage(/page1.html, pageClass); Gets wicket to associate set url with the class. But then when the ResourceStreamLocator is called, it's given A reference to class and a reference to the path. Where class is set correctly (pageClass). But the PATH is set wrong. It is what Wicket THINKS it should try PageClass_en.html. (class name + locale + default extension) While *I* would like to load my own class. I was thinking about completely rewriting ResourceStreamLocator to know my own paths, BUT it's not aware of what real page is being loaded (as the path is set to PageClass_en.html). I could also break down and load my own stuff in beforeRender, but I was hoping there's a better way to handle this. Lastly, I could overwrite onRender() in my PageClass... Any advice would be much appreciated. - Alex. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - 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: how to map 2 html files to 1 class?
I don't see how this applies. Please note that ResourceStreamLocator does not see the original url's path. And Page uses a cacheKey which is solely based on the class name. Maybe you can elaborate, but all 3 html files are TOTALLY UNRELATED PAGES. It's not the same page 3 times for diff skins. All 3 need to be available at the same time. (Should have made it clear earlier). -Original Message- From: Scott Swank [mailto:scott.sw...@gmail.com] Sent: Monday, October 05, 2009 5:38 PM To: users@wicket.apache.org Subject: Re: how to map 2 html files to 1 class? Have you considered using variant or style? http://cwiki.apache.org/WICKET/localization-and-skinning-of-applications.htm l Scott On Mon, Oct 5, 2009 at 2:35 PM, Alex Rass a...@itbsllc.com wrote: Yeah, that's what I had before. (Many fake classes that do nothing but extend default one). But I have multiple sites. With lots of pages. I don't want to have 200 classes that serve no purpose! (I already have 30 like that for my first couple sites :) was hoping to stop this silly practice) (hold the jokes about there aren't many classes that can claim to have a purpose :) ) This thing about PageContantHandler intrigues me as this is exactly what I need, but I don't understand how this would work. Unless this is your way of asking the question. If so, here's what I want: domain.com/PageA.html domain.com/PageB.html domain.com/PageC.html (all files are locally on my site, just to keep it clear.) PageHandler.java, that handles all 3. mountBookmarkablePage(/PageA.html, PageHandler.class); mountBookmarkablePage(/PageB.html, PageHandler.class); mountBookmarkablePage(/PageC.html, PageHandler.class); -Original Message- From: Martin Makundi [mailto:martin.maku...@koodaripalvelut.com] Sent: Monday, October 05, 2009 5:23 PM To: users@wicket.apache.org Subject: Re: how to map 2 html files to 1 class? And ofcourse you could have polymorphism. AbstractPageWithDesiredCommonFunctionality.java with all your common logic, Page1Design extends AbstractPageWithDesiredCommonFunctionality Page2Design extends AbstractPageWithDesiredCommonFunctionality : : : Page-n-Design extends AbstractPageWithDesiredCommonFunctionality And also the html would be Page1Design.html Page2Design.html : : : Page-n-Design.html ** Martin 2009/10/6 Martin Makundi martin.maku...@koodaripalvelut.com: It's too late :) Apparently you wanted just the opposite. Well.. you could have: PageA.html: PageB.html: PageC.html: Page?.java: public class CommonPage extends WebPage { public CommonPage() { new PageContantHandler(this); } } ** Martin 2009/10/6 Martin Makundi martin.maku...@koodaripalvelut.com: Hi! I did not exactly understand what you are after, but you can always do like this: CommonPage.html: blabla ... CommonPage.java: public class CommonPage extends WebPage { public CommonPage() { if (A-mode) { new PageVersionAContantHandler(this); } else { new PageVersionAContantHandler(this); } } } Maybe you wanted something different? ** Martin 2009/10/6 Alex Rass a...@itbsllc.com: Hi. Spent hours now trying to figure out how to map 2 html files to 1 class. If someone knows the answer - please help. I need to map 10 similar html pages to same class (for same behavior). Doing this: webApplication.mountBookmarkablePage(/page1.html, pageClass); Gets wicket to associate set url with the class. But then when the ResourceStreamLocator is called, it's given A reference to class and a reference to the path. Where class is set correctly (pageClass). But the PATH is set wrong. It is what Wicket THINKS it should try PageClass_en.html. (class name + locale + default extension) While *I* would like to load my own class. I was thinking about completely rewriting ResourceStreamLocator to know my own paths, BUT it's not aware of what real page is being loaded (as the path is set to PageClass_en.html). I could also break down and load my own stuff in beforeRender, but I was hoping there's a better way to handle this. Lastly, I could overwrite onRender() in my PageClass... Any advice would be much appreciated. - Alex. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - 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
Re: how to map 2 html files to 1 class?
But if all three html files are associated with the same Java class, how does this differ from separate skins? Is the distinction semantic, or am I missing something? Scott On Mon, Oct 5, 2009 at 2:44 PM, Alex Rass a...@itbsllc.com wrote: I don't see how this applies. Please note that ResourceStreamLocator does not see the original url's path. And Page uses a cacheKey which is solely based on the class name. Maybe you can elaborate, but all 3 html files are TOTALLY UNRELATED PAGES. It's not the same page 3 times for diff skins. All 3 need to be available at the same time. (Should have made it clear earlier). -Original Message- From: Scott Swank [mailto:scott.sw...@gmail.com] Sent: Monday, October 05, 2009 5:38 PM To: users@wicket.apache.org Subject: Re: how to map 2 html files to 1 class? Have you considered using variant or style? http://cwiki.apache.org/WICKET/localization-and-skinning-of-applications.htm l Scott On Mon, Oct 5, 2009 at 2:35 PM, Alex Rass a...@itbsllc.com wrote: Yeah, that's what I had before. (Many fake classes that do nothing but extend default one). But I have multiple sites. With lots of pages. I don't want to have 200 classes that serve no purpose! (I already have 30 like that for my first couple sites :) was hoping to stop this silly practice) (hold the jokes about there aren't many classes that can claim to have a purpose :) ) This thing about PageContantHandler intrigues me as this is exactly what I need, but I don't understand how this would work. Unless this is your way of asking the question. If so, here's what I want: domain.com/PageA.html domain.com/PageB.html domain.com/PageC.html (all files are locally on my site, just to keep it clear.) PageHandler.java, that handles all 3. mountBookmarkablePage(/PageA.html, PageHandler.class); mountBookmarkablePage(/PageB.html, PageHandler.class); mountBookmarkablePage(/PageC.html, PageHandler.class); -Original Message- From: Martin Makundi [mailto:martin.maku...@koodaripalvelut.com] Sent: Monday, October 05, 2009 5:23 PM To: users@wicket.apache.org Subject: Re: how to map 2 html files to 1 class? And ofcourse you could have polymorphism. AbstractPageWithDesiredCommonFunctionality.java with all your common logic, Page1Design extends AbstractPageWithDesiredCommonFunctionality Page2Design extends AbstractPageWithDesiredCommonFunctionality : : : Page-n-Design extends AbstractPageWithDesiredCommonFunctionality And also the html would be Page1Design.html Page2Design.html : : : Page-n-Design.html ** Martin 2009/10/6 Martin Makundi martin.maku...@koodaripalvelut.com: It's too late :) Apparently you wanted just the opposite. Well.. you could have: PageA.html: PageB.html: PageC.html: Page?.java: public class CommonPage extends WebPage { public CommonPage() { new PageContantHandler(this); } } ** Martin 2009/10/6 Martin Makundi martin.maku...@koodaripalvelut.com: Hi! I did not exactly understand what you are after, but you can always do like this: CommonPage.html: blabla ... CommonPage.java: public class CommonPage extends WebPage { public CommonPage() { if (A-mode) { new PageVersionAContantHandler(this); } else { new PageVersionAContantHandler(this); } } } Maybe you wanted something different? ** Martin 2009/10/6 Alex Rass a...@itbsllc.com: Hi. Spent hours now trying to figure out how to map 2 html files to 1 class. If someone knows the answer - please help. I need to map 10 similar html pages to same class (for same behavior). Doing this: webApplication.mountBookmarkablePage(/page1.html, pageClass); Gets wicket to associate set url with the class. But then when the ResourceStreamLocator is called, it's given A reference to class and a reference to the path. Where class is set correctly (pageClass). But the PATH is set wrong. It is what Wicket THINKS it should try PageClass_en.html. (class name + locale + default extension) While *I* would like to load my own class. I was thinking about completely rewriting ResourceStreamLocator to know my own paths, BUT it's not aware of what real page is being loaded (as the path is set to PageClass_en.html). I could also break down and load my own stuff in beforeRender, but I was hoping there's a better way to handle this. Lastly, I could overwrite onRender() in my PageClass... Any advice would be much appreciated. - Alex. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To
Re: how to map 2 html files to 1 class?
PageHandler.java, that handles all 3. mountBookmarkablePage(/PageA.html, PageHandler.class); mountBookmarkablePage(/PageB.html, PageHandler.class); mountBookmarkablePage(/PageC.html, PageHandler.class); This is a bit confusing, you ar giving different aliases to the same page. Is that what you want or you really want different html files also..`? ** Martin - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Wicket + Guice + Warp-persist + Hibernate
So I took the plunge and tried to implement Guice + Warp Persist to solve my lazy loading issues. I know I may not have it all figured out with regards to lazy loading but I can't even get simple data access to work now. Sorry for all the questions and issues. Can anyone provide some insight on what is wrong or what I am missing. The Hibernate configuration succeeds in the getModule() method. Thanks. Code is below: My Web Application public class WicketApplication extends WebApplication { private PersistenceService service; public WicketApplication() { } @Override public Class? extends Page getHomePage() { return Home.class; } @Override public Session newSession(Request request, Response response) { return new MySession(request); } @Override protected void init() { Injector injector = Guice.createInjector(PersistenceService.usingHibernate() .across(UnitOfWork.REQUEST).transactedWith( TransactionStrategy.LOCAL).buildModule(), getModule()); addComponentInstantiationListener(new GuiceComponentInjector(this, injector)); service = injector.getInstance(PersistenceService.class); service.start(); injector.injectMembers(this); } private Module getModule() { return new Module() { public void configure(Binder binder) { // default values from development String connectionUrl = the url; String username = the username; String password = the password; try { InitialContext context = new InitialContext(); connectionUrl = (String) context.lookup(java:comp/env/hibernate.connection.url); username = (String) context.lookup(java:comp/env/hibernate.connection.username); password = (String) context.lookup(java:comp/env/hibernate.connection.password); } catch (NamingException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } // annotation and xml final AnnotationConfiguration config = new AnnotationConfiguration().configure(); config.setProperty(hibernate.connection.url, connectionUrl); config.setProperty(hibernate.connection.username, username); config.setProperty(hibernate.connection.password, password); config.setProperty(hibernate.current_session_context_class, managed); binder.bind(Configuration.class).toInstance(config); } }; } } My web.xml web-app xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns=http://java.sun.com/xml/ns/javaee; xmlns:web=http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd; xsi:schemaLocation=http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd; id=WebApp_ID version=2.5 display-nameMyApp/display-name context-param param-nameconfiguration/param-name param-valuedevelopment/param-value /context-param !-- Warp Filter -- filter filter-namewarpSessionFilter/filter-name filter-classcom.wideplay.warp.hibernate.SessionPerRequestFilter/filte r-class /filter filter-mapping filter-namewarpSessionFilter/filter-name url-pattern/*/url-pattern /filter-mapping !-- Warp Filter -- filter filter-namewicket.filter/filter-name filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class init-param param-nameapplicationClassName/param-name param-valuecom.myapp.WicketApplication/param-value /init-param /filter filter-mapping filter-namewicket.filter/filter-name url-pattern/*/url-pattern /filter-mapping /web-app And my Hibernate Base Generic DAO: public abstract class HibernateGenericDao implements GenericDao {
RE: how to map 2 html files to 1 class?
PageA.html PageB.html PageC.html Think about it this way: PageA.html = Privacy Page PageB.html = SiteMap Page. I want to handle them both in same java class file cause hardly anything is going on there. -Original Message- From: Martin Makundi [mailto:martin.maku...@koodaripalvelut.com] Sent: Monday, October 05, 2009 6:08 PM To: users@wicket.apache.org Subject: Re: how to map 2 html files to 1 class? PageHandler.java, that handles all 3. mountBookmarkablePage(/PageA.html, PageHandler.class); mountBookmarkablePage(/PageB.html, PageHandler.class); mountBookmarkablePage(/PageC.html, PageHandler.class); This is a bit confusing, you ar giving different aliases to the same page. Is that what you want or you really want different html files also..`? ** 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: how to map 2 html files to 1 class?
What are you handling there ? ** Martin 2009/10/6 Alex Rass a...@itbsllc.com: PageA.html PageB.html PageC.html Think about it this way: PageA.html = Privacy Page PageB.html = SiteMap Page. I want to handle them both in same java class file cause hardly anything is going on there. -Original Message- From: Martin Makundi [mailto:martin.maku...@koodaripalvelut.com] Sent: Monday, October 05, 2009 6:08 PM To: users@wicket.apache.org Subject: Re: how to map 2 html files to 1 class? PageHandler.java, that handles all 3. mountBookmarkablePage(/PageA.html, PageHandler.class); mountBookmarkablePage(/PageB.html, PageHandler.class); mountBookmarkablePage(/PageC.html, PageHandler.class); This is a bit confusing, you ar giving different aliases to the same page. Is that what you want or you really want different html files also..`? ** 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: how to map 2 html files to 1 class?
Scott, Maybe I am not clear on how localization works, but what you are proposing would work only if I needed ONE of the html files to be available at one time/session to same user. What I want is: 3 html files. Called up via 3 distinct predefined urls. All handled by 1 class. As far as I can tell from reading a ton of code today: anything beyond the Page class has no idea as to what URL was called up by the user, just the class. And from that class, it finds variations of url name based on class's name. I have a many:one mapping. Many html files to one class. No way to find out from class - which URL was requested. Page class knows the url through the getRequest. No one further has any idea. Again, that's just what I read. Which is why I am here -Original Message- From: Scott Swank [mailto:scott.sw...@gmail.com] Sent: Monday, October 05, 2009 5:56 PM To: users@wicket.apache.org Subject: Re: how to map 2 html files to 1 class? But if all three html files are associated with the same Java class, how does this differ from separate skins? Is the distinction semantic, or am I missing something? Scott On Mon, Oct 5, 2009 at 2:44 PM, Alex Rass a...@itbsllc.com wrote: I don't see how this applies. Please note that ResourceStreamLocator does not see the original url's path. And Page uses a cacheKey which is solely based on the class name. Maybe you can elaborate, but all 3 html files are TOTALLY UNRELATED PAGES. It's not the same page 3 times for diff skins. All 3 need to be available at the same time. (Should have made it clear earlier). -Original Message- From: Scott Swank [mailto:scott.sw...@gmail.com] Sent: Monday, October 05, 2009 5:38 PM To: users@wicket.apache.org Subject: Re: how to map 2 html files to 1 class? Have you considered using variant or style? http://cwiki.apache.org/WICKET/localization-and-skinning-of-applications.htm l Scott On Mon, Oct 5, 2009 at 2:35 PM, Alex Rass a...@itbsllc.com wrote: Yeah, that's what I had before. (Many fake classes that do nothing but extend default one). But I have multiple sites. With lots of pages. I don't want to have 200 classes that serve no purpose! (I already have 30 like that for my first couple sites :) was hoping to stop this silly practice) (hold the jokes about there aren't many classes that can claim to have a purpose :) ) This thing about PageContantHandler intrigues me as this is exactly what I need, but I don't understand how this would work. Unless this is your way of asking the question. If so, here's what I want: domain.com/PageA.html domain.com/PageB.html domain.com/PageC.html (all files are locally on my site, just to keep it clear.) PageHandler.java, that handles all 3. mountBookmarkablePage(/PageA.html, PageHandler.class); mountBookmarkablePage(/PageB.html, PageHandler.class); mountBookmarkablePage(/PageC.html, PageHandler.class); -Original Message- From: Martin Makundi [mailto:martin.maku...@koodaripalvelut.com] Sent: Monday, October 05, 2009 5:23 PM To: users@wicket.apache.org Subject: Re: how to map 2 html files to 1 class? And ofcourse you could have polymorphism. AbstractPageWithDesiredCommonFunctionality.java with all your common logic, Page1Design extends AbstractPageWithDesiredCommonFunctionality Page2Design extends AbstractPageWithDesiredCommonFunctionality : : : Page-n-Design extends AbstractPageWithDesiredCommonFunctionality And also the html would be Page1Design.html Page2Design.html : : : Page-n-Design.html ** Martin 2009/10/6 Martin Makundi martin.maku...@koodaripalvelut.com: It's too late :) Apparently you wanted just the opposite. Well.. you could have: PageA.html: PageB.html: PageC.html: Page?.java: public class CommonPage extends WebPage { public CommonPage() { new PageContantHandler(this); } } ** Martin 2009/10/6 Martin Makundi martin.maku...@koodaripalvelut.com: Hi! I did not exactly understand what you are after, but you can always do like this: CommonPage.html: blabla ... CommonPage.java: public class CommonPage extends WebPage { public CommonPage() { if (A-mode) { new PageVersionAContantHandler(this); } else { new PageVersionAContantHandler(this); } } } Maybe you wanted something different? ** Martin 2009/10/6 Alex Rass a...@itbsllc.com: Hi. Spent hours now trying to figure out how to map 2 html files to 1 class. If someone knows the answer - please help. I need to map 10 similar html pages to same class (for same behavior). Doing this: webApplication.mountBookmarkablePage(/page1.html, pageClass); Gets wicket to associate set url with the class. But then when the ResourceStreamLocator is called, it's given A reference to class and a reference to the path. Where class is set correctly (pageClass). But the PATH is set wrong. It is what Wicket THINKS it should try PageClass_en.html. (class name + locale
RE: how to map 2 html files to 1 class?
Standardizing footers across the site. So I will have a dozen pages which are bare content + footer from a common file/db. I don't want to have THAT many useless classes. If I do - wicket is a failure. -Original Message- From: Martin Makundi [mailto:martin.maku...@koodaripalvelut.com] Sent: Monday, October 05, 2009 6:27 PM To: users@wicket.apache.org Subject: Re: how to map 2 html files to 1 class? What are you handling there ? ** Martin 2009/10/6 Alex Rass a...@itbsllc.com: PageA.html PageB.html PageC.html Think about it this way: PageA.html = Privacy Page PageB.html = SiteMap Page. I want to handle them both in same java class file cause hardly anything is going on there. -Original Message- From: Martin Makundi [mailto:martin.maku...@koodaripalvelut.com] Sent: Monday, October 05, 2009 6:08 PM To: users@wicket.apache.org Subject: Re: how to map 2 html files to 1 class? PageHandler.java, that handles all 3. mountBookmarkablePage(/PageA.html, PageHandler.class); mountBookmarkablePage(/PageB.html, PageHandler.class); mountBookmarkablePage(/PageC.html, PageHandler.class); This is a bit confusing, you ar giving different aliases to the same page. Is that what you want or you really want different html files also..`? ** 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
Re: how to map 2 html files to 1 class?
Do you use page inheritance? The header / footer / common navbars should go in a common parent class. Then your child classes have only the content that is unique to that class. -- Jeremy Thomerson http://www.wickettraining.com On Mon, Oct 5, 2009 at 5:36 PM, Alex Rass a...@itbsllc.com wrote: Standardizing footers across the site. So I will have a dozen pages which are bare content + footer from a common file/db. I don't want to have THAT many useless classes. If I do - wicket is a failure. -Original Message- From: Martin Makundi [mailto:martin.maku...@koodaripalvelut.com] Sent: Monday, October 05, 2009 6:27 PM To: users@wicket.apache.org Subject: Re: how to map 2 html files to 1 class? What are you handling there ? ** Martin 2009/10/6 Alex Rass a...@itbsllc.com: PageA.html PageB.html PageC.html Think about it this way: PageA.html = Privacy Page PageB.html = SiteMap Page. I want to handle them both in same java class file cause hardly anything is going on there. -Original Message- From: Martin Makundi [mailto:martin.maku...@koodaripalvelut.com] Sent: Monday, October 05, 2009 6:08 PM To: users@wicket.apache.org Subject: Re: how to map 2 html files to 1 class? PageHandler.java, that handles all 3. mountBookmarkablePage(/PageA.html, PageHandler.class); mountBookmarkablePage(/PageB.html, PageHandler.class); mountBookmarkablePage(/PageC.html, PageHandler.class); This is a bit confusing, you ar giving different aliases to the same page. Is that what you want or you really want different html files also..`? ** 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
RE: how to map 2 html files to 1 class?
Please read the posts in full. GOAL: to not have 200 classes that do NOTHING but inherit from parent class and are empty inside. -Original Message- From: Jeremy Thomerson [mailto:jer...@wickettraining.com] Sent: Monday, October 05, 2009 6:38 PM To: users@wicket.apache.org Subject: Re: how to map 2 html files to 1 class? Do you use page inheritance? The header / footer / common navbars should go in a common parent class. Then your child classes have only the content that is unique to that class. -- Jeremy Thomerson http://www.wickettraining.com On Mon, Oct 5, 2009 at 5:36 PM, Alex Rass a...@itbsllc.com wrote: Standardizing footers across the site. So I will have a dozen pages which are bare content + footer from a common file/db. I don't want to have THAT many useless classes. If I do - wicket is a failure. -Original Message- From: Martin Makundi [mailto:martin.maku...@koodaripalvelut.com] Sent: Monday, October 05, 2009 6:27 PM To: users@wicket.apache.org Subject: Re: how to map 2 html files to 1 class? What are you handling there ? ** Martin 2009/10/6 Alex Rass a...@itbsllc.com: PageA.html PageB.html PageC.html Think about it this way: PageA.html = Privacy Page PageB.html = SiteMap Page. I want to handle them both in same java class file cause hardly anything is going on there. -Original Message- From: Martin Makundi [mailto:martin.maku...@koodaripalvelut.com] Sent: Monday, October 05, 2009 6:08 PM To: users@wicket.apache.org Subject: Re: how to map 2 html files to 1 class? PageHandler.java, that handles all 3. mountBookmarkablePage(/PageA.html, PageHandler.class); mountBookmarkablePage(/PageB.html, PageHandler.class); mountBookmarkablePage(/PageC.html, PageHandler.class); This is a bit confusing, you ar giving different aliases to the same page. Is that what you want or you really want different html files also..`? ** 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
Re: how to map 2 html files to 1 class?
Maybe you're doing the wrong thing with wicket.. it's not for serving static content. But yes, at least you should be able to take the html file name as parameter to a bookmarkable page somehow and work from there? www.domain.com/PageHandler/intro.html/show or www.domain.com/PageHandler/show/intro.html ? ** Martin 2009/10/6 Alex Rass a...@itbsllc.com: Standardizing footers across the site. So I will have a dozen pages which are bare content + footer from a common file/db. I don't want to have THAT many useless classes. If I do - wicket is a failure. -Original Message- From: Martin Makundi [mailto:martin.maku...@koodaripalvelut.com] Sent: Monday, October 05, 2009 6:27 PM To: users@wicket.apache.org Subject: Re: how to map 2 html files to 1 class? What are you handling there ? ** Martin 2009/10/6 Alex Rass a...@itbsllc.com: PageA.html PageB.html PageC.html Think about it this way: PageA.html = Privacy Page PageB.html = SiteMap Page. I want to handle them both in same java class file cause hardly anything is going on there. -Original Message- From: Martin Makundi [mailto:martin.maku...@koodaripalvelut.com] Sent: Monday, October 05, 2009 6:08 PM To: users@wicket.apache.org Subject: Re: how to map 2 html files to 1 class? PageHandler.java, that handles all 3. mountBookmarkablePage(/PageA.html, PageHandler.class); mountBookmarkablePage(/PageB.html, PageHandler.class); mountBookmarkablePage(/PageC.html, PageHandler.class); This is a bit confusing, you ar giving different aliases to the same page. Is that what you want or you really want different html files also..`? ** 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
Re: how to map 2 html files to 1 class?
2009/10/5 Alex Rass a...@itbsllc.com: Standardizing footers across the site. So I will have a dozen pages which are bare content + footer from a common file/db. I don't want to have THAT many useless classes. If I do - wicket is a failure. It sounds as though you don't actually want to use any Wicket features for the content of any of these pages, so I don't think you actually want to create pages for them at all. Instead, I would have a general content page, and then interpret the rest of the URL as an argument. I can't remember which type of mount you need, but you would basically interpret something like: /content/home /content/index /content/something as all being the same page, with a single parameter. Then in the page class you just print out some raw HTML content for the entire middle bit of the page. There are various ways to do that, and you have a free choice if really all you want to do is write straight to the response. -Original Message- From: Martin Makundi [mailto:martin.maku...@koodaripalvelut.com] Sent: Monday, October 05, 2009 6:27 PM To: users@wicket.apache.org Subject: Re: how to map 2 html files to 1 class? What are you handling there ? ** Martin 2009/10/6 Alex Rass a...@itbsllc.com: PageA.html PageB.html PageC.html Think about it this way: PageA.html = Privacy Page PageB.html = SiteMap Page. I want to handle them both in same java class file cause hardly anything is going on there. -Original Message- From: Martin Makundi [mailto:martin.maku...@koodaripalvelut.com] Sent: Monday, October 05, 2009 6:08 PM To: users@wicket.apache.org Subject: Re: how to map 2 html files to 1 class? PageHandler.java, that handles all 3. mountBookmarkablePage(/PageA.html, PageHandler.class); mountBookmarkablePage(/PageB.html, PageHandler.class); mountBookmarkablePage(/PageC.html, PageHandler.class); This is a bit confusing, you ar giving different aliases to the same page. Is that what you want or you really want different html files also..`? ** 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 -- Phil Housley - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: how to map 2 html files to 1 class?
But yes, at least you should be able to take the html file name as parameter to a bookmarkable page somehow and work from there? www.domain.com/PageHandler/intro.html/show or www.domain.com/PageHandler/show/intro.html And then override this: public MarkupStream getAssociatedMarkupStream(final boolean throwException) { try { return getApplication().getMarkupSettings().getMarkupCache().getMarkupStream(this, false, throwException); } or something there inside...? ** Martin ** Martin 2009/10/6 Alex Rass a...@itbsllc.com: Standardizing footers across the site. So I will have a dozen pages which are bare content + footer from a common file/db. I don't want to have THAT many useless classes. If I do - wicket is a failure. -Original Message- From: Martin Makundi [mailto:martin.maku...@koodaripalvelut.com] Sent: Monday, October 05, 2009 6:27 PM To: users@wicket.apache.org Subject: Re: how to map 2 html files to 1 class? What are you handling there ? ** Martin 2009/10/6 Alex Rass a...@itbsllc.com: PageA.html PageB.html PageC.html Think about it this way: PageA.html = Privacy Page PageB.html = SiteMap Page. I want to handle them both in same java class file cause hardly anything is going on there. -Original Message- From: Martin Makundi [mailto:martin.maku...@koodaripalvelut.com] Sent: Monday, October 05, 2009 6:08 PM To: users@wicket.apache.org Subject: Re: how to map 2 html files to 1 class? PageHandler.java, that handles all 3. mountBookmarkablePage(/PageA.html, PageHandler.class); mountBookmarkablePage(/PageB.html, PageHandler.class); mountBookmarkablePage(/PageC.html, PageHandler.class); This is a bit confusing, you ar giving different aliases to the same page. Is that what you want or you really want different html files also..`? ** 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
Issue with URL for
I'm using final String loginUrl = RequestUtils.toAbsolutePath(urlFor(PAGE_CLASS.class, null).toString()); It generates this link, without my domain. http://PageClass/urlKey/urlValue/etc/etc/
Re: how to map 2 html files to 1 class?
Alternately, I'm unsure why variation wouldn't work for you, something like: public EmptyPage(String pageVariation) { this.pageVariation = pageVariation; } @Override public String getVariation() { return pageVariation; } Then you could have html classes such as: BasePage_home.html BasePage_index.html BasePage_something.html From there you could look at MixedParamUrlCodingStrategy to set up urls such as www.domain.com/some/path/home www.domain.com/some/path/index www.domain.com/some/path/something Scott On Mon, Oct 5, 2009 at 3:50 PM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: But yes, at least you should be able to take the html file name as parameter to a bookmarkable page somehow and work from there? www.domain.com/PageHandler/intro.html/show or www.domain.com/PageHandler/show/intro.html And then override this: public MarkupStream getAssociatedMarkupStream(final boolean throwException) { try { return getApplication().getMarkupSettings().getMarkupCache().getMarkupStream(this, false, throwException); } or something there inside...? ** Martin ** Martin 2009/10/6 Alex Rass a...@itbsllc.com: Standardizing footers across the site. So I will have a dozen pages which are bare content + footer from a common file/db. I don't want to have THAT many useless classes. If I do - wicket is a failure. -Original Message- From: Martin Makundi [mailto:martin.maku...@koodaripalvelut.com] Sent: Monday, October 05, 2009 6:27 PM To: users@wicket.apache.org Subject: Re: how to map 2 html files to 1 class? What are you handling there ? ** Martin 2009/10/6 Alex Rass a...@itbsllc.com: PageA.html PageB.html PageC.html Think about it this way: PageA.html = Privacy Page PageB.html = SiteMap Page. I want to handle them both in same java class file cause hardly anything is going on there. -Original Message- From: Martin Makundi [mailto:martin.maku...@koodaripalvelut.com] Sent: Monday, October 05, 2009 6:08 PM To: users@wicket.apache.org Subject: Re: how to map 2 html files to 1 class? PageHandler.java, that handles all 3. mountBookmarkablePage(/PageA.html, PageHandler.class); mountBookmarkablePage(/PageB.html, PageHandler.class); mountBookmarkablePage(/PageC.html, PageHandler.class); This is a bit confusing, you ar giving different aliases to the same page. Is that what you want or you really want different html files also..`? ** 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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: how to map 2 html files to 1 class?
Yes - this sounds like a good idea. I believe you could also call setVariation(parameters.get(0 or type, etc)) in your constructor and use the parameter to determine which HTML file is rendered. -- Jeremy Thomerson http://www.wickettraining.com On Mon, Oct 5, 2009 at 5:44 PM, Phil Housley undeconstruc...@gmail.comwrote: 2009/10/5 Alex Rass a...@itbsllc.com: Standardizing footers across the site. So I will have a dozen pages which are bare content + footer from a common file/db. I don't want to have THAT many useless classes. If I do - wicket is a failure. It sounds as though you don't actually want to use any Wicket features for the content of any of these pages, so I don't think you actually want to create pages for them at all. Instead, I would have a general content page, and then interpret the rest of the URL as an argument. I can't remember which type of mount you need, but you would basically interpret something like: /content/home /content/index /content/something as all being the same page, with a single parameter. Then in the page class you just print out some raw HTML content for the entire middle bit of the page. There are various ways to do that, and you have a free choice if really all you want to do is write straight to the response. -Original Message- From: Martin Makundi [mailto:martin.maku...@koodaripalvelut.com] Sent: Monday, October 05, 2009 6:27 PM To: users@wicket.apache.org Subject: Re: how to map 2 html files to 1 class? What are you handling there ? ** Martin 2009/10/6 Alex Rass a...@itbsllc.com: PageA.html PageB.html PageC.html Think about it this way: PageA.html = Privacy Page PageB.html = SiteMap Page. I want to handle them both in same java class file cause hardly anything is going on there. -Original Message- From: Martin Makundi [mailto:martin.maku...@koodaripalvelut.com] Sent: Monday, October 05, 2009 6:08 PM To: users@wicket.apache.org Subject: Re: how to map 2 html files to 1 class? PageHandler.java, that handles all 3. mountBookmarkablePage(/PageA.html, PageHandler.class); mountBookmarkablePage(/PageB.html, PageHandler.class); mountBookmarkablePage(/PageC.html, PageHandler.class); This is a bit confusing, you ar giving different aliases to the same page. Is that what you want or you really want different html files also..`? ** 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 -- Phil Housley - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
ImageDropDownChoice?
Hey Folks, Anyone know of a solid ImageDropDownChoice component? I've seen others ask about this in old posts, but nothing definitive. Using google, I found this open source Wicket app that implemented an ImageDropDownChoice: http://xoosent.xoocode.org/demo/app/show/ Looks like it doesn't work with Safari though (ok on Firefox, didn't try IE). Another option I found that might be wrapped with a Wicket ImageDropDownChoice impl... http://www.marghoobsuleman.com/jquery-image-dropdown Looks free (open?) and claims to support all the browsers. Any other options out there? Phil
Re: how to map 2 html files to 1 class?
I don't see a Component#setVariation() method, but then we're still on 1.3.5. On Mon, Oct 5, 2009 at 4:06 PM, Jeremy Thomerson jer...@wickettraining.com wrote: Yes - this sounds like a good idea. I believe you could also call setVariation(parameters.get(0 or type, etc)) in your constructor and use the parameter to determine which HTML file is rendered. -- Jeremy Thomerson http://www.wickettraining.com On Mon, Oct 5, 2009 at 5:44 PM, Phil Housley undeconstruc...@gmail.comwrote: 2009/10/5 Alex Rass a...@itbsllc.com: Standardizing footers across the site. So I will have a dozen pages which are bare content + footer from a common file/db. I don't want to have THAT many useless classes. If I do - wicket is a failure. It sounds as though you don't actually want to use any Wicket features for the content of any of these pages, so I don't think you actually want to create pages for them at all. Instead, I would have a general content page, and then interpret the rest of the URL as an argument. I can't remember which type of mount you need, but you would basically interpret something like: /content/home /content/index /content/something as all being the same page, with a single parameter. Then in the page class you just print out some raw HTML content for the entire middle bit of the page. There are various ways to do that, and you have a free choice if really all you want to do is write straight to the response. -Original Message- From: Martin Makundi [mailto:martin.maku...@koodaripalvelut.com] Sent: Monday, October 05, 2009 6:27 PM To: users@wicket.apache.org Subject: Re: how to map 2 html files to 1 class? What are you handling there ? ** Martin 2009/10/6 Alex Rass a...@itbsllc.com: PageA.html PageB.html PageC.html Think about it this way: PageA.html = Privacy Page PageB.html = SiteMap Page. I want to handle them both in same java class file cause hardly anything is going on there. -Original Message- From: Martin Makundi [mailto:martin.maku...@koodaripalvelut.com] Sent: Monday, October 05, 2009 6:08 PM To: users@wicket.apache.org Subject: Re: how to map 2 html files to 1 class? PageHandler.java, that handles all 3. mountBookmarkablePage(/PageA.html, PageHandler.class); mountBookmarkablePage(/PageB.html, PageHandler.class); mountBookmarkablePage(/PageC.html, PageHandler.class); This is a bit confusing, you ar giving different aliases to the same page. Is that what you want or you really want different html files also..`? ** 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 -- Phil Housley - 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: Issue with URL for
Ok.. I just realized that the issue is when the link is generated on a page with Params. i.e. http://www.mysite.com/Page/Parm1/Value 1 but is works fine if you have http://www.mysite.com/Page On Oct 5, 2009, at 5:52 PM, Douglas Ferguson wrote: I'm using final String loginUrl = RequestUtils.toAbsolutePath(urlFor(PAGE_CLASS.class, null).toString()); It generates this link, without my domain. http://PageClass/urlKey/urlValue/etc/etc/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Issue with URL for
Ok.. This is really odd. This urlFor(PAGE_CLASS.class, null).toString( is spitting out ../../MyPage If I have query params. Then RequestUtils.toAbsolutePath() decides to managle it further. On Oct 5, 2009, at 6:26 PM, Douglas Ferguson wrote: Ok.. I just realized that the issue is when the link is generated on a page with Params. i.e. http://www.mysite.com/Page/Parm1/Value 1 but is works fine if you have http://www.mysite.com/Page On Oct 5, 2009, at 5:52 PM, Douglas Ferguson wrote: I'm using final String loginUrl = RequestUtils.toAbsolutePath(urlFor(PAGE_CLASS.class, null).toString()); It generates this link, without my domain. http://PageClass/urlKey/urlValue/etc/etc/ - 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
Processing dynamic text
Wicketeers, If I have a Label that contains some text I want to process, what is the best way to do that? - Should I even be using a label? - Should I override Label's onComponentTag or something? - Is there a better way? The key is that I don't know the content in advance, so there is no way to add markup to my html. Is this beyond the scope of Wicket, or is there something in there that I've overlooked? (Concrete example below.) Thanks! =David *** Example: I have the text: The quick brown fox jumps over the lazy brown dog. I don't know the content of the text in advance, but I DO know that I want to decorate all the nouns. The meaning of decorate can change over time (maybe some CSS, maybe some js, like a popup). So I need to produce: The quick brown ##fox## jumps over the lazy brown ##dog##. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Generics and SortableDataProvider
Hi Sven, Thanks for your reply. Since I sent the original question I ended up doing what you suggested and now I'm wondering why I ever used the id projection approach. Habit I guess, formed with previous frameworks. Just to make sure I've got this right, as long as I use a DetachableModel as a return from model method, the domain objects aren't stored in the session even if they are returned from the iterator. Am I correct in this? Jonny svenmeier wrote: Hi John, I believe the consensus on this list is that you should change your approach: Why don't you just iterate over your domain objects in the first place? They will be loaded anyway to be displayed on your component. So your approach triggers 1+n selects instead of 1 select for all required objects at once. Sven -- View this message in context: http://www.nabble.com/Generics-and-SortableDataProvider-tp25757590p25761751.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