Re: i am using weblogic 10.3
Check out my example application: http://svn.carmanconsulting.com/public/wicket-advanced/trunk That application does exactly what you are looking to do. It's got the spring security filter stuff all configured. On Fri, May 15, 2009 at 4:21 PM, fachhoch wrote: > > sorry that wasa wrong question , my applicaqtion has the following filters > > 1st open-view-session-filter > > 2nd org.acegisecurity.util.FilterToBeanProxy > > 3rd wicket filter > > is this order proper ? > > > > fachhoch wrote: >> >> is there an extension to wicket filter to get the application class from >> spring ? >> >> James Carman-3 wrote: >>> >>> filter >>> >>> On Fri, May 15, 2009 at 3:21 PM, tubin gen wrote: I read in previous post that if it is weblogic then its better to use wicket filter rather than wicket servlet and more over I am using open view session filter and as this filter order is important , please suggst me if I should go with wicket-servlet or wicket filter , I know wicket-servlet internally calls wicket filter but in terms several other filters where order of filter is importanrt is it better to use wicket-servlet or wicket filter ? >>> >>> - >>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >>> For additional commands, e-mail: users-h...@wicket.apache.org >>> >>> >>> >> >> > > -- > View this message in context: > http://www.nabble.com/i-am-using-weblogic-10.3-tp23565884p23566698.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: i am using weblogic 10.3
sorry that wasa wrong question , my applicaqtion has the following filters 1st open-view-session-filter 2nd org.acegisecurity.util.FilterToBeanProxy 3rd wicket filter is this order proper ? fachhoch wrote: > > is there an extension to wicket filter to get the application class from > spring ? > > James Carman-3 wrote: >> >> filter >> >> On Fri, May 15, 2009 at 3:21 PM, tubin gen wrote: >>> I read in previous post that if it is weblogic then its better to use >>> wicket >>> filter rather than wicket servlet and more over I am using open view >>> session filter and as this filter order is important , please suggst >>> me if >>> I should go with wicket-servlet or wicket filter , I know wicket-servlet >>> internally calls wicket filter but in terms several other filters >>> where >>> order of filter is importanrt is it better to use wicket-servlet or >>> wicket >>> filter ? >>> >> >> - >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> For additional commands, e-mail: users-h...@wicket.apache.org >> >> >> > > -- View this message in context: http://www.nabble.com/i-am-using-weblogic-10.3-tp23565884p23566698.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: i am using weblogic 10.3
is there an extension to wicket filter to get the application class from spring ? James Carman-3 wrote: > > filter > > On Fri, May 15, 2009 at 3:21 PM, tubin gen wrote: >> I read in previous post that if it is weblogic then its better to use >> wicket >> filter rather than wicket servlet and more over I am using open view >> session filter and as this filter order is important , please suggst me >> if >> I should go with wicket-servlet or wicket filter , I know wicket-servlet >> internally calls wicket filter but in terms several other filters >> where >> order of filter is importanrt is it better to use wicket-servlet or >> wicket >> filter ? >> > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > > -- View this message in context: http://www.nabble.com/i-am-using-weblogic-10.3-tp23565884p23566578.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: error because of log4j from org.apache.wicket.Application
i updated this dependency to resolve org.slf4j slf4j-api 1.5.5 previously i had 1.4 Lars Vonk wrote: > > You should also check your dependencies using the maven dependency plugin. > Are there conflicting slf4j-log4j12 versions in there? Are there > conflicting > log4j versions? > > On Thu, May 14, 2009 at 9:54 PM, fachhoch wrote: > >> >> I using log4j.xml >> >> http://www.nabble.com/file/p23547818/log4j.xml log4j.xml attached is my >> log4j.xml >> >> James Carman-3 wrote: >> > >> > Can we see your log4j.properties file? >> > >> > On Thu, May 14, 2009 at 3:39 PM, tubin gen wrote: >> >> bean wicketApplication' is my web-application's >> >> org.apache.wicket.Application >> >> >> >> this is the error message I get starting my application >> >> >> >> org.springframework.beans.factory.BeanCreationException: Error >> creating >> >> bean >> >> with name 'wicketApplication' defined in class path resource >> >> [applicationContext-web.xml]: Instantiation of bean failed; nested >> >> exception >> >> is java.lang.NoSuchFieldError: name >> >> >> >> root cause >> >> >> >> Caused by: java.lang.NoSuchFieldError: name >> >>at >> >> org.slf4j.impl.Log4jLoggerAdapter.(Log4jLoggerAdapter.java:75) >> >>at >> >> >> org.slf4j.impl.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:75) >> >>at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:103) >> >>at org.apache.wicket.Application.(Application.java:143) >> >>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.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:100) >> >>at >> >> >> org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:61) >> >>at >> >> >> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:877) >> >> >> >> please suggest what am I missing , >> >> >> >> My project is built by maven and this is a project with >> >> sub-projects >> >> jar,war, and ear and its uses spring , hibernate , and wicket 1.4, >> >> >> >> I specified the dependency for org.slf4j >> >> >> >> >> >>org.slf4j >> >>slf4j-log4j12 >> >>1.5.5 >> >> >> >> please suggest what version should I use ? >> >> >> > >> > - >> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> > For additional commands, e-mail: users-h...@wicket.apache.org >> > >> > >> > >> >> -- >> View this message in context: >> http://www.nabble.com/error-because-of-log4j-from-org.apache.wicket.Application-tp23547592p23547818.html >> Sent from the Wicket - User mailing list archive at Nabble.com. >> >> >> - >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> For additional commands, e-mail: users-h...@wicket.apache.org >> >> > > -- View this message in context: http://www.nabble.com/error-because-of-log4j-from-org.apache.wicket.Application-tp23547592p23566509.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: i am using weblogic 10.3
filter On Fri, May 15, 2009 at 3:21 PM, tubin gen wrote: > I read in previous post that if it is weblogic then its better to use wicket > filter rather than wicket servlet and more over I am using open view > session filter and as this filter order is important , please suggst me if > I should go with wicket-servlet or wicket filter , I know wicket-servlet > internally calls wicket filter but in terms several other filters where > order of filter is importanrt is it better to use wicket-servlet or wicket > filter ? > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
i am using weblogic 10.3
I read in previous post that if it is weblogic then its better to use wicket filter rather than wicket servlet and more over I am using open view session filter and as this filter order is important , please suggst me if I should go with wicket-servlet or wicket filter , I know wicket-servlet internally calls wicket filter but in terms several other filters where order of filter is importanrt is it better to use wicket-servlet or wicket filter ?
Re: Spring Security's method security and Wicket
On Fri, May 15, 2009 at 8:24 AM, Kent Larsson wrote: > Sounds like a nicer solution! > > I'll look into doing something like that myself, being a Wicket newbie > it might take me a while though. Are there any examples of doing > anything similar available somewhere? Well, I've got a working solution, but it's not quite complete, IMHO. I've got it redirecting to the login page whenever you try to invoke a @Secured method. But, once you login, it doesn't exactly go back and try to do what you were trying to do. It will just take you back to the page where you were trying to do it (a limitation of how Wicket handles the redirectToInterceptPage). My solution uses an aspect to enforce the @Secured annotations. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Application scope vs Singleton
On Fri, May 15, 2009 at 12:18 PM, alf.redo wrote: > > Thank you to all for your precious suggestions. > > My question is not for a real need. > Supposing to discard the injection "strategy", I would like to know if the > cache of an object into my WebApplication class during application startup > has the same result if I make this object Singleton (and not store it in > WebApplication). Can be some problems about "thread-safety" or other issue > in one case rather than the other? Making the object a "singleton" would make unit testing more difficult, IMHO. Thread-safety is all up to how you implement the class, really. You'd have to be aware of threading issues either way. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Application scope vs Singleton
Thank you to all for your precious suggestions. My question is not for a real need. Supposing to discard the injection "strategy", I would like to know if the cache of an object into my WebApplication class during application startup has the same result if I make this object Singleton (and not store it in WebApplication). Can be some problems about "thread-safety" or other issue in one case rather than the other? I'm sorry if this seems to be a stupid question... alf -- View this message in context: http://www.nabble.com/Application-scope-vs-Singleton-tp23559402p23563036.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: Component creation and initialization
I actually had to Google that one. But, yes, that is the general consensus that I've seen. If you wanted to write a page that showed the different ways that you mentioned, that would be fine. It really just depends on if you really need lazy component creation, and then how you want to implement it. -- Jeremy Thomerson http://www.wickettraining.com On Fri, May 15, 2009 at 11:13 AM, Clint Popetz wrote: > TMTOWTDI - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Component creation and initialization
On Fri, May 15, 2009 at 10:24 AM, Jeremy Thomerson wrote: > Interestingly, in the long-standing defacto > article on asking smart questions, the very first thing it says to do > is to search the forums [1]. FWIW, I did search the list, before posting. I found a lot of disagreement about this topic, no resolution, and mostly threads that just trailed off. I was hoping that perhaps there was a consensus pointing to a best practice with respect to creating component hierarchies in wicket that works around the problem of constructors in java, but that does not seem to be the case. Some people advocate onBeforeRender with checks to make sure it's the first time, some people advocated adding an onBeforeFirstRender() to the framework, which never made it in. Some use init() methods like I posted, and some use factory patterns. If the consensus is just that TMTOWTDI, that's fine too I suppose, but it will result in this thread resurfacing bi-monthly. If I were to write up a wiki document right now on this topic, it would reflect my own confusion on this topic, so I'll wait until lucidity arrives. -Clint - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Application scope vs Singleton
On Fri, May 15, 2009 at 11:26 AM, Jeremy Thomerson wrote: > Use injection. The difference is that there is no way to override the > implementation of the static accessor / singleton for testing > functionality. If you instead use an IoC container (Spring / Guice) > and injection, you are not statically tying yourself to a single > class. Work off the interface, and all the places in your code that > use that interface can be changed to use a different implementation > without changing each of them - just change the config as to which one > is injected. You could always use a mock application object in your tests that has mock objects for the singletons defined there. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Bookmarkable fallback ajax link
But you don't want URLs with jsessionid in Google's results. Multiple people can come into your site with the same session. -- Jeremy Thomerson http://www.wickettraining.com On Fri, May 15, 2009 at 10:33 AM, Igor Vaynberg wrote: > googlebot does not support cookies, so your container will add > jsessionid into the url. so unless googlebot specifically ignores > jsessionid (which doesnt look to be the case because there are plenty > links in google with jsessionid) it should all work. > > -igor > > On Thu, May 14, 2009 at 9:19 AM, John wrote: >> Hi, >> >> I want googlebot to be able to see content that is shown to normal browsers >> using ajax. I use a fallback ajax link but because googlebot does not use >> sessions the links need to be bookmarkable. The problem seems to be because >> the link contains an ajax behaviour it is considered stateful. >> >> Is there anyway to achieve this? >> >> thanks, >> >> John >> >> - >> 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
lazily loaded table structure?
Hi, I want to display a table structure, however the data retrieving takes a certain time. Currently I use the AjaxLazyLoadPanel to display all results at once. But in future I'd like to to immediately display it on the page when it is retrieved. So I need some kind of table where I can add rows via Ajax *AND* reorder the items (because they are not retrieved in the final order). Do you know of any components that can be helpful for this task? Thanks, Jan - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Bookmarkable fallback ajax link
googlebot does not support cookies, so your container will add jsessionid into the url. so unless googlebot specifically ignores jsessionid (which doesnt look to be the case because there are plenty links in google with jsessionid) it should all work. -igor On Thu, May 14, 2009 at 9:19 AM, John wrote: > Hi, > > I want googlebot to be able to see content that is shown to normal browsers > using ajax. I use a fallback ajax link but because googlebot does not use > sessions the links need to be bookmarkable. The problem seems to be because > the link contains an ajax behaviour it is considered stateful. > > Is there anyway to achieve this? > > thanks, > > John > > - > 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: Bookmarkable fallback ajax link
Is your Ajax link redirecting you to another page? Or is it swapping something out on the page? I suppose you could create a bookmarkable link and add the ajax behavior to it, but this seems counterintuitive because it is unlikely that you have an ajax link that is simply redirecting you to a new page. So, it seems like this would be creating two entirely separate code paths. -- Jeremy Thomerson http://www.wickettraining.com On Thu, May 14, 2009 at 11:19 AM, John wrote: > Hi, > > I want googlebot to be able to see content that is shown to normal browsers > using ajax. I use a fallback ajax link but because googlebot does not use > sessions the links need to be bookmarkable. The problem seems to be because > the link contains an ajax behaviour it is considered stateful. > > Is there anyway to achieve this? > > thanks, > > John > > - > 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: Application scope vs Singleton
Use injection. The difference is that there is no way to override the implementation of the static accessor / singleton for testing functionality. If you instead use an IoC container (Spring / Guice) and injection, you are not statically tying yourself to a single class. Work off the interface, and all the places in your code that use that interface can be changed to use a different implementation without changing each of them - just change the config as to which one is injected. -- Jeremy Thomerson http://www.wickettraining.com On Fri, May 15, 2009 at 10:21 AM, alf.redo wrote: > > Hi James, > I would like to know what is the difference between a Singleton class with a > static accessor method and POJO stored into my WebApplication class (with > proper getter). > What is the preferred way to set an application scoped object? > > Thank you again... > > > -- > View this message in context: > http://www.nabble.com/Application-scope-vs-Singleton-tp23559402p23562038.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: Component creation and initialization
Documentation is always welcome. This is a very active list (one of the most active that I've seen with an open source project) where the core devs spend a lot of quality time answering questions. There's not enough hours in the day for us to also add that to documentation or provide everyone with links to documentation when so much of it is available by using smart searches on the plethora of available list searching sites. I use Nabble extensively. So, you will hear "search the list" quite a bit. Interestingly, in the long-standing defacto article on asking smart questions, the very first thing it says to do is to search the forums [1]. So, the long and short of it is that we need folks like yourself who may not spend as much time answering questions on the list but will take the initiative to pull out the useful tidbits and document them on the wiki, organize the wiki so that it's easier to navigate, etc. Many times that is thankless work, but it is appreciated nonetheless. THANK YOU! [1] - http://catb.org/esr/faqs/smart-questions.html#before -- Jeremy Thomerson http://www.wickettraining.com On Fri, May 15, 2009 at 7:59 AM, Clint Popetz wrote: > On Fri, May 15, 2009 at 12:07 AM, Jeremy Thomerson > wrote: >> >> Most java programmers know not to call overridable methods from the >> constructor as a general rule, although there are times when it could >> inadvertantly happen - which is why we need bug reports if you see >> that happening. >> > > I've only been on the wicket list for a few months, and I can > understand the annoyance of bringing up a subject that's perhaps been > beaten to death, but to me that means the resulting consensus to be > documented in the wiki, rather than pointing users to "search the > list." So whatever comes out of this thread, I'll add it to the wiki > (unless it's already there, in which case I apologise.) > > This isn't just a matter of whether Wicket internally calls > overridable methods. > > What ends up happening (only in my experience) is that inheritance for > pages ends up needing you to create your own internal init() mechanism > in order to ensure that subclasses are ready to effectively override > methods for base class component creation. I'm not suggesting that > Wicket provide this type of init() mechanism, but in my experience it > is a pattern that crops up, and it should be documented as such. If > it is already documented, my apologies. If it's an anti-pattern, > what's the alternative? > > > public class Template extends WebPage { > public Template(PageParameters params) { > setupParams(params); > add(new Label("title",getTitle())); > } > > pubilc void setupParams(PageParameters params) { } > public String getTitle() { return "Title should be overriden"; } > } > > public class SpecificPage extends Template { > Object somethingCreatedBasedOnParams; > public SpecificPage(PageParameters params) { > super(params); > } > public void setupParams(PageParameters params) { > //set up somethingCreatedBasedOnParams > } > public String getTitle() { > return "A page about " + somethingCreatedBasedOnParams.getFoo(); > } > } > > This same pattern evolves in my experience even if you are using > panels for templating, because you need the base class to add() the > panel, and the subclass wants to override which panel to add, but it > can't know what it needs to know in the override unless an init method > has given it a chance to access PageParameters. > > -Clint > > > > >> >> >> On Fri, May 15, 2009 at 12:01 AM, Vladimir K wrote: >>> >>> Martijn, >>> >>> here Java is not safe as a language. Yo're able to invoke overrided methods >>> on non-completely constructed objects. >>> >>> from my perspective it is a regular case in Wicket: >>> >>> class SampleComponent extends ... { >>> String parameter; >>> >>> SampleComponent(String id, String parameter) { >>> super(id); >>> this.parameter = parameter; >>> } >>> >>> // method is called from within superconstructor >>> �...@override >>> void createAdditionalComponents(RepeatingView rv) { >>> useSomehow(parameter); >>> } >>> } >>> >>> I know two approaches to work around: >>> - onBeforeRender >>> - a closure as a constructor formal parameter. >>> >>> But the latter does not help with built-in components. >>> >>> If Wicket does not help us with adding appropriate method for >>> second-step-initialization it should document it in wiki, javadoc and books >>> "dear user, when overriding methods, beware using of yet unassigned >>> constructor parameters". Hmm ... sounds stupid :) >>> >>> >>> Martijn Dashorst wrote: This has been discussed till death previously and we have excluded it from our roadmap. We will never have an init() method for components. Gossling gave us a Constructor to initialize your Objects. Search and read the archives if you want more information on the subject. Martijn On Fri,
Re: Application scope vs Singleton
Hi James, I would like to know what is the difference between a Singleton class with a static accessor method and POJO stored into my WebApplication class (with proper getter). What is the preferred way to set an application scoped object? Thank you again... -- View this message in context: http://www.nabble.com/Application-scope-vs-Singleton-tp23559402p23562038.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: Application scope vs Singleton
Alfredo Aleandri wrote: > I have a doubt about application-scoped objects. > What's the pro and cons of setting an object instance into my > WebApplication class or define that class as singleton (using a static > method to access it) ? Pro: Singletons are easy to use Contra: They make Unit tests and re-usability difficult. I personally use dependency-injection with wicket-guice. Jan - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Application scope vs Singleton
On Fri, May 15, 2009 at 9:01 AM, Alfredo Aleandri wrote: > Hi, > I have a doubt about application-scoped objects. What is your doubt? > What's the pro and cons of setting an object instance into my WebApplication > class or define that class as singleton (using a static method to access it) > ? If you always access it through the "getter" method on the application, I don't think there's any real problem with that. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket > features > scalability, clustering > "plans for next version..." already ended?
nope that is dropped and isnt very likely implemented in a coming release On Fri, May 15, 2009 at 15:15, manuelbarzi wrote: > hi, again > > regarding wicket > features > scalability, clustering > > there is a mention about: > > "The next version of Wicket will support client-side models for zero-state > scalability." > > is this already released? > > please, let me know asap. > > thank you. >
Re: wicket > features > security > "plans for next version..." already ended?
we already have url encryption (based on a session id as seed) On Fri, May 15, 2009 at 14:52, manuelbarzi wrote: > Hi, > > at wicket > features > security > > there is a mention about: > > "There are plans for the next version of Wicket to add URL encryption to > support highly secure web sites." > > is this already ended? > > please, let me know asap, i am preparing an architecture documentation to > justify wicket at this point. > > thank you. >
wicket > features > scalability, clustering > "plans for next version..." already ended?
hi, again regarding wicket > features > scalability, clustering there is a mention about: "The next version of Wicket will support client-side models for zero-state scalability." is this already released? please, let me know asap. thank you.
wicket > features > security > "plans for next version..." already ended?
Hi, at wicket > features > security there is a mention about: "There are plans for the next version of Wicket to add URL encryption to support highly secure web sites." is this already ended? please, let me know asap, i am preparing an architecture documentation to justify wicket at this point. thank you.
wicket > features > security > "plans for next version..." already ended?
Hi, at wicket > features > security there is a mention about: "There are plans for the next version of Wicket to add URL encryption to support highly secure web sites." is this already ended? please, let me know asap, i am preparing an architecture documentation to justify wicket at this point. thank you.
Application scope vs Singleton
Hi, I have a doubt about application-scoped objects. What's the pro and cons of setting an object instance into my WebApplication class or define that class as singleton (using a static method to access it) ? Thank you alf - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Component creation and initialization
On Fri, May 15, 2009 at 12:07 AM, Jeremy Thomerson wrote: > > Most java programmers know not to call overridable methods from the > constructor as a general rule, although there are times when it could > inadvertantly happen - which is why we need bug reports if you see > that happening. > I've only been on the wicket list for a few months, and I can understand the annoyance of bringing up a subject that's perhaps been beaten to death, but to me that means the resulting consensus to be documented in the wiki, rather than pointing users to "search the list." So whatever comes out of this thread, I'll add it to the wiki (unless it's already there, in which case I apologise.) This isn't just a matter of whether Wicket internally calls overridable methods. What ends up happening (only in my experience) is that inheritance for pages ends up needing you to create your own internal init() mechanism in order to ensure that subclasses are ready to effectively override methods for base class component creation. I'm not suggesting that Wicket provide this type of init() mechanism, but in my experience it is a pattern that crops up, and it should be documented as such. If it is already documented, my apologies. If it's an anti-pattern, what's the alternative? public class Template extends WebPage { public Template(PageParameters params) { setupParams(params); add(new Label("title",getTitle())); } pubilc void setupParams(PageParameters params) { } public String getTitle() { return "Title should be overriden"; } } public class SpecificPage extends Template { Object somethingCreatedBasedOnParams; public SpecificPage(PageParameters params) { super(params); } public void setupParams(PageParameters params) { //set up somethingCreatedBasedOnParams } public String getTitle() { return "A page about " + somethingCreatedBasedOnParams.getFoo(); } } This same pattern evolves in my experience even if you are using panels for templating, because you need the base class to add() the panel, and the subclass wants to override which panel to add, but it can't know what it needs to know in the override unless an init method has given it a chance to access PageParameters. -Clint > > > On Fri, May 15, 2009 at 12:01 AM, Vladimir K wrote: >> >> Martijn, >> >> here Java is not safe as a language. Yo're able to invoke overrided methods >> on non-completely constructed objects. >> >> from my perspective it is a regular case in Wicket: >> >> class SampleComponent extends ... { >> String parameter; >> >> SampleComponent(String id, String parameter) { >> super(id); >> this.parameter = parameter; >> } >> >> // method is called from within superconstructor >> �...@override >> void createAdditionalComponents(RepeatingView rv) { >> useSomehow(parameter); >> } >> } >> >> I know two approaches to work around: >> - onBeforeRender >> - a closure as a constructor formal parameter. >> >> But the latter does not help with built-in components. >> >> If Wicket does not help us with adding appropriate method for >> second-step-initialization it should document it in wiki, javadoc and books >> "dear user, when overriding methods, beware using of yet unassigned >> constructor parameters". Hmm ... sounds stupid :) >> >> >> Martijn Dashorst wrote: >>> >>> This has been discussed till death previously and we have excluded it >>> from our roadmap. We will never have an init() method for components. >>> Gossling gave us a Constructor to initialize your Objects. >>> >>> Search and read the archives if you want more information on the subject. >>> >>> Martijn >>> >>> On Fri, May 15, 2009 at 12:36 AM, Juan G. Arias >>> wrote: It would be very nice to add a new phase for component creation, like I said, an init() or createContent(). Is there a JIRA issue for that? If yes, I will vote for it and suggest to change the name to something _not_ related to the rendre phase. Thanks! Juan On Thu, May 14, 2009 at 3:31 PM, Daniel Stoch wrote: > I think you can use hasBeenRendered() method instead of custom boolean > flag. > > -- > Daniel > > On 2009-05-14, at 20:15, Jeremy Thomerson wrote: > > You could probably do it in onBeforeRender - but you would need to >> keep a boolean flag to check if it's the first render so that you >> don't recreate them on a second render There was talking of >> adding an onBeforeFirstRender method, but I don't think it's happened >> yet - you could look for the method to see if I'm wrong. >> >> -- >> 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 > > >>> >>> >>> >>>
Re: objectautocomplete on a form with CompoundPropertyModel
hmm true, I think it's because it's ajax and actually get set before the form are submited. I agree it would be nice if it acted exactly like normal form, but I guess the way it are now allows much more flexibility, however it should be possible to do the other aswell. regards 2009/5/14 Brill Pappin : > I'd actually rather it worked as expected and simply set the object on the > model property :) > However, it's usable so I'll live with it. > > - brill > > On 13-May-09, at 3:10 PM, nino martinez wael wrote: > >> Yeah or just another way of thinking.. :) >> >> 2009/5/11 Brill Pappin : >>> >>> Thanks that worked... although its a bit of a pain in the behind :) >>> >>> - Brill Pappin >>> >>> On 11-May-09, at 6:55 AM, nino martinez wael wrote: >>> You do something like this: // compound model private final IModel cityModel = new PropertyModel( searchWrapper, "cityId"); builderCity .updateOnSelectionChange(new ObjectAutoCompleteSelectionChangeListener() { public void selectionChanged(AjaxRequestTarget target, IModel model) { cityModel.setObject(model.getObject()); } }); So it does not update on submit, but instead onSelectionChange of the builder.. 2009/5/11 Brill Pappin : > > I'm trying to use ObjectAutoComplete from wicketstuff on a form where > the > model is a CompoundPropertyModel. > > The auto compete field doesn't seem to be setting its value on the form > model at all during a submit. > > I've looked at the examples for this component and not a single one > actually > includes the onSubmit implementation. > Is there something special i have to do with this component? > > - Brill Pappin - 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: Newbie-Problem: Wicket/Maven/Jetty: FileNotFoundException?
Note that this is a maven problem. Apparently maven does not use the correct 'home' directory. You can override the home directory set by setting an environment variable. I think its called M2_REPO. Regards, Erik. Henrik schreef: I am very new to the Java-World and want to make a web project using Java/Maven2/Wicket. I tried to install Wicket with these instructions: http://cwiki.apache.org/WICKET/windows-guide-to-installing-wicket-on-eclipse-with-maven.html Everything went fine up to the point of running a project. I tried Wicket version 1.4 rc4 and 1.3.6. Trying to reach localhost:8080 displays an 503-Error... The console told me the following: INFO - log- Logging to org.slf4j.impl.Log4jLoggerAdapter(org.mortbay.log) via org.mortbay.log.Slf4jLog STARTING EMBEDDED JETTY SERVER, PRESS ANY KEY TO STOP INFO - log- jetty-6.1.4 INFO - log- NO JSP Support for /, did not find org.apache.jasper.servlet.JspServlet WARN - log- Failed startup of context org.mortbay.jetty.webapp.webappcont...@137c60d{/,src/main/webapp} java.io.FileNotFoundException: \\ROSSV01\ROSSV01\Users\mypersonalusername\.m2\repository\log4j\log4j\1.2.14\log4j-1.2.14.jar (Access denied) at java.util.zip.ZipFile.open(Native Method) at java.util.zip.ZipFile.(ZipFile.java:114) at java.util.jar.JarFile.(JarFile.java:133) [...] ROSSV01 is the name of the networkserver where my userdata is stored. I have no clue why Maven(?) chose that directory... However the URL is false: Right URL: \\ROSSV01\Users\mypersonalusername\.m2\... Wrong URL: \\ROSSV01\ROSSV01\Users\mypersonalusername\.m2\... So I'm pretty stuck here. Is it a Wicket error? Is it a Maven error? Jetty error? Where could I change the URL using eclipse? Right now I am pretty confused here... Would be great if somebody can help me out... - 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
Bookmarkable fallback ajax link
Hi, I want googlebot to be able to see content that is shown to normal browsers using ajax. I use a fallback ajax link but because googlebot does not use sessions the links need to be bookmarkable. The problem seems to be because the link contains an ajax behaviour it is considered stateful. Is there anyway to achieve this? thanks, John - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Spring Security's method security and Wicket
>> The catching AuthenticationException and returning false is something >> I'm not familiar with. I don't think I've mentioned it? Please refresh >> my memory, maybe I have mentioned it. ;-) > > It would be in the authenticate method of mine. If the exception is > thrown, you'd need to return false. Ah, I'll check it out. :-) >> 1. Spring records the request. >> 2. Wicket recieves the request, it's a session relative page. >> 3. Wicket does its thing and some logic written by "you" is executed. >> 4. Your code calls a Spring bean through Wicket-Spring-IoC. >> 5. Spring Security intercept the method call and performs an >> authrorization check. It turns out the user isn't logged in! A >> AuthenticationCredentialsNotFoundException is thrown. >> 6. Wicket catches the AuthenticationCredentialsNotFoundException but >> re-throws it exactly as it were (by solving my question 1). >> 7. Spring catches the exception, let's the user log in and simulates >> the previously recorded request. > > I don't think I'd have Spring catch the exception. I'd use a custom > RequestCycle and put logic in it to look for those runtime exceptions. > If it sees one, it'd either redirect the user (by throwing a restart > at intercept page exception) if they're not logged in or show the > "you're not allowed to do that" page. Sounds like a nicer solution! I'll look into doing something like that myself, being a Wicket newbie it might take me a while though. Are there any examples of doing anything similar available somewhere? Best regards, Kent - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Spring Security's method security and Wicket
On Fri, May 15, 2009 at 5:02 AM, Kent Larsson wrote: > The catching AuthenticationException and returning false is something > I'm not familiar with. I don't think I've mentioned it? Please refresh > my memory, maybe I have mentioned it. ;-) It would be in the authenticate method of mine. If the exception is thrown, you'd need to return false. > 1. Spring records the request. > 2. Wicket recieves the request, it's a session relative page. > 3. Wicket does its thing and some logic written by "you" is executed. > 4. Your code calls a Spring bean through Wicket-Spring-IoC. > 5. Spring Security intercept the method call and performs an > authrorization check. It turns out the user isn't logged in! A > AuthenticationCredentialsNotFoundException is thrown. > 6. Wicket catches the AuthenticationCredentialsNotFoundException but > re-throws it exactly as it were (by solving my question 1). > 7. Spring catches the exception, let's the user log in and simulates > the previously recorded request. I don't think I'd have Spring catch the exception. I'd use a custom RequestCycle and put logic in it to look for those runtime exceptions. If it sees one, it'd either redirect the user (by throwing a restart at intercept page exception) if they're not logged in or show the "you're not allowed to do that" page. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Component creation and initialization
The horse is pretty alive - https://issues.apache.org/jira/browse/WICKET-1134. Jeremy Thomerson-5 wrote: > > With regards to multiple wicket:extend tags - that is also an old, > dead horse that doesn't need to be beat right now. The user list has > a lot of discussion on it. The simplest way to allow a child to > contribute multiple components to a page is the same as you would do > in normal java (which does not allow multiple inheritance) - expose > multiple overridable methods that provide the components... i.e.: > -- View this message in context: http://www.nabble.com/Component-creation-and-initialization-tp23545666p23557008.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: Illegal State Exception on DefaultTeeModel.removeNodeFromParent
Collapsing the node works :) +Leena -- View this message in context: http://www.nabble.com/Illegal-State-Exception-on-DefaultTeeModel.removeNodeFromParent-tp20185042p23556124.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: May be useful for projects deciding between JSF and Wicket
even more ... the title sounds a bit vulgarly. But the arrangement of such links has a value itself. Especially for people who hasn't started a project yet. I would sort the list by date descending. The latest articles has more value than older. jeroend-2 wrote: > > ... > The title is subjective at best to start with and to open up with blog > entries from 5 years ago is not giving it more credibility. ... > > regards, > jeroen. > -- View this message in context: http://www.nabble.com/May-be-useful-for-projects-deciding-between-JSF-and-Wicket-tp23554009p23556062.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: Spring Security's method security and Wicket
The catching AuthenticationException and returning false is something I'm not familiar with. I don't think I've mentioned it? Please refresh my memory, maybe I have mentioned it. ;-) I was talking about Spring throwing a AuthenticationCredentialsNotFoundException, when the exception goes back to Wicket it swallows the exception (and shows it to the user) and I was wondering if there is a possibility to let that specific exception through. By letting it through (ie re-throwing it without encapsulating it or modifying it) Spring can handle it and I think it will work as advertised by Spring. My question 2 was essentially if this is something one wants to do with Wicket. Or if there could be any nasty surprises along the way? One such nasty surprise might be: 1. Spring records the request. 2. Wicket recieves the request, it's a session relative page. 3. Wicket does its thing and some logic written by "you" is executed. 4. Your code calls a Spring bean through Wicket-Spring-IoC. 5. Spring Security intercept the method call and performs an authrorization check. It turns out the user isn't logged in! A AuthenticationCredentialsNotFoundException is thrown. 6. Wicket catches the AuthenticationCredentialsNotFoundException but re-throws it exactly as it were (by solving my question 1). 7. Spring catches the exception, let's the user log in and simulates the previously recorded request. 8. The request is for the session relative page from earlier [see 2 above]. But that object no longer exists as the AuthenticationCredentialsNotFoundException was thrown [see 5 above]. Maybe we will get a NullPointerException here. Could such nasty surprises happen? If so, then it might be better to turn the user to a access denied page when a @Secured method is found and the user isn't logged in or lacks the sufficient role(s). It still involves catching the Spring Security exception I guess, but logging in and re-sending the request is not an option. Thoughts? Best regards, Kent On Thu, May 14, 2009 at 7:46 PM, James Carman wrote: > On Thu, May 14, 2009 at 1:38 PM, Kent Larsson wrote: >> Hi James, >> >> Thank you for example! Although I can't find any secured methods in >> there. Not in your beans.xml and not by grepping for Secured on all >> your files. So correct me if I'm wrong, but I don't think you are >> using the method security option in Spring Security? In any case I'm >> greatful for you showing me how you solved the integration and I'll be >> looking more into it soon. >> >> My current problem is with method security, while URL security works. > > You're very welcome. Sorry I didn't fix the problem in the code (I > should do that while I'm thinking about it), but it's not that > difficult to catch AuthenticationException and return false. You're > correct, I am not using method-level security. I can imagine that you > can try a custom error catcher to redirect to your login page if a > spring security exception is found (or tell them they're not allowed > to do what they tried to do)? I'd have to play with it. > > - > 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: May be useful for projects deciding between JSF and Wicket
Hmm, Not sure if I can convince my boss (or maybe even me myself) by this blog entry. The title is subjective at best to start with and to open up with blog entries from 5 years ago is not giving it more credibility. I have worked with jsf (myfaces and icefaces) on 2 projects and to be honest I forced it down the throat of the freelancers. In the end it worked allright (for intranet, we havent tested it for more than 10 concurrent users). We have definitely have had our share of problems. However to change architecture with a group of people used to it is a brave or even stupid action. I have seen quite some freelancers come and go with only one thing on their agenda: pimping up their cv. It went from struts to jsf, from jdbc, ejb1/ejb2, hibernate and jpa all on Websphere (the only stable factor, giggle). Now we should refactor again to wicket or tapestry or whatever. The big thing with JSF is, it is mainstream IBM, Oracle and Sun love it and so does management (like it or not). I do realize i'm saying this on the wicket forum, where I follow some of the discussions and I hope to take part in it at a later stage. My objective is first to play with it myself (on a hobby project at home) and see how well it will fit our needs. What I can say at this point in favor of Wicket is the enormous enthusiastic and capable crowd supporting it. Problems with jsf are hard to solve just by lack of support, support which is strangely enough adverted big time by the large companies. regards, jeroen. -Oorspronkelijk bericht- Van: Peter Thomas [mailto:ptrtho...@gmail.com] Verzonden: vr 5/15/2009 8:14 Aan: users@wicket.apache.org Onderwerp: May be useful for projects deciding between JSF and Wicket Hi, I blogged a fairly large collection of links to discussions about the issues with JSF in general. What prompted me to put this up is that I yet again failed to convince a team at work that Wicket should be chosen over JSF. Frustrating. Hope this proves useful to some, please pass it on to the pointy haired bosses, architecture astronauts, powerpoint consultants etc that you know. DZone link: http://dzone.com/links/jsf_sucks_compendium_of_jsf_rantsreviews.html Thanks, Peter.
Re: May be useful for projects deciding between JSF and Wicket
Where you were two years ago? :) ptrthomas wrote: > > Hi, > > I blogged a fairly large collection of links to discussions about the > issues > with JSF in general. What prompted me to put this up is that I yet again > failed to convince a team at work that Wicket should be chosen over JSF. > Frustrating. > > Hope this proves useful to some, please pass it on to the pointy haired > bosses, architecture astronauts, powerpoint consultants etc that you know. > > DZone link: > http://dzone.com/links/jsf_sucks_compendium_of_jsf_rantsreviews.html > > Thanks, > > Peter. > > -- View this message in context: http://www.nabble.com/May-be-useful-for-projects-deciding-between-JSF-and-Wicket-tp23554009p23554709.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