Re: conditional css

2011-02-08 Thread mbrictson
You might find this useful http://opensource.55minutes.com/apidocs/fiftyfive-wicket/2.0.3/fiftyfive/wicket/css/InternetExplorerCss.html Source: http://opensource.55minutes.com/svn/java/tags/releases/fiftyfive-wicket-2.0.3/src/main/java/fiftyfive/wicket/css/InternetExplorerCss.java Wicket 1.5

Re: Calculating wicket page URL in JavaScript

2011-02-06 Thread mbrictson
My solution is to put a link 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 head link rel=home wicket:id=home-link / /head BasePage.java add(new BookmarkablePageLink(home-link,

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:

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: I

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: 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 reusable

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 Component

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 worked!

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

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: dependency groupIdorg.wicketstuff/groupId artifactIdannotation/artifactId

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);

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

2009-11-18 Thread mbrictson
groupIdorg.apache.maven.plugins/groupId artifactIdmaven-jar-plugin/artifactId configuration classifierwicket13/classifier /configuration /plugin /plugins /build /profile /profiles mbrictson wrote: Hello, I am writing

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.

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 this

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 to

Re: prevent browser from cahing my pages

2009-09-10 Thread mbrictson
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 protected void setHeaders(WebResponse response

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 give

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

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 wrote: Hi,

Re: AutoCompleteTextField and accentuated characters

2009-03-23 Thread mbrictson
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 m...@55minutes.com wrote: Are you using Tomcat? I had a similar problem (with the word café specifically) and it turned out