Re: Scala DSL for Wicket

2011-07-28 Thread Bruno Borges
Just wanted to share my experience playing a little more with Scala and Wicket A few minutes ago I got this excelent code: I know it is too simple, and it can be accomplished as well in Java with static imports. But still, for my project it's being great (and cool) to do such things. object

Problem while decouple page flow by using SpringBean

2011-07-28 Thread Mike Mander
Hi, i would like to decouple the page dependencies. My page flow is implemented by using bookmarkable page links. As we all know they take a page class as parameter. This couples both pages. So i thought it's a good idea to give the page class a name in my Spring application context and

RE: Ten things every Wicket programmer must know?

2011-07-28 Thread Hielke Hoeve
* How models work and best practices for wicket/hibernate * how ajax behaviors should be used * how are resources defined and used * how to make a multilingual site using resource models etc Hielke -Original Message- From: Jeremy Thomerson [mailto:jer...@wickettraining.com] Sent:

Re: Problem while decouple page flow by using SpringBean

2011-07-28 Thread Mike Mander
Found a solution, but would be great if i could get some tips about the consequences. I was wrapping the beans in proxies by setting the flag in SpringComponentInjector to true. Now it's set to false and it's working. But i'm a bit in doubt that i opened pandoras box with this. It was

Re: Problem while decouple page flow by using SpringBean

2011-07-28 Thread Martin Grigorov
It is quite easy to extend SpringComponentInjector so that it will look for another annotation, e.g. @SpringBean2 which wont be proxy-ed. Yet another one is to create a ticket to add an additional attribute to original @SpringBean (proxy = false). On Thu, Jul 28, 2011 at 10:18 AM, Mike Mander

Re: Ten things every Wicket programmer must know?

2011-07-28 Thread vineet semwal
what hielke said + how to -- use images from database/filesystem -- resources as already mentioned including shared resources.. -- show error alert next to formcomponent -- reusability +good coding practises as already mentioned On Thu, Jul 28, 2011 at 12:39 PM, Hielke Hoeve

Re: AjaxFormComponentUpdatingBehavior target.addComponent(component) causes to lose focus

2011-07-28 Thread Martin Grigorov
add target.focusComponent(null) This way Wicket wont try to restore the focus On Thu, Jul 28, 2011 at 9:26 AM, Erki Erki erki.pub...@gmail.com wrote: Hello, I have this problem with wicket. I have added onBlur AjaxFormComponentUpdatingBehavior to my textfield. After the user moves focus to

Re: How can i get inline styles of div in runtime?

2011-07-28 Thread accord
thanks. i found solution like this yesterday. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-can-i-get-inline-styles-of-div-in-runtime-tp3698773p3700702.html Sent from the Users forum mailing list archive at Nabble.com.

RE: Ten things every Wicket programmer must know?

2011-07-28 Thread Wilhelmsen Tor Iver
Also: * How to avoid excessive use of Labels and AttributeModifiers (with ResourceModels) just for l10n, by using wicket:message in the template instead * compressing code by use of ids matching property names combined with CompoundPropertyModel and/or PropertyListView - Tor Iver

Re: wicketstuff tinymce development

2011-07-28 Thread Pointbreak
According to: http://tinymce.moxiecode.com/tryit/multiple_configs.php Mode should be switched to textareas our current implementation provide exact only. Why would you want to use textareas matching when using TinyMce in Wicket? Attach a TinyMceBehavior to each Wicket component that

Re: Ten things every Wicket programmer must know?

2011-07-28 Thread Martin Makundi
* compressing code by use of ids matching property names combined with CompoundPropertyModel and/or PropertyListView Oh.. that will lead to fragility. ** Martin - Tor Iver - To unsubscribe, e-mail:

Re: wicketstuff tinymce development

2011-07-28 Thread Michal Letynski
W dniu 2011-07-28 12:08, Pointbreak pisze: According to: http://tinymce.moxiecode.com/tryit/multiple_configs.php Mode should be switched to textareas our current implementation provide exact only. Why would you want to use textareas matching when using TinyMce in Wicket? Attach a

Re: RFC: Ten things every Wicket programmer must know?

2011-07-28 Thread Carl-Eric Menzel
On Wed, 27 Jul 2011 18:29:22 -0400 Jeremy Thomerson jer...@wickettraining.com wrote: Hello all, I'm writing an article for a Java magazine and would like to include in it a list of ten things every Wicket programmer must know. Of course, I have my list, but I'd be very curious to see

Re: Ten things every Wicket programmer must know?

2011-07-28 Thread Carl-Eric Menzel
On Thu, 28 Jul 2011 11:10:30 +0300 Martin Makundi martin.maku...@koodaripalvelut.com wrote: * compressing code by use of ids matching property names combined with CompoundPropertyModel and/or PropertyListView Oh.. that will lead to fragility. It can, but in my experience it hasn't. Our

Re: Ten things every Wicket programmer must know?

2011-07-28 Thread Martin Makundi
Hi! * compressing code by use of ids matching property names combined with CompoundPropertyModel and/or PropertyListView Oh.. that will lead to fragility. It can, but in my experience it hasn't. Our domain objects rarely change, and if they do, our unit tests catch that immediately. It

Re: Ten things every Wicket programmer must know?

2011-07-28 Thread Ted Roeloffzen
In my humble opinion: The most important thing that you should know are models en how powerfull they can be used. Models can be quite confusing, especially to programmers who've just started using Wicket. I remember how I struggled with the concept, when I started to use Wicket. How and when to

Re: RFC: Ten things every Wicket programmer must know?

2011-07-28 Thread Arjun Dhar
From my experience, stuff where I screwed up or wasted time: 1. Wicket is a UI framework, delegate as much as possible to your own neutral code base service and components. Data Models etc. Both Server and Client Side. Client Side:: Don't wrestle with Grids etc in Wicket; if you can get away with

Re: DropDownChoice updates onchange event.

2011-07-28 Thread Andrea Del Bene
Hi, I've looked at your code but is not clear to me how and when you read the selected value in savedReportsDropDown. Is trackingProfileVO an instance of SelectedTrackProfileVO? Here is the code: private DropDownChoiceSelectedTrackProfileVO savedReportsDropDown; savedReportsDropDown =

Re: Problem while decouple page flow by using SpringBean

2011-07-28 Thread Mike Mander
Thanks Martin for the work-around. Jira added: https://issues.apache.org/jira/browse/WICKET-3936 Thanks Mike Am 28.07.2011 09:26, schrieb Martin Grigorov: i would like to decouple the page dependencies. My page flow is implemented by using bookmarkable page links. As we all know they take a

A safer way to build PropertyModels, version 1.2

2011-07-28 Thread Carl-Eric Menzel
https://github.com/duesenklipper/wicket-safemodel As I wrote earlier on this list, SafeModel lets you turn the fragile strings of this: IModelString childNameModel = new PropertyModelString( myBean, child.name); ...into this, gaining refactor-safety: IModelString childNameModel =

Re: A safer way to build PropertyModels, version 1.2

2011-07-28 Thread Thomas Matthijs
On Thu, Jul 28, 2011 at 12:12 PM, Carl-Eric Menzel cmen...@wicketbuch.dewrote: https://github.com/duesenklipper/wicket-safemodel As I wrote earlier on this list, SafeModel lets you turn the fragile strings of this: IModelString childNameModel = new PropertyModelString( myBean,

Re: AjaxFormComponentUpdatingBehavior target.addComponent(component) causes to lose focus

2011-07-28 Thread Jack Berg
You are talking about the AjaxFeedbackUpdater.onBeforeRespond method? It didn't work for me. It behaves the same. -- View this message in context:

Re: AjaxFormComponentUpdatingBehavior target.addComponent(component) causes to lose focus

2011-07-28 Thread Martin Grigorov
There is no class AjaxFeedbackUpdater in Wicket distro. I'm talking about AjaxRequestTarget.focusComponent() method. On Thu, Jul 28, 2011 at 2:36 PM, Jack Berg erki.pub...@gmail.com wrote: You are talking about the AjaxFeedbackUpdater.onBeforeRespond method? It didn't work for me. It behaves

Re: A safer way to build PropertyModels, version 1.2

2011-07-28 Thread Carl-Eric Menzel
On Thu, 28 Jul 2011 12:44:14 +0200 Thomas Matthijs li...@selckin.be wrote: ...into this, gaining refactor-safety: IModelString childNameModel = model(from(myBean).getChild().getName()); Does it require a default constructor? In the above example, myBean is any sort of regular Java

Re: AjaxFormComponentUpdatingBehavior target.addComponent(component) causes to lose focus

2011-07-28 Thread Jack Berg
Sorry, I should have been more clear. AjaxFeedbackUpdater is a class in my sample project that implements AjaxRequestTarget.IListener . In its onBeforeRespond method, I add components to the AjaxRequestTarget. I tried adding focusComponent(null), but no luck. -- View this message in context:

Re: RFC: Ten things every Wicket programmer must know?

2011-07-28 Thread Michael O'Cleirigh
Hi Jeremy, I think the most important things a wicket programmer should know relate to building their own set of resuable components.Here are my top ten on that theme: 1. Build a reusable set of components tailored for your business domain. 2. Solve a few problems then push up the

NullPointerException and don't know why ...

2011-07-28 Thread armandoxxx
Hi guys got a problem with NPE I'm having using Kaptcha for drawing captcha .. public class CaptchaImage extends NonCachingImage { private static final long serialVersionUID = 1667766853896645923L; private transient DefaultKaptcha captchaProducer= new

Re: NullPointerException and don't know why ...

2011-07-28 Thread Martin Grigorov
Because it is transient and after deserialization it will be null. On Thu, Jul 28, 2011 at 5:07 PM, armandoxxx armando@dropchop.com wrote: Hi guys got a problem with NPE I'm having using Kaptcha for drawing captcha .. public class CaptchaImage extends NonCachingImage {        private

Re: NullPointerException and don't know why ...

2011-07-28 Thread armandoxxx
thank you ! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/NullPointerException-and-don-t-know-why-tp3701404p3701481.html Sent from the Users forum mailing list archive at Nabble.com. - To

Re: A safer way to build PropertyModels, version 1.2

2011-07-28 Thread Matt Brictson
On Jul 28, 2011, at 3:12 AM, Carl-Eric Menzel wrote: IModelUser userModel = model(fromService(userEJB.loadUser(42))); Not sure if this is a typo in your example, but wouldn't this mean that (the real, non-proxied) userEJB.loadUser is invoked when the model is constructed? Perhaps this syntax

resource file handle issues on windows?

2011-07-28 Thread rush66
Greetings, We are in the process of migrating our project to 1.5 and have discovered an issue with editing CSS and JS files with the app serve running. We're curious if there is anyone else experiencing similar issues. We are working on Win7 with eclipse running Jboss 5 locally with wicket

What does this syntax say?

2011-07-28 Thread Niranjan Rao
Ok, I admit it - I don't understand this function at all defined in IComponentInheritedModel public W IWrapModelW wrapOnInheritance(Component component) I don't understand meaning of W and IWrapModelW. I know generics generally, but this syntax has been baffling me. Based on what eclipse is

Sometimes a long time to construct page with tabs

2011-07-28 Thread coincoinfou
Sometimes it takes a long time to construct my page She looks like this : LoadableDetachableModel myObject = new LoadableDetachableModel(String id) { String id; LoadableDetachableModel(String id) { this.id = id; } protected Object load() { return

Re: What does this syntax say?

2011-07-28 Thread Bas Gooren
This syntax is for use when you need a generic placeholder. In this case, it means that W is determined by the call site: IModelBusinessObject model = OtherModel.wrapOnInheritance( Component ); The above means that W is checked to be BusinessObject for all occurrences of W. A better to

Re: What does this syntax say?

2011-07-28 Thread Dan Retzlaff
The first W let's the compiler know that the second W is a generic type and not a reference to some class named W. It's just syntax. On Thu, Jul 28, 2011 at 10:48 AM, Niranjan Rao nhr...@gmail.com wrote: Ok, I admit it - I don't understand this function at all defined in

Re: A safer way to build PropertyModels, version 1.2

2011-07-28 Thread Carl-Eric Menzel
On Thu, 28 Jul 2011 09:04:31 -0700 Matt Brictson m...@55minutes.com wrote: On Jul 28, 2011, at 3:12 AM, Carl-Eric Menzel wrote: IModelUser userModel = model(fromService(userEJB.loadUser(42))); Not sure if this is a typo in your example, but wouldn't this mean that (the real, non-proxied)

Re: DropDownChoice updates onchange event.

2011-07-28 Thread Archana
The savedReportsDropDownList Arraylist contains a collection of SelectedTrackProfileVO. trackingProfileVO is a type of TrackingProfileVO, which contains the selected object which is of type SelectedTrackProfileVO. profileDropDown is of type SelectedTrackProfileVO. TrackingProfileVO is added to the

Re: What does this syntax say?

2011-07-28 Thread Ben Tilford
Without a Class argument how is it returning/casting correctly? Shouldn't it be public W IWrapModelW wrapOnInheritance(Component component,ClassW type) to make W available within the method? On Thu, Jul 28, 2011 at 12:40 PM, Dan Retzlaff dretzl...@gmail.com wrote: The first W let's the

Re: What does this syntax say?

2011-07-28 Thread Dan Retzlaff
Generic types are lost by the time the method is executed, so there's really nothing the method implementation could check. Another fun example is org.apache.wicket.model.Model#of(). The general subject is called type erasure, and is one of the more confusing aspects of Java generics. On Thu, Jul

getInput and getDefaultModelObject and validation

2011-07-28 Thread Brown, Berlin [GCG-PFS]
If I am using some form validator, I notice that getDefaultModelObject does not have the value from the getInput. I am assume this intentional. Is there a way to force wicket to update the modelObject? How and when does the modelobject get updated. myForm.add(new AbstractFormValidator() {

Re: What does this syntax say?

2011-07-28 Thread Ben Tilford
Right but Model.of accepts an instance of the generic type so it's not lost and is available at runtime. static ModelT of(T instance) vs. public W IWrapModelW wrapOnInheritance(Component component) On Thu, Jul 28, 2011 at 6:33 PM, Dan Retzlaff dretzl...@gmail.com wrote: Generic types are lost

Ajax broken in IE 8

2011-07-28 Thread T P D
Wicket 1.4.9's Ajax doesn't work in Internet Explorer; in particular, AjaxFallbackButtons fall back to non-Ajax POSTs, and the Wicket Debug window is never seen. In 1.4.17, Ajax is still broken, but the fallback never happens, because Ajax sort-of works: the the Wicket Debug window doe show

Re: What does this syntax say?

2011-07-28 Thread Dan Retzlaff
I actually meant the no-argument version of of(). Since this is getting off-topic, I suggest you search around under java type erasure. There are people far more expert than I to describe what's going on. :) On Thu, Jul 28, 2011 at 9:26 PM, Ben Tilford b...@tilford.info wrote: Right but