Re: conditional css

2011-02-08 Thread mbrictson
You might find this useful Source: Wicket 1

Re: Calculating wicket page URL in JavaScript

2011-02-06 Thread mbrictson
My solution is to put a tag on every page with a reference to the home page URL. That way scripts can always build URLs based on the home page root. For example: BasePage.html BasePage.java add(new BookmarkablePageLink("home-link", getApplication().getHomePage())); Then your JavaScript

Re: Access to HttpServletResponse gone in 1.5?

2011-01-27 Thread mbrictson
Todd Wolff wrote: > > How can I access HttpServletResponse? > I think this will work in the latest 1.5-SNAPSHOT: (HttpServletResponse) getResponse().getContainerResponse(); -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Access-to-HttpServletResponse-gone-in-1-5-

Re: Recover from session expiration ?

2010-04-11 Thread mbrictson
Another option: include an AjaxSelfUpdatingTimerBehavior on your page; this will keep your session from expiring. Boris Goldowsky-3 wrote: > > I have a wicket website that stores some user choices around how a page is > displayed in the Session - simple, non-critical information. It also uses

Re: Recover from session expiration ?

2010-04-11 Thread mbrictson
Have you seen jolira-tools? It was mentioned here on the mailing list recently. I haven't used it, but it seems to have some components that are intended solve the type of "stateless ajax" problem you are having. http://code.google.com/p/jolira-tools/wiki/stateless Boris Goldowsky-3 wrote: > >

Re: What about an onInitialRender method ?

2010-04-02 Thread mbrictson
Good example. Thanks for clarifying. igor.vaynberg wrote: > > one usecase is when you want the user to be able to change which > components will be created. > > this is bad: > > class mycomponent extends panel { > public mycomponent(string id) { add(newCounter("counter")); } > protected C

Re: What about an onInitialRender method ?

2010-04-02 Thread mbrictson
Joseph, Could you elaborate on why adding components in onBeforeRender is "safe" and a "wicket good practice"? I haven't come across this very often in my projects. Under what circumstances would you recommend this approach? josephpachod wrote: > > hi > > The other day, I was busy creating re

Re: [announce] better look & modern css for wicket examples contest

2010-02-02 Thread mbrictson
In addition to the examples, I think it would be nice to apply a pleasant CSS skin to the Wicket quickstart archetype. Instead of an un-styled "QuickStart" message, how about a nicely formatted short intro with links to tutorials, reference documentation, etc.? As an example, I like the "it worke

Re: Wicket, Spring 3 and UnitTesting

2010-01-28 Thread mbrictson
The API is bit confusing: registerSingleton() on StaticWebApplicationContext takes a class, but registerSingleton() on ConfigurableListableBeanFactory takes a bean. That is why I first call getBeanFactory() in my example. ctx.getBeanFactory().registerSingleton(...) I use StaticWebApplicationCont

Re: Wicket, Spring 3 and UnitTesting

2010-01-26 Thread mbrictson
Why not use Spring's StaticWebApplicationContext? StaticWebApplicationContext ctx = new StaticWebApplicationContext(); ctx.getBeanFactory().registerSingleton("serviceOfDoom", mock); http://static.springsource.org/spring/docs/3.0.x/api/org/springframework/web/context/support/StaticWebApplicationC

Re: Maven problem with wicketstuff

2010-01-26 Thread mbrictson
What part of wicketstuff do you want to use in your project? The "wicketstuff-core" artifact is not a JAR artifact. You have to specify the actual JAR you need, like "annotation", for example: org.wicketstuff annotation 1.4.2-SNAPSHOT Warren Bell-2 wrote: > > I am trying to retrieve wi

Re: How to compile a component for both Wicket 1.3 and 1.4?

2009-11-18 Thread mbrictson
jar-plugin wicket13 mbrictson wrote: > > Hello, > > I am writing a Wicket component that I would like to use in two different > Wicket applications. One application is using Wicket 1.4.3, and the other > is a legacy application using Wicket 1.3.6.

Re: correct way to call necessary javascript initialization when a component is added via ajax

2009-11-11 Thread mbrictson
Actually wicket-ajax.js is smart enough to fire these "dom ready" events after an ajax request. Of course, a jQuery $(document).ready() will not fire; neither will the "ready" events of other various JS libraries. However if you specifically use Wicket's "dom ready" event (i.e. renderOnDomReadyJa

Re: Serializable check

2009-11-05 Thread mbrictson
I think the problem is that you are using the "volatile" keyword when you should be using "transient". bht wrote: > > So I wonder, what is the situation with SerializableChecker > complaining about that volatile field not being Serializable. Is this > a bug or do I miss anything? > -- View t

Re: prevent browser from cahing my pages

2009-09-10 Thread mbrictson
gging statements or debugging could help narrow down that problem. fachhoch wrote: > > i tried this it did not work , does it have anything to do with > urlencodingstrategy ? > > mbrictson wrote: >> >> This works for me: >> >> @Override >>

Re: prevent browser from cahing my pages

2009-09-10 Thread mbrictson
This works for me: @Override protected void setHeaders(WebResponse response) { response.setHeader("Pragma", "no-cache"); response.setHeader( "Cache-Control", "no-cache, max-age=0, must-revalidate, no-store" ); } "no-store" is needed

Re: Mysterious NullPointerException

2009-06-29 Thread mbrictson
If you simply call log.error(e), your log will only contain e.toString(), which does not include the stack trace. You need to use the 2-arg version of log.error() if you want the full trace. Try this: log.error("An uncaught runtime exception occurred", e); jelevy wrote: > > Igor, > Can you gi

Re: AutoCompleteTextField and accentuated characters

2009-03-23 Thread mbrictson
m hosting my web site. > > Do you know if there is another way to set that per web application? > > Thanks again! > > Thierry > > Sent from: Montreal Quebec Canada. > > On Mon, Mar 23, 2009 at 16:37, mbrictson wrote: > >> >> Are you using Tomcat? &g

Re: radio button ajax behaviour

2009-03-23 Thread mbrictson
I suggest using the "onclick" event instead. In Internet Explorer, the "onchange" event does not work for radio buttons. -- Matt dtoffe wrote: > > Have you tried with an AjaxEventBehavior and an "onchange" event ? See > the javadocs for AjaxEventBehavior. > > Daniel > > > SrinivasaRaju Ch

Re: AutoCompleteTextField and accentuated characters

2009-03-23 Thread mbrictson
Are you using Tomcat? I had a similar problem (with the word café specifically) and it turned out to be caused by Tomcat's URL encoding. By default, Tomcat uses the system encoding for URLs. You will have to edit the Tomcat configuration to change this: 1. Open $CATALINA_HOME/conf/server.xml 2.