small library to unit test Wicket pages
Dear all, I've made a small library to unit test Wicket pages: It launches Jetty to run your webapp in-process and launches the Selenium client. Then you inject POJO mock objects into @SpringBean annotated fields and use the Selenium client to drive your page. Why I think it is useful? * The key benefit is that you can control the right thing (the data your pages get, from the services), and then observe the right thing (HTML DOM elements, possible manipulated by Javascript/AJAX). * Your real application is run. You don't need to modify it in anyway. * It's very easy to implement as it relies on well established tools (Selenium and Jetty). It means it can easily be kept updated with new versions of Wicket. * Potentially this approach can be applied to frameworks other than Wicket. You're welcome to test it. Visit http://wicketpagetest.sourceforge.net/index.html for more info. -- Kent Tong Useful FREE software at http://www2.cpttm.org.mo/cyberlab/freeware - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicketstuff.org down?
Dear Martijn, THE server had been moves to another ip. I havent had time to update dns perhaps you can tell us the ip so I am able to use the maven repository while the dns update is not yet synchronized with the rest of the dns world? Best regards, Ilja Pavkovic On Saturday, November 7, 2009, Janos Cserep cser...@metaprime.hu wrote: Yes. 2009/11/7 Ilja Pavkovic ilja.pavko...@binaere-bauten.de: Hi, I cannot reach wicketstuff.org anymore. Anyone else experiencing this problem? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- binaere bauten gmbh · tempelhofer ufer 1a · 10961 berlin +49 · 171 · 9342 465 Handelsregister: HRB 115854 - Amtsgericht Charlottenburg Geschäftsführer: Dipl.-Inform. Ilja Pavkovic, Dipl.-Inform. Jost Becker - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicketstuff.org down?
193.46.80.204 On Sun, Nov 8, 2009 at 10:46, Ilja Pavkovic ilja.pavko...@binaere-bauten.de wrote: Dear Martijn, THE server had been moves to another ip. I havent had time to update dns perhaps you can tell us the ip so I am able to use the maven repository while the dns update is not yet synchronized with the rest of the dns world? Best regards, Ilja Pavkovic On Saturday, November 7, 2009, Janos Cserep cser...@metaprime.hu wrote: Yes. 2009/11/7 Ilja Pavkovic ilja.pavko...@binaere-bauten.de: Hi, I cannot reach wicketstuff.org anymore. Anyone else experiencing this problem? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- binaere bauten gmbh · tempelhofer ufer 1a · 10961 berlin +49 · 171 · 9342 465 Handelsregister: HRB 115854 - Amtsgericht Charlottenburg Geschäftsführer: Dipl.-Inform. Ilja Pavkovic, Dipl.-Inform. Jost Becker - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicketstuff.org down?
Hi, 193.46.80.204 thanks. For maven you can create a file ~/.m2/settings.xml with the following content: settings mirrors mirror idWicketStuff/id namewicketstuff dns problem/name urlhttp://193.46.80.204/maven/repository/url mirrorOfWicketStuff/mirrorOf /mirror /mirrors /settings Best Regards, Ilja Pavkovic On Sun, Nov 8, 2009 at 10:46, Ilja Pavkovic ilja.pavko...@binaere-bauten.de wrote: Dear Martijn, THE server had been moves to another ip. I havent had time to update dns perhaps you can tell us the ip so I am able to use the maven repository while the dns update is not yet synchronized with the rest of the dns world? Best regards, Ilja Pavkovic On Saturday, November 7, 2009, Janos Cserep cser...@metaprime.hu wrote: Yes. 2009/11/7 Ilja Pavkovic ilja.pavko...@binaere-bauten.de: Hi, I cannot reach wicketstuff.org anymore. Anyone else experiencing this problem? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- binaere bauten gmbh · tempelhofer ufer 1a · 10961 berlin +49 · 171 · 9342 465 Handelsregister: HRB 115854 - Amtsgericht Charlottenburg Geschäftsführer: Dipl.-Inform. Ilja Pavkovic, Dipl.-Inform. Jost Becker - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- binaere bauten gmbh · tempelhofer ufer 1a · 10961 berlin +49 · 171 · 9342 465 Handelsregister: HRB 115854 - Amtsgericht Charlottenburg Geschäftsführer: Dipl.-Inform. Ilja Pavkovic, Dipl.-Inform. Jost Becker - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Scopes in Wicket Application
Hello, What are the scopes in wicket application much like four different scopes(request, page, session, application) in jsp.
User count
Hello, How to maintain the user hit (number of visitors) to the application without using the database.
Re: User count
Use some free statistics service like google analytics or similar. ** Martin 2009/11/8 sakthi vel vela@gmail.com: Hello, How to maintain the user hit (number of visitors) to the application without using the database. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Scopes in Wicket Application
Wicket is built on servlet model so it should be the same. ** Matin 2009/11/8 sakthi vel vela@gmail.com: Hello, What are the scopes in wicket application much like four different scopes(request, page, session, application) in jsp. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket vs. CKEditor/FCKEditor Java integration
Thanks for the swift answer... Best Regards Muro On Fri, Nov 6, 2009 at 3:16 PM, Roman Ilin roman.i...@gmail.com wrote: There is good TinyMCE component in wicket. http://wicketstuff.org/confluence/display/STUFFWIKI/wicket-contrib-tinymce On Fri, Nov 6, 2009 at 3:13 PM, Muro Copenhagen copenha...@gmail.com wrote: Hi Has anyone any experience on using Wicket and the CKEditor ? Is there any Wicket integration to the CKEditor like the FCK Editor Java integration...? Best Regards Muro - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Help me with setting up Ubuntu, NetBeans, Maven2, Wicket, Jetty and Google App Engine
Well, I'm playing with GAE and Wicket for couple of days and I see that without official Maven2 support, developing using it gives too much trouble for me. I've downloaded http://kenai.com/projects/nbappengine/pages/Home (NetBeans support for Google App Engine) and it's very convenient. I've found a temporary solution (till the official Maven2 support for GAE will be present): - create regular project (Choose project - Java Web - Web Application) with Google App Engine as a server and select Wicket Framework, - create Maven2 project (using wicket-archetype-quickstart) and add your favorite dependencies, - click Show dependency graph, then switch to classpath tab select appropriate library and click Create Library button, - add created libraries to regular (non-maven) project, - repeat previous two steps when new dependencies are added or some are updated in Maven2 project, - develop using regular project, I will see how this solution will work for me. 2009/11/7 Piotr Tarsa piotr.ta...@gmail.com: OK. I will be grateful for any help. 2009/11/7 Pieter Degraeuwe pieter.degrae...@systemworks.be: unfortunately, there are no public maven repositories that contain the needed artifacts. I did install them all manually in my local repo... If you are interested I can send you my pom (but that'll be monday, since I can't access my pc right now...) pieter On Sat, Nov 7, 2009 at 3:52 PM, Piotr Tarsa piotr.ta...@gmail.com wrote: Hi, I am trying to develop Wicket application (site about my research in Data Compression Algorithms) to Google App Engine using NetBeans and Maven2. I need an up-to-date pom.xml files with short dependencies, ie. the ones I saw had a long list of dependencies. Currently I've found two unsatisfactory solutions: http://gae-j-maven.appspot.com/ http://code.google.com/p/maven-gae-plugin/ Do you know something better? I need to have access to Google App Engine features like DataStore, MemCache etc. I've set netbeans.deploy=false so NetBeans doesn't ask for deploying server (besides, I am using embedded Jetty to run that, so the question was weird), but sadly, now NetBeans doesn't open new browser window and doesn't stop Jetty before another run command. Do you think that using Maven2 with that project makes sense? Maybe I should make regular NetBeans project... - 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: wicketstuff.org down?
dns has been updated (about an hour ago) so things should get back to working order soon as the update trickles through internet. Martijn On Sat, Nov 7, 2009 at 11:40 PM, Martijn Dashorst martijn.dasho...@gmail.com wrote: THE server had been moves to another ip. I havent had time to update dns Martijn On Saturday, November 7, 2009, Janos Cserep cser...@metaprime.hu wrote: Yes. 2009/11/7 Ilja Pavkovic ilja.pavko...@binaere-bauten.de: Hi, I cannot reach wicketstuff.org anymore. Anyone else experiencing this problem? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.4 increases type safety for web applications Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.0 -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.4 increases type safety for web applications Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.0 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicketstuff.org down?
http://wicketstuff.org/maven/repository says now: Service Temporarily Unavailable The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later. 2009/11/8 Martijn Dashorst martijn.dasho...@gmail.com: dns has been updated (about an hour ago) so things should get back to working order soon as the update trickles through internet. Martijn On Sat, Nov 7, 2009 at 11:40 PM, Martijn Dashorst martijn.dasho...@gmail.com wrote: THE server had been moves to another ip. I havent had time to update dns Martijn On Saturday, November 7, 2009, Janos Cserep cser...@metaprime.hu wrote: Yes. 2009/11/7 Ilja Pavkovic ilja.pavko...@binaere-bauten.de: Hi, I cannot reach wicketstuff.org anymore. Anyone else experiencing this problem? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.4 increases type safety for web applications Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.0 -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.4 increases type safety for web applications Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.0 - 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: Scopes in Wicket Application
Basically the same. -- Jeremy Thomerson http://www.wickettraining.com On Sun, Nov 8, 2009 at 7:34 AM, sakthi vel vela@gmail.com wrote: Hello, What are the scopes in wicket application much like four different scopes(request, page, session, application) in jsp.
Re: Wicket and JQuery
Hi.. I came across jquery live or livequery. That might work better with wicket, I'll look more into that. Basically the idea is that the event handlers are standalone and if you replace a dom element with another, the events will still work if the new element matches the event specification (id, tag name, class etc.). ** Martin 2009/10/28 Jeremy Thomerson jer...@wickettraining.com: I use custom event binding quite a bit within jQuery... for instance: $(document).bind('fooUpdated', function() { // here I make a textfield within foo into an autocomplete textfield }); Then, when I call to AJAX that replaces foo, I just do: $(document).trigger('fooUpdated'); This works great. Just do all your UI component creation within custom event handlers. Then, to handle the creation of them on load, use: $(document).ready(function() { $(document).trigger('fooUpdated'); }); The problem comes when using plugins that [foolishly] use $(document).ready to do any styling, etc. If you encounter them, you may be able to try $(document).trigger('ready'); I have never tried this - there may be unintended consequences. -- Jeremy Thomerson http://www.wickettraining.com On Tue, Oct 27, 2009 at 11:38 PM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: ... and expect trouble with ajaxifying jquery plugins that skin html components. They will not work properly if you replace your components via ajax - or at least you might have to work hard on it. ** Marin 2009/10/27 Jeremy Thomerson jer...@wickettraining.com: I'd suggest only using jQuery for the UI effects and let Wicket do the AJAX. -- Jeremy Thomerson http://www.wickettraining.com On Tue, Oct 27, 2009 at 4:06 PM, Jeffrey Schneller jeffrey.schnel...@envisa.com wrote: I am trying to determine how to use Wicket and JQuery. I would prefer not using wiQuery or similar. I would like to just include the jQuery libraries in my html and then use jQuery as javascript and not wrap everything in java on the server side to generate the client code. How would one go about doing this? I assume the basic jQuery functionality is straight forward. However how would you implement jQuery code that uses Ajax to communicate back to the server using Wicket on the server? Or would the recommendation be to let Wicket handle the Ajax communication and only use jQuery for the UI components such as Lightbox, Greybox, apple like sliders, etc. Any ideas? Thanks. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: getCallbackUrl question
Any one ?
Wicket rocks
Hi ! I've been evaluating wicket for the past month, and I'm absolutely thrilled by it. It's the coolest piece of kit I've come across in the last few years. Having been working with struts1 for the last 7 years, wicket is like ... like a revelation. Thanks too all those out there supporting the project ! A. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: getCallbackUrl question
i have not used wiquery but I do the same in such cases , in some cases i attach the placeholder for components in panel constructor and replace them in onbeforerender component.getPage() inside panel constructor is wrong because panel is attached after instantiation, -- regards, Vineet Semwal On Mon, Nov 9, 2009 at 1:15 AM, Eyal Golan egola...@gmail.com wrote: Any one ?
ModalWindow best practice - panel or page?
Is there a performance benefit for using one way rather than the other? This stemmed from a problem I encountered with cross domain scripting and I've been weighing the pros and cons against panels and pages. On the negative side I need a new page hierarchy since I can't reuse the original layout inside a much smaller window. It also means different css and js files, and some css components can't be shared unless they are broken out of the master.css. On the positive side I can add analytics to the pages and track them better. I'm not sure if the iframe is a benefit or not. A final concern is in the case of an error, if I am using iframes I don't want the standard error page to fill the frame since it uses my original layout which would look strange, I'd rather have the whole page redirect to an error. Can anyone share info about what they had done or how you ended up one way or the other?
RE: dynamic components
Create a panel with dummy components (e.g. Label components where the label is an empty string). Later you can replace one or more of the components. One complication is that some wicket components (e.g. Image) need to be attached to specialized HTML. However, the basic principle still stands. -Original Message- From: Gw [mailto:not4spamm...@gmail.com] Sent: Saturday, November 07, 2009 7:38 AM To: users@wicket.apache.org Subject: dynamic components Hi people, Does anyone know how to dynamically add components to a form? The types and numbers of the components are arbitrary, and will be determined programmatically. In one page, the form may contain 1 textbox, 2 buttons. In another page, it may contain 2 textareas, 1 checkbox, and so on... Perhaps there's a framework over Wicket for this? Lots of thanks in advance for ur assist. Regards, Mike - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Scopes in Wicket Application
except they are type-safe. also, there is component scope. jthomerson wrote: Basically the same. -- Jeremy Thomerson http://www.wickettraining.com On Sun, Nov 8, 2009 at 7:34 AM, sakthi vel vela@gmail.com wrote: Hello, What are the scopes in wicket application much like four different scopes(request, page, session, application) in jsp. -- View this message in context: http://old.nabble.com/Scopes-in-Wicket-Application-tp26253836p26258274.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: model update in moveuplink and movedownlink onclick
I solved the problem. I was't putting target.addComponent. Just for reference,here is how it looks now . public final AjaxSubmitLink moveDownMasterChainLink(final String id, final ListItemT item, MasterChainListForm form) { return new AjaxSubmitLink(id) { private static final long serialVersionUID = 1L; @Override protected void onSubmit(AjaxRequestTarget target, Form? form) { // TODO Auto-generated method stub final int index = getList().indexOf(item.getModelObject()); if (index != -1) { addStateChange(new Change() { private static final long serialVersionUID = 1L; final int oldIndex = index; @Override public void undo() { Collections.swap(getList(), oldIndex + 1, oldIndex); } }); // Swap list items and invalidate listView Collections.swap(getList(), index, index + 1); MyListView.this.removeAll(); } target.addComponent(form); } /** * @see org.apache.wicket.Component#onBeforeRender() */ @Override protected void onBeforeRender() { super.onBeforeRender(); //setAutoEnable(false); if (getList().indexOf(item.getModelObject()) == (getList().size() - 1)) { setEnabled(false); } } }; } wicketnewuser wrote: Is there anyway that you can update model before you move the item up or down using moveuplink and movedownlink in listview. My goal is to save the input data to the model so that I don't loose use input on the item before moving the item. I did try to extend the ListView and added my own moveuplink and downlink code called form's updateFormComponentModels() method but that didn't really help. Does anyone have any idea how this can be done. LeadTransnodeChain lc = new LeadTransnodeChain(1, 2, 3, 4, 5, LeadTransnodeChain.MODE.ASYNC); masterChainList.add(lc); masterChainList.add(new LeadTransnodeChain(11, 12, 13, 14, 15, LeadTransnodeChain.MODE.SYNC)); masterChainList.add(new LeadTransnodeChain(21, 22, 23, 24, 25, LeadTransnodeChain.MODE.SYNC)); ListView propertiesList = new MyListView(masterChainList, masterChainList) { @Override protected void populateItem(ListItem item) { LeadTransnodeChain leadTransnodeChain = (LeadTransnodeChain) item.getModelObject(); item.add(new Label(masterChain, new PropertyModel(leadTransnodeChain, m_masterChainID))); item.add(new DropDownChoice(runAs, new PropertyModel(leadTransnodeChain, m_mode), Arrays.asList(LeadTransnodeChain.MODE.values()), new IChoiceRenderer() { public Object getDisplayValue(Object mode) { return ((LeadTransnodeChain.MODE) mode).toString(); } public String getIdValue(Object obj, int index) { return obj.toString(); } } )); item.add(moveMyUpLink(moveUp, item, form)); item.add(moveMyDownLink(moveDown, item, form)); } }; add(new Button(submitButton)); propertiesList.setReuseItems(true); add(propertiesList); }public void updateComponentModels(){ super.updateFormComponentModels(); } public abstract class MyListViewT extends ListViewT { ... protected abstract void populateItem(ListItem item) ; /** * Returns a link that will move the given item down (towards the end) in the listView. * * @param id *Name of move-down link component to create * @param item * @return The link component */ public final LinkVoid
Re: Proposal: TabbedPanel variant that does all the work on the client
Thanks for the advice Mike! You should: 1. Get a sourceforge account. 2. Request on d...@wicket.apache.org to be given commit access to the wicketstuff repository. I think 'wicketstuff-minis' might be the most suitable place for your code since it is fairly small. [...] For now, I created a corresponding issue in Jira, and attached my code: http://wicketstuff.org/jira/browse/WSMINIS-11 If you really want to grant me commit access, I'll put it into the SVN myself. Here's my SourceForge user id: 2693911 Regards, Michael I'm pretty new on this list and I don't know if this is the right place for such contributions. However, I recently developed a subclass of TabbedPanel (from wicket-extensions) that IMHO may be useful for others, so I'd like to share it. The main idea is that it's a drop-in replacement for TabbedPanel, but it does all the work on the client side. That is, all the tab contents are preloaded, and the user can switch between the tabs using client-side JavaScript only. No additional HTTP Requests involved. The good thing is, that this fits in really neatly with all the other TabbedPanel stuff. My new class ClientSideTabbedPanel is only a few lines of Java and JavaScript code, and no markup. But it still supports fallback, if JavaScript is deactivated. The main benefit of ClientSideTabbedPanel is that it is more responsive when switching tabs. It may also be better in terms of search engine optimization, since all the tab-contents are being indexed in one page. You can see it in action here for instance: http://www.airline-direct.de/fluege/nach/London-LON So, how can I share this? Should I just post the code to this list? Anyone interested at all? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Proposal: TabbedPanel variant that does all the work on the client
Hi Ernesto, Is your implementation using jQuery? Then maybe you should try to contact someone behind some of the jQuery-Wicket related projects out there and see if your component could feet on one of those projects. Yes, right now it's using jQuery. I'll have a look at jQuery-Wicket, and see if it fits in with it... It would be nice, and not difficult to achieve I guess, to have that component not depending on any JavaScript library, but simple an plain JavaScript. I'd prefer that actually, although plain JavaScript is a little cumbersome. Is there not some small Wicket-specific JavaScript library I could build upon? Regards, Michael - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: FormTester not working in Cheesr (Wicket In Action) update to 1.4.3
Here's the fix: select the state as follows: formTester.select(state-wmc:state, 1); -- View this message in context: http://old.nabble.com/FormTester-not-working-in-Cheesr-%28Wicket-In-Action%29-update-to-1.4.3-tp26248438p26259781.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: Absolute static file references
Jonathan Locke wrote: it's pure common sense. don't prematurely optimize is just a version of don't fix what ain't broke. luther.baker wrote: Thanks Igor. We're not having performance issues. I'm just mapping what we traditionally do to Wicket. I did come across CSSPackageResource.getHeaderContribution(style/default/main.css)); which seems to do exactly what I was looking for. Back to your point, I guess I understood that Wicket 'could' manage resources - I'm just not sure when it 'should' manage them. I generally consider it a best practice to let the server handle static CSS and potentially huge js and img files but it sounds like you're suggesting start by managing the resources within Wicket and wait until performance issues actually start popping up and then consider externalizing them. What's nice to see is that Wicket appears to handle either approach pretty well. Also, ContextImage hit the nail on the head. Thanks for the suggestion -Luther On Sat, Oct 24, 2009 at 4:42 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote: have you actually hit a scalability problem? if you are trying to optimize upfront you can use a less invasive technique. all resource urls in wicekt are served under the /resources/ virtual folder. you can enable the setting where wicket will append a last-modified date to the end of each resource url, and then have an apache-side cache to cache and serve everything under /resources/. alternatively see how ContextImage works if you want to serve your own stuff out of webapp folder. -igor On Sat, Oct 24, 2009 at 10:53 AM, Luther Baker lutherba...@gmail.com wrote: Have another question about serving up CSS (JS, img, etc) files statically: a) I'd like to have the option to serve my CSS up statically via an apache proxy. I'd also like to avoid serving CSS requests up via the wicket filter - even if served up by Jetty - as I think it will scale just a bit better ... b) With my current URL mounts, many pages with different base URLs refer to the same CSS file. Consequently, a relative URL for the common CSS files as referenced in the master template won't work since the CSS file would be looked up relative to each different URL mount point. Does that makes sense? So, I would like to create a simple, absolute reference mechanism for my static CSS, image or other files (without hardcoding). I'm not as knowledgeable about the way that components are mapped to wicket tags, how to add my own tags or even how to create my own components (other than Panels of course). Does the approach below adhere to the wicket way? It feels a bit manual ... and I'm not fond of the static WEB_CONTEXT assignment - but I don't see an elegant/efficient way to get it from within the Page or the AbstractBehavior on a per request basis. Just looking for a bit of advice. Does the WIKI have some detailed docs that really get into the nitty gritty of low-level component and tag design? IE: Details of ComponentTag, MarkupElement, WicketTag, On the other hand, is there any strong advice to put custom CSS, image and JS files in the classpath and reference ala wicket or is my approach perfectly reasonable here. An alternate goal of mine to keep custom components/solutions to a minimum. Thanks in advance, -Luther *MARKUP IN:* head link wicket:id=head.link rel=stylesheet href=style/default/main.css/ /head *MARKUP OUT:* head link rel=stylesheet href=*/portal/*style/default/main.css/ /head *JAVA* final static String WEB_CONTEXT = WebApplication.get().getServletContext().getContextPath(); protected DefaultPageTemplate() { // http://www.mkyong.com/wicket/how-to-dynamic-add-attribute-to-a-html-tag-in-wicket/ final WebMarkupContainerWithAssociatedMarkup cssLink = new WebMarkupContainerWithAssociatedMarkup(head.link); add(cssLink); cssLink.add(new AbstractBehavior() { private static final long serialVersionUID = 1L; @Override public void onComponentTag(final Component component, final ComponentTag tag) { String href = tag.getAttribute(href); href = WEB_CONTEXT + / + href; tag.put(href, href); } }); } - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org Hi all, I am a new member of forum. Would a newcomer be warmly welcome here? Good day you guys!!! __ [url=http://animewatching.com]Watch Anime Episodes[/url] -- View this message in context: http://old.nabble.com/Absolute-static-file-references-tp26041429p26260531.html
Re: Absolute static file references
Hi all, I am a new member of forum. Would a newcomer be warmly welcome here? Good day you guys!!! New members always welcome. It's much better to start a new thread for each topic, though, rather than add to one (especially completely off-topic). This is a very high traffic list and your message will get lost otherwise. -- Jeremy Thomerson http://www.wickettraining.com
Combination CompoundPropertyModel and ChoiceRenderer on DropDownChoice gives problems
I've created a jira issue with more information and an example for this problem: https://issues.apache.org/jira/browse/WICKET-2565 DISCLAIMER http://www.tvh.com/newen2/emaildisclaimer/default.html This message is delivered to all addressees subject to the conditions set forth in the attached disclaimer, which is an integral part of this message.
Re: Resource leaks for CSS and IMG tags
No, it seems not to be this issue. The *.css files and the images are located in separate folders 'styles' and 'images' at the same location where the WEB-INF folder is located. There are no jar files including the resources. I've tested the work around but the problem still exists. Peter Jonas-21 wrote: could this be the same issue as described here? https://issues.apache.org/jira/browse/WICKET-2534 - 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://old.nabble.com/Resource-leaks-for-CSS-and-IMG-tags-tp26233434p26262301.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