1.5 Printing Markup
Has something changed where WicketTester.getResponse().getDocument() no longer contains the generated markup? I'm getting empty strings for any component started through the tester. Stepping through with the debugger it does resolve the associated markup correctly it just never gets added to the response/document.
Re: Scala DSL for Wicket
For LDM class Ldm[T](provider:()= T) extends LoadableDetachable... { def load():T { provider() } } object Ldm { def apply(provider:()=T) = new Ldm[T](provider) } could be used as ... val id = 1 val model = Ldm(()={dao.get(id)}) or val id = 1 def provider = dao.get(id) val model = Ldm(provider) On Fri, Jul 29, 2011 at 6:44 AM, Martin Grigorov mgrigo...@apache.orgwrote: Bruno, Yet another idea for the dsl: def ldm[R, ID](id: ID = null, f: (ID) = R) = {new LoadableDetachableModel(id) { override def load() : R = { f(id); } } } P.S. Not tested. On Thu, Jul 28, 2011 at 9:07 AM, Bruno Borges bruno.bor...@gmail.com wrote: Just wanted to share my experience playing a little more with Scala and Wicket A few minutes ago I got this excelent code: I know it is too simple, and it can be accomplished as well in Java with static imports. But still, for my project it's being great (and cool) to do such things. object btnEditar extends Button(btnEditar) { override def onSubmit() = { -/* show fields */ -camposForm.setVisibilityAllowed(true) -btnSalvar.setVisibilityAllowed(true) -cancelar.setVisibilityAllowed(true) - -/* hide them */ -camposTela.setVisibilityAllowed(false) -btnEditar.setVisibilityAllowed(false) +show(camposForm, btnSalvar, cancelar) +hide(camposTela, btnEditar) } } add(btnEditar) Methods show/hide are imported as import code.DSLWicket._ *Bruno Borges* www.brunoborges.com.br +55 21 76727099 On Wed, Jul 27, 2011 at 4:53 PM, Bruno Borges bruno.bor...@gmail.com wrote: Thanks Martin, There was only a small little problem in your code. The correct syntax is: def label[T](id: String, model: IModel[T] = null): Label = { val label = new Label(id, model); add(label); label } The suggestions were updated on Gist. *Bruno Borges* www.brunoborges.com.br +55 21 76727099 On Wed, Jul 27, 2011 at 3:55 PM, Martin Grigorov mgrigo...@apache.org wrote: Idea for simplification: use named parameters. For example def label[T](id: String, model: IModel[T]): Label = { val label = new Label(id, model); add(label); label } would become def label[T](id: String, model = _ : IModel[T]): Label = { val label = new Label(id, model); add(label); label } this way you'll have just one declaration of label function which will handle the current three additionally you may add a pimp: implicit def ser2model[S : Serializable](ser: S): IModel[S] = Model.of(ser) now even when you pass String as second param to label() it will be converted to IModel On Wed, Jul 27, 2011 at 9:11 PM, Martin Grigorov mgrigo...@apache.org wrote: Take a look at scala.swing.* sources. On Wed, Jul 27, 2011 at 8:34 PM, Bruno Borges bruno.bor...@gmail.com wrote: Can some Scala expert help me to make this DSL available as PML (pimp my library)? I've tried to code it that way but things didn't quite worked out the way they should. The reason is that for every Wicket object I create, I must extend the trait DSLWicket *Bruno Borges* www.brunoborges.com.br +55 21 76727099 On Wed, Jul 27, 2011 at 2:30 PM, Bruno Borges bruno.bor...@gmail.com wrote: Not really. The method onSubmit() of button is void, as well onClick(), so there's no need for the function be passed as () = Unit or anything else. I made a few changes to it and updated on Gist. I've also uploaded a page that uses this DSL at https://gist.github.com/1109919 Take a look *Bruno Borges* www.brunoborges.com.br +55 21 76727099 On Wed, Jul 27, 2011 at 2:22 PM, Scott Swank scott.sw...@gmail.com wrote: I think you do want Unit, which as I understand it is closest equivalent to void in Scala. http://www.scala-lang.org/api/current/scala/Unit.html Scott On Wed, Jul 27, 2011 at 10:14 AM, Bruno Borges bruno.bor...@gmail.com wrote: No, the function must return void, not another function (unit). But there's also the option of () = Nothing. Which one should I use for this case? *Bruno Borges* www.brunoborges.com.br +55 21 76727099 On Wed, Jul 27, 2011 at 12:54 PM, Martin Grigorov mgrigo...@apache.org wrote: def button(id: String, submit: () = Void): Button = { it should be () = Unit, no ? On Wed, Jul 27, 2011 at 6:51 PM, Martin Grigorov mgrigo...@apache.org wrote: Adding some usage examples at the bottom will help us evaluate it. Why not add type to def textField(id: String): TextField[_] = { val field = new TextField(id); add(field); field } to become def textField[T](id: String): TextField[T] = { val field = new TextField[T](id); add(field); field }
Re: What does this syntax say?
Without a Class argument how is it returning/casting correctly? Shouldn't it be public W IWrapModelW wrapOnInheritance(Component component,ClassW type) to make W available within the method? On Thu, Jul 28, 2011 at 12:40 PM, Dan Retzlaff dretzl...@gmail.com wrote: The first W let's the compiler know that the second W is a generic type and not a reference to some class named W. It's just syntax. On Thu, Jul 28, 2011 at 10:48 AM, Niranjan Rao nhr...@gmail.com wrote: Ok, I admit it - I don't understand this function at all defined in IComponentInheritedModel public W IWrapModelW wrapOnInheritance(Component component) I don't understand meaning of W and IWrapModelW. I know generics generally, but this syntax has been baffling me. Based on what eclipse is trying to do, it seems like it will return IWrapModelW, but then what does first W do? I tried some google searches, but could not find the answer. Thanks, Niranjan --**--**- To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.org users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: What does this syntax say?
Right but Model.of accepts an instance of the generic type so it's not lost and is available at runtime. static ModelT of(T instance) vs. public W IWrapModelW wrapOnInheritance(Component component) On Thu, Jul 28, 2011 at 6:33 PM, Dan Retzlaff dretzl...@gmail.com wrote: Generic types are lost by the time the method is executed, so there's really nothing the method implementation could check. Another fun example is org.apache.wicket.model.Model#of(). The general subject is called type erasure, and is one of the more confusing aspects of Java generics. On Thu, Jul 28, 2011 at 4:45 PM, Ben Tilford b...@tilford.info wrote: Without a Class argument how is it returning/casting correctly? Shouldn't it be public W IWrapModelW wrapOnInheritance(Component component,ClassW type) to make W available within the method? On Thu, Jul 28, 2011 at 12:40 PM, Dan Retzlaff dretzl...@gmail.com wrote: The first W let's the compiler know that the second W is a generic type and not a reference to some class named W. It's just syntax. On Thu, Jul 28, 2011 at 10:48 AM, Niranjan Rao nhr...@gmail.com wrote: Ok, I admit it - I don't understand this function at all defined in IComponentInheritedModel public W IWrapModelW wrapOnInheritance(Component component) I don't understand meaning of W and IWrapModelW. I know generics generally, but this syntax has been baffling me. Based on what eclipse is trying to do, it seems like it will return IWrapModelW, but then what does first W do? I tried some google searches, but could not find the answer. Thanks, Niranjan --**--**- To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.org users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Scala DSL for Wicket
I started on something sililar about a month ago. Havnt had time to work on it for a few weeks but maybe it would be usable by someone. https://github.com/btilford/wicketstuff-core/branches/scala-wicket-builder There's also a groovy builder if you browse my other repos. sent from mobile On Jul 27, 2011 12:56 PM, Martin Grigorov mgrigo...@apache.org wrote: Idea for simplification: use named parameters. For example def label[T](id: String, model: IModel[T]): Label = { val label = new Label(id, model); add(label); label } would become def label[T](id: String, model = _ : IModel[T]): Label = { val label = new Label(id, model); add(label); label } this way you'll have just one declaration of label function which will handle the current three additionally you may add a pimp: implicit def ser2model[S : Serializable](ser: S): IModel[S] = Model.of(ser) now even when you pass String as second param to label() it will be converted to IModel On Wed, Jul 27, 2011 at 9:11 PM, Martin Grigorov mgrigo...@apache.org wrote: Take a look at scala.swing.* sources. On Wed, Jul 27, 2011 at 8:34 PM, Bruno Borges bruno.bor...@gmail.com wrote: Can some Scala expert help me to make this DSL available as PML (pimp my library)? I've tried to code it that way but things didn't quite worked out the way they should. The reason is that for every Wicket object I create, I must extend the trait DSLWicket *Bruno Borges* www.brunoborges.com.br +55 21 76727099 On Wed, Jul 27, 2011 at 2:30 PM, Bruno Borges bruno.bor...@gmail.com wrote: Not really. The method onSubmit() of button is void, as well onClick(), so there's no need for the function be passed as () = Unit or anything else. I made a few changes to it and updated on Gist. I've also uploaded a page that uses this DSL at https://gist.github.com/1109919 Take a look *Bruno Borges* www.brunoborges.com.br +55 21 76727099 On Wed, Jul 27, 2011 at 2:22 PM, Scott Swank scott.sw...@gmail.com wrote: I think you do want Unit, which as I understand it is closest equivalent to void in Scala. http://www.scala-lang.org/api/current/scala/Unit.html Scott On Wed, Jul 27, 2011 at 10:14 AM, Bruno Borges bruno.bor...@gmail.com wrote: No, the function must return void, not another function (unit). But there's also the option of () = Nothing. Which one should I use for this case? *Bruno Borges* www.brunoborges.com.br +55 21 76727099 On Wed, Jul 27, 2011 at 12:54 PM, Martin Grigorov mgrigo...@apache.org wrote: def button(id: String, submit: () = Void): Button = { it should be () = Unit, no ? On Wed, Jul 27, 2011 at 6:51 PM, Martin Grigorov mgrigo...@apache.org wrote: Adding some usage examples at the bottom will help us evaluate it. Why not add type to def textField(id: String): TextField[_] = { val field = new TextField(id); add(field); field } to become def textField[T](id: String): TextField[T] = { val field = new TextField[T](id); add(field); field } usage: textField[Int](someId) with using implicit Manifest for T you can also can automatically set the type: field.setType(m.erasure) On Wed, Jul 27, 2011 at 6:26 PM, Bruno Borges bruno.bor...@gmail.com wrote: I've been playing with Wicket and Scala and I thought this could be added to the wicket-scala project at WicketStuff. What do you guys think? https://gist.github.com/1109603 *Bruno Borges* www.brunoborges.com.br +55 21 76727099 -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.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 -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: RFC: Ten things every Wicket programmer must know?
1. How static resources work. For a newcomer this can be shocking/frustrating. 2. Models are a context that holds a reference to a model. On Wed, Jul 27, 2011 at 5:21 PM, Scott Swank scott.sw...@gmail.com wrote: Jeremy, I just threw together the following, which indicates that at least to me Models are worth 3 of your 10 items. 1. Most components have a backing object of some sort. This object is referenced via a Model. Significantly, the type of the component and the model match (e.g. LabelInteger has an IModelInteger). 2. These objects live in the session and are managed in the session by wicket, so that when the component goes out of scope the object is removed from the session by wicket. 3. Because domain objects are often too large to store in the session there is a LoadableDetachableModel that is responsible for loading the object whenever it is needed in a request and then flushing it at the end of the request via detach(). Cheers, Scott On Wed, Jul 27, 2011 at 3:29 PM, Jeremy Thomerson jer...@wickettraining.com wrote: Hello all, I'm writing an article for a Java magazine and would like to include in it a list of ten things every Wicket programmer must know. Of course, I have my list, but I'd be very curious to see what you think should be on that list from your own experience. Or, put another way, maybe the question would be what I wished I knew when I started Wicket - what tripped you up or what made you kick yourself later? Please reply back if you have input. Please note that by replying, you are granting me full permission to use your response as part of my article without any attribution or payment. If you disagree with those terms, please respond anyway but in your response mention your own terms. Best regards, -- Jeremy Thomerson http://wickettraining.com *Need a CMS for Wicket? Use Brix! http://brixcms.org* - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: actually what i feel is it will be better when
Some things will be better but some things won't. Java and Javscript don't have a whole lot in common. On Sat, Apr 2, 2011 at 11:31 PM, hariharansrc hariharan...@gmail.comwrote: we use gwt we can code in java instead of js and then we can use the generated js in wicket. This only i thought. Sorry if i am wrong. but for me it will better when we code in java than in javascript. since i don't want to learn a new lang -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/how-to-call-javascript-function-on-form-submission-tp3408147p3423059.html Sent from the Users forum 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 pages created by guice
Some things you may look at IComponentInitalizationListener -- http://wicket.apache.org/apidocs/1.4/org/apache/wicket/application/IComponentInitializationListener.html IComponentInstantiationListener -- http://wicket.apache.org/apidocs/1.4/org/apache/wicket/application/IComponentInstantiationListener.html If your really wanting to use Guice/Spring have you considered using a panel/component and implementing your own provider/factory for the component? I'ts almost always harder to do this sort of thing with a Page. On Tue, Feb 22, 2011 at 3:20 PM, Dan Griffin dangri...@gmail.com wrote: Thanks, that does offer more flexibility, but it hasn`t solved my problem yet. Guicier and wicket-guice both return objects with wicket, not guice proxy when I say something like setResponse(HomePage.class). If I inject my page object and say, for example, setResponse(injectedPage) it works fine, but I can`t stick to that course throughout my application, because Application.getHome() returns Class? extends Page. By the way, the application doesn`t crash, it only throws org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException: Unable to serialize class: com.google.inject.InjectorImpl$4 and then it continues doing whatever it was doing. I found that similar issue was raised before http://osdir.com/ml/users-wicket.apache.org/2009-06/msg01059.html, if it was resolved I would be happy to know. :) Take a look at http://code.google.com/p/jolira-tools/wiki/guicier http://code.google.com/p/jolira-tools/wiki/guicierThere is an extended integration with Guice. On Mon, Feb 21, 2011 at 5:16 PM, Dan Griffindangri...@gmail.com wrote: Sorry for spamming, but I remembered another thing I would like to ask related to this. The reason why I need to inject a page is because I would like to use guice AOP feature to wrap an interceptor around wicket pages. If you can recommend another way to do that , it would be helpful as well. I did a quick scan through wicket documentation, but couldn`t find anything useful. Maybe I missed something? Време: 21.02.2011. 13:31, Dan Griffin пише: Hi all, I have guice integrated in my wicket app, and it worked fine until I tried to inject a page, when I received java.lang.IllegalArgumentException: Protected method: checkHierarchyChange(Lorg/apache/wicket/Component;) Now, I assume this is because of guice integration pitfall https://cwiki.apache.org/WICKET/guice-integration-pitfall.html, as I clearly cannot use interfaces here, but the proposed solution (with deprecated protected no-arg constructor) doesn`t help me here. Any idea how to get around this? Thanks in advance, Dan
Re: Wicket 1.5 and GAE
Has the extension point for setting your page store changed? I believe newSessionStore() has been removed in 1.5 In wicket 1.4 this is what was needed in you Application @Override protected void init() { super.init(); //remove thread monitoring from resource watcher this.getResourceSettings().setResourcePollFrequency(null); } @Override protected ISessionStore newSessionStore() { return new HttpSessionStore(this);//return new SecondLevelCacheSessionStore(this, new InMemoryPageStore()); } On Wed, Oct 27, 2010 at 12:56 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote: you will need to provide your own page store, everything else will work i think. -igor On Wed, Oct 27, 2010 at 12:52 PM, Alex Objelean alex.objel...@gmail.com wrote: Is there a way to make wicket-1.5 to work with Google App Engine? Thanks, Alex -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-1-5-and-GAE-tp3016185p3016185.html Sent from the Users forum 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: instantiate panels in a spring bean
What are you using to build the project? If your doing stub generation (mixed java groovy project) see if the stubs look right. There are a few bugs in the stub generator when dealing with inner classes but it shouldn't have compiled in that case. On 10/2/10, fachhoch fachh...@gmail.com wrote: I added super for subclasses it still did not work , as I said it worked with java the same code when comming from .groovy should work right ? if it is not do I have to give some special treatment for wicket groovy compoments ? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/instantiate-panels-in-a-spring-bean-tp2946859p2952942.html Sent from the Users forum 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: instantiate panels in a spring bean
This might interest you http://kenai.com/projects/joint/pages/WicketExample Its using the netbeans lookup api instead of spring to build a menu based on what components are available on the classpath. On Oct 2, 2010 12:32 AM, James Carman ja...@carmanconsulting.com wrote: So, why would you use the initialize method of a prototype bean to instantiate components rather than just use whatever method you're going to call on that bean to instantiate your components? Also, why not just use a regular spring bean and just have some factory method that creates components for you (I do this in my application). The point is that it's silly to use the init() method to instantiate components. If your bean is non-prototype, then you just flat out can't do that. Components aren't shareable. If it is prototype, there really is no need. On Sat, Oct 2, 2010 at 3:12 AM, Arjun Dhar dhar...@yahoo.com wrote: https://cwiki.apache.org/WICKET/spring.html ..As per my understanding @SpringBean is to inject context services (like DAO's etc ..assumed to be SINGLETON's) and puts them in a ThreadLocal to be available to Wicket Components. Its a convenient way to provide Context to all Wicket components. The purpose seems clear Context sharing of services. I'd further assume these services to be stateless and also Non-Serializable. Since its objects in a ThreadLocal, I guess one can also use it for injecting components in theory. ..I've never tried it that way, if you have please let me know. Injecting components on the other hand is about Injecting serialized objects (which should be replicatable across in a cluster; unlike your DAO's). ..ok, lets not over complicate it by going that far. But from the problem described it seems he wants to Inject Components not Services. ..and I think that is fair. My point is clear, if you want to inject components, then those have to be in PROTOTYPE scope. @SpringBean is just an annotation for convenience but all the documentation examples point to it being convenient to provide Inject Services to wicket components not Injected components. One is Stateless the other Stateful and serializable, I think conceptually that is a big difference. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/instantiate-panels-in-a-spring-bean-tp2946859p2952221.html Sent from the Users forum 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: Wicket on Google App Engine support for IPageStore on BigTable
Nice Have you tried this with wicket 1.5? On Fri, Oct 1, 2010 at 7:22 AM, Bruno Borges bruno.bor...@gmail.com wrote: Like I've tweeted a few days ago, I've implemented a BigTableGAEPageStore for Wicket so we can advance another step further full compatibility with Google App Engine. The project can be seen at http://code.google.com/p/gawcket It is a fork of wicket-gae-template with a modified Guestbook to not use LoadableDetachableModel and the BigTableGAEPageStore. With this said, you can go to http://gawcket.appspot.com and test it. Submit the form a few times and then modify the URL to reference an older version. You can check this video on YouTube to see how data is being stored at GAE's Datastore: http://youtu.be/ObvA9ao8U2Q I just hope I've done everything correctly on this implementation. So I ask the experts to take a look, and more important: to try it on your apps that run on more than one CPU at GAE. Thank you, Long live Wicket!! Bruno Borges Bruno Borges www.brunoborges.com.br +55 21 76727099 The glory of great men should always be measured by the means they have used to acquire it. - Francois de La Rochefoucauld
Re: instantiate panels in a spring bean
I think its just that the subclasses need to call super() or super(wicketId). On Sat, Oct 2, 2010 at 9:07 PM, fachhoch fachh...@gmail.com wrote: here is my code class UserMenuItems implements MenuItems { @Resource(name=manualService) private ManualService manualService; ListComponent components ; //@PostConstruct void myInit(){ components= new ArrayListComponent(); components.add (new UserGuidePanel()); components.add (new OMBCircularPanel()); components.add (new SendComments()); } @Override public ListComponent getComponents() { myInit(); return components; } private abstract class CustomPanel extends Panel implements IMarkupResourceStreamProvider{ public CustomPanel() { super(MenuItems.menuItemId); } public IResourceStream getMarkupResourceStream(MarkupContainer container,Class? containerClass){ return new StringResourceStream(getMarkUp()); } protected abstract String getMarkUp(); } private class UserGuidePanel extends CustomPanel { public UserGuidePanel() { add(new Link(link){ public void onClick() { manualService.getManualBytes(UserContextHolder.getOrgAbbrev()); } }); } @Override protected String getMarkUp() { return wicket:panel # User Guide /wicket:panel ; } } } now I got a new problem , this is a groovy file and when I call getComponents method I get this error Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at org.apache.wicket.session.DefaultPageFactory.createPage(DefaultPageFactory.java:188) ... 43 more Caused by: java.lang.NoSuchMethodError: gov.hhs.acf.web.util.UserMenuItems$CustomPanel: method init()V not found at gov.hhs.acf.web.util.UserMenuItems$ArtmsUserGuidePanel.init(UserMenuItems.groovy) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:77) at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:107) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:200) at gov.hhs.acf.web.util.UserMenuItems.myInit(UserMenuItems.groovy:33) at gov.hhs.acf.web.util.UserMenuItems$myInit.callCurrent(Unknown Source) at gov.hhs.acf.web.util.UserMenuItems.getComponents(UserMenuItems.groovy:41) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.wicket.proxy.LazyInitProxyFactory$JdkHandler.invoke(LazyInitProxyFactory.java:416) at org.apache.wicket.proxy.$Proxy142.getComponents(Unknown Source) I inject this bean in my page and call getComponents method and I end up with the error above .I wont get this error if I make this a .java , please tell me is it any different to write a wicket component in groovy ? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/instantiate-panels-in-a-spring-bean-tp2946859p2952922.html Sent from the Users forum 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: Within the wicket lifecyle, what is the best place to add a call on the page request
If your using wicket 1.4.10 you may want to look at the new onConfigure method that was added. On Thu, Sep 2, 2010 at 3:38 PM, Brown, Berlin [GCG-PFS] berlin.br...@primerica.com wrote: Where is the best place to add logic to get invoked always when the page is requested? The logic may or may not be tied to the model. Berlin Brown
Re: Scripting language
It depends how much time you want to take to learn the language. With Groovy you don't have to know anything but Java to start with and can learn more about the language as needed or interested. Scala is nothing like Java or any other language. The issues Groovy had with inner classes almost all been fixed since the Stack Overflow posting so as long as your using 1.7.x you should be good there. Whats better is going to come down to what your comfortable with, willing to learn, and if squeezing a couple milliseconds of performance matters or not. On Wed, Sep 1, 2010 at 11:38 AM, James Carman ja...@carmanconsulting.comwrote: On Wed, Sep 1, 2010 at 11:34 AM, Peter Thomas ptrtho...@gmail.com wrote: Done as an experiment a long time ago though, in a big hurry. Personally, I didn't like the combination of Groovy + Wicket, for reasons mentioned in the Scala + Wicket StackOverflow link below. Others may have different opinions though. So, you would recommend using Scala as opposed to Groovy, then? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Single inheritence in parts
class Page extends Page { abstract Component getPart1(); abstract Component getPart2(); } html div wicket:id=id4part1 / wicket:child / div wicket:id=id4part2 / On Thu, Jul 8, 2010 at 5:49 AM, Chris Colman chr...@stepaheadsoftware.comwrote: Search the list for this and you'll find some quite long discussions. Basically, it's not going to happen. This would be multiple inheritance, not single. Hi Jeremy, I hope I don't sound confrontationalist when I say this but this is clearly not a case of multiple inheritance. For this request to be deemed to be multiple inheritance one class/markup file would need to be inheriting from two separate super classes/markup files. That is not what is requested here. There remains only a single super class/markup file. All that is requested here is for multiple markup sections to be overridden in this single inheritance scenario - just like Java does not restrict you to overriding only a single method in any Java class: You can override as many methods as you like in a Java class but that does not break Java's single inheritance model - which constrains the number of base classes to ONE, not the number of methods you can override to ONE. All this user (and others before him) are asking is for wicket to support the overriding of N markup sections without instead of the arbitrarily imposed constraint of N = 1. Jeremy Thomerson -- sent from my smartphone - please excuse formatting and spelling errors On Jul 5, 2010 12:41 AM, Arjun Dhar dhar...@yahoo.com wrote: Hi, all the examples etc suggest that Single inheritence is possible but I cant break it up. The break up is essential when you want to merge common parts of your MARKUP with multiple specific parts of the Child page. Example: HTML HEADtitleBASE TEMPLATE / PARENT PAGE/title/HEAD BODY wicket:child / br / h2Some other Html common/h2 wicket:child / /BODY /HTML --- HTML HEADtitleCHILD PAGE 1/title/HEAD BODY wicket:extend Part 1 specific to Child Page /wicket:extend Any HTML here can be ignored as conceptually anyway what appears in extend is what should be rendered from a child page. wicket:extend Part 2 Specific to Child Page (will appear after common HTML in parent page) /wicket:extend /BODY /HTML I tried this, only the first part renders. I'm wondering if we can add such capability. Conceptually I don't see why not. If already possible do let me know or consider as a feature request?! -Thanks Arjun -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Single-inheritence-in-parts- tp2278064p2278064.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: Single inheritence in parts
Use a pre render listener to call your render method. The constructor stuff is pretty bad though. If you have the listener look for the @PostConstruct annotation it even looks like its supposed to work that way. imo if multiple markup section inheritance were implemented you would really limit how your allowed to use the framework. As it is its simple (ignoring constructor/rendering pains) and in your control not the frameworks. On Thu, Jul 8, 2010 at 5:23 PM, James Carman ja...@carmanconsulting.comwrote: And, this method doesn't really work very well either. You can't reliably call those abstract methods from the superclass' constructor. On Thu, Jul 8, 2010 at 2:47 PM, Chris Colman chr...@stepaheadsoftware.com wrote: class Page extends Page { abstract Component getPart1(); abstract Component getPart2(); } html div wicket:id=id4part1 / wicket:child / div wicket:id=id4part2 / That's the component based workaround that I mentioned which IMHO isn't really the pure markup OO solution we're proposing. I'm hoping for true markup inheritance that supports multiple overridable sections that doesn't mandate a Java side coding change each time a markup editor adds or removes a particular overridable section. On Thu, Jul 8, 2010 at 5:49 AM, Chris Colman chr...@stepaheadsoftware.comwrote: Search the list for this and you'll find some quite long discussions. Basically, it's not going to happen. This would be multiple inheritance, not single. Hi Jeremy, I hope I don't sound confrontationalist when I say this but this is clearly not a case of multiple inheritance. For this request to be deemed to be multiple inheritance one class/markup file would need to be inheriting from two separate super classes/markup files. That is not what is requested here. There remains only a single super class/markup file. All that is requested here is for multiple markup sections to be overridden in this single inheritance scenario - just like Java does not restrict you to overriding only a single method in any Java class: You can override as many methods as you like in a Java class but that does not break Java's single inheritance model - which constrains the number of base classes to ONE, not the number of methods you can override to ONE. All this user (and others before him) are asking is for wicket to support the overriding of N markup sections without instead of the arbitrarily imposed constraint of N = 1. Jeremy Thomerson -- sent from my smartphone - please excuse formatting and spelling errors On Jul 5, 2010 12:41 AM, Arjun Dhar dhar...@yahoo.com wrote: Hi, all the examples etc suggest that Single inheritence is possible but I cant break it up. The break up is essential when you want to merge common parts of your MARKUP with multiple specific parts of the Child page. Example: HTML HEADtitleBASE TEMPLATE / PARENT PAGE/title/HEAD BODY wicket:child / br / h2Some other Html common/h2 wicket:child / /BODY /HTML --- HTML HEADtitleCHILD PAGE 1/title/HEAD BODY wicket:extend Part 1 specific to Child Page /wicket:extend Any HTML here can be ignored as conceptually anyway what appears in extend is what should be rendered from a child page. wicket:extend Part 2 Specific to Child Page (will appear after common HTML in parent page) /wicket:extend /BODY /HTML I tried this, only the first part renders. I'm wondering if we can add such capability. Conceptually I don't see why not. If already possible do let me know or consider as a feature request?! -Thanks Arjun -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Single-inheritence-in-parts- tp2278064p2278064.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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ResourceStreamLocator and mvn resource:resource copying resources in the right directory
If you haven't customized the resource locator your telling wicket to look sibling directory to your classpath root WEB-INF/classes which I THINK is where wicket will start looking for resources. It may be easier to use the build helper plugin which handles resources much better than maven does on it's own. On Thu, Jun 17, 2010 at 3:31 PM, Fernando Wermus fernando.wer...@gmail.comwrote: Hi all, I need to change the development enviroment for IResourceStreamLocator locator = new ResourceStreamLocator(new Path(new Folder(html))); getResourceSettings().setResourceStreamLocator(locator); but, what I also need is that maven copy the resources form src/main/resources to src/main/WEB-INF/html. This is needed because when maven creates the war file the resources should also be located in that directory. I've tried plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-resources-plugin/artifactId version2.4.1/version executions execution idcopy-package-config/id phasepackage/phase goals goalcopy-resources/goal /goals configuration outputDirectory${basedir}/html/outputDirectory resources resource directory${basedir}/src/main/resources/directory filteringtrue/filtering /resource /resources /configuration /execution /executions /plugin and I got [1] Inside the definition for plugin 'maven-resources-plugin' specify the following: configuration ... resourcesVALUE/resources /configuration. I don't know what else to do thanks in advance -- Fernando Wermus. www.linkedin.com/in/fernandowermus
Re: Wicket-Spring 1.4.8 runs into exception in unit test
Did you upgrade to spring 3? I ran into an issue with the testng spring test not creating the application context before wicket tester tried to use it (iirc @BeforeTest executed before the super classes @BeforeClass) Ended up switching anything annotated with @BeforeTest to @BeforeMethod. I assume junit has similar annotations. On Tue, May 4, 2010 at 11:15 PM, Jeremy Thomerson jer...@wickettraining.com wrote: Is your unit test setting up the application before it starts (i.e. in the setUp method if you're using junit?). If you can't figure it out, create a quickstart that demonstrates it, and attach that to a JIRA. -- Jeremy Thomerson http://www.wickettraining.com On Tue, May 4, 2010 at 11:42 AM, Per Newgro per.new...@gmx.ch wrote: Hi *, today i updated wicket from 1.4.7 to 1.4.8. I found a hardcoded dependency to wicket-spring 1.4.1 in my pom. I updated it to 1.4.8 to. Now i get in my page test the following exception in setup. But what does it mean? Where can i change something to make this work. Until now i didn't found a starting point. Maybe someone solved this already. - Unit test layout is related to world-known wicket-example. org.apache.wicket.WicketRuntimeException: There is no application attached to current thread main at org.apache.wicket.Application.get(Application.java:179) at org.apache.wicket.injection.web.InjectorHolder.setInjector(InjectorHolder.java:88) at org.apache.wicket.spring.injection.annot.test.AnnotApplicationContextMock.init(AnnotApplicationContextMock.java:61) at my.chaman.frontend.wicket.MockContext.init(MockContext.java:11) at my.chaman.frontend.wicket.ApplicationForTesting.init(ApplicationForTesting.java:11) at my.chaman.frontend.wicket.pricetype.edit.pricetypetext.PriceTypeTextPageTest.setUp(PriceTypeTextPageTest.java:29) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) at org.junit.runners.ParentRunner.run(ParentRunner.java:236) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) Cheers Per - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket + security, what are the best options? Spring Security reached almost all the way...
You can use Spring security with wicket auth-roles, I works out pretty nice compared to the alternatives. iirc You need do your normal Spring setup, extend AuthenticatedWicketApplication, and AuthenticatedSession which has an authenticate method you'll call your UserDetails bean from. Outdated Link https://cwiki.apache.org/WICKET/spring-security-and-wicket-auth-roles.html#SpringSecurityandWicket-auth-roles-ExampleWicket1.3.5 On Tue, Apr 27, 2010 at 7:20 PM, Jimi jimi.hulleg...@mogul.com wrote: Hi, I'm curious to know what security frameworks you guys are using. The reason I'm asking is because I recently tried out Spring Security together with a simple wicket web application, and was amazed on how easy it was. I applied the steps mentioned in their Pet Clinic tutorial ( http://static.springsource.org/spring-security/site/petclinic-tutorial.html ) more or less exactly as they are, and I didn't have to write a single line of code. All was done using configuration. And even when I replaced the hard coded list of users (with their passwords and groups) with my custom authentication provider (or actually custom UserDetailsService) I only had two write two simple classes that implemented two very simple and logical interfaces respectively, that used my pre existing hibernate configuration and POJOs. BUT... when I wanted to replace the auto generated login screen (which worked great, but just didn't look very appealing) with a custom login page I quickly ran into trouble. If the login was successful then all was fine. But for the cases when the login failed for some reason (like incorrect username/password or database being down) I was having problems accessing the error cause. Because as far as I could tell this message (actually an Exception subclass) was only available as a http session attribute. And it seems that Wicket does everything to hide those from the user, discourages the use of the getHttpServletRequest() and the session attributes of the wicket session object only seems to include attributes with a specific wicket-prefix (like wicket:wicket.myProject:) which of course caused my precious Spring Security session attributes to be unavailable. It was then I started thinking that Spring Security maybe isn't the best security framework together with Wicket. So I started looking around for other alternatives. Wicket-security/WASP/SWARM (still not sure what is what) and wicket auth roles where the first two, and some time later I also heard about wicket-shiro. But all these three seemed to have one or more of the following down sides that irritated me when I evaluated them: 1. Missing official site. [wicket auth roles] At least I can't find it. 2. Seems old. [wicket auth roles + WASP/SWARM] Found a two year old discussion labeled is wicket-auth-roles discontinued?. And the comments on the Getting started with Swarm wiki page is from 2007 and 2008, plus that they talk about Acegi (the old name for Spring Security) and the project has dependencies to Wicket 1.3 and Spring 2.0. 3. Doesn't seem stable. [wicket-shiro] No maven repository (you have to check out trunk and build yourself) and has three different SNAPSHOT dependencies. 4. Seems to require a lot of different project specific java classes. [all three]. The last point, number 4, is a really big down side if you ask me. Keep in mind that I was able to integrate Spring Security almost completely in my wicket web application with very little new java code needed. And that is a good thing, because project specific code is of course much less tested and tried compared to official stable code of reputable frameworks. Plus that I don't have to reinvent the wheel, considering the simple authentication and authorization demands of my project. The only thing stopping me was this stupid error message in the unavailable http session attribute. I actually started converting my project into a WASP/SWARM project, using the example project from http://out-println.blogspot.com/2009/02/wicket-swarm-spring-security-how-to.html , but after creating class after class after class of in-my-eyes boilerplate code I got the overwhelming feeling that I was making my project more and more dirty. And, more importantly, I got the feeling that this shouldn't be so complicated. Other people surely have done this before, and maybe there is a good, stable and official framework/plugin/whatever that makes Spring Security and Wicket integration into a breeze. Which it really was when I followed the Pet Clinic tutorial (see URL above), since that used the auto generated login form. So, any input from you guys? What do you use to secure your wicket web sites? Or maybe someone can explain how to best solve my Wicket+Spring Security problem with the hidden http session attributes? Also, I hope I didn't step on anybody's toes with my list of down sides. Maybe I just haven't found the right web
Re: Repeating form on a page
Would a FormComponentPanel work? http://wicket.apache.org/docs/1.4/org/apache/wicket/markup/html/form/FormComponentPanel.html On Fri, Apr 16, 2010 at 4:48 PM, David Hamilton dhamil...@hermitagelighting.com wrote: Thanks for the great response! I will look at RefreshingView, but right now I'm considering yet another possibility. I'm think of using a display-only ListView for existing items with an edit button to populate a modal dialog. I have yet to get to the Modal dialog part so I'll have to report back on how well that works :). Thanks, David -Original Message- From: Xavier López [mailto:xavil...@gmail.com] Sent: Friday, April 16, 2010 9:33 AM To: users@wicket.apache.org Subject: Re: Repeating form on a page Hi, I've been through a similar issue recently, also with a 'remove' button to delete elements from the list. I ended up using RefreshingView (that's the one I'd reccomend), and it worked nicely. However I'll expose the various solutions I've gone through, hoping to provide some background on the subject. I'd also be grateful on observations and comments on these, because I'm sure I'm missing something and there are still some aspects of these repeaters that I don't understand, so probably part of these thoughts are wrong :) In the first place, I used a ListView repeater. When clicking the 'add new' button, however, I found that all unsaved input entered on the other list elements was lost. That's because ListView refreshes the entire List with the backing Model objects in it's ModelList, and models were not being updated, as forms were not being submitted. So, I had to make the 'add new' link a submit button (skipping default form processing in order to avoid validation errors on incomplete data). However, to my surprise, same thing keeped happening (same for the delete button). Later on, I found about 'ListView#setReuseItems(boolean)', which solved the problem. But to my despair, the delete button always deleted the last element from the List. I still do not understand why, and still don't know what is 'reuseItems' really doing. (Any hints on that one?) Then, I was advised to use RefreshingView, and things were moreover the same, only that instead of having a ModelList given to the repeater, an IteratorModel had to be provided in an overriden method. In this case, a ModelsEqual ReuseItemStrategy had to be provided in order to keep the unsaved inputs in the forms when adding/removing. As a last appreciation, I have to say I hoped there was a specific component addressing this behavior, being it a fairly common arrangement... If one day I fully understand this I'd be happy to implement one myself, even if only for the sake of clarity in my code ;) Thanks, Xavier 2010/4/16 David Hamilton dhamil...@hermitagelighting.com I am new to Wicket (and have had great help from this community so far - thank you). My question here is that I'm trying to setup a simple contact form where a person may have zero or more contacts. My solution is to make the contact info a form within a panel. However, I need to repeat the panel form on the page for each contact (represented by a POJO I can bind to the form elements). I will provide and add button at the bottom of the list to allow them to re-submit the page and add a new empty object bound to a new form element. So my question is really two questions. 1) Is this best approach for this situation? 2) If it is, how do I bind each POJO on the list to a unique form instance? The goal is to allow each contact to be individually edited and saved. Any help is greatly appreciated. Thanks, David Hamilton Web Coordinator (615) 843-3337 Hermitage Lighting Gallery www.hermitagelighting.com Keep it Green! To help protect the environment, please only print this email if necessary. Printing email can cost more than you think. Learn more on our website: http://www.hermitagelighting.com/printing_email.php The information transmitted in this email is intended solely for the individual or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of or taking action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you have received this email in error please immediately notify us by reply email to the sender. You must destroy the original material and its contents from any computer. -- Klein bottle for rent--inquire within. Keep it Green! To help protect the environment, please only print this email if necessary. Printing email can cost more than you think. Learn more on our website:
Re: Type Inference for Wicket 1.4
What happened to the groovy wicket builder project? I know it was on hold until anonymous inner classes were going to be supported which were added in groovy 1.7 irrc. On Fri, Apr 16, 2010 at 7:58 AM, Erdinc kocam...@yahoo.com wrote: Or use wicket as I explained on this page :) http://java.dzone.com/articles/faster-development-easywicket From: James Carman jcar...@carmanconsulting.com To: users@wicket.apache.org Sent: Fri, April 16, 2010 2:05:12 PM Subject: Re: Type Inference for Wicket 1.4 And, nothing is stopping you from doing something like this in your own code. I have a class called ComponentUtils where I put stuff like this. I have two methods: public static T extends Serializable IModelT modelOf(T bean); public static T extends Serializable IModelT modelFor(ClassT beanClass); // This will instantiate the object for you. I also have: public static void detachAllModelFields(Component c); With static imports, you can just use these methods like they're in your classes. On Fri, Apr 16, 2010 at 1:21 AM, Jeremy Thomerson jer...@wickettraining.com wrote: This is the key - and it has been discussed before (in the many grueling 1.4 conversations). The short of it is that with private constructors there's a huge change and an inability to extend. And without the private constructors, the static methods are dumb and extraneous because you would need hundreds of them, and you would need even more of them on your extended model and component classes. -- Jeremy Thomerson http://www.wickettraining.com On Thu, Apr 15, 2010 at 8:51 AM, Thomas Kappler thomas.kapp...@isb-sib.chwrote: On 04/15/10 13:06, James Perry wrote: I can sympathise with that. However I don't think it would be a maintenance nightmare if the constructors are set to private; but that would mean a dramatic API change for such convenience and I'm guessing you're not willing to do this. Apart from the huge change for questionable benefit, that would also remove inheritance, which is essential to the Wicket way, because you can't extend a class with private constructors only. If you can, get a hold of Bloch, Effective Java, and read the insightful chapter on the constructor vs. static factory method trade-off. -- Thomas Best, James. On 14 April 2010 17:01, Igor Vaynbergigor.vaynb...@gmail.com wrote: you are going to have one factory method for each constructor, its going to be a pita to maintain. not something we will want in core. -igor On Wed, Apr 14, 2010 at 8:51 AM, James Perry james.austin.pe...@gmail.com wrote: I am looking to migrate from Wicket 1.3 and Wicket 1.4 and I really like the type-safe goodies but I do not like its verbosity. I was thinking of writing a patch that provides factories to improve the brevity by type inference of the generic invariant. This is an example of my idea: ModelMySuperLongNameForASimpleFooObject model = Model.newModel(); public staticT ModelT newModel() { return new ModelT(); } Feedback welcomed. :-) -- Best, James. - 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 -- --- Thomas Kapplerthomas.kapp...@isb-sib.ch Swiss Institute of Bioinformatics Tel: +41 22 379 51 89 CMU, rue Michel Servet 1 1211 Geneve 4 Switzerland http://www.uniprot.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: Any mature work on integrating Hibernate Validator with Wicket?
If you find anything useful heres some stuff I have put together https://docs.google.com/leaf?id=0ByQjVcAVDuP9MWE4NDcxODMtODZlOC00Mzk0LThhOTUtYmI2MmNlYzEwNWFihl=en I'd upload it somewhere else but it looks like there are already like 4 different projects for this. 2010/4/10 Uwe Schäfer u...@thomas-daily.de David Chang schrieb: hi, did you get the jsr 303 validation code released? where can i find it? i am really excited looking forward to it. about to. just finishing examples tomorrow. stay tuned. cu uwe - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: jqery not getting called after ajax refresh
Try function setup() { $(a.showHidePrograms).click( function () { var $div= $(this).parent().next(div); if($div.attr(class) == 'hide'){ $div.attr(class,show); }else{ $div.attr(class,hide); } } ); } $(document).ready(function(){ setup(); }); Then in your ajax method target.appendJavascript(setup();); On Fri, Apr 9, 2010 at 5:30 PM, Russell Morrisey russell.morri...@missionse.com wrote: It might be a good idea to use an IBehavior to contribute the script. You can add the behavior to the link component in wicket; when the behavior is rendered, it can contribute the javascript code to set it up with jquery. That way, you ensure that every new rendering of the link (which creates a new DOM element) includes your javascript (which binds your handler to the DOM element that is there right now), whether it's the first time on the page or from an ajax request. When you bind your event on page load, the ajax request creates a new DOM element for the link by repainting it, so the link that had your bound event handler goes away. RUSSELL E. MORRISEY Programmer Analyst Professional Mission Solutions Engineering, LLC | russell.morri...@missionse.com | www.missionse.com 304 West Route 38, Moorestown, NJ 08057 -Original Message- From: tubin gen [mailto:fachh...@gmail.com] Sent: Friday, April 09, 2010 2:12 PM To: users Subject: jqery not getting called after ajax refresh I added this jquery code to my page. $(document).ready(function(){ $(a.showHidePrograms).click( function () { var $div= $(this).parent().next(div); if($div.attr(class) == 'hide'){ $div.attr(class,show); }else{ $div.attr(class,hide); } } ); }); inside my html I have a table this contains anchor tag with class showHidePrograms. onclick of this anchor tag the function gets called everything is fine. This page also has some ajaxLinks on click of this link I repaint the table, after thiswhen I click on anchor tag the jquery script is not called , does repainting somehow hides this anchor from jquery ? This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind MSE to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Any mature work on integrating Hibernate Validator with Wicket?
So far this is what I've got. Doesn't do anything with groups or the more advanced stuff but this may be all it takes. public class BeanComponentValidatorT extends AbstractValidatorT { public BeanComponentValidator() { super(); } @Override protected void onValidate(IValidatableT validatable) { for(ConstraintViolationT violation : validate(validatable.getValue())) { validatable.error(new ValidationError().addMessageKey(violation.getMessage())); } } SetConstraintViolationT validate(T value) { Validator validator = Validation.buildDefaultValidatorFactory().getValidator();//this may only be working because I'm using Spring 3.0.2 and Hibernate 3.5 I don't know for sure. return validator.validate(value); } } On Mon, Apr 5, 2010 at 12:15 PM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: Hi! It's quite easy to add trivial min/max/required validators using (any) helper method. Maybe bindgen project would be closest to this.. it's already working with annotations, it could perhaps parse also annotations of property target objects. ** Martin 2010/4/5 David Chang david_q_zh...@yahoo.com: Using Hibernate Validator may bring a few good things: 1. On the data end, it helps to improve data, performance, etc. Also the annotation you write on domain objects get translated into database creation and objects save/update. You can find more on in this area. Obviously, this has nothing to do with wicket. 2. Regarding the web tier, it is often needed to write validation rules such as not null or the maximum chars in an input field being less than 10. In pure wicket, you have to add many validation rules yourself manually for each field. Why should I do so second time in wicket if I can explicitly specify them on domain objects via Hibernate Validator (or Bean Validation, JSR 303, now official)? I hope to see wicket can take adavantage of bean validation to let us code faster and have more maintainable code. Please feel free to comment I am wrong. Best. --- On Mon, 4/5/10, Martin Makundi martin.maku...@koodaripalvelut.com wrote: From: Martin Makundi martin.maku...@koodaripalvelut.com Subject: Re: Any mature work on integrating Hibernate Validator with Wicket? To: users@wicket.apache.org Date: Monday, April 5, 2010, 11:31 AM Do you have any user stories on the topic? It would be useful to evaluate how interesting the use case is. Me myself I cannot immagine anything useful could come out of hibernate validators, only something very trivial. Could be wrong, thoug. ** Martin 2010/4/5 David Chang david_q_zh...@yahoo.com: thanks for chiming in. sorry if i was not clear in prevoius posts. i would like to hear comments whether it is worthy to explore or any benefits. i also would like to know whether there is more mature work since i only found experimental work. i am unable to find anything aobut it on wicketstuff. regards. --- On Mon, 4/5/10, Igor Vaynberg igor.vaynb...@gmail.com wrote: From: Igor Vaynberg igor.vaynb...@gmail.com Subject: Re: Any mature work on integrating Hibernate Validator with Wicket? To: users@wicket.apache.org Date: Monday, April 5, 2010, 11:21 AM you have answered your own question twice, why does anyone else need to reply? -igor On Mon, Apr 5, 2010 at 8:01 AM, David Chang david_q_zh...@yahoo.com wrote: Hi folks, I feel a bit puzzled about not getting any response on this topic. I have to say that I am new in Wicket. If this a bad or wrong question or if this is something not worthy to explore, please feel free to let me know. Thanks for any input! --- On Sun, 4/4/10, David Chang david_q_zh...@yahoo.com wrote: From: David Chang david_q_zh...@yahoo.com Subject: Re: Any mature work on integrating Hibernate Validator with Wicket? To: users@wicket.apache.org Date: Sunday, April 4, 2010, 11:31 PM Found another related work. http://42lines.net/content/integrating-hibernate-validator-and-wicket Any comment or pointers regarding relatively mature work in this regard? Regards. --- On Sat, 4/3/10, David Chang david_q_zh...@yahoo.com wrote: From: David Chang david_q_zh...@yahoo.com Subject: Any mature work on integrating Hibernate Validator with Wicket? To: users@wicket.apache.org Date: Saturday, April 3, 2010, 1:45 PM Is there any mature work on integrating Hibernate Validator with Wicket? I am unable to find any at wicketstuff. Googled and found this work is interesting. http://carinae.net/tag/hibernate-validator/ Any pointers? Any comment? Thanks and Happy Easter!
Component Instantiation Listener Problem
I ran into an issue with a Component Instantiation Listener because the listener is notified before setModelImpl is called. Is this the intended behavior? It limits what you can do in your listener quite a bit.
Re: Component Instantiation Listener Problem
Exactly what I needed. On Mon, Mar 8, 2010 at 12:04 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote: yes it is intended. you are not really meant to mock with the class because the listener is called before the constructors of your subclasses have finished. there are listeners you can use that are called in onbeforerender of components where you can mock with the actual component instance, not just the class. -igor On Mon, Mar 8, 2010 at 8:36 AM, Ben Tilford bentilf...@gmail.com wrote: I ran into an issue with a Component Instantiation Listener because the listener is notified before setModelImpl is called. Is this the intended behavior? It limits what you can do in your listener quite a bit. - 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: [OT] Wicket changed my life !
Models are the hardest part to learn... Because they are really models. On Sat, Feb 20, 2010 at 12:05 AM, Eelco Hillenius eelco.hillen...@gmail.com wrote: Thanks for the kind words people. Definitively a key part of Wicket's success has been an enthusiastic community. The learning curve was slightly steep once we started doing interesting UI interactions (and also that really annoying LazyLoad exception during tests that I still can't figure out), but it's worth the effort. Detachable models are your friend. Eelco - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Future of Wicket Security (WASP/SWARM)
Assuming adopting it into Apache Wicket would mean being in the wicket jar instead of an optional jar. [ ] adopt Wicket security into Apache Wicket [x] keep Wicket security at Wicket Stuff On Fri, Jan 22, 2010 at 11:00 AM, Les Hazlewood lhazlew...@apache.orgwrote: [ ] adopt Wicket security into Apache Wicket [x] keep Wicket security at Wicket Stuff I am biased, yes, but I much prefer Shiro in my Wicket apps too :) - Les On Fri, Jan 22, 2010 at 10:03 AM, Martin Grigorov mcgreg...@e-card.bg wrote: On Fri, 2010-01-22 at 10:52 +0100, Martijn Dashorst wrote: Guys, I'd like to discuss the future of the Wicket Security project. Currently the project lives on/in the wicketstuff repository, but uses group id and package names org.apache.wicket. IMO We should either: - adopt Wicket Security into the Wicket project and move everything over from Wicket Stuff into a subproject within Apache Wicket (and adopt the committers), or - keep Wicket Security at wicketstuff and move it into the fold of wicket stuff, including groupid/package rename. Since development on wicket security 1.4 is currently happening with a 1.4-beta1 just released, it is prudent to decide its future now (with a pending package rename). Considering that both the wicket security contributors and the Wicket PMC members are needed to make this happen, all their opinions are considered binding. [ ] adopt Wicket security into Apache Wicket [x] keep Wicket security at Wicket Stuff I haven't seen in the mailing lists many users of it. Most of them use Spring Security (my statistics). I think there is no need to add one more thing to support by the core committers. P.S. I personally prefer Shiro. Martijn - 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: OSGi Wicket
You might want to check out http://kenai.com/projects/joint the wicket example builds a menu system based of pages / links that are on the classpath which implement a Navigatable interface and have the @Navigation annotation. Still very early in development but it still might do what you need. On Mon, Nov 2, 2009 at 2:29 AM, Giambalvo, Christian christian.giamba...@excelsisnet.com wrote: Maybe OSGi ist o much overhead for my needs. I just want to be able to load WicketPages from a jar during runtime. Lets say i have a wicket app with just the wicketapplication and a homepage (extendable through plugins (jar)). Then during runtime i dropin a jar containing some Pages and i want wicket to be able to reach them. My idea is to to just add the jars to the classloader searchpath and let wicket do the rest. Is this a naive idea or whats the wicket way? Igor wrote (some time ago): what we have in wicket is a IClassResolver which we use to allow for pluggable class resolution. How can this pluggable resolution be accomplished? Greetz and thanks -Ursprüngliche Nachricht- Von: Ernesto Reinaldo Barreiro [mailto:reier...@gmail.com] Gesendet: Sonntag, 1. November 2009 06:40 An: users@wicket.apache.org Betreff: Re: OSGi Wicket I do agree Eclipse buddy system in not proper OSGi, but it makes a lot easier to develop applications because 1- Your application, components, etc, will be same as in any normal Wicket application (no changes to are needed) 2- If you find out OSGi is not suitable at the end, you can always build the same application dropping OSGi and using the same (component) factory services. You will loose hot pluggability and that's it. I never hit serialization limitation myself. On the other hand, I do know from experience that integrating with certain application servers (using bridge approach) can be challenging. This is also something to take into account before deciding to use osgi. I think Igor is totally right about the things you should weight in deciding whether to use OSGi or not for a project. OSGi is a way to achieve pluggability but not the only one. Best, Ernesto On Sun, Nov 1, 2009 at 2:27 AM, David Leangen wic...@leangen.net wrote: If you do go with OSGi, you will have problems with classloaders and deserialization. To my knowledge, nobody has yet solved this (i.e. implemented a good solution) in a decent way. The Eclipse buddy system is not proper OSGi, IMO. pax-wicket does solve this problem (using proper OSGi), but I have never used their approach much even though I use the framework. Here is a post about this by me with some interesting comments from Igor: http://bioscene.blogspot.com/2009/03/serialization-in-osgi.html Good luck to you! =David On Nov 1, 2009, at 3:26 AM, Igor Vaynberg wrote: it is easy to create a pluggable application in wicket. all you need is a registry of component providers, whether it be something like spring [1], a custom registry like brix uses [2] or something more advanced like osgi. the choice should be based on the featureset you need. eg, if you need hot updating, classloader separation, etc, then osgi is good. if not, there are simpler ways to achieve modularity [1] [2]. the great news is that wicket lends itself easily to modularization. [1] http://wicketinaction.com/2008/10/creating-pluggable-applications-with-wicket-and-spring/ [2] http://code.google.com/p/brix-cms/source/browse/#svn/trunk/brix- core/src/main/java/brix/registry -igor 2009/10/29 Tomáš Mihok tomas.mi...@cnl.tuke.sk: Hello, I'm currently designing a new application. One of the requests is to make it modular. I found out that one of the possibilities to enable loading of modules while application is running is OSGi. Is there a tool/plugin/guide to accomplish this or are there any other possibilities of accomplishing same goal? Tom - 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: OSGi Wicket
Forgot to mention, the Netbeans Lookup would also be an option. On Mon, Nov 2, 2009 at 10:45 AM, Ben Tilford bentilf...@gmail.com wrote: You might want to check out http://kenai.com/projects/joint the wicket example builds a menu system based of pages / links that are on the classpath which implement a Navigatable interface and have the @Navigation annotation. Still very early in development but it still might do what you need. On Mon, Nov 2, 2009 at 2:29 AM, Giambalvo, Christian christian.giamba...@excelsisnet.com wrote: Maybe OSGi ist o much overhead for my needs. I just want to be able to load WicketPages from a jar during runtime. Lets say i have a wicket app with just the wicketapplication and a homepage (extendable through plugins (jar)). Then during runtime i dropin a jar containing some Pages and i want wicket to be able to reach them. My idea is to to just add the jars to the classloader searchpath and let wicket do the rest. Is this a naive idea or whats the wicket way? Igor wrote (some time ago): what we have in wicket is a IClassResolver which we use to allow for pluggable class resolution. How can this pluggable resolution be accomplished? Greetz and thanks -Ursprüngliche Nachricht- Von: Ernesto Reinaldo Barreiro [mailto:reier...@gmail.com] Gesendet: Sonntag, 1. November 2009 06:40 An: users@wicket.apache.org Betreff: Re: OSGi Wicket I do agree Eclipse buddy system in not proper OSGi, but it makes a lot easier to develop applications because 1- Your application, components, etc, will be same as in any normal Wicket application (no changes to are needed) 2- If you find out OSGi is not suitable at the end, you can always build the same application dropping OSGi and using the same (component) factory services. You will loose hot pluggability and that's it. I never hit serialization limitation myself. On the other hand, I do know from experience that integrating with certain application servers (using bridge approach) can be challenging. This is also something to take into account before deciding to use osgi. I think Igor is totally right about the things you should weight in deciding whether to use OSGi or not for a project. OSGi is a way to achieve pluggability but not the only one. Best, Ernesto On Sun, Nov 1, 2009 at 2:27 AM, David Leangen wic...@leangen.net wrote: If you do go with OSGi, you will have problems with classloaders and deserialization. To my knowledge, nobody has yet solved this (i.e. implemented a good solution) in a decent way. The Eclipse buddy system is not proper OSGi, IMO. pax-wicket does solve this problem (using proper OSGi), but I have never used their approach much even though I use the framework. Here is a post about this by me with some interesting comments from Igor: http://bioscene.blogspot.com/2009/03/serialization-in-osgi.html Good luck to you! =David On Nov 1, 2009, at 3:26 AM, Igor Vaynberg wrote: it is easy to create a pluggable application in wicket. all you need is a registry of component providers, whether it be something like spring [1], a custom registry like brix uses [2] or something more advanced like osgi. the choice should be based on the featureset you need. eg, if you need hot updating, classloader separation, etc, then osgi is good. if not, there are simpler ways to achieve modularity [1] [2]. the great news is that wicket lends itself easily to modularization. [1] http://wicketinaction.com/2008/10/creating-pluggable-applications-with-wicket-and-spring/ [2] http://code.google.com/p/brix-cms/source/browse/#svn/trunk/brix- core/src/main/java/brix/registry -igor 2009/10/29 Tomáš Mihok tomas.mi...@cnl.tuke.sk: Hello, I'm currently designing a new application. One of the requests is to make it modular. I found out that one of the possibilities to enable loading of modules while application is running is OSGi. Is there a tool/plugin/guide to accomplish this or are there any other possibilities of accomplishing same goal? Tom - 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 Maven in Netbean 6.7
Netbeans has maven built in but it will use an external installation if you tell it to. It sounds like you have it configured to use an external maven installation but don't have maven installed. In Netbeans go to ToolsOptionsMiscMaven and see if you have set it up to use an external maven Then either install maven and point Netbeans to it or use the built in maven 2009/10/28 Tomáš Mihok tomas.mi...@cnl.tuke.sk Hi there, year ago when I started with wicket I had Netbeans 6.5 and after installing Maven I had option to create Wicket Quickstart Archetype. Yesterday I downloaded Netbean 6.7.1 which has built in Maven support but I can't find the wicket archetype. When I tried to add new archetype with information from wicket site netbeans gave me messagebox that said that maven cannot be found. Even the mvn command is not recognized by the command line. Can you help me to set up the environment for wicket development? tm - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Working on a Plugin Framework (Joint)
*A little info: *The framework is using the Netbeans Lookup api to discover joint implementations which are exported services using the standard META-INF/services/xyz.Abc in addition there are annotations used to configure how/where the plugin will be used. Example would be a wicket page, You can configure navigation contexts where you would want to link to that page. Currently what I have working is wicket page navigation (ability to add pages to an application just by dropping in a new jar file). If anyone is interested the source with an example application is available at https://svn.kenai.com/svn/joint~svn Also looking for any suggestions on what types of plugins (wicket related) or not people would like to see. *Project Home* http://kenai.com/projects/joint
Modular Application
Are there any examples of a modular wicket application? I'm specifically having trouble getting maven to compile a jar which contains a sub-class of WebPage. Using 1.4.2 and have attempted with 1.4.1/1.4.0, packaging a Panel etc... all seems to work fine. demo/locator/web/components/BasePage.java:[17,8] cannot find symbol symbol : method add(org.apache.wicket.markup.html.basic.Label) location: class demo.locator.web.components.BasePage
Re: Modular Application
Something other than? dependency groupIdorg.apache.wicket/groupId artifactIdwicket/artifactId version${wicket.version}/version /dependency On Tue, Oct 13, 2009 at 3:30 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote: your module still needs a wicket dependency -igor On Tue, Oct 13, 2009 at 12:20 PM, Ben Tilford bentilf...@gmail.com wrote: Are there any examples of a modular wicket application? I'm specifically having trouble getting maven to compile a jar which contains a sub-class of WebPage. Using 1.4.2 and have attempted with 1.4.1/1.4.0, packaging a Panel etc... all seems to work fine. demo/locator/web/components/BasePage.java:[17,8] cannot find symbol symbol : method add(org.apache.wicket.markup.html.basic.Label) location: class demo.locator.web.components.BasePage - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Modular Application
No base page is in a common module (probably will be used by more than 1 app in the end). The wicket dependency is declared in a parent project (I've tried moving thinking maybe there was something odd going on there). Using Netbeans I can see the dependency is resolved and on the classpath. Looking at the dependency graph there is only 1 version of wicket in any of the modules and they all have 1.4.2. I did see a conflict with log4j versions but after fixing that I'm still getting the same compilation error. To me its a bit odd that its the add method of WebPage that can't be found. On Tue, Oct 13, 2009 at 4:00 PM, James Carman jcar...@carmanconsulting.comwrote: Is BasePage in your webapp module and you have other pages in other modules? If so, you're going to have a circular dependency. What you could do is set up a web-commons module which contains stuff like BasePage and have your other modules use that. Then, your web module declares all of them as dependencies. That's what we do. On Tue, Oct 13, 2009 at 3:36 PM, Ben Tilford bentilf...@gmail.com wrote: Something other than? dependency groupIdorg.apache.wicket/groupId artifactIdwicket/artifactId version${wicket.version}/version /dependency On Tue, Oct 13, 2009 at 3:30 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote: your module still needs a wicket dependency -igor On Tue, Oct 13, 2009 at 12:20 PM, Ben Tilford bentilf...@gmail.com wrote: Are there any examples of a modular wicket application? I'm specifically having trouble getting maven to compile a jar which contains a sub-class of WebPage. Using 1.4.2 and have attempted with 1.4.1/1.4.0, packaging a Panel etc... all seems to work fine. demo/locator/web/components/BasePage.java:[17,8] cannot find symbol symbol : method add(org.apache.wicket.markup.html.basic.Label) location: class demo.locator.web.components.BasePage - 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: Modular Application
@James Everything works if I don't have a sub-class of WebPage outside the war project. @Pedro From command line or on the parent project I get the same error. Also deleted the org/apache/wicket directory out of my .m2 repository and re-downloaded. On Tue, Oct 13, 2009 at 4:19 PM, Pedro Santos pedros...@gmail.com wrote: Isn't it the case for you manually run mvn install on your parent project? Your local repository may have old .class bytecodes On Tue, Oct 13, 2009 at 5:11 PM, Ben Tilford bentilf...@gmail.com wrote: No base page is in a common module (probably will be used by more than 1 app in the end). The wicket dependency is declared in a parent project (I've tried moving thinking maybe there was something odd going on there). Using Netbeans I can see the dependency is resolved and on the classpath. Looking at the dependency graph there is only 1 version of wicket in any of the modules and they all have 1.4.2. I did see a conflict with log4j versions but after fixing that I'm still getting the same compilation error. To me its a bit odd that its the add method of WebPage that can't be found. On Tue, Oct 13, 2009 at 4:00 PM, James Carman jcar...@carmanconsulting.comwrote: Is BasePage in your webapp module and you have other pages in other modules? If so, you're going to have a circular dependency. What you could do is set up a web-commons module which contains stuff like BasePage and have your other modules use that. Then, your web module declares all of them as dependencies. That's what we do. On Tue, Oct 13, 2009 at 3:36 PM, Ben Tilford bentilf...@gmail.com wrote: Something other than? dependency groupIdorg.apache.wicket/groupId artifactIdwicket/artifactId version${wicket.version}/version /dependency On Tue, Oct 13, 2009 at 3:30 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote: your module still needs a wicket dependency -igor On Tue, Oct 13, 2009 at 12:20 PM, Ben Tilford bentilf...@gmail.com wrote: Are there any examples of a modular wicket application? I'm specifically having trouble getting maven to compile a jar which contains a sub-class of WebPage. Using 1.4.2 and have attempted with 1.4.1/1.4.0, packaging a Panel etc... all seems to work fine. demo/locator/web/components/BasePage.java:[17,8] cannot find symbol symbol : method add(org.apache.wicket.markup.html.basic.Label) location: class demo.locator.web.components.BasePage - 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 Henrique Oliveira dos Santos
Re: Perspective from fellow Wicketers on ColdFusion job oppty.
It only gets worse the longer you work with ColdFusion. Where I work were finally working towards abandoning it completely. Some paint points: * No null value, you get a bunch of methods to check various types of objects to see if they are undefined * You can only specify return types of the core objects provided by ColdFusion * No method overloading * Calling a method or function is usually about half a dozen lines of code. * Same with actually creating an object/component * cfthis cfthat gets really old and since the language doesn't have a schema definition for its tags (would be impossible because its not valid xml to begin with) you don't get decent IDE support. * No build or deployment tools (unless copying files ftp counts). You have to create your own. On Wed, Oct 7, 2009 at 11:33 PM, Jamie Swain jpsw...@gmail.com wrote: Hey guys, I know this is an unusual question for this list, but I was hoping that I could get some viewpoints and info about something. I recently interviewed for a job opportunity at a company that runs their core app, comprised of both web interface and web services, in a cool niche that I would like to work in. Also the company seems very cool over all. It's a nice size, a small development team, and the guys I met seemed really good. The big problem is that I'd be working mostly in ColdFusion. When they told me that in the initial, pre-interview email, I thought jeez is anybody using that still. I had never had any hands-on experience with it, so I spent the weekend with a decent book working through some exercises on my laptop. What I found was that my initial impression was, this language sucks, it is a pain to use. I admit this is only after spending about 3 days with CF and I really didn't go into it with my mind wide open. So, my question would be, if anyone here has experience with CF, is it really as bad as it seems? As someone with a passionate, nearly religious fondness of Wicket, will I hate every minute of CF as much as I fear I might? Is there any chance that after trying to accept some of the things I already don't like that I will find that I can still enjoy programming a cool product even if the underlying system sucks? Thanks for any info/thoughts! - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Firefox, be afraid be very afraid!!!
It's not Wicket or Firefox its the caching settings (probably on the server). If the cached resources aren't expired the browser is supposed to use what it has cached. Best to set the far future expires to something really short or 0 in development. On Tue, Aug 4, 2009 at 10:17 PM, Jeremy Thomerson jer...@wickettraining.com wrote: Strange - I use FF almost exclusively and have never had this problem. Did you use something like HttpFox or TamperData to look at the headers and see if the expiry headers were coming back correctly? -- Jeremy Thomerson http://www.wickettraining.com On Tue, Aug 4, 2009 at 9:12 PM, Steve Tarltonstarl...@gmail.com wrote: I just spent the better half of a day WASTED because I use Firefox for testing my Wicket development. For the life of me, I couldn't figure out why I couldn't get a simple data picker to center. I wouldn't call myself an expert at html so I doubted myself. Turns out that Firefox decided that there is no need to update changes if there is something in cache -- WTF!!! It wasn't until I got so fed up I tried Internet Explorer and saw that what I was doing was working all along. I exited Firefox and restarted it and still not working. It wasn't until I went in and cleared my private cache and then visited my app again that it did what it was suppose to do. I of course poked around in Firefox to turn that !...@#$%! cache off but the only thing I found was a setting that would automatically flush it when I exited (not closed) Firefox. I will probably still use it for normal surfing but unless there is a way to stop it from not updating my html changes, I will NOT be useing it for Wicket development! - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: best or common practice for application plug-ins
I think maven 3 is supposed to allow using OSGi bundles for versioning etc.. On Mon, Jul 20, 2009 at 8:12 AM, Sam Stainsby s...@sustainablesoftware.com.au wrote: Thanks Olger, that gives me some ideas. I wonder if a maven could somehow be coerced to do the dependency/downloading part, perhaps with some new plugin. On Mon, 20 Jul 2009 13:39:10 +0200, Olger Warnier wrote: Hi Sam, How we do it with that service: We have a file listener class that checks if OSGI based jar files are put in a directory. If so, these are automatically deployed to the OSGI runtime by the BundleDeployer class. We miss a download / version updates part, but you could add that by downloading to the directory specfified by the FileListener. There is no need to restart, OSGI updates the whole automatically (we use embedded felix for this). Something to keep in mind, be careful with the OSGI versioning in this as that puts versions next to eachother. This is used to provide custom, for our project - wicket based, user interface functionality. Kind Regards, Olger On 20 jul 2009, at 12:51, Sam Stainsby wrote: OK, so I am an sys admin running some sort of OSGI-based application and now I want to add your questionnaire service and any other modules that it depends on. I also want to occasionally check for version updates. I want these updates and dependencies to be downloaded and put in the correct place for me so that when I restart the application, they are loaded. How do I do that? If it were Zope, I would add one line to a 'buildout.cfg' file and run the 'buildout' script, and restart Zope. On Mon, 20 Jul 2009 10:33:45 +0200, Olger Warnier wrote: In our project we use OSGI to get a plugin structure. Interfaces defined in the 'core' layer are implemented in OSGI modules. For a simple example see: http://www.joiningtracks.org/svn/his/trunk/ questionnaire/ (SVN code repo) It's a questionnaire service that uses OSGI to load the question forms (based on wicket) Our whole platform is constructed like that, the questionnaire service is the most simple one and easily adapted for your own use. - 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: [OFF TOPIC] Java desktop applications
Take a look at Griffon On Thu, Jun 11, 2009 at 8:18 PM, James Carman jcar...@carmanconsulting.comwrote: Jide is very nice, if you want to pay for something. Their licenses are very reasonable. On Thu, Jun 11, 2009 at 5:54 PM, Jeremy Thomersonjer...@wickettraining.com wrote: I would like to build a nice-looking java desktop application. I hope that isn't an oxymoron :). I have built some desktop apps before - a lot of command line utilities in various languages, and some GUI apps (perl, java, python, php, even vb (yikes!), c# etc...). The question is - what framework do you use for your UI components and layout on a desktop app? I would like to use Java because I'll be most efficient with it and it will work for me on linux machines and others on Windoze, etc.. But when I've built Swing apps in the past, I have hated having to layout everything in the code and I can never make anything aesthetically pleasing. So 1 - do you have any recommendations on a good framework for nice looking desktop apps? 2 - any other recommendations for desktop apps in general? 3 - It should be a lightweight, easy install - and I would prefer to stay away from using the Eclipse framework for building the app (I use the IDE but it doesn't need to be something that heavy for the GUI) 4 - I have even thought about building an app that opens a swing window that contains an embedded browser and jetty servlet running the app so that I can use Wicket. Has anyone thought of or done this before? Basically, it's a CRUD application, but containing personal data that the user should not store on someone else's server. I would use an embedded database that stores the data with encryption. Ideas? -- Jeremy Thomerson http://www.wickettraining.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket Quickstart vs WIA eclipse projects: why so different?
Something that may be worth trying is mvn jetty:run-exploded On Fri, May 29, 2009 at 6:10 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote: like i said, the best way is to right click the Start class and do run as java application. you can, of course, do it any other way you like - including installing jetty eclipse launcher plugin. -igor On Fri, May 29, 2009 at 3:17 PM, David Brown dbr...@sexingtechnologies.com wrote: Hello Igor, thanks for the reply. Can I just ignore the QuickStart embedded jetty and install jetty on Eclipse then do a run-as without any issues? Please advise, David. - Original Message - From: Igor Vaynberg igor.vaynb...@gmail.com To: users@wicket.apache.org Cc: david da...@davidwbrown.name Sent: Friday, May 29, 2009 4:51:02 PM GMT -06:00 US/Canada Central Subject: Re: Wicket Quickstart vs WIA eclipse projects: why so different? why dont you just start the project from eclipse directly using the Start class, that way you get debug and hotswap - which should be the real student's dream :) -igor On Fri, May 29, 2009 at 2:53 PM, David Brown dbr...@sexingtechnologies.com wrote: Hello Martin, Jeremy, dev, gurus, users and mortals. I have just finished ch. 13 of the WIA.pdf. I have followed closely the reading using the wicket-in-action eclipse project. I have the wicket-in-action running under the: mvn jetty:run. The wicket-in-action project is redeployed every 60 seconds (a student's dream). After finishing the 13th chapter I decided to leave the nest for the 1.4rc QuickStart. The new QuickStart project expanded and imported into the Eclipse workspace no-problemo. The mystery is what am I doing wrong to get the automatic 60 second re-deploy. As it stands now I have to kill jetty, mvn package and then restart jetty (mvn jetty:run). I have pasted in the: ** context-param param-nameconfiguration/param-name param-valuedevelopment/param-value /context-param ** from the wicket-in-action web.xml but no change. The Windows cmd console shows the usual Wicket WARNING: running in development mode. I plan to use the wicket-in-action almost verbatim including the Hibernate DAO for my current gig. It is probably only a few weeks before they start holding my feet to the fire. Please advise, David. - 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: 60% waste
Have you looked at selenium? Your not really unit testing here. On Sat, May 9, 2009 at 7:41 AM, Marko Sibakov marko.siba...@ri.fi wrote: Like Martijn said i also strongly recommend to take a look at the jdave-wicket's selectors (http://www.jdave.org/). examples = http://svn.laughingpanda.org/svn/jdave/trunk/jdave-wicket/src/test/jdave/wicket/PageWithItemsSpec.java with form tester it goes like this = form = wicket.newFormTester(selectFirst(Form.class, form).from(panel).getPageRelativePath()); form.setValue(name, wicket); form.setValue(address, jdave); form.submit(); MSi Martijn Dashorst wrote: See jdave-wicket for better test support. Slated to come to you in Wicket 1.5 Martijn On Fri, May 8, 2009 at 5:48 PM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: Hi! I use TDD: I spend 60% of my time type-checking and path-checking my wicketTests and components. I always have the wrong path and I must prinDocument and iterate to get it right Anybody have the same experience? How about introducing type-safety and path-safety/identity into component hierarchies? Can this be done? ** 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: serialVersionUID
I've always seen it done as public. Anyways I checked the javadoc and the access modifier does not matter. On Sun, Apr 12, 2009 at 1:56 AM, Eelco Hillenius eelco.hillen...@gmail.comwrote: The purpose of the *public* static final long serialVersionUID is for long Why do you stress *public*? private is the norm for serialVersionUID. Eelco - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: serialVersionUID
The purpose of the *public* static final long serialVersionUID is for long term storage or situations where you may potentially have made modifications to the class that make it incompatible with previous versions (distributed apps/clustering). I'd say that its easier to just add it in case you ever need it, its only 1 line of code. On Sat, Apr 11, 2009 at 4:22 PM, Luther Baker lutherba...@gmail.com wrote: You don't need a serialVersionUID for serialization to work (and certainly not a unique one, or your plan for using 1L wouldn't very well). Thanks. -Luther
Re: GWT vs. Wicket?
Working with GWT is kind of a nightmare. You have to write custom build scripts for any library / module you use so that the sources are included in the jar and available to the GWT compiler. Until GWT has a build system that is better I'll stay away from it. Really a shame because the programming model used is nice. On Wed, Apr 8, 2009 at 9:17 AM, Craig Tataryn crai...@tataryn.net wrote: Peter Thomas did a great side by side you should checkout: http://ptrthomas.wordpress.com/2008/09/04/wicket-and-gwt-compared-with-code/ Craig. On 8-Apr-09, at 8:11 AM, Casper Bang wrote: I was just wondering about the Wicket community's opinion of GWT. It seems to share many of the positive characteristics as Wicket (focus on code, not markup) with the major difference/benefit as I see, that is does not maintain any state on the server. Also, with GWT you seem to get more readily available components (i.e. http://extjs.com/explorer/). The bennefit of Wicket as I can see, is that applications potentially degrade nicer and the programming model hides the Ajax RPC better. Any thoughts? /Casper
Re: GWT vs. Wicket?
There was a grails-wicket plugin but I don't think it works with any recent version. They are also working on making grails more modular with standalone GORM etc... Also heard somewhere that Groovy 1.7 or 1.8 will allow anonymous inner classes. On Wed, Apr 8, 2009 at 8:53 PM, Andre Prasetya andre.prase...@gmail.comwrote: Zk ia good for buildng qpplication bt the zul wndow layout is just like that. And the license os stopping us from buildng commercial apps wthout buying their licnse.it worth th money but if u live in an economically poor country,you can't afford it. I wish wicket can play nicely with grails,having something like active record to use with wicket is nice. Andre On 4/8/09, Azzeddine Daddah waarhei...@gmail.com wrote: Hi, You may also take a look at ZK framework. It's also a kind of framework which can be used to build beautiful RIA's. You can chose to use it by writing your app in just Java or in Java/Zul. http://www.zkoss.org But in my opinion, Wicket stills beter then these kind of frameworks :) Regards, Azzeddine Daddah www.hbiloo.com On Wed, Apr 8, 2009 at 4:46 PM, Casper Bang cas...@jbr.dk wrote: Peter Thomas did a great side by side you should checkout: Good article, if perhaps a bit one-sided. I can understand how separation-of-concerns/composability comes slightly more natural to Wicket. However the performance, flexibility and component repertoire of GWT along with steadily more capable browsers leaves me with a feeling that I'll get more bang for my buck. Until GWT has a build system that is better I'll stay away from it. Since version 1.6 today, it uses normal Ant scripts (which I suppose is easy to mavenize). Thanks guys, /Casper -- Sent from my mobile device -Andre- A Programmer's Diary http://rafunkel.blogspot.com My journey in enjoying spring... - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org