RE: serialization question

2011-08-15 Thread Wilhelmsen Tor Iver
> Is there a hook point to serialization of components? We would like to > throw a WicketRuntimeException if we detect that we are about to attempt to > serialize out an attached (in our case Hibernate) entity rather than using a > LoadableDetachableModel and only serializing the id. I usually so

Re: Can't properly override getConverter on FormComponent subclasses

2011-08-15 Thread vineet semwal
sorry i just realized i goofed up while copying the method signature .. there is no final in the method signature.. On Mon, Aug 15, 2011 at 8:51 PM, vineet semwal wrote: > the signature of method is  public final IConverter > getConverter(Class clazz) ; > >    public IConverter getConverter(Clas

Re: Can't properly override getConverter on FormComponent subclasses

2011-08-15 Thread vineet semwal
The real problem is that Component has no generics. i agree with that so type parameter has to be used on the method currently unless a new method is added in the FormComponent ,the older method can just call the new method based on some conditional logic so nothings get broken in core..,the users

Re: Can't properly override getConverter on FormComponent subclasses

2011-08-15 Thread Martin Grigorov
The real problem is that Component has no generics. The tradeoff is that the library (FormComponents) do cast but all users of them benefit without seeing this casting On Mon, Aug 15, 2011 at 6:21 PM, vineet semwal wrote: > the signature of method is  public final IConverter > getConverter(Class

Re: Can't properly override getConverter on FormComponent subclasses

2011-08-15 Thread vineet semwal
the signature of method is public final IConverter getConverter(Class clazz) ; public IConverter getConverter(Class type) ^^ means not overriding correctly as method signature is not the same public IConvertergetConverter(Class type) now you have declared as your type param

Re: serialization question

2011-08-15 Thread Martin Grigorov
In Wicket 1.4 see org.apache.wicket.util.io.IObjectStreamFactory. In Wicket 1.5 org.apache.wicket.serialize.ISerializer On Mon, Aug 15, 2011 at 5:50 PM, Steve Lowery wrote: > Is there a hook point to serialization of components?  We would like to > throw a WicketRuntimeException if we detect that

serialization question

2011-08-15 Thread Steve Lowery
Is there a hook point to serialization of components? We would like to throw a WicketRuntimeException if we detect that we are about to attempt to serialize out an attached (in our case Hibernate) entity rather than using a LoadableDetachableModel and only serializing the id. I see I can register

Re: Injecting beans into behaviors

2011-08-15 Thread Martin Grigorov
The limitation is that all your components extend from o.a.w.Component while you can implement IBehavior or IModel directly and there is no way to intercept your constructors' calls. In Wicket 1.5 there is no IBehavior anymore and there is class Behavior where we can do that but I'm not convinced

Injecting beans into behaviors

2011-08-15 Thread Jack Berg
Hello, It seems that @SpringBeans does not inject beans into behaviors. It works only in Components by calling getApplication().notifyComponentInstantiationListeners(this) in the constructor. Is there a reason for limiting this? An easy workaround? Thanks for the responses to my previous questio

Re: Auto Complate Text Field Character Problem

2011-08-15 Thread bilgisever
The problem has been solved. Source of the problem is operating system language and also encoding. Change operating system(English to Turkish) and encoding work fine. Thanks all, -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Auto-Complate-Text-Field-Character-Pr

Re: Can't properly override getConverter on FormComponent subclasses

2011-08-15 Thread Martin Grigorov
Try it. The problem is that getConverter(Class) is defined in Component which has no type parametrization. FormComponent extends Component and has the type but cannot break the signature... On Mon, Aug 15, 2011 at 3:33 PM, Fabio Cechinel Veronez wrote: > heheh ... well, in my opinion the best so

Re: Can't properly override getConverter on FormComponent subclasses

2011-08-15 Thread Fabio Cechinel Veronez
heheh ... well, in my opinion the best solution is to change definition of Component.getConverter in way its generic type is bound to FormComponent's T generic type ... Is there any change to have it changed? On Mon, Aug 15, 2011 at 9:24 AM, Martin Grigorov wrote: > If you find better solution p

Re: Can't properly override getConverter on FormComponent subclasses

2011-08-15 Thread Martin Grigorov
If you find better solution please send it back to us :-) On Mon, Aug 15, 2011 at 3:14 PM, Fabio Cechinel Veronez wrote: > Hello Martin, thanks for you prompt response.. > > I had saw that solution but it uses an "unchecked" cast that was > exactly what I was trying to avoid. > > I guess generics

Re: Can't properly override getConverter on FormComponent subclasses

2011-08-15 Thread Fabio Cechinel Veronez
Hello Martin, thanks for you prompt response.. I had saw that solution but it uses an "unchecked" cast that was exactly what I was trying to avoid. I guess generics were introduced just to avoid those types of casts. On Mon, Aug 15, 2011 at 9:04 AM, Martin Grigorov wrote: > See how we do it at

Re: Can't properly override getConverter on FormComponent subclasses

2011-08-15 Thread Fabio Cechinel Veronez
Sorry for previews post, wrong combinations of pressed keys =/ I, will continue: Hello everybody, I'm using wicket 1.5-RC5.1 and I'm having problem to override getConverter method of in a FormCompont subclass. Well, lets say I have a TextField (I'm using j.u.Date here just as example, could be

Re: Can't properly override getConverter on FormComponent subclasses

2011-08-15 Thread Martin Grigorov
See how we do it at: http://svn.apache.org/viewvc/wicket/trunk/wicket-datetime/src/main/java/org/apache/wicket/datetime/markup/html/form/DateTextField.java?view=markup On Mon, Aug 15, 2011 at 2:57 PM, Fabio Cechinel Veronez wrote: > Hello everybody, > > I'm using wicket 1.5-RC5.1 and I'm having p

Can't properly override getConverter on FormComponent subclasses

2011-08-15 Thread Fabio Cechinel Veronez
Hello everybody, I'm using wicket 1.5-RC5.1 and I'm having problem to override getConverter method of in a FormCompont subclass. Well, lets say I have a TextField (I'm using j.u.Date here just as example, could be any type) when I try to to provide a specific converter for my instance I -- Fabi

Re: get url string to stateful page without defining an element in markup

2011-08-15 Thread Martin Grigorov
See different Component#urlFor() methods. On Mon, Aug 15, 2011 at 2:53 PM, Jack Berg wrote: > Hello! > > I'm trying to create a tooltip behavior that adds tooltip html elements > after components. I want the tooltip message to contain a link to a page > where you can edit the tooltip itself. > I

get url string to stateful page without defining an element in markup

2011-08-15 Thread Jack Berg
Hello! I'm trying to create a tooltip behavior that adds tooltip html elements after components. I want the tooltip message to contain a link to a page where you can edit the tooltip itself. I could mount the page and use pageparameters from a manually constructed link in the behavior, but is ther

Re: Issue with french accent

2011-08-15 Thread Martin Grigorov
Better use XML properties. There is no need to UTF encode the special characters. In Wicket 1.5 just rename the file to xxx_fr.properties.xml and the structure is someValue See java.util.Properties#loadFromXml() for more details. In Wicket 1.4 the file extension is .xml. In .properties file you

Re: Issue with french accent

2011-08-15 Thread Andreas Pieber
Not sure what is the correct setting. But if you use eclipse you can try the propedit plugin translating such chars correctly. Kind regards, Andreas On Aug 15, 2011 1:39 PM, "Charles Moulliard" wrote: > Hi, > > I have created a xxx_fr.properties file to translate labels from English to > French.

Issue with french accent

2011-08-15 Thread Charles Moulliard
Hi, I have created a xxx_fr.properties file to translate labels from English to French. During the display, the french accents are removed the html page. I have tried to use in the properties file the following syntax : table.repertory = Répertoire but that does not help too Regards, Charles

Re: onClick on Image

2011-08-15 Thread Charles Moulliard
Thx for the remark. That works now. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/onClick-on-Image-tp3744299p3744332.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscri

Re: Auto Complate Text Field Character Problem

2011-08-15 Thread İzlem Gözükeleş
Hi, I also had problem about Turkish characters (ç, ş,İ,ğ) and solved problem: * Add these lines to the Application class's init method: getRequestCycleSettings().setResponseRequestEncoding("UTF-8"); getMarkupSettings().setDefaultMarkupEncoding("UTF-8"); * After this, I re-configured tomcat's s

Re: onClick on Image

2011-08-15 Thread Charles Moulliard
Here is the code which was missing from my topic post --> " # " Regards, Charles Иванов Дмитрий wrote: > > And what is your markup? > > 15 Август 2011 г. 16:28:00, Charles Moulliard писал: >> >> Hi, >> >> I would like to change the Locale setting when we click on a Image (flag >> corre

Re: onClick on Image

2011-08-15 Thread vineet semwal
add(link).add(new Image("frenchFlag", new ResourceReference(BasePage.class, "images/karaf-logo.png"))); ^^ is the problem add(link) actually returns the container to which you are adding component so you are actually not adding image to link and i think in your html you have specified image to b

Re: onClick on Image

2011-08-15 Thread Dmitriy V. Ivanov
And what is your markup? 15 Август 2011 г. 16:28:00, Charles Moulliard писал: Hi, I would like to change the Locale setting when we click on a Image (flag corresponding to the Locale - France, UK, ...). So in my HTML page, I have defined the following HTML # and in the corresponding Wicket

Re: onClick on Image

2011-08-15 Thread Bas Gooren
If the image is inside the link, your code should read: add(link); link.add(new Image(...)); Bas Op 15-8-2011 12:28, schreef Charles Moulliard: Hi, I would like to change the Locale setting when we click on a Image (flag corresponding to the Locale - France, UK, ...). So in my HTML page, I h

onClick on Image

2011-08-15 Thread Charles Moulliard
Hi, I would like to change the Locale setting when we click on a Image (flag corresponding to the Locale - France, UK, ...). So in my HTML page, I have defined the following HTML # and in the corresponding Wicket Class, the following code : Link link = new Link("goFrench") {

Re: Auto Complate Text Field Character Problem

2011-08-15 Thread bilgisever
getMarkupSettings().setDefaultMarkupEncoding("ISO-8859-3"); getRequestCycleSettings().setResponseRequestEncoding("ISO-8859-3"); I try it in Application init, encoding is changed but the problem is still ongoing. Thanks, -- View this message in context: http://apache-wicket.1842946.n4.nabble.

Re: How to Ajax refresh captcha image (a image backed by DynamicImageResource)?

2011-08-15 Thread praveenhomkar
Hi I am able to reload the captcha image in the following way(Using JCaptcha) package com.sybase365.mobiliser.web.consumer.pages.signup; 1>Write a class for dynamic image as follows. public abstract class CaptchaImage extends NonCachingImage { public CaptchaImage(String id, final String chall

Re: Auto Complate Text Field Character Problem

2011-08-15 Thread Martin Grigorov
Sorry, for this problem you actually need org.apache.wicket.settings.IRequestCycleSettings.setResponseRequestEncoding(String) I remember such problem reporter by a user with Cyrillic characters. On Mon, Aug 15, 2011 at 9:49 AM, bilgisever wrote: >   I thik there is no problem with general encodi