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

http://opensource.55minutes.com/svn/java/branches/wicket-1.5-migration/src/main/java/fiftyfive/wicket/css/InternetExplorerCss.java

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/conditional-css-tp3276786p3276897.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: 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, getApplication().getHomePage()));

Then your JavaScript can do something like this (jQuery):

var projectPageUrl = $(link[rel='home']).attr(href) + project/ +
projectId;
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Calculating-wicket-page-URL-in-JavaScript-tp3262459p3263084.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: 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-tp3239121p3243679.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: 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 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
 Ajax to do things like bring up a zoomed-in version of an image.
 
 The problem is when sessions expire after an hour or so, trying to zoom an
 image or set a display preference causes an Page Expired exception.  Since
 people aren't logging in or anything, and no mission-critical information
 is being stored in the session, I'd prefer to allow a new session to be
 transparently created when necessary rather than showing users a session
 expired page.
 
 Am I missing some easy way around this problem, or do I need to re-build
 all the functionality to use cookies and jQuery instead of wicket forms
 and ajax?
 
 This thread seems relevant but didn't seem to have a solution:
 http://www.nabble.com/Graceful-handling-of-ajax-after-session-expiration-tf4559480.html
 
 Thanks for any pointers -
 
 Bng
 
 

-- 
View this message in context: 
http://old.nabble.com/Recover-from-session-expiration---tp28184196p28210705.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: 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
 Ajax to do things like bring up a zoomed-in version of an image.
 
 The problem is when sessions expire after an hour or so, trying to zoom an
 image or set a display preference causes an Page Expired exception.  Since
 people aren't logging in or anything, and no mission-critical information
 is being stored in the session, I'd prefer to allow a new session to be
 transparently created when necessary rather than showing users a session
 expired page.
 
 Am I missing some easy way around this problem, or do I need to re-build
 all the functionality to use cookies and jQuery instead of wicket forms
 and ajax?
 
 This thread seems relevant but didn't seem to have a solution:
 http://www.nabble.com/Graceful-handling-of-ajax-after-session-expiration-tf4559480.html
 
 Thanks for any pointers -
 
 Bng
 
 

-- 
View this message in context: 
http://old.nabble.com/Recover-from-session-expiration---tp28184196p28210725.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: 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 components. To make them
 safe, I used what I believe is a wicket good practices: adding the
 components in onBeforeRender.
 
 In fact, it's not just in onBeforeRender, it's rather :
 @Override
 protected void onBeforeRender() {
 if(!hasBeenRendered()){
 // actual code
 }
 super.onBeforeRender();
 }
 
 having done this stuff repeatedly, I felt a bit annoyed but these many   
 if(!hasBeenRendered()) and the brackets/indentations it brings. 
 Furthermore, on the few occasions I really needed something done on each
 onBeforeRender, it brought clutter to the code.
 Last but not least, recently, I was helping a wicket beginner and
 explaining this onBeforeRender/if(!hasBeenRendered) wasn't the best
 moment I had.
 
 As such, I started to wonder if a simple onInitialRender method (or
 similarly named) could be created ? It would run once and only once before
 the first onBeforeRender. 
 
 onBeforeRender would then return to what it should really mean (but still
 have this handy hasBeenRendered() method just in case). 
 
 In the end, it's trivial but would save a few keystrokes and bring some
 clarity.
 
 What do you think of that ?
 
 thanks in advance
 joseph
 

-- 
View this message in context: 
http://old.nabble.com/What-about-an-onInitialRender-method---tp28122954p28123309.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: 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 newCounter(String id) { return new Label(id, );
 }
 }
 
 because you are calling an overridable method from constructor
 

-- 
View this message in context: 
http://old.nabble.com/What-about-an-onInitialRender-method---tp28122954p28123955.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: [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! welcome page that Django provides:

http://i46.tinypic.com/2q025g9.jpg


nino martinez wael wrote:
 
 Hi
 
 Someone mentioned that we could have a better look  feel for wicket,
 since
 there are no designers in the core team. I proposed a contest, to make the
 coolest slickest css for wicket. So please feel free to apply.
 
 
 Requirements:
 
 your css should be compatible with the basic browsers, Firefox , IE ,
 Safari
 etc. And retain heavy use of embedded js. And it should be a drop on,
 using
 existing id's  hierachy for design.
 
 Practical info:
 
 The contest ends in 2 months April 2nd.
 
 Get the wicket examples here:
 http://svn.apache.org/repos/asf/wicket/trunk/wicket-examples/
 
 If you need it you can put your css in svn at wicketstuff, write to this
 list for details on howto get commit rights, you should add your css to
 sandbox and sf user name (
 https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/sandbox/ ).
 
 Yes as with all contest there is a prize, you can win the wicket t-shir
 along with the honor if your css are the winner. This
 http://www.cafepress.com/apachewicket.317298148 or this
 http://www.cafepress.com/apachewicket.317298083 depending on your age :)
 
 Just reply to this thread to enter the contest.
 
 Regards Nino on behalf of the Wicket People
 
 

-- 
View this message in context: 
http://old.nabble.com/-announce--better-look---modern-css-for-wicket-examples-contest-tp27425107p27426016.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 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 StaticWebApplicationContext for my unit testing, so I am pretty sure
it works. :)

Here is the registerSingleton signature:

http://static.springsource.org/spring/docs/3.0.x/api/org/springframework/beans/factory/config/SingletonBeanRegistry.html#registerSingleton%28java.lang.String,%20java.lang.Object%29




Jochen Mader-2 wrote:
 
 Sorry for my late answer.
 StaticWebApplicationContext doesn't cut it for  me.
 Your example contains a small mistake:
 Inserting the mock-object won't work as registerSingleton expects to get a
 Class.
 As I want to create mock objects with EasyMock there are two approaches
 (as
 far as I know).
 The one I have shown before, involving the creation of the custom
 ApplicationContextMock or using easy mock inside a testing-spring.xml.
 
 CU
 
 Jochen
 
 

-- 
View this message in context: 
http://old.nabble.com/Wicket%2C-Spring-3-and-UnitTesting-tp27320784p27358526.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: 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
  version1.4.2-SNAPSHOT/version
/dependency


Warren Bell-2 wrote:
 
 I am trying to retrieve wicketstuff-core from repository and am getting 
 the following Missing artifact.
 
 Missing artifact
 org.wicketstuff:wicketstuff-core:jar:1.4.2-SNAPSHOT:compile
 
 my pom
 
 ...
 repository
 idwicket-snaps/id
 urlhttp://wicketstuff.org/maven/repository/url
 snapshots
 enabledtrue/enabled
 /snapshots
 releases
 enabledtrue/enabled
 /releases
 /repository
 ...
 
 dependency
 groupIdorg.wicketstuff/groupId
 artifactIdwicketstuff-core/artifactId
 version1.4.2-SNAPSHOT/version
 /dependency
 ...
 
 
 What am I doing wrong?
 
 Thanks,
 
 Warren
 
 -
 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://old.nabble.com/Maven-problem-with-wicketstuff-tp27332061p27332549.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 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/StaticWebApplicationContext.html


Jochen Mader-2 wrote:
 
 Just figured out how to do UnitTesting with Spring 3 and Wicket.
 Spring 3 introduced a check to see if a given context was a
 WebApplicationContext. That means ApplicationContextMock is not suitable
 for
 testing (giving the infamous  No WebApplicationContext found: no
 ContextLoaderListener registered? message).
 I simply extended the class and added WebApplicationContext interface.
 
 The following example shows how to get it going (I hope the code doesn't
 get
 messed up):
 
 
 public class TestHomePage extends TestCase {
 
 private WicketTester tester;
 
 
  @Override
 
 public void setUp() {
 
 final WebApplicationContextMock appctx = new WebApplicationContextMock();
 
 
  final ServiceOfDoom mock = createMock(ServiceOfDoom.class);
 
 expect(mock.getIt()).andReturn(whups).anyTimes();
 
 replay(mock);
 
  tester = new WicketTester(new WicketApplication()) {
 
 @Override
 
 public ServletContext newServletContext(String path) {
 
 MockServletContext servletContext = (MockServletContext) super
 
 .newServletContext(path);
 
 appctx.setServletContext(servletContext);
 
 appctx.putBean(scratchy, mock);
 
 servletContext
 
 .setAttribute(
 
 WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE,
 
 appctx);
 
 return servletContext;
 
 }
 
 };
 
 tester.getApplication().addComponentInstantiationListener(
 
 new SpringComponentInjector(tester.getApplication(), appctx,
 
 false));
 
 }
 
 
  public void testRenderMyPage() {
 
 // start and render the test page
 
 tester.startPage(HomePage.class);
 
 
  // assert rendered page class
 
 tester.assertRenderedPage(HomePage.class);
 
 
  // assert rendered label component
 
 tester
 
 .assertLabel(message,
 
 whups);
 
 }
 
 
  private class WebApplicationContextMock extends ApplicationContextMock
 
 implements WebApplicationContext {
 
 private ServletContext servletContext;
 
 
  public T T getBean(ClassT requiredType) throws BeansException {
 
 // TODO Auto-generated method stub
 
 return null;
 
 }
 
 
  public   A findAnnotationOnBean(String beanName,
 
 Class  annotationType) {
 
 // TODO Auto-generated method stub
 
 return null;
 
 }
 
 
  public MapString, Object getBeansWithAnnotation(
 
 Class? extends Annotation annotationType)
 
 throws BeansException {
 
 // TODO Auto-generated method stub
 
 return null;
 
 }
 
 
  public void setServletContext(ServletContext servletContext) {
 
 this.servletContext = servletContext;
 
 }
 
 
  public ServletContext getServletContext() {
 
 return null;
 
 }
 
 
  }
 
 }
 
 

-- 
View this message in context: 
http://old.nabble.com/Wicket%2C-Spring-3-and-UnitTesting-tp27320784p27332886.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: How to compile a component for both Wicket 1.3 and 1.4?

2009-11-18 Thread mbrictson

If anyone is interested, here's how I solved the problem of building a Wicket
1.3-compatible JAR and 1.4-compatible JAR from the same codebase.

First I tweaked my Wicket code so that it could compile under 1.3 and 1.4.
Basically, I started with 1.4 code, then removed generics, and avoided using
get/setDefaultModel.

Then I added build profiles to my POM (see below). I can now use the build
profiles to compile and deploy JARs for both 1.3 and 1.4, using maven's
classifier to distinguish the two JARs.

profiles
  profile
idwicket14/id
activation
  activeByDefaulttrue/activeByDefault
/activation
properties
  wicket.version1.4.3/wicket.version
/properties
build
  plugins
plugin
  groupIdorg.apache.maven.plugins/groupId
  artifactIdmaven-jar-plugin/artifactId
  configuration
classifierwicket14/classifier
  /configuration
/plugin
  /plugins
/build
  /profile
  profile
idwicket13/id
activation
  property
namewicket13/name
  /property
/activation
properties
  wicket.version1.3.6/wicket.version
/properties
build
  plugins
plugin
  groupIdorg.apache.maven.plugins/groupId
  artifactIdmaven-jar-plugin/artifactId
  configuration
classifierwicket13/classifier
  /configuration
/plugin
  /plugins
/build
  /profile
/profiles


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. Unfortunately upgrading this
 legacy app to 1.4 is not an option.
 
 I'm using maven for my build process. Right now I am considering the
 following approach:
 
 1. Set up a multi-module maven project.
 
 2. Create a common module that contains all the code that will safely
 execute in both Wicket 1.3 and Wicket 1.4.
 
 3. Create a wicket13 module that contains the 1.3-specific code.
 
 4. Create a wicket14 module that contains the 1.4-specific code.
 
 That sounds like a lot of trouble. Can anyone think of a simpler solution,
 perhaps using maven build profiles? Or am I approaching this completely
 wrong?
 
 --
 Matt
 
 
 -
 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://old.nabble.com/How-to-compile-a-component-for-both-Wicket-1.3-and-1.4--tp26413392p26419338.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: 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. renderOnDomReadyJavascript() as in the
Java example below, or manually in JavaScript using
Wicket.Event.addDomReadyEvent()), then the event will fire after the ajax
call.


jthomerson wrote:
 
 Won't work on an ajax request because the dom ready event isn't fired.
 Right?
 
 --
 Jeremy Thomerson
 http://www.wickettraining.com
 
 
 
 On Wed, Nov 11, 2009 at 2:23 AM, svenmeier s...@meiers.net wrote:
 

 Why so complicated?

 @Override
 public void renderHead(IHeaderResponse response) {
 response.renderOnDomReadyJavascript(init_slider_js());
 }

 
 

-- 
View this message in context: 
http://old.nabble.com/correct-way-to-call-necessary-javascript-initialization-when-a--component-is-added-via-ajax-tp26295973p26307595.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: 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 message in context: 
http://old.nabble.com/Transactions-with-RuntimeException-tp26220780p26227378.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: 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 prevent Firefox from caching the back-button.



fachhoch wrote:
 
 I want to add nocache header to my pages ,
 
 code from WebPage
 
 response.setHeader(Pragma, no-cache);
 response.setHeader(Cache-Control, no-cache, max-age=0,
 must-revalidate); // no-store
 
 
 and I also added
 
 response.setHeader(Cache-Control,no-cache);
 response.setDateHeader (Expires, -1);
 by overriding
@Override
 protected void setHeaders(WebResponse response) {
 super.setHeaders(response);
 response.setHeader(Cache-Control,no-cache);
 response.setDateHeader (Expires, -1);
 }
 
 
 but the browser is still caching the pages , I hit the back button or
 forward button the page is not refreshed , please tell me how   to prevent
 browser from chaching my pages.
 
 

-- 
View this message in context: 
http://www.nabble.com/prevent-browser-from-cahing-my-pages-tp25385725p25386585.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: prevent browser from cahing my pages

2009-09-10 Thread mbrictson

I am not sure, but you may want to double-check where the caching is actually
happening, and whether setHeaders() is working.

For example, using Firebug or something simliar you should be able to check
if the browser cache is being used or if it is actually making an HTTP
roundtrip. You should also double-check that the cache-control header is
being sent as you expect.

If the browser isn't caching (i.e. it is getting stale data from the
server), or if the expected cache-control header is not being sent, the
problem might be in your Wicket code or something in between. Some logging
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)
 {
 response.setHeader(Pragma, no-cache);
 response.setHeader(
 Cache-Control,
 no-cache, max-age=0, must-revalidate, no-store
 );
 }
 
 no-store is needed to prevent Firefox from caching the back-button.
 
 
 
 fachhoch wrote:
 
 I want to add nocache header to my pages ,
 
 code from WebPage
 
 response.setHeader(Pragma, no-cache);
 response.setHeader(Cache-Control, no-cache, max-age=0,
 must-revalidate); // no-store
 
 
 and I also added
 
 response.setHeader(Cache-Control,no-cache);
 response.setDateHeader (Expires, -1);
 by overriding
@Override
 protected void setHeaders(WebResponse response) {
 super.setHeaders(response);
 response.setHeader(Cache-Control,no-cache);
 response.setDateHeader (Expires, -1);
 }
 
 
 but the browser is still caching the pages , I hit the back button or
 forward button the page is not refreshed , please tell me how   to
 prevent
 browser from chaching my pages.
 
 
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/prevent-browser-from-cahing-my-pages-tp25385725p25387499.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: 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 me some direction on how to go about getting the e.
 
 In my own RequestCycle I've done the following:
 
  @Override
 protected void logRuntimeException(RuntimeException e) {
 super.logRuntimeException(e);
 log.error(e);
 }
 
 
-- 
View this message in context: 
http://www.nabble.com/Mysterious-NullPointerException-tp24094116p24257631.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: 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. Locate the Connector that is being used. If you are accessing Tomcat
   directly, this will be the HTTP/1.1 connector. If you have Tomcat fronted
by
   Apache HTTPd, this will be the AJP connector. If in doubt, edit both.
   
3. Add the attribute: URIEncoding=UTF-8.

Example:

Connector port=8080 protocol=HTTP/1.1 
   connectionTimeout=2 
   redirectPort=8443
   URIEncoding=UTF-8 /

--
Matt


tleveque wrote:
 
 Hi,
 
 I have a problem AutoCompleteTextField and accentuated characters. When I
 type characters within the us-ascii set, there is no problem, but as soon
 as I use other characters (like 'é'), it doesn't work. The wrong character
 is received.
 With the Ajax debugger I can see that what is sent is wrong (or maybe
 encoded?). For a 'é', it sends is '%C3%A9'. That what is received as the
 parameter of the getChoices method.
 
 Is there something I can do about that?
 I am using Wicket 1.3.5
 
 Thanks...
 

-- 
View this message in context: 
http://www.nabble.com/AutoCompleteTextField-and-accentuated-characters-tp22637037p22668559.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: 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,
 
 I am unable to apply ajax behaviour to radio button. I want my 
 components to be shown and hide with RadioChoice.
 
 
 Regards,
 Srinivasa Raju CH.
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/radio-button-ajax-behaviour-tp22659660p22668668.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: AutoCompleteTextField and accentuated characters

2009-03-23 Thread mbrictson

I checked the Tomcat source code and the default URIEncoding is ISO-8859-1
(not the system default encoding as I previously stated).

AFAIK it is a global setting; I don't think you can set it per web
application.

If you don't have access to change the URIEncoding in the server.xml, then
perhaps your only option is to build your Wicket application using
ISO-8859-1 instead of UTF-8.

--
Matt


tleveque wrote:
 
 It is working!!! Thanks!!!
 
 But I hope this is standard on Linux server, because I don't think I will
 have access that on the server where I am 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 m...@55minutes.com wrote:
 

 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. Locate the Connector that is being used. If you are accessing Tomcat
   directly, this will be the HTTP/1.1 connector. If you have Tomcat
 fronted
 by
   Apache HTTPd, this will be the AJP connector. If in doubt, edit both.

 3. Add the attribute: URIEncoding=UTF-8.

 Example:

 Connector port=8080 protocol=HTTP/1.1
   connectionTimeout=2
   redirectPort=8443
   URIEncoding=UTF-8 /

 --
 Matt


 tleveque wrote:
 
  Hi,
 
  I have a problem AutoCompleteTextField and accentuated characters. When
 I
  type characters within the us-ascii set, there is no problem, but as
 soon
  as I use other characters (like 'é'), it doesn't work. The wrong
 character
  is received.
  With the Ajax debugger I can see that what is sent is wrong (or maybe
  encoded?). For a 'é', it sends is '%C3%A9'. That what is received as
 the
  parameter of the getChoices method.
 
  Is there something I can do about that?
  I am using Wicket 1.3.5
 
  Thanks...
 

 --
 View this message in context:
 http://www.nabble.com/AutoCompleteTextField-and-accentuated-characters-tp22637037p22668559.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/AutoCompleteTextField-and-accentuated-characters-tp22637037p22672081.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