SV: Question on close button of modal windows
You could do it with JQuery directly, or implement WiQuery dialog. The latter is preferrable, because if you close a ModalWindow in the browser with no roundtrip then the server side state will not be notified that it is closed, and thus might reappear if the page is refreshed as a whole. - Tor Iver - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
SV: Type Inference for Wicket 1.4
ModelMySuperLongNameForASimpleFooObject model = Model.newModel(); Go on a hike in the Greek islands for six months, when you come back download Java 1.7 where you can do neato stuff like ModelMySuperLongNameForASimpleFooObject model = new Model(); Or use an IDE which automatically fills the second set of braces for you (I think most except Apple's XCode do). (Young whippersnappers have it too easy - imagine back in the day, typing - in vi, with no code completion - insanely long namespace-mangled names of C methods in libraries like Xt...) - Tor Iver - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
How to redirect to other page after downloading file
Hello, I download file by getRequestCycle().setRequestTarget(requestTarget); How can I redirect to other page after download? setResponsePage(MyPage.class); does not work Thanks in advance -- View this message in context: http://n4.nabble.com/How-to-redirect-to-other-page-after-downloading-file-tp1866644p1866644.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: MarkupComponentBorder and deprecation
hmm, interesting, that would be nice-to-have. now it would be even better if inside this behavior one could add other markup just like labels which i is not possible with a MarkupComponentBorder. is that somehow doable? Antoine On Wed, Apr 14, 2010 at 5:59 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote: no, you cant attach markup to behavior but you can create an equivalent of MarkupComponentBorder using a behavior. -igor On Wed, Apr 14, 2010 at 1:40 AM, Antoine van Wel antoine.van@gmail.com wrote: Hi, quick question: since IComponentBorder and Component.setComponentBorder are deprecated, how should I use MarkupComponentBorder - or shouldn't I use that at all? You can't attach a markup file to a behavior, right? Antoine - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: http://cwiki.apache.org/WICKET is down
Not much - the last news was here - https://blogs.apache.org/infra/ - and it looks as if the CWiki system's being restored at present as some of the area's are there, but many aren't, yet. /Gwyn On 14 April 2010 23:26, Carl Sziebert car...@gmail.com wrote: Any updates on when the reference site will be available again? On Sat, Apr 10, 2010 at 11:02 AM, Brian Topping topp...@codehaus.org wrote: Yes, I saw that too. Apache infrastructure was attacked this week, I presume they are working on repairing things right now. On Apr 10, 2010, at 2:00 PM, Carlos Chávez wrote: Hello everyone. I just want to let all know that the wiki is seems down, can anyone confirm this ? I understand the wiki is on http://cwiki.apache.org/WICKET
AjaxSubmitLink javadocs
Hi, I'm a liitle confused about AjaxSubmitLink's JavaDoc, and the code inside it... I'm using Wicket 1.3.6: If/when javascript is turned off in the browser, or it doesn't support javascript, then the browser will not respond to the onclick event, using the href directly. Wicket will then use a normal request target, and call the serverside onClick with a null {...@link AjaxRequestTarget}. First question is, does it really mean 'serverside onClick' ? Or should it read 'serverside onSubmit' ? And then, in the code, I see : protected void onComponentTag(ComponentTag tag) { super.onComponentTag(tag); if (isLinkEnabled()) { if (tag.getName().toLowerCase().equals(a)) { tag.put(href, #); } } else { disableLink(tag); } } So it seems this component never gets to have anything else than # in its href, so it won't do anything when js is not enabled... Is this an error in the documentation ? Thanks, Xavier
Re: Wicket Wiki
Not really, but it looks as if there's some progress and the machines restore is underway, although it's not got to the Wicket spaces yet. Note that Apache was attacked the CWiki machine was one of the ones open to compromise - see https://blogs.apache.org/infra/ - but while it looks as if it's presently being restored, I'd expect that the other systems were more critical to restore first. /Gwyn On 14 April 2010 15:12, Jeffrey Schneller jeffrey.schnel...@envisa.comwrote: Any ideas on when the Wicket Wiki will be back up? http://cwiki.apache.org/WICKET Thanks.
Re: Type Inference for Wicket 1.4
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. Best, James. On 14 April 2010 17:01, Igor Vaynberg igor.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 static T 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
show ConfirmDialog in the middle of some action/function
Hello dear Wicket Gurus, I'm currently rewrite one fat client java program to wicket one. And I have to say that mostly this isn't a big issue but there is one thing that I really miss in wicket. In a program is a lot of business logic there and we used ConfirmDialogs to go through branches. For ex. public void save(){ // do some stuff here if( ! MessageDialog.openConfirm(some confirm message)){ return; } // do more stuff here if( ! MessageDialog.openConfirm(some other confirm message)){ // do one more stuff here } // do end stuff here } Is it possible to write wicket ConfirmDialog component to show HTML confirmation dialog and then go back to my previously executed method/place. Maybe with custom request cycle? Regards Roman - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
resources folder / package
Hello to you all, it's been a very long time since I wrote here. I have a question regarding folder locations. I am working with WiQuery and it is unbelievable great. Also the support there (thanks indiana ;) ) In WiQuery there are 'themes' and the location of the CSS and images is in a separate folder called 'resources' , which has the same structure as of the Java classes themselves. I wanted to do the same in my project without success. Should I configure something other than just put the same hierarchy? thanks for the help. My question is Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary
Re: resources folder / package
You can define packages and put all CSS / JS files into them. Note that there must be some class also along with them, it may be an empty class. Then you can reference these resources using that class declaration. Note that if your css uses images, then you have to put correct paths into that css. Sigmar On Thu, Apr 15, 2010 at 2:43 PM, Eyal Golan egola...@gmail.com wrote: Hello to you all, it's been a very long time since I wrote here. I have a question regarding folder locations. I am working with WiQuery and it is unbelievable great. Also the support there (thanks indiana ;) ) In WiQuery there are 'themes' and the location of the CSS and images is in a separate folder called 'resources' , which has the same structure as of the Java classes themselves. I wanted to do the same in my project without success. Should I configure something other than just put the same hierarchy? thanks for the help. My question is Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary
Re: Type Inference for Wicket 1.4
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
Re: jqery not getting called after ajax refresh
My link is a static html link its not ajax link ,and this link resides in AjaxFallbackDefaultDataTable , the repaint of this table containing is handled by AjaxFallbackDefaultDataTable. Please tell me how can I add the java script in this case ? -- View this message in context: http://n4.nabble.com/jqery-not-getting-called-after-ajax-refresh-tp1872270p1893590.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
Wicket + Spring 3 + Hibernate
Hi, I am at a point where I need to upgrade my application from Spring 2.5.6 to Spring 3.0.1.RELEASE. I have a working application and when I update Spring, I see the following exception on deployment: Caused by: org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'sessionFactory': FactoryBean which is currently in creation returned null from getObject at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:157) at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:109) at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1387) I've simplified my Hibernate configuration to: bean id=sessionFactory class=org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean property name=dataSource ref=dataSource / property name=hibernateProperties props prop key=hibernate.dialectorg.hibernate.dialect.Oracle10gDialect/prop prop key=hibernate.hbm2ddl.autovalidate/prop /props /property property name=packagesToScan list valuecom.mycompany.model/value /list /property /bean Finally, here is the dependency list in Maven for my Spring and Hibernate libraries with wicket.version=1.4.7 and spring.version=3.0.1.RELEASE: dependency groupIdorg.apache.wicket/groupId artifactIdwicket-spring/artifactId version${wicket.version}/version /dependency dependency groupIdorg.springframework/groupId artifactIdorg.springframework.context/artifactId version${spring.version}/version /dependency dependency groupIdorg.springframework/groupId artifactIdorg.springframework.core/artifactId version${spring.version}/version /dependency dependency groupIdorg.springframework/groupId artifactIdorg.springframework.web/artifactId version${spring.version}/version /dependency dependency groupIdorg.springframework/groupId artifactIdorg.springframework.web.servlet/artifactId version${spring.version}/version /dependency dependency groupIdorg.springframework/groupId artifactIdorg.springframework.beans/artifactId version${spring.version}/version /dependency dependency groupIdorg.springframework/groupId artifactIdorg.springframework.oxm/artifactId version${spring.version}/version /dependency dependency groupIdorg.springframework/groupId artifactIdorg.springframework.orm/artifactId version${spring.version}/version /dependency dependency groupIdjavax.servlet/groupId artifactIdservlet-api/artifactId version${servlet-api.version}/version scopeprovided/scope /dependency dependency groupIdorg.hibernate/groupId artifactIdhibernate-core/artifactId version3.3.2.GA/version /dependency dependency groupIdjavax.persistence/groupId artifactIdpersistence-api/artifactId version1.0/version /dependency dependency groupIdorg.hibernate/groupId artifactIdhibernate-annotations/artifactId version3.4.0.GA/version /dependency I have successfully integrated Spring 3 and Hibernate in a RESTful web service and I have successfully integrated Wicket 1.4.7 with Spring 2.5.6 and Hibernate, but I am seeing errors specifically with Wicket and Spring 3 with Hibernate. Has anyone successfully integrated the three technologies? Any suggestions? Thanks! Steve - 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
have you tried using jQuery 1.4 live/delegate handlers? they will attach events to elements even after initial dom load. -- View this message in context: http://n4.nabble.com/jqery-not-getting-called-after-ajax-refresh-tp1872270p1896790.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket + Spring 3 + Hibernate
What error? Next time post the stack :) On Thu, Apr 15, 2010 at 5:47 PM, Steven Haines lyg...@yahoo.com wrote: Hi, I am at a point where I need to upgrade my application from Spring 2.5.6 to Spring 3.0.1.RELEASE. I have a working application and when I update Spring, I see the following exception on deployment: Caused by: org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'sessionFactory': FactoryBean which is currently in creation returned null from getObject at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:157) at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:109) at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1387) I've simplified my Hibernate configuration to: bean id=sessionFactory class=org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean property name=dataSource ref=dataSource / property name=hibernateProperties props prop key=hibernate.dialectorg.hibernate.dialect.Oracle10gDialect/prop prop key=hibernate.hbm2ddl.autovalidate/prop /props /property property name=packagesToScan list valuecom.mycompany.model/value /list /property /bean Finally, here is the dependency list in Maven for my Spring and Hibernate libraries with wicket.version=1.4.7 and spring.version=3.0.1.RELEASE: dependency groupIdorg.apache.wicket/groupId artifactIdwicket-spring/artifactId version${wicket.version}/version /dependency dependency groupIdorg.springframework/groupId artifactIdorg.springframework.context/artifactId version${spring.version}/version /dependency dependency groupIdorg.springframework/groupId artifactIdorg.springframework.core/artifactId version${spring.version}/version /dependency dependency groupIdorg.springframework/groupId artifactIdorg.springframework.web/artifactId version${spring.version}/version /dependency dependency groupIdorg.springframework/groupId artifactIdorg.springframework.web.servlet/artifactId version${spring.version}/version /dependency dependency groupIdorg.springframework/groupId artifactIdorg.springframework.beans/artifactId version${spring.version}/version /dependency dependency groupIdorg.springframework/groupId artifactIdorg.springframework.oxm/artifactId version${spring.version}/version /dependency dependency groupIdorg.springframework/groupId artifactIdorg.springframework.orm/artifactId version${spring.version}/version /dependency dependency groupIdjavax.servlet/groupId artifactIdservlet-api/artifactId version${servlet-api.version}/version scopeprovided/scope /dependency dependency groupIdorg.hibernate/groupId artifactIdhibernate-core/artifactId version3.3.2.GA/version /dependency dependency groupIdjavax.persistence/groupId artifactIdpersistence-api/artifactId version1.0/version /dependency dependency groupIdorg.hibernate/groupId artifactIdhibernate-annotations/artifactId version3.4.0.GA/version /dependency I have successfully integrated Spring 3 and Hibernate in a RESTful web service and I have successfully integrated Wicket 1.4.7 with Spring 2.5.6 and Hibernate, but I am seeing errors specifically with Wicket and Spring 3 with Hibernate. Has anyone successfully integrated the three technologies? Any suggestions? Thanks! Steve - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket + Spring 3 + Hibernate
I posted a few lines from the error, but here is the complete stack trace. My initial searches on this pointed to a circular dependency caused by autowiring, which may or may not be the case - when I removed the default-autowire parameter from my beans node then the error changed to state that the bean needs a sessionFactory (because I removed it.) So note sure if I took a step forward or back. If you are interested I created a sample project that produces the error, I can zip it up and mail it to you (but dont want to spam the whole list with an attachment... Thanks Steve Stack Trace: Apr 15, 2010 11:05:11 AM org.apache.catalina.core.StandardContext listenerStart SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'messageDao' defined in file [/Users/scadmin/Downloads/apache-tomcat-6.0.20/webapps/wicketspringhibernateexample/WEB-INF/classes/com/informit/dao/HibernateMessageDaoImpl.class]: Unsatisfied dependency expressed through bean property 'sessionFactory': : Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xml]: Unsatisfied dependency expressed through bean property 'eventListeners': : Error creating bean with name 'transactionManager' defined in class path resource [applicationContext.xml]: Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'sessionFactory': FactoryBean which is currently in creation returned null from getObject; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager' defined in class path resource [applicationContext.xml]: Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'sessionFactory': FactoryBean which is currently in creation returned null from getObject; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xml]: Unsatisfied dependency expressed through bean property 'eventListeners': : Error creating bean with name 'transactionManager' defined in class path resource [applicationContext.xml]: Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'sessionFactory': FactoryBean which is currently in creation returned null from getObject; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager' defined in class path resource [applicationContext.xml]: Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'sessionFactory': FactoryBean which is currently in creation returned null from getObject at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireByType(AbstractAutowireCapableBeanFactory.java:1150) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1040) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:511) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:450) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:290) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:287) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:189) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:562) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:871) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:423) at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:272) at
Re: Wicket + Spring 3 + Hibernate
Sorry for the spam, I found the root cause of the problem - I guess there is some kind of circular dependency in Spring/Hibernate that appeared when I integrated the app with Wicket... I dont full understand, but I changed application context XML file to wire by name instead of type and the problem went away: beans default-autowire=byName xmlns=http://www.springframework.org/schema/beans; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:context=http://www.springframework.org/schema/context; xmlns:util=http://www.springframework.org/schema/util; xsi:schemaLocation=http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd; I appreciate your responses and I hope that someone can find my couple days of troubleshooting helpful :) Thanks Steve - Original Message From: Steven Haines lyg...@yahoo.com To: users@wicket.apache.org Sent: Thu, April 15, 2010 11:14:49 AM Subject: Re: Wicket + Spring 3 + Hibernate I posted a few lines from the error, but here is the complete stack trace. My initial searches on this pointed to a circular dependency caused by autowiring, which may or may not be the case - when I removed the default-autowire parameter from my beans node then the error changed to state that the bean needs a sessionFactory (because I removed it.) So note sure if I took a step forward or back. If you are interested I created a sample project that produces the error, I can zip it up and mail it to you (but dont want to spam the whole list with an attachment... Thanks Steve Stack Trace: Apr 15, 2010 11:05:11 AM org.apache.catalina.core.StandardContext listenerStart SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'messageDao' defined in file [/Users/scadmin/Downloads/apache-tomcat-6.0.20/webapps/wicketspringhibernateexample/WEB-INF/classes/com/informit/dao/HibernateMessageDaoImpl.class]: Unsatisfied dependency expressed through bean property 'sessionFactory': : Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xml]: Unsatisfied dependency expressed through bean property 'eventListeners': : Error creating bean with name 'transactionManager' defined in class path resource [applicationContext.xml]: Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'sessionFactory': FactoryBean which is currently in creation returned null from getObject; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager' defined in class path resource [applicationContext.xml]: Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'sessionFactory': FactoryBean which is currently in creation returned null from getObject; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xml]: Unsatisfied dependency expressed through bean property 'eventListeners': : Error creating bean with name 'transactionManager' defined in class path resource [applicationContext.xml]: Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'sessionFactory': FactoryBean which is currently in creation returned null from getObject; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager' defined in class path resource [applicationContext.xml]: Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'sessionFactory': FactoryBean which is currently in creation returned null from getObject at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireByType(AbstractAutowireCapableBeanFactory.java:1150) at
Re: MarkupComponentBorder and deprecation
sure, you just have to build the render process yourself. -igor On Thu, Apr 15, 2010 at 2:08 AM, Antoine van Wel antoine.van@gmail.com wrote: hmm, interesting, that would be nice-to-have. now it would be even better if inside this behavior one could add other markup just like labels which i is not possible with a MarkupComponentBorder. is that somehow doable? Antoine On Wed, Apr 14, 2010 at 5:59 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote: no, you cant attach markup to behavior but you can create an equivalent of MarkupComponentBorder using a behavior. -igor On Wed, Apr 14, 2010 at 1:40 AM, Antoine van Wel antoine.van@gmail.com wrote: Hi, quick question: since IComponentBorder and Component.setComponentBorder are deprecated, how should I use MarkupComponentBorder - or shouldn't I use that at all? You can't attach a markup file to a behavior, right? Antoine - 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: jqery not getting called after ajax refresh
No , please tell more on usingjQuery 1.4 live/delegate, you have any example ? ok one more easy solution may be if I add the function in onclick attribute of the link , but I dont know to write jquery function in onclick attribute , please tell me how can I write the jquery function in onclick attribute ? http://n4.nabble.com/file/n1903859/2010-04-15_121948.png here is the 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); } } ); -- View this message in context: http://n4.nabble.com/jqery-not-getting-called-after-ajax-refresh-tp1872270p1903859.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: jqery not getting called after ajax refresh
hopefully this helps: We can bind a simple click handler to this element: $('.clickme').bind('click', function() { // Bound handler called. }); When the element is clicked, the handler is called. However, suppose that after this, another element is added: $('body').append('lt;div class=clickmegt;Another targetlt;/divgt;'); This new element also matches the selector .clickme, but since it was added after the call to .bind(), clicks on it will do nothing. The .live() method provides an alternative to this behavior. If we bind a click handler to the target element using this method: $('.clickme').live('click', function() { // Live handler called. }); And then later add a new element: $('body').append('lt;div class=clickmegt;Another targetlt;/divgt;'); Then clicks on the new element will also trigger the handler. http://api.jquery.com/live/ jQuery Live -- View this message in context: http://n4.nabble.com/jqery-not-getting-called-after-ajax-refresh-tp1872270p1906384.html Sent from the Wicket - User mailing list archive at Nabble.com.
Re: jqery not getting called after ajax refresh
It works thanks . -- View this message in context: http://n4.nabble.com/jqery-not-getting-called-after-ajax-refresh-tp1872270p1908182.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
Adding attributes to child components in a behavior.
Is there a way to add attributes to child components in a behavior that is added to a page? I want to create a behavior that is added to a page that adds some js to the header and then adds some js in an onfocus attribute of each child form component on the page. I have the list of child form components, but can't figure out how to add the attribute to the components. Warren
Re: Adding attributes to child components in a behavior.
Warren, See MarkupContainer#visitChildren Regards - Cemal jWeekend OO Java Technologies, Wicket Consulting, Development, Training http://jWeekend.com On 15 April 2010 18:44, Warren Bell warr...@clarksnutrition.com wrote: Is there a way to add attributes to child components in a behavior that is added to a page? I want to create a behavior that is added to a page that adds some js to the header and then adds some js in an onfocus attribute of each child form component on the page. I have the list of child form components, but can't figure out how to add the attribute to the components. Warren - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket + Spring 3 + Hibernate
Take out the 'default-autowire=byName' from your beans.xml and it will work. Cheers! On Thu, Apr 15, 2010 at 12:21 PM, Steven Haines lyg...@yahoo.com wrote: Sorry for the spam, I found the root cause of the problem - I guess there is some kind of circular dependency in Spring/Hibernate that appeared when I integrated the app with Wicket... I dont full understand, but I changed application context XML file to wire by name instead of type and the problem went away: beans default-autowire=byName xmlns=http://www.springframework.org/schema/beans; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:context=http://www.springframework.org/schema/context; xmlns:util=http://www.springframework.org/schema/util; xsi:schemaLocation=http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd; I appreciate your responses and I hope that someone can find my couple days of troubleshooting helpful :) Thanks Steve - Original Message From: Steven Haines lyg...@yahoo.com To: users@wicket.apache.org Sent: Thu, April 15, 2010 11:14:49 AM Subject: Re: Wicket + Spring 3 + Hibernate I posted a few lines from the error, but here is the complete stack trace. My initial searches on this pointed to a circular dependency caused by autowiring, which may or may not be the case - when I removed the default-autowire parameter from my beans node then the error changed to state that the bean needs a sessionFactory (because I removed it.) So note sure if I took a step forward or back. If you are interested I created a sample project that produces the error, I can zip it up and mail it to you (but dont want to spam the whole list with an attachment... Thanks Steve Stack Trace: Apr 15, 2010 11:05:11 AM org.apache.catalina.core.StandardContext listenerStart SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'messageDao' defined in file [/Users/scadmin/Downloads/apache-tomcat-6.0.20/webapps/wicketspringhibernateexample/WEB-INF/classes/com/informit/dao/HibernateMessageDaoImpl.class]: Unsatisfied dependency expressed through bean property 'sessionFactory': : Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xml]: Unsatisfied dependency expressed through bean property 'eventListeners': : Error creating bean with name 'transactionManager' defined in class path resource [applicationContext.xml]: Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'sessionFactory': FactoryBean which is currently in creation returned null from getObject; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager' defined in class path resource [applicationContext.xml]: Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'sessionFactory': FactoryBean which is currently in creation returned null from getObject; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xml]: Unsatisfied dependency expressed through bean property 'eventListeners': : Error creating bean with name 'transactionManager' defined in class path resource [applicationContext.xml]: Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'sessionFactory': FactoryBean which is currently in creation returned null from getObject; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager' defined in class path resource [applicationContext.xml]: Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'sessionFactory': FactoryBean which is currently in creation returned null from getObject at
Re: PackageResource that isn't tied to session; returns 302?
Answering my own question: use Resource Reference: new Image(img, new ResourceReference(Page2.class, image.png)); On Wed, Apr 14, 2010 at 3:23 PM, Nikita Tovstoles nikita.tovsto...@gmail.com wrote: Correction: PackageResource packageResource = PackageResource.get(Page2.class, image.png); does correctly set response headers (to allow for 304). But, for some reason, the link generated is not static and is instead tied to an HttpSession. Any way to get a Session-independent packageResource (for static image)? On Tue, Apr 13, 2010 at 6:05 PM, Nikita Tovstoles nikita.tovsto...@gmail.com wrote: Given this page: public class Page2 extends WebPage { public Page2() { add(new Image(plainImage, image.png)); PackageResource packageResource = PackageResource.get(Page2.class, image.png); add(new Image(pkgImage, packageResource)); } } plainImage produces an img that returns a 304 on page reload; and is not tied to a session. pkgImage, however, renders as a 'wicket:interface' url that actually re-loads an image (200) on page reload, and is tied to a session (throws PageExpiredException) when session expires or sessionid is removed from img src. Is there way to get a (Package)Resource that is not session-specific? I see a SharedResources but am unsure how to access it. We need to new Image in several places whose source paths are computed at render time from page params, yet are always relative to the same component class (support of multiple LF). I recognize that we could use a ContextImage instead, but I am curious to find an approach that would also work for JS/CSS. thanks -nikita -- --- Nikita Tovstoles CTO, CastaneaLabs.com (m) +1-650-996-8173 (e) ntovsto...@castanealabs.com ---
Re: Adding attributes to child components in a behavior.
I have that figured out, I just don't know how to add the attribute to each component. I can't add a behavior, since Cannot modify component hierarchy after render phase has started (page version cant change then anymore) Can I even do this in a behavior? Cemal Bayramoglu wrote: Warren, See MarkupContainer#visitChildren Regards - Cemal jWeekend OO Java Technologies, Wicket Consulting, Development, Training http://jWeekend.com On 15 April 2010 18:44, Warren Bell warr...@clarksnutrition.com wrote: Is there a way to add attributes to child components in a behavior that is added to a page? I want to create a behavior that is added to a page that adds some js to the header and then adds some js in an onfocus attribute of each child form component on the page. I have the list of child form components, but can't figure out how to add the attribute to the components. Warren - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Thanks, Warren Bell - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: show ConfirmDialog in the middle of some action/function
Any ideas? On Thu, Apr 15, 2010 at 1:33 PM, Roman Ilin roman.i...@gmail.com wrote: Hello dear Wicket Gurus, I'm currently rewrite one fat client java program to wicket one. And I have to say that mostly this isn't a big issue but there is one thing that I really miss in wicket. In a program is a lot of business logic there and we used ConfirmDialogs to go through branches. For ex. public void save(){ // do some stuff here if( ! MessageDialog.openConfirm(some confirm message)){ return; } // do more stuff here if( ! MessageDialog.openConfirm(some other confirm message)){ // do one more stuff here } // do end stuff here } Is it possible to write wicket ConfirmDialog component to show HTML confirmation dialog and then go back to my previously executed method/place. Maybe with custom request cycle? Regards Roman - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: Adding attributes to child components in a behavior.
Sorry if this got double posted, I didn't see it up there. I have that figured out, I just don't know how to add the attribute to each component. I can't add a behavior, since Cannot modify component hierarchy after render phase has started (page version cant change then anymore) Can I even do this in a behavior? Cemal Bayramoglu wrote: Warren, See MarkupContainer#visitChildren Regards - Cemal jWeekend OO Java Technologies, Wicket Consulting, Development, Training http://jWeekend.com On 15 April 2010 18:44, Warren Bell warr...@clarksnutrition.com wrote: Is there a way to add attributes to child components in a behavior that is added to a page? I want to create a behavior that is added to a page that adds some js to the header and then adds some js in an onfocus attribute of each child form component on the page. I have the list of child form components, but can't figure out how to add the attribute to the components. Warren - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Thanks, Warren Bell - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: show ConfirmDialog in the middle of some action/function
Hi Roman, you'd need continuations for modal dialogs, see: https://issues.apache.org/jira/browse/WICKET-598 Sven Roman Ilin wrote: Any ideas? On Thu, Apr 15, 2010 at 1:33 PM, Roman Ilin roman.i...@gmail.com wrote: Hello dear Wicket Gurus, I'm currently rewrite one fat client java program to wicket one. And I have to say that mostly this isn't a big issue but there is one thing that I really miss in wicket. In a program is a lot of business logic there and we used ConfirmDialogs to go through branches. For ex. public void save(){ // do some stuff here if( ! MessageDialog.openConfirm(some confirm message)){ return; } // do more stuff here if( ! MessageDialog.openConfirm(some other confirm message)){ // do one more stuff here } // do end stuff here } Is it possible to write wicket ConfirmDialog component to show HTML confirmation dialog and then go back to my previously executed method/place. Maybe with custom request cycle? Regards Roman - 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: show ConfirmDialog in the middle of some action/function
I use current stable wicket 1.4 on JBoss. Wicket application is only small part of our EE project. So Jetty continuations isn't an option for me. On Thu, Apr 15, 2010 at 10:08 PM, Sven Meier s...@meiers.net wrote: Hi Roman, you'd need continuations for modal dialogs, see: https://issues.apache.org/jira/browse/WICKET-598 Sven Roman Ilin wrote: Any ideas? On Thu, Apr 15, 2010 at 1:33 PM, Roman Ilin roman.i...@gmail.com wrote: Hello dear Wicket Gurus, I'm currently rewrite one fat client java program to wicket one. And I have to say that mostly this isn't a big issue but there is one thing that I really miss in wicket. In a program is a lot of business logic there and we used ConfirmDialogs to go through branches. For ex. public void save(){ // do some stuff here if( ! MessageDialog.openConfirm(some confirm message)){ return; } // do more stuff here if( ! MessageDialog.openConfirm(some other confirm message)){ // do one more stuff here } // do end stuff here } Is it possible to write wicket ConfirmDialog component to show HTML confirmation dialog and then go back to my previously executed method/place. Maybe with custom request cycle? Regards Roman - 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: Adding attributes to child components in a behavior.
Hi Warren, The way I normally handle this situation is to create a javascript emitting behaviour that is attached to the container. This behaviour will emit the necessary javascript method to do what you need to do. Then for each child component you can use an AttributeModifier to write their onclick callback to call the custom method being emitted by the container attached behavior. All the logic can be handled in the implementation details of the custom method/Object that was emitted. To get the onclick actions emitted before the rendering phase either include it within the container.onBeforeRender() method, to call the visitChildren method, or perhaps within your behavior override the AbstractBehavior.beforeRender(Component c) method. I've written something like this for a table of check boxes where each column header is a radio button. Selecting column 2's radio button causes all of the check boxes in column 1 to become disabled and all the check boxes in column 2 to become enabled. In my case I made the behaviour aware of the components in each column and then during rendering the javascript it writes out an array of markup id's for each table column. But if you don't have the child components in scope when adding the behavior to the container adding the child behaviors before rendering starts should let things work. Regards, Mike I have that figured out, I just don't know how to add the attribute to each component. I can't add a behavior, since Cannot modify component hierarchy after render phase has started (page version cant change then anymore) Can I even do this in a behavior? Cemal Bayramoglu wrote: Warren, See MarkupContainer#visitChildren Regards - Cemal jWeekend OO Java Technologies, Wicket Consulting, Development, Training http://jWeekend.com On 15 April 2010 18:44, Warren Bell warr...@clarksnutrition.com wrote: Is there a way to add attributes to child components in a behavior that is added to a page? I want to create a behavior that is added to a page that adds some js to the header and then adds some js in an onfocus attribute of each child form component on the page. I have the list of child form components, but can't figure out how to add the attribute to the components. Warren - 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: Adding attributes to child components in a behavior.
I assume you were trying this in beforeRender of your behaviour, which as you say is too late. If you really need to use a behaviour encapsulate all this, try something like the following, but some may feel its a little politically incorrect to do this in bind. class MyBehaviour extends AbstractBehavior{ @Override public void bind(Component component) { if(!(component instanceof MarkupContainer)){ throw new RuntimeException(contaıners only please); } visitChildren(new IVisitorComponent(){ @Override public Object component(Component component) { component.add(new SimpleAttributeModifier(class,goodChild)); return IVisitor.CONTINUE_TRAVERSAL; } }); } } Regards - Cemal jWeekend OO Java Technologies, Wicket Consulting, Development, Training http://jWeekend.com On 15 April 2010 20:17, Warren Bell warrenbe...@gmail.com wrote: I have that figured out, I just don't know how to add the attribute to each component. I can't add a behavior, since Cannot modify component hierarchy after render phase has started (page version cant change then anymore) Can I even do this in a behavior? Cemal Bayramoglu wrote: Warren, See MarkupContainer#visitChildren Regards - Cemal jWeekend OO Java Technologies, Wicket Consulting, Development, Training http://jWeekend.com On 15 April 2010 18:44, Warren Bell warr...@clarksnutrition.com wrote: Is there a way to add attributes to child components in a behavior that is added to a page? I want to create a behavior that is added to a page that adds some js to the header and then adds some js in an onfocus attribute of each child form component on the page. I have the list of child form components, but can't figure out how to add the attribute to the components. Warren - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Thanks, Warren Bell - 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: Adding attributes to child components in a behavior.
... and if you're not building your component tree before you add such an IBehaviour to the parent container you can instead override onBeforeRender on that container to do something like: @Override public void onBeforeRender() { super.onBeforeRender(); visitChildren(new IVisitorComponent(){ @Override public Object component(Component component) { component.add(new SimpleAttributeModifier(class,goodChild)); return IVisitor.CONTINUE_TRAVERSAL; } }); } Regards - Cemal jWeekend OO Java Technologies, Wicket Consulting, Development, Training http://jWeekend.com On 15 April 2010 21:17, Cemal Bayramoglu jweekend_for...@cabouge.com wrote: I assume you were trying this in beforeRender of your behaviour, which as you say is too late. If you really need to use a behaviour encapsulate all this, try something like the following, but some may feel its a little politically incorrect to do this in bind. class MyBehaviour extends AbstractBehavior{ �...@override public void bind(Component component) { if(!(component instanceof MarkupContainer)){ throw new RuntimeException(contaıners only please); } visitChildren(new IVisitorComponent(){ �...@override public Object component(Component component) { component.add(new SimpleAttributeModifier(class,goodChild)); return IVisitor.CONTINUE_TRAVERSAL; } }); } } Regards - Cemal jWeekend OO Java Technologies, Wicket Consulting, Development, Training http://jWeekend.com On 15 April 2010 20:17, Warren Bell warrenbe...@gmail.com wrote: I have that figured out, I just don't know how to add the attribute to each component. I can't add a behavior, since Cannot modify component hierarchy after render phase has started (page version cant change then anymore) Can I even do this in a behavior? Cemal Bayramoglu wrote: Warren, See MarkupContainer#visitChildren Regards - Cemal jWeekend OO Java Technologies, Wicket Consulting, Development, Training http://jWeekend.com On 15 April 2010 18:44, Warren Bell warr...@clarksnutrition.com wrote: Is there a way to add attributes to child components in a behavior that is added to a page? I want to create a behavior that is added to a page that adds some js to the header and then adds some js in an onfocus attribute of each child form component on the page. I have the list of child form components, but can't figure out how to add the attribute to the components. Warren - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Thanks, Warren Bell - 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: resources folder / package
hi, thanks. I know this, but my question was different. I saw in some projects that the JS and CSS files are in the same hierarchy as the class that is used for their scope, but the main folder is different. Example: I have a Java class: com.myCompany.ResourceScope.java it is located under src. I have a file called MyCss.css, which is located under com.myCompany but it is located under resources folder. both src and resources are under the same project. in the projects I saw, you can call for this resource reference with the ResourceScope class. I tried to do the same without success. Any thoughts? Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Thu, Apr 15, 2010 at 4:46 PM, Sigmar Muuga meedi...@gmail.com wrote: You can define packages and put all CSS / JS files into them. Note that there must be some class also along with them, it may be an empty class. Then you can reference these resources using that class declaration. Note that if your css uses images, then you have to put correct paths into that css. Sigmar On Thu, Apr 15, 2010 at 2:43 PM, Eyal Golan egola...@gmail.com wrote: Hello to you all, it's been a very long time since I wrote here. I have a question regarding folder locations. I am working with WiQuery and it is unbelievable great. Also the support there (thanks indiana ;) ) In WiQuery there are 'themes' and the location of the CSS and images is in a separate folder called 'resources' , which has the same structure as of the Java classes themselves. I wanted to do the same in my project without success. Should I configure something other than just put the same hierarchy? thanks for the help. My question is Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary
Re: resources folder / package
Eyal, This is not to do with Wickets resource loading. Its got to do with how you set up your build mechanism, and in particular, which files, from which folders you tell it to include in the creation of the target (folders or archives). In other words, you need to tell Maven or Ant or your IDE etc, which folders are source folders (and maybe even which files.types of fıles in them) so it knows you need these packaged up ready for deployment/use at runtime. If you are using Maven, see how the LegUp [1] POMs specify this. Or, in Eclipse, mark the relevant folders as source folders (right-click on the folder and you'll see the context-menu option for this). Make sense? Regards - Cemal jWeekend OO Java Technologies, Wicket Consulting, Development, Training http://jWeekend.com [1] http://jweekend.co.uk/dev/LegUp On 15 April 2010 22:11, Eyal Golan egola...@gmail.com wrote: hi, thanks. I know this, but my question was different. I saw in some projects that the JS and CSS files are in the same hierarchy as the class that is used for their scope, but the main folder is different. Example: I have a Java class: com.myCompany.ResourceScope.java it is located under src. I have a file called MyCss.css, which is located under com.myCompany but it is located under resources folder. both src and resources are under the same project. in the projects I saw, you can call for this resource reference with the ResourceScope class. I tried to do the same without success. Any thoughts? Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Thu, Apr 15, 2010 at 4:46 PM, Sigmar Muuga meedi...@gmail.com wrote: You can define packages and put all CSS / JS files into them. Note that there must be some class also along with them, it may be an empty class. Then you can reference these resources using that class declaration. Note that if your css uses images, then you have to put correct paths into that css. Sigmar On Thu, Apr 15, 2010 at 2:43 PM, Eyal Golan egola...@gmail.com wrote: Hello to you all, it's been a very long time since I wrote here. I have a question regarding folder locations. I am working with WiQuery and it is unbelievable great. Also the support there (thanks indiana ;) ) In WiQuery there are 'themes' and the location of the CSS and images is in a separate folder called 'resources' , which has the same structure as of the Java classes themselves. I wanted to do the same in my project without success. Should I configure something other than just put the same hierarchy? thanks for the help. My question is Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: resources folder / package
@Eyal Maybe you would like to have a look at this thread. http://n4.nabble.com/resource-css-loading-td1878209.html Regards, Apple Grew my blog @ http://blog.applegrew.com/ On Fri, Apr 16, 2010 at 2:41 AM, Eyal Golan egola...@gmail.com wrote: hi, thanks. I know this, but my question was different. I saw in some projects that the JS and CSS files are in the same hierarchy as the class that is used for their scope, but the main folder is different. Example: I have a Java class: com.myCompany.ResourceScope.java it is located under src. I have a file called MyCss.css, which is located under com.myCompany but it is located under resources folder. both src and resources are under the same project. in the projects I saw, you can call for this resource reference with the ResourceScope class. I tried to do the same without success. Any thoughts? Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Thu, Apr 15, 2010 at 4:46 PM, Sigmar Muuga meedi...@gmail.com wrote: You can define packages and put all CSS / JS files into them. Note that there must be some class also along with them, it may be an empty class. Then you can reference these resources using that class declaration. Note that if your css uses images, then you have to put correct paths into that css. Sigmar On Thu, Apr 15, 2010 at 2:43 PM, Eyal Golan egola...@gmail.com wrote: Hello to you all, it's been a very long time since I wrote here. I have a question regarding folder locations. I am working with WiQuery and it is unbelievable great. Also the support there (thanks indiana ;) ) In WiQuery there are 'themes' and the location of the CSS and images is in a separate folder called 'resources' , which has the same structure as of the Java classes themselves. I wanted to do the same in my project without success. Should I configure something other than just put the same hierarchy? thanks for the help. My question is Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary
Re: Adding attributes to child components in a behavior.
I ended up doing it in bind of the behavior and it works fine. I just have to remember to add the behavior to the page after all the other components. Thanks I assume you were trying this in beforeRender of your behaviour, which as you say is too late. If you really need to use a behaviour encapsulate all this, try something like the following, but some may feel its a little politically incorrect to do this in bind. class MyBehaviour extends AbstractBehavior{ @Override public void bind(Component component) { if(!(component instanceof MarkupContainer)){ throw new RuntimeException(contaıners only please); } visitChildren(new IVisitorComponent(){ @Override public Object component(Component component) { component.add(new SimpleAttributeModifier(class,goodChild)); return IVisitor.CONTINUE_TRAVERSAL; } }); } } Regards - Cemal jWeekend OO Java Technologies, Wicket Consulting, Development, Training http://jWeekend.com On 15 April 2010 20:17, Warren Bell warrenbe...@gmail.com wrote: I have that figured out, I just don't know how to add the attribute to each component. I can't add a behavior, since Cannot modify component hierarchy after render phase has started (page version cant change then anymore) Can I even do this in a behavior? Cemal Bayramoglu wrote: Warren, See MarkupContainer#visitChildren Regards - Cemal jWeekend OO Java Technologies, Wicket Consulting, Development, Training http://jWeekend.com On 15 April 2010 18:44, Warren Bell warr...@clarksnutrition.com wrote: Is there a way to add attributes to child components in a behavior that is added to a page? I want to create a behavior that is added to a page that adds some js to the header and then adds some js in an onfocus attribute of each child form component on the page. I have the list of child form components, but can't figure out how to add the attribute to the components. Warren - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Thanks, Warren Bell - 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: Type Inference for Wicket 1.4
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
Re: AjaxSubmitLink javadocs
This appears to be an issue in the documentation of the AjaxSubmitLink. I just checked and the documentation is still the same in 1.4. I will try to verify this and fix it tomorrow. In the meantime, it would be helpful if you opened a JIRA issue to keep track of this (post the link back to this thread). Anyway, the documentation is written as if this were a fallback component (i.e. AjaxFallbackLink). However, it is not. Obviously, if you do not have JS enabled, you can not submit a form with a link in the browser. You could only submit it with a submit button. -- Jeremy Thomerson http://www.wickettraining.com On Thu, Apr 15, 2010 at 4:12 AM, Xavier López xavil...@gmail.com wrote: Hi, I'm a liitle confused about AjaxSubmitLink's JavaDoc, and the code inside it... I'm using Wicket 1.3.6: If/when javascript is turned off in the browser, or it doesn't support javascript, then the browser will not respond to the onclick event, using the href directly. Wicket will then use a normal request target, and call the serverside onClick with a null {...@link AjaxRequestTarget}. First question is, does it really mean 'serverside onClick' ? Or should it read 'serverside onSubmit' ? And then, in the code, I see : protected void onComponentTag(ComponentTag tag) { super.onComponentTag(tag); if (isLinkEnabled()) { if (tag.getName().toLowerCase().equals(a)) { tag.put(href, #); } } else { disableLink(tag); } } So it seems this component never gets to have anything else than # in its href, so it won't do anything when js is not enabled... Is this an error in the documentation ? Thanks, Xavier
Re: Adding attributes to child components in a behavior.
Yes, this is risky. Why not add the appropriate onclick handler via JS on the client side? i.e., you could output javascript (jQuery in this example) that says: $('#myTableID tr').click(function() { // do whatever your onclick should do }); That's just another option - not necessarily the best way either. -- Jeremy Thomerson http://www.wickettraining.com 2010/4/15 Warren Bell warr...@clarksnutrition.com I ended up doing it in bind of the behavior and it works fine. I just have to remember to add the behavior to the page after all the other components. Thanks I assume you were trying this in beforeRender of your behaviour, which as you say is too late. If you really need to use a behaviour encapsulate all this, try something like the following, but some may feel its a little politically incorrect to do this in bind. class MyBehaviour extends AbstractBehavior{ @Override public void bind(Component component) { if(!(component instanceof MarkupContainer)){ throw new RuntimeException(contaıners only please); } visitChildren(new IVisitorComponent(){ @Override public Object component(Component component) { component.add(new SimpleAttributeModifier(class,goodChild)); return IVisitor.CONTINUE_TRAVERSAL; } }); } } Regards - Cemal jWeekend OO Java Technologies, Wicket Consulting, Development, Training http://jWeekend.com On 15 April 2010 20:17, Warren Bell warrenbe...@gmail.com wrote: I have that figured out, I just don't know how to add the attribute to each component. I can't add a behavior, since Cannot modify component hierarchy after render phase has started (page version cant change then anymore) Can I even do this in a behavior? Cemal Bayramoglu wrote: Warren, See MarkupContainer#visitChildren Regards - Cemal jWeekend OO Java Technologies, Wicket Consulting, Development, Training http://jWeekend.com On 15 April 2010 18:44, Warren Bell warr...@clarksnutrition.com wrote: Is there a way to add attributes to child components in a behavior that is added to a page? I want to create a behavior that is added to a page that adds some js to the header and then adds some js in an onfocus attribute of each child form component on the page. I have the list of child form components, but can't figure out how to add the attribute to the components. Warren - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Thanks, Warren Bell - 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