Re: Wicket based social apps, forums, wall-to-wall (facebook-style), live chat, etc.
iirc shindig is an open social container, maybe that is easy to integrate? And there are several facebook examples on the wiki. Martijn On Wed, Mar 18, 2009 at 1:31 AM, Tauren Mills tau...@tauren.com wrote: Are there any existing open source projects that could help reduce the effort of integrating social communication features into a site? I've read through the archives and noticed several conversations about building a wicket-based forum. I believe Uwe started a google code project, but it looks like it hasn't really gone anywhere. Nino asked about integrating JForum and Toto had some suggestions for him. But I didn't find much else. Are there any wicket-specific forums out there? Would it be best to just use JForum? What about Facebook style profile feeds, wall-to-wall type of communication? Or live chat, either Facebook style, Live Person style, or otherwise? Thanks, Tauren - 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.3.5 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: openstreetmap in openlayers
Hi Nino, thanks for the commit access. I have now added the support for openstreetmap maps. I also added a simple example map. Maybe someone could review my solution. regards, richard -- View this message in context: http://www.nabble.com/openstreetmap-in-openlayers-tp22329429p22576668.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
reloading ajaxlaxyloadpanel via ajaxbutton
Hello there, i have a panelclass which i have a form with a button (well 2 actually but doesn't matter for the problem i have), and below the form a div with results. When you enter an sql in the form field and click the button, i want to submit it via ajax, do the sql, and print the resultset in the results-div. Easy enough, right? Well, it works, IF i use a label for the results-div, but i thought it'd be nifty to have a progress thingie while the sql is executed, so i'm trying to exchange the label with an ajaxlazyload panel. I'm not very successful sofar... when the page loads first time all is initialized properly, but nothing happens when i click on the ajax button. Am I missing something? is it not possible to update the lazyloadpanel?? I'm new at Wicket so there's probably something i don't understand. My panel: public class TestPanel extends AbstractPanel { AjaxLazyLoadPanel test; private String sql; public TestPanel(final String id) { super(id); add(new TestForm(testForm,this)); test = new AjaxLazyLoadPanel(testResults){ public Component getLazyLoadComponent(String markupId) { return new Label(markupId, getTestData()); } }; test.setOutputMarkupId(true); add(test); } ... My form: private class TestForm extends Form { FreemarkerTestPanel panel; public FreemarkerTestForm(String id, FreemarkerTestPanel panel) { super(id); this.panel= panel; add(new TextArea(sql, new PropertyModel(panel, sql))); add(new TextArea(script, new PropertyModel(panel, script))); SqlButton cancel = new SqlButton(sqlbutton); add(cancel); } public void onSubmit() {} private class SqlButton extends AjaxButton { public SqlButton(String id) { super(id); } protected void onSubmit(AjaxRequestTarget target, Form? form) { System.out.println(SqlButton;onsubmit); target.addComponent(test); } ... Then there's a getTestData() that runs the actual sql, which is called by my AjaxLazyLoadPanel as you can see. What happens is that the ajaxbutton's onsubmit method is called fine, but the markup div with the id testResults is not updated, and the getTestData() method is never called. If i just switch the test parameter from ajaxlazyloadpanel to a normal label everything works fine (i then make the ajaxbutton onsubmit execute the getTestData and assign it to a property that the label reads. I would much appreciate any pointers. -- View this message in context: http://www.nabble.com/reloading-ajaxlaxyloadpanel-via-ajaxbutton-tp22577518p22577518.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
OnChangeAjaxBehavior only first time
Hi, I have a panel MatchingPanel with a form and a result div: wicket:panel form wicket:id=form action=# div class=widget labelwicket:message key=form.userAgent[form.userAgent]/wicket:message/label input wicket:id=userAgent class=userAgent type=text maxlength=255 / /div div class=buttons input type=submit value=Match wicket:message=value:form.match / /div /form div wicket:id=result div labelwicket:message key=result.matchedUserAgent[result.matchedUserAgent]/wicket:message/label span wicket:id=matchedUserAgent[sourceUserAgent]/span /div /div /wicket:panel while my java code is: class MatchingForm extends FormObject { ... private void registerBehaviors() { userAgentField.add(new OnChangeAjaxBehavior() { @Override protected void onUpdate(AjaxRequestTarget target) { logger.debug(AJAX matching user agent); matchUserAgent(); target.addComponent(resultPanel); } }); } ... private void matchUserAgent() { String userAgent = userAgentModel.getObject(); WURFLManager wurflManager = getWurflManager(); MatchingResult result = null; if (StringUtils.isNotBlank(userAgent)) { Instant start = new Instant(); Device device = wurflManager.getDeviceForRequest(userAgent); Instant end = new Instant(); Period duration = new Period(start, end); result = new MatchingResult(userAgent, device, (long) duration .getMillis()); } resultPanel.setResult(result); } } The OnChangeBehaviour is called only the first time the userAgent field take the focus. To call other time, i have to lost focus and give focus to userAgent input text. Why? The target component is outside the frm, it is an issue? Thank you -- Filippo De Luca -- Email: dl.fili...@filosganga.it Web: http://www.filosganga.it LinkedIn: http://www.linkedin.com/in/filippodeluca mobile: +393395822588
Re: Global resources
Thanks Igor That really help me getting started. I'm able to use BundleStringResourceLoader but it only loads property files. Do I have to write my own StringResourceLoader for xml file propertyfile? Jens Alenius -- View this message in context: http://www.nabble.com/Global-resources-tp22536340p22579172.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: custom formcomponent and multiple models
Pass it two models. Hold your models as private fields of the form component. Don't forget to override onDetach and detach the two models yourself. -- Jeremy Thomerson http://www.wickettraining.com On Wed, Mar 18, 2009 at 9:49 AM, Bram Vandoren b...@bram.be wrote: Hi, I use a custom FormComponent on a form: Form myForm = new Form(form); CompoundPropertyModel myModel = new CompoundPropertyModel(myOrder) myForm.setModel(myModel); The formcomponent has to set two properties of the CompoundPropertyModel of the form. At the moment I pass the complete CompoundPropertyModel to the FormComponent: myForm.add(new MyFormComponent(id, myModel)); It looks terrible but it was the only solution I found. The FormComponent has access to the complete CompoundPropertyModel and I can't reuse the same FormComponent with other models. Any suggestions how to set 2 models in a FormComponent? Thanks, Bram. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: optional link
If you still need the link text to appear, but not be linked, then you can do: link.isEnabled(false); This will surround the link with an em tag instead of the a tag. If you don't want any tag to be substituted, have this in your Application class: getMarkupSettings().setDefaultBeforeDisabledLink(null); getMarkupSettings().setDefaultAfterDisabledLink(null); or where null can be another type of tag. cheers, Steve On 18 Mar 2009, at 04:46, Martin Makundi wrote: And you can use the following to optionally hide any surrounding html markup: wicket:enclosure child=yourLink XXX /wicket:enclosure 2009/3/18 Jeremy Thomerson jer...@wickettraining.com: For any component, simply override isVisible. Jeremy Thomerson http://www.wickettraining.com -- sent from a wireless device -Original Message- From: gaoxm gaoxm2...@gmail.com Sent: Tuesday, March 17, 2009 8:19 PM To: users@wicket.apache.org Subject: optional link Hello everyone, I am working on a page which needs a feature of optional link. for example, I have a html file as shown blew: div wicket:id=profile a wicket:id=residenceCityLink span wicket:id=residenceCItyLabel /a /div What I want is: if a user's profile has a valid residence city field, I will show the city link and label. Otherwise, I don't show anything here. I don't know if there is any better method to implement the optional link. So far I am checking the field and add an invisible link if the residence city is not saved. if (profile.getResidenceCity() == null) { PageLink cityLink = new PageLink(residenceCityLink, DummyPage.class); cityLink.setVisible(false); add(cityLink); ... ... } else { PageLink cityLink = getCityPage(profile.getResidenceCity()); add(cityLink); ... ... } There are many such kinds of links in my page. Please advise me if you know any better way to do this. Thanks. --Simon - 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 smime.p7s Description: S/MIME cryptographic signature
wicket+guice+hibernate
I am a newbie to wicket and guice . I would like to look at some examples of the trio before starting to use them for my project. Can somebody point me to them? thanks Vidhya
Re: Global resources
see PropertiesFactory, both .properties and .xml are loaded the same way. -igor On Wed, Mar 18, 2009 at 7:06 AM, jensiator jens.alen...@megasol.se wrote: Thanks Igor That really help me getting started. I'm able to use BundleStringResourceLoader but it only loads property files. Do I have to write my own StringResourceLoader for xml file propertyfile? Jens Alenius -- View this message in context: http://www.nabble.com/Global-resources-tp22536340p22579172.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: using jquery with wicket
I compared wicketstuff.minis.veil and WicketAjaxIndicatorAppender http://www.nabble.com/file/p22582613/code.gif this is the code from WicketAjaxIndicatorAppender , but this method public void onRendered(Component component) is not overriden in org.wicketstuff.minis.veil.VeilResources please tell how should I override this method ? igor.vaynberg wrote: see the Veil component in wicketstuff-minis project, that should give you all the clues you need. -ig On Tue, Mar 17, 2009 at 12:57 PM, fachhoch fachh...@gmail.com wrote: I want to use jquery block plugin to block my page for ajax requests , please help me with some tutorials how to integrate wicket and jquery. url for jquery block plugin http://www.malsup.com/jquery/block/#demos the script provided by jquery to block page is $.blockUI(); now please suggest me how to call this through wicket -- View this message in context: http://www.nabble.com/using-jquery---with-wicket-tp22566645p22566645.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 -- View this message in context: http://www.nabble.com/using-jquery---with-wicket-tp22566645p22582613.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+guice+hibernate
http://www.cafesolo.com.ar/2008/10/22/wicket-guice-warp-and-hibernate-a-quickstart-project/ francisco On Wed, Mar 18, 2009 at 4:57 PM, srividh...@yahoo.com wrote: I am a newbie to wicket and guice . I would like to look at some examples of the trio before starting to use them for my project. Can somebody point me to them? thanks Vidhya - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
newSession() not being called
have a SpringWebApplication with overridden newSession, but for some reason newSession is not being called. Have closed browsers and started new browsers, authenticating, but newSession in the WebApplication is not being called. What does this mean? Anyone have any ideas what might be wrong? -- View this message in context: http://www.nabble.com/newSession%28%29-not-being-called-tp22584600p22584600.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: Extensible wicket application
Hi Daniel, Is this the output of the console? I have no idea what's going on... I'll try to get bridge running myself with those bundles (*wstarter*)... Did you tried running them with eclipse and the starter demo contains? Ernesto On Tue, Mar 17, 2009 at 10:58 PM, Daniel Dominik Holúbek dankodo...@gmail.com wrote: Ok, so I finally managed to get it working :) I installed the http-console bundle an it works, but when I try to run your demo application, when trying to start the demo bundle I get this error: java.lang.LinkageError: loader constraints violated when linking javax/servlet/Servlet class My bundles are: idState Bundle 0ACTIVE org.eclipse.osgi_3.3.0.200704022148 Fragments=12 1ACTIVE org.eclipse.equinox.common_3.3.0.200704022148 2ACTIVE org.eclipse.update.configurator_3.2.100.v20070322 3ACTIVE org.eclipse.equinox.http.servletbridge_1.0.0.200704022148 4ACTIVE org.eclipse.equinox.http.registry_1.0.0.200704022148 5ACTIVE http_console_1.0.0 6ACTIVE javax.servlet_2.4.0.200903171653 9ACTIVE org.eclipse.equinox.http.servlet_1.0.0.200704022148 11ACTIVE org.eclipse.equinox.registry_3.3.0.v20070318 12RESOLVEDorg.eclipse.equinox.servletbridge.extensionbundle_1.0.0 Master=0 13RESOLVEDorg.eclipse.osgi.services_3.1.100.200704022148 16ACTIVE com.antilia.wstarter_1.0.0 17RESOLVEDcom.antilia.wstarter.demo_1.0.0 do you have any clue? :) big thanks for your help! On Fri, Mar 13, 2009 at 11:30 AM, Ernesto Reinaldo Barreiro reier...@gmail.com wrote: You will have to use bridge-servlet approach for that. As said the bridge-servlet will launch an equinox runtime and redirect your request to the underlaying http service. If you import the projects I mentioned into eclipse and then export them as plugin jar files into the plugins folder on the bridge war then you will be able to run your wicket application on any server. That is, if you mount the bridge servlet at *bridge*, then accessing the URL localhost:8080/bridge/demo-app should re-direct you to the previous wicket application. Of course, this is just the big picture, and you will have to figure out the (sometime nasty) details by yourself. So in development you can use eclipse and for deployment you will to export any bundles you use to the a bridge war. This could be automated with an ANT file. There are some additional caveats, for some application servers, concerning class-loading if you plan to access things via JNDI from within the OSGi runtime... About the console I think there is flag -console or similar that allows you to disable/enable the console or even tell which port to use. I do not recall the details right now... Ernesto On Fri, Mar 13, 2009 at 10:21 AM, Daniel Dominik Holúbek dankodo...@gmail.com wrote: Hello, this seems to be helpful, thanks. But still it does not solve the main problem. How do I put OSGi on the Sun Java Application Server and then how do I install bundles in it? (preferably with no console available) Thanks again :) On Thu, Mar 12, 2009 at 10:24 PM, Ernesto Reinaldo Barreiro reier...@gmail.com wrote: Hi, I just created a very simple starting project for OSGi and wicket at: http://code.google.com/p/antilia/source/browse/#svn/trunk check out projects com.antilia.wstarter com.antilia.wstarter.demo Then you will have a equinox launcher called wicket-app (for eclipse 3.4). Use it to launch your application and then browse at localhost:8080/demo-app Hope this helps. Ernesto On Thu, Mar 12, 2009 at 3:36 PM, Daniel Dominik Holúbek dankodo...@gmail.com wrote: Hello :) I looked at the links listed below, seemed interesting, but the main problem (how to set up such a project) remains unsolved. So I think I really do need help :) It seems to me, though, that this whole thing is much too complicated. I need only some simple loading of multiple jars :) But if it would work, I don't care how :) Thanks again! On Thu, Mar 12, 2009 at 10:07 AM, Ernesto Reinaldo Barreiro reier...@gmail.com wrote: Hi Daniel, Some comments inlined. On Thu, Mar 12, 2009 at 9:37 AM, Daniel Dominik Holúbek dankodo...@gmail.com wrote: Firstly, thanks for you reply :) I have already read that document regarding wicket and OSGi, but I think it is written for more experienced users at OSGi. As I wrote before, I even do not know how to build a simple web OSGi project (what should I deploy, how to install those bundles - I can't access any console..) In my experience getting used to do
easyb for testing wicket
Hi, Is anyone out there using easyb for testing pages? I've tried writing a test using easyb and the BaseWicketTester since the WicketTester is for JUnit. But I'm getting this errorwhen creating the new BaseWicketTester. a wicket tester. -- InjectorHolder has not been assigned an injector. Use InjectorHolder.setInjector() to assign an injector. In m ost cases this should be done once inside SpringWebApplication subclass's init() method. scenario The main page loads correctly., { given a wicket tester., { tester = new BaseWicketTester( ) } then we can render the main page., { // // start and render the test page // tester.startPage( MainPage.class ) } and the page loads correctly, { // // assert rendered page class // tester.assertRenderedPage( MainPage.class ) // // assert rendered label component // tester.assertLabel( myMessage, Hello! ) } - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How NOT TO Cache Markup - Markup Dynamically created
It appears that the looping problem I was having with trying to get the markup to NOT cache was because my page was a child of another page. In the implementation of the method getMarkupResourceStream, I was returning wicket:extend blah blah blan /wicket:extend Is this a limitation? Thomas R. Corbin wrote: On Sunday 15 March 2009, schapey said: Hi All, I don't see this post in the forum.. so I am posting again. sometimes I just wish we were using grails. but I am sure that would come with it's own problems. I have a page where the markup is creating dynamically and I do not want the markup to be cached. I am implementing both IMarkupResourceStreamProvider, IMarkupCacheKeyProvider I'm not sure what I need to do in order for the markup not to be cached. In one of the source files in here http://wicketstuff.org/wicket13/customresourceloading, it said that if I returned null from getCacheKey that the markup would not be cached. When I do this I get into a loop and it keeps trying to get the markup over and over again. @Override public String getCacheKey( MarkupContainer container, Class containerClass ) { return null; } I tried calling the clearing the cache after the page renders... but when I do this the page won't even load. Any help would greatly be appreciated. I am using wicket1.4rc2. Thanks Karen. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Disable or hide tabs in AjaxTabbedpanel
Hi, I need a way to hide or disable a tab for certain conditions. Is there a way of doing this with overriding newLink(java.lang.String linkId, int index) ? I need to get this to work with ajax. example. User changes language and I need to disable or hide certain tabs. -- View this message in context: http://www.nabble.com/Disable-or-hide-tabs-in-AjaxTabbedpanel-tp22585946p22585946.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
Jackwicket demo
I published a website and a demo with my last personal work that I called Jackwicket. In this project I put together Apache Wicket and Apache Jackrabbit OCM. My target was create easyly and quickly powerful interactive webapps, and I think that Wicket and Jackrabbit are very good technologies to achieve this target. You can find more info below: Demo: http://www.alessandro.vincelli.name/jackwicket/ Project website: http://www.alessandro.vincelli.name/project-jackwicket/ I will be very happy to know your opinion and to receive suggestions or contributions. Regards, Alessandro -- Alessandro Vincelli --- http://www.alessandro.vincelli.name http://devel.alessandro.vincelli.name - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Disable or hide tabs in AjaxTabbedpanel
Yes, normal isVisible. You need any help with that? ** Martin 2009/3/18 Mathias P.W Nilsson math...@snyltarna.se: Hi, I need a way to hide or disable a tab for certain conditions. Is there a way of doing this with overriding newLink(java.lang.String linkId, int index) ? I need to get this to work with ajax. example. User changes language and I need to disable or hide certain tabs. -- View this message in context: http://www.nabble.com/Disable-or-hide-tabs-in-AjaxTabbedpanel-tp22585946p22585946.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: newSession() not being called
Thanks for your feedback! What do mean looking in the wrong webapplication subclass? How would I have not properly overridden newsession? igor.vaynberg wrote: you are looking in the wrong webapplication subclass or you havent properly overridden newsession. -igor On Wed, Mar 18, 2009 at 10:42 AM, Edwin Ansicodd erik.g.hau...@gmail.com wrote: have a SpringWebApplication with overridden newSession, but for some reason newSession is not being called. Have closed browsers and started new browsers, authenticating, but newSession in the WebApplication is not being called. What does this mean? Anyone have any ideas what might be wrong? -- View this message in context: http://www.nabble.com/newSession%28%29-not-being-called-tp22584600p22584600.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 -- View this message in context: http://www.nabble.com/newSession%28%29-not-being-called-tp22584600p22587104.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: validation message-keys differences on m3 to rc2
https://issues.apache.org/jira/browse/WICKET-2159 On 10/mar/09, at 15:55, Igor Vaynberg wrote: jira, quickstart, you know the drill -igor On Tue, Mar 10, 2009 at 3:15 AM, gilberthuph gdoe6...@yahoo.it wrote: I'm having exactly the same problem after moving from 1.4-rc1 - 1.4-rc2 Here's the extract from my properties file TaxiBookingPage.xml. ?xml version=1.0 encoding=UTF-8? !DOCTYPE properties SYSTEM http://java.sun.com/dtd/properties.dtd; properties entry key=generalDetails.numberOfVehiclesRequired.RequiredYou must enter the number of vehicles/entry .. snip .. /properties RC1 The key generalDetails.numberOfVehiclesRequired.Required is found immediately and the appropriate message retrieved. 11:00:38.595 [http-8180-3] DEBUG org.apache.wicket.Session - Getting page [path = 4:taxiBookingForm, versionNumber = 0] 11:00:38.609 [http-8180-3] DEBUG org.apache.wicket.resource.loader.ComponentStringResourceLoader - Found resource from: com/rp/webapp/taxi/TaxiBookingPage.; key: generalDetails.numberOfVehiclesRequired.Required RC2 Does not attempt to look up generalDetails.numberOfVehiclesRequired.Required but the key taxiBookingForm .numberOfVehiclesContainer .numberOfVehiclesRequiredBorder .generalDetails.numberOfVehiclesRequired.Required which is not found. 10:47:47.902 [http-8180-1] DEBUG org.apache.wicket.Localizer - Locate property: key: 'Required'; Component: '[MarkupContainer [Component id = generalDetails.numberOfVehiclesRequired]]' 10:47:47.903 [http-8180-1] DEBUG org.apache.wicket.resource.loader.ComponentStringResourceLoader - component: '[MarkupContainer [Component id = generalDetails.numberOfVehiclesRequired]]'; key: 'Required' 10:47:47.903 [http-8180-1] DEBUG org.apache.wicket.resource.loader.ComponentStringResourceLoader - key: 'taxiBookingForm .numberOfVehiclesContainer .numberOfVehiclesRequiredBorder .generalDetails.numberOfVehiclesRequired.Required'; class: 'com.rp.webapp.taxi.TaxiBookingPage'; locale: 'en_GB'; Style: 'null' 10:47:47.903 [http-8180-1] DEBUG org.apache.wicket.resource.loader.ComponentStringResourceLoader - Found properties file: 'com/rp/webapp/taxi/TaxiBookingPage.' but it doesn't contain the property So it seems the lookup algorithm hasn't changed but the message key. Is this a bug or should we now be using the full form-relative key as shown above? Alexander Lohse wrote: I could not find any reported changes concerning validation message keys from version 1.4-m3 to 1.4-rc2, but I have the following required key in my application resources that does not work anymore. .. trim .. -- View this message in context: http://www.nabble.com/validation-message-keys-differences-on-m3-to-rc2-tp22155986p22431244.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: newSession() not being called
On Wed, Mar 18, 2009 at 3:49 PM, Edwin Ansicodd erik.g.hau...@gmail.com wrote: Thanks for your feedback! What do mean looking in the wrong webapplication subclass? How would I have not properly overridden newsession? Put an @Override annotation on your method. Does it compile? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
HTML from Java
Hi, How can I insert in the result HTML page some markup from Java code ? I have, in HTML : p wiket:id=xyz?/p In Java : String valueOfXYZ = bWhat a good ibook/i/b; add(xyz, something here); And I should want : p wiket:id=xyzbWhat a good ibook/i/b/p Thank for your help. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: HTML from Java
You can use a label: add(new Label(xyz, valueOfXYZ).setEscapeModelStrings(false)); ** Martin 2009/3/18 Ista Pouss ista...@gmail.com: Hi, How can I insert in the result HTML page some markup from Java code ? I have, in HTML : p wiket:id=xyz?/p In Java : String valueOfXYZ = bWhat a good ibook/i/b; add(xyz, something here); And I should want : p wiket:id=xyzbWhat a good ibook/i/b/p Thank for your help. - 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
Explaination of Ajax in Wicket
When using an ajaxlink my modelObjectAsString on a textField is always empty. It is always set to where it was when the page was generated package se.edgesoft.hairless.web.page.site.checkout; import java.util.LinkedList; import java.util.List; import org.apache.wicket.ajax.AjaxRequestTarget; import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior; import org.apache.wicket.ajax.markup.html.AjaxLink; import org.apache.wicket.ajax.markup.html.form.AjaxSubmitLink; import org.apache.wicket.extensions.ajax.markup.html.tabs.AjaxTabbedPanel; import org.apache.wicket.extensions.markup.html.tabs.AbstractTab; import org.apache.wicket.markup.html.WebMarkupContainer; import org.apache.wicket.markup.html.form.ChoiceRenderer; import org.apache.wicket.markup.html.form.DropDownChoice; import org.apache.wicket.markup.html.form.Form; import org.apache.wicket.markup.html.form.TextField; import org.apache.wicket.markup.html.panel.Panel; import org.apache.wicket.model.CompoundPropertyModel; import org.apache.wicket.model.IModel; import org.apache.wicket.model.LoadableDetachableModel; import org.apache.wicket.model.Model; import org.apache.wicket.spring.injection.annot.SpringBean; import se.edgesoft.hairless.entities.presentation.Presentation; import se.edgesoft.hairless.entities.presentation.PresentationType; import se.edgesoft.hairless.entities.translation.Translation; import se.edgesoft.hairless.entities.translation.TranslationType; import se.edgesoft.hairless.entities.user.User; import se.edgesoft.hairless.model.order.payment.IPayment; import se.edgesoft.hairless.model.order.payment.KreditorFactory; import se.edgesoft.hairless.model.order.payment.KreditorPayment; import se.edgesoft.hairless.model.order.payment.PaymentFactory; import se.edgesoft.hairless.model.order.payment.PaymentMethod; import se.edgesoft.hairless.model.presentation.PresentationManager; import se.edgesoft.hairless.model.translation.TranslatorManager; import se.edgesoft.hairless.web.page.site.OverviewablePage; public class PurchasePage extends OverviewablePage{ AjaxTabbedPanel panel; private IPayment payment; @SpringBean( name = PaymentFactory ) private PaymentFactory paymentFactory; @SpringBean( name = KreditorFactory ) private KreditorFactory kreditorFactory; public KreditorFactory getKreditorFactory() { return kreditorFactory; } public PaymentFactory getPaymentFactory() { return paymentFactory; } public IPayment getPayment() { return payment; } public void setPayment(IPayment payment) { this.payment = payment; } public PurchasePage(){ Presentation presentation = new PresentationManager( getStore() ).getPresentation( PresentationType.CART ); Translation translation = new TranslatorManager( getStore() ).getTranslation( TranslationType.CART ); setBackground( presentation ); addOverview( translation, presentation ); addPromotion( true ); IModel countryModel = new LoadableDetachableModel(){ @Override protected Object load() { return getCountryDao().getCountries(); } }; IModel userModel = new LoadableDetachableModel(){ @Override protected Object load() { return new User(); } }; final Form purchaseForm = new Form( purchase.form ); add( purchaseForm ); final WebMarkupContainer userContainer = new WebMarkupContainer( userContainer,new CompoundPropertyModel(userModel)){ @Override public boolean isVisible(){ if( ! isLoggedIn() ) return false; return true; } }; userContainer.setOutputMarkupId( true ); final DropDownChoice country = new DropDownChoice( country , countryModel, new ChoiceRenderer( name , name) ); country.add( new AjaxFormComponentUpdatingBehavior( onchange ){ @Override protected void onUpdate(AjaxRequestTarget target) { target.addComponent( panel ); } }); final TextField firstName = new TextField( firstName ); firstName.setOutputMarkupId( true );
wicketstuff-jmx-panel in Wicket 1.4, missing a MarkupContainer.add(Component) ?
I'm trying to use the wicketstuff-jmx-panel component as simply as possible: add(new JmxPanel(jmx)); But I get a strange error about a method that doesn't exist: Caused by: java.lang.NoSuchMethodError: org.wicketstuff.jmx.markup.html.tree.JmxTreePanel.add(Lorg/apache/wicket/Component;)Lorg/apache/wicket/MarkupContainer; at org.wicketstuff.jmx.markup.html.tree.JmxTreePanel.init(JmxTreePanel.java:33) at org.wicketstuff.jmx.markup.html.JmxPanel.init(JmxPanel.java:113) at org.wicketstuff.jmx.markup.html.JmxPanel.init(JmxPanel.java:94) I call it strange because I'm using 1.4-m3, which appears to have the MarkupContainer.add(Component...) method, so I cannot figure out what it's trying to tell me. So is anyone using this in 1.4? Any idea why it's complaining about no such method? Thanks! Trent
Re: Explaination of Ajax in Wicket
you are using a server-side tab panel with tab links that are not submit links, that means a) only form elements that are on the current tab when you press submit are processed b) any time you switch tabs you lose form data from the previous tab. -igor On Wed, Mar 18, 2009 at 3:17 PM, Mathias P.W Nilsson math...@snyltarna.se wrote: When using an ajaxlink my modelObjectAsString on a textField is always empty. It is always set to where it was when the page was generated package se.edgesoft.hairless.web.page.site.checkout; import java.util.LinkedList; import java.util.List; import org.apache.wicket.ajax.AjaxRequestTarget; import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior; import org.apache.wicket.ajax.markup.html.AjaxLink; import org.apache.wicket.ajax.markup.html.form.AjaxSubmitLink; import org.apache.wicket.extensions.ajax.markup.html.tabs.AjaxTabbedPanel; import org.apache.wicket.extensions.markup.html.tabs.AbstractTab; import org.apache.wicket.markup.html.WebMarkupContainer; import org.apache.wicket.markup.html.form.ChoiceRenderer; import org.apache.wicket.markup.html.form.DropDownChoice; import org.apache.wicket.markup.html.form.Form; import org.apache.wicket.markup.html.form.TextField; import org.apache.wicket.markup.html.panel.Panel; import org.apache.wicket.model.CompoundPropertyModel; import org.apache.wicket.model.IModel; import org.apache.wicket.model.LoadableDetachableModel; import org.apache.wicket.model.Model; import org.apache.wicket.spring.injection.annot.SpringBean; import se.edgesoft.hairless.entities.presentation.Presentation; import se.edgesoft.hairless.entities.presentation.PresentationType; import se.edgesoft.hairless.entities.translation.Translation; import se.edgesoft.hairless.entities.translation.TranslationType; import se.edgesoft.hairless.entities.user.User; import se.edgesoft.hairless.model.order.payment.IPayment; import se.edgesoft.hairless.model.order.payment.KreditorFactory; import se.edgesoft.hairless.model.order.payment.KreditorPayment; import se.edgesoft.hairless.model.order.payment.PaymentFactory; import se.edgesoft.hairless.model.order.payment.PaymentMethod; import se.edgesoft.hairless.model.presentation.PresentationManager; import se.edgesoft.hairless.model.translation.TranslatorManager; import se.edgesoft.hairless.web.page.site.OverviewablePage; public class PurchasePage extends OverviewablePage{ AjaxTabbedPanel panel; private IPayment payment; �...@springbean( name = PaymentFactory ) private PaymentFactory paymentFactory; �...@springbean( name = KreditorFactory ) private KreditorFactory kreditorFactory; public KreditorFactory getKreditorFactory() { return kreditorFactory; } public PaymentFactory getPaymentFactory() { return paymentFactory; } public IPayment getPayment() { return payment; } public void setPayment(IPayment payment) { this.payment = payment; } public PurchasePage(){ Presentation presentation = new PresentationManager( getStore() ).getPresentation( PresentationType.CART ); Translation translation = new TranslatorManager( getStore() ).getTranslation( TranslationType.CART ); setBackground( presentation ); addOverview( translation, presentation ); addPromotion( true ); IModel countryModel = new LoadableDetachableModel(){ �...@override protected Object load() { return getCountryDao().getCountries(); } }; IModel userModel = new LoadableDetachableModel(){ �...@override protected Object load() { return new User(); } }; final Form purchaseForm = new Form( purchase.form ); add( purchaseForm ); final WebMarkupContainer userContainer = new WebMarkupContainer( userContainer,new CompoundPropertyModel(userModel)){ �...@override public boolean isVisible(){ if( ! isLoggedIn() ) return false; return true; } }; userContainer.setOutputMarkupId( true ); final DropDownChoice country = new DropDownChoice( country , countryModel, new ChoiceRenderer( name , name) ); country.add( new AjaxFormComponentUpdatingBehavior( onchange ){ �...@override protected void onUpdate(AjaxRequestTarget target) { target.addComponent( panel );
Re: Explaination of Ajax in Wicket
After chaning all my AjaxLink to AjaxSubmitLink it works a little better, still some questions. Why can't I use ajaxLink here? another question on Ajax and wicket. Let's say I have a MarkupContainer with some fields. This is contained in another MarkupContainer. When switching tab I want to hide the inner Markupconteiner. All containers have setOutputMarkupId( true ). The Container is not hidden. -- View this message in context: http://www.nabble.com/Explaination-of-Ajax-in-Wicket-tp22589797p22592154.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: Explaination of Ajax in Wicket
On Wed, Mar 18, 2009 at 9:26 PM, Mathias P.W Nilsson math...@snyltarna.se wrote: After chaning all my AjaxLink to AjaxSubmitLink it works a little better, still some questions. Why can't I use ajaxLink here? In order for the form's values to get into your model objects, the form must be submitted. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Explaination of Ajax in Wicket
Ok, I got it to work but I'm still rather confused. -- View this message in context: http://www.nabble.com/Explaination-of-Ajax-in-Wicket-tp22589797p22592233.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: How can I share text resources with multiple web applications?
With Maven, non compiled files should be in src/main/resources The quickstart archetype actually does the *wrong* thing and puts them in with the java files. - Brill Pappin On 18-Mar-09, at 4:19 PM, Trent Larson wrote: Thanks for the suggestion. For posterity's sake: my problem was actually with the Maven 2 build, where it ignored the properties file (located in with the Java files) when it built the jar project. Trent On Mon, Mar 16, 2009 at 5:02 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote: see iresourcesettings#addstringresourceloader() make one that loads your properties from some file you keep on the classpath -igor On Mon, Mar 16, 2009 at 4:00 PM, Trent Larson larsontr...@gmail.com wrote: I have 2 web applications, and I would like to allow them to share the same text files. The only way I've found is to make each WebApplication class extend a common ParentApplication class and make a ParentApplication.properties file to contain the common text; then I package the common ParentApplication class and properties in a separate jar project and include that in each of the web projects. This works great in Eclipse in an exploded environment; unfortunately, it looks like it does not work when I include the ParentApplication artifacts inside a separate jar. I get the following error: Caused by: java.util.MissingResourceException: Unable to find property: ' squeeze.presented.by' for component: [class=com.max.web.page.bizopp1Page] at org.apache.wicket.Localizer.getString(Localizer.java:269) . Is there any way to make this work? Is there another approach where I can share the text between these projects? Thanks for any suggestions. Trent - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How can I share text resources with multiple web applications?
yes, but wicket takes a different view than maven on resources in general. they are always closest to the component they belong to. it's a form of encapsulation. so maybe it's wrong from maven's point of view, but putting them in src/main/resources would be wrong from wicket's point of view. the archetype should remain unchanged. Brill Pappin wrote: With Maven, non compiled files should be in src/main/resources The quickstart archetype actually does the *wrong* thing and puts them in with the java files. - Brill Pappin On 18-Mar-09, at 4:19 PM, Trent Larson wrote: Thanks for the suggestion. For posterity's sake: my problem was actually with the Maven 2 build, where it ignored the properties file (located in with the Java files) when it built the jar project. Trent On Mon, Mar 16, 2009 at 5:02 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote: see iresourcesettings#addstringresourceloader() make one that loads your properties from some file you keep on the classpath -igor On Mon, Mar 16, 2009 at 4:00 PM, Trent Larson larsontr...@gmail.com wrote: I have 2 web applications, and I would like to allow them to share the same text files. The only way I've found is to make each WebApplication class extend a common ParentApplication class and make a ParentApplication.properties file to contain the common text; then I package the common ParentApplication class and properties in a separate jar project and include that in each of the web projects. This works great in Eclipse in an exploded environment; unfortunately, it looks like it does not work when I include the ParentApplication artifacts inside a separate jar. I get the following error: Caused by: java.util.MissingResourceException: Unable to find property: ' squeeze.presented.by' for component: [class=com.max.web.page.bizopp1Page] at org.apache.wicket.Localizer.getString(Localizer.java:269) . Is there any way to make this work? Is there another approach where I can share the text between these projects? Thanks for any suggestions. Trent - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/How-can-I-share-text-resources-with-multiple-web-applications--tp22549375p22592795.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: How can I share text resources with multiple web applications?
Hi Jonathan, Curious for your thoughts - how does separating html files into the resources directory break encapsulation? -Luther On Wed, Mar 18, 2009 at 10:19 PM, Jonathan Locke jonathan.lo...@gmail.comwrote: yes, but wicket takes a different view than maven on resources in general. they are always closest to the component they belong to. it's a form of encapsulation. so maybe it's wrong from maven's point of view, but putting them in src/main/resources would be wrong from wicket's point of view. the archetype should remain unchanged. Brill Pappin wrote: With Maven, non compiled files should be in src/main/resources The quickstart archetype actually does the *wrong* thing and puts them in with the java files. - Brill Pappin On 18-Mar-09, at 4:19 PM, Trent Larson wrote: Thanks for the suggestion. For posterity's sake: my problem was actually with the Maven 2 build, where it ignored the properties file (located in with the Java files) when it built the jar project. Trent On Mon, Mar 16, 2009 at 5:02 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote: see iresourcesettings#addstringresourceloader() make one that loads your properties from some file you keep on the classpath -igor On Mon, Mar 16, 2009 at 4:00 PM, Trent Larson larsontr...@gmail.com wrote: I have 2 web applications, and I would like to allow them to share the same text files. The only way I've found is to make each WebApplication class extend a common ParentApplication class and make a ParentApplication.properties file to contain the common text; then I package the common ParentApplication class and properties in a separate jar project and include that in each of the web projects. This works great in Eclipse in an exploded environment; unfortunately, it looks like it does not work when I include the ParentApplication artifacts inside a separate jar. I get the following error: Caused by: java.util.MissingResourceException: Unable to find property: ' squeeze.presented.by' for component: [class=com.max.web.page.bizopp1Page] at org.apache.wicket.Localizer.getString(Localizer.java:269) . Is there any way to make this work? Is there another approach where I can share the text between these projects? Thanks for any suggestions. Trent - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/How-can-I-share-text-resources-with-multiple-web-applications--tp22549375p22592795.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: How can I share text resources with multiple web applications?
I get that, and thinks its a wonderful feature of Wicket... for Maven, the html is in the same package as the java source, but maven organized the content in a logical way. So, I make the statement that: Wicket takes the exact same view of resources as Maven does. - Brill On 18-Mar-09, at 11:19 PM, Jonathan Locke wrote: yes, but wicket takes a different view than maven on resources in general. they are always closest to the component they belong to. it's a form of encapsulation. so maybe it's wrong from maven's point of view, but putting them in src/main/resources would be wrong from wicket's point of view. the archetype should remain unchanged. Brill Pappin wrote: With Maven, non compiled files should be in src/main/resources The quickstart archetype actually does the *wrong* thing and puts them in with the java files. - Brill Pappin On 18-Mar-09, at 4:19 PM, Trent Larson wrote: Thanks for the suggestion. For posterity's sake: my problem was actually with the Maven 2 build, where it ignored the properties file (located in with the Java files) when it built the jar project. Trent On Mon, Mar 16, 2009 at 5:02 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote: see iresourcesettings#addstringresourceloader() make one that loads your properties from some file you keep on the classpath -igor On Mon, Mar 16, 2009 at 4:00 PM, Trent Larson larsontr...@gmail.com wrote: I have 2 web applications, and I would like to allow them to share the same text files. The only way I've found is to make each WebApplication class extend a common ParentApplication class and make a ParentApplication.properties file to contain the common text; then I package the common ParentApplication class and properties in a separate jar project and include that in each of the web projects. This works great in Eclipse in an exploded environment; unfortunately, it looks like it does not work when I include the ParentApplication artifacts inside a separate jar. I get the following error: Caused by: java.util.MissingResourceException: Unable to find property: ' squeeze.presented.by' for component: [class=com.max.web.page.bizopp1Page] at org.apache.wicket.Localizer.getString(Localizer.java:269) . Is there any way to make this work? Is there another approach where I can share the text between these projects? Thanks for any suggestions. Trent - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/How-can-I-share-text-resources-with-multiple-web-applications--tp22549375p22592795.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Disable or hide tabs in AjaxTabbedpanel
Would an enclosure based on an implementation of *link.isVisible*() work for you ... ? i.e: the enclosure would contain the tab you wish to hide whose visibility would be based on that of the child Link component of the enclosure? *wicket:enclosure* - (since 1.3) This tag is useful for filtering markup that surrounds a component but has its visibility dependent on the visibility of that component. Lets take a simple example of where you want to show a table row, but only if a Label is visible. http://cwiki.apache.org/WICKET/wickets-xhtml-tags.html -Luther On Wed, Mar 18, 2009 at 2:06 PM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: Yes, normal isVisible. You need any help with that? ** Martin 2009/3/18 Mathias P.W Nilsson math...@snyltarna.se: Hi, I need a way to hide or disable a tab for certain conditions. Is there a way of doing this with overriding newLink(java.lang.String linkId, int index) ? I need to get this to work with ajax. example. User changes language and I need to disable or hide certain tabs. -- View this message in context: http://www.nabble.com/Disable-or-hide-tabs-in-AjaxTabbedpanel-tp22585946p22585946.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How can I share text resources with multiple web applications?
I'm definitely stretching this a little, but I also believe it to be true... Resource files are, in my mind, encapsulated by the package that they belong to. You should be able to *look* at a package and see a component with all its related resources. You should be able to right click on a component's folder and copy that folder and know that you have the whole package. I feel it's not intuitive for resources to be anywhere other than in the package they belong to. Anyway, putting them in a separate directory hierarchy (even if they wind up in the same Java packaging structure when you build the JAR) breaks this idea of encapsulation. In general, things should always be as private/local as possible. With resources, this is best accomplished by keeping them in the same folder. It seems that everyone who encounters Wicket for the first time goes through a period when they think this is wrongheaded... until they almost invariably change their minds about it. It definitely requires a small mind shift. luther.baker wrote: Hi Jonathan, Curious for your thoughts - how does separating html files into the resources directory break encapsulation? -Luther On Wed, Mar 18, 2009 at 10:19 PM, Jonathan Locke jonathan.lo...@gmail.comwrote: yes, but wicket takes a different view than maven on resources in general. they are always closest to the component they belong to. it's a form of encapsulation. so maybe it's wrong from maven's point of view, but putting them in src/main/resources would be wrong from wicket's point of view. the archetype should remain unchanged. Brill Pappin wrote: With Maven, non compiled files should be in src/main/resources The quickstart archetype actually does the *wrong* thing and puts them in with the java files. - Brill Pappin On 18-Mar-09, at 4:19 PM, Trent Larson wrote: Thanks for the suggestion. For posterity's sake: my problem was actually with the Maven 2 build, where it ignored the properties file (located in with the Java files) when it built the jar project. Trent On Mon, Mar 16, 2009 at 5:02 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote: see iresourcesettings#addstringresourceloader() make one that loads your properties from some file you keep on the classpath -igor On Mon, Mar 16, 2009 at 4:00 PM, Trent Larson larsontr...@gmail.com wrote: I have 2 web applications, and I would like to allow them to share the same text files. The only way I've found is to make each WebApplication class extend a common ParentApplication class and make a ParentApplication.properties file to contain the common text; then I package the common ParentApplication class and properties in a separate jar project and include that in each of the web projects. This works great in Eclipse in an exploded environment; unfortunately, it looks like it does not work when I include the ParentApplication artifacts inside a separate jar. I get the following error: Caused by: java.util.MissingResourceException: Unable to find property: ' squeeze.presented.by' for component: [class=com.max.web.page.bizopp1Page] at org.apache.wicket.Localizer.getString(Localizer.java:269) . Is there any way to make this work? Is there another approach where I can share the text between these projects? Thanks for any suggestions. Trent - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/How-can-I-share-text-resources-with-multiple-web-applications--tp22549375p22592795.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 -- View this message in context: http://www.nabble.com/How-can-I-share-text-resources-with-multiple-web-applications--tp22549375p22594107.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: optional link
Hi Igor, Jeremy, Martin, Steve, Thanks a lot for your reply. In my page, the link text will also be empty if the link is not necessary to show. I changed a little bit of my code and set visible of link component to false. The code looks better now. --Simon However, I have another concern. On Wed, Mar 18, 2009 at 11:19 PM, Steve Swinsburg s.swinsb...@lancaster.ac.uk wrote: If you still need the link text to appear, but not be linked, then you can do: link.isEnabled(false); This will surround the link with an em tag instead of the a tag. If you don't want any tag to be substituted, have this in your Application class: getMarkupSettings().setDefaultBeforeDisabledLink(null); getMarkupSettings().setDefaultAfterDisabledLink(null); or where null can be another type of tag. cheers, Steve On 18 Mar 2009, at 04:46, Martin Makundi wrote: And you can use the following to optionally hide any surrounding html markup: wicket:enclosure child=yourLink XXX /wicket:enclosure 2009/3/18 Jeremy Thomerson jer...@wickettraining.com: For any component, simply override isVisible. Jeremy Thomerson http://www.wickettraining.com -- sent from a wireless device -Original Message- From: gaoxm gaoxm2...@gmail.com Sent: Tuesday, March 17, 2009 8:19 PM To: users@wicket.apache.org Subject: optional link Hello everyone, I am working on a page which needs a feature of optional link. for example, I have a html file as shown blew: div wicket:id=profile a wicket:id=residenceCityLink span wicket:id=residenceCItyLabel /a /div What I want is: if a user's profile has a valid residence city field, I will show the city link and label. Otherwise, I don't show anything here. I don't know if there is any better method to implement the optional link. So far I am checking the field and add an invisible link if the residence city is not saved. if (profile.getResidenceCity() == null) { PageLink cityLink = new PageLink(residenceCityLink, DummyPage.class); cityLink.setVisible(false); add(cityLink); ... ... } else { PageLink cityLink = getCityPage(profile.getResidenceCity()); add(cityLink); ... ... } There are many such kinds of links in my page. Please advise me if you know any better way to do this. Thanks. --Simon - 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