Re: How to get a list of the connected users ?

2007-09-11 Thread John Krasnay
On Tue, Sep 11, 2007 at 11:24:38PM +0200, landry soules wrote: Hello, I have to display a list of the connected users in a page of my app. I know it sounds definitely dumb, but i don't know how to achieve this... Users login to my site (i extended AuthenticatedWebApplication), and then i

Re: Acegi (Spring Security)

2007-09-14 Thread John Krasnay
On Fri, Sep 14, 2007 at 04:05:47PM +0200, Ian Godman wrote: Does anyone have any experience with Wicket/Acegi or know how Wicket deals with Acegi integration? I need ideas of where to look. Ian Can you post the Spring configuration for your Acegi beans? jk

Re: Question about best approach using Spring

2007-09-19 Thread John Krasnay
On Wed, Sep 19, 2007 at 09:05:48AM -0400, Rick Reumann wrote: Yea, I'd like to use the annotation but I believe that's only working when running under Java5? (sadly, this app has to run on an old websever that is using Java4.) (The annotation is in the wicket-contrib-spring-jdk5 so I just

Re: ANN: beturtle.com launched

2007-09-20 Thread John Krasnay
On Thu, Sep 20, 2007 at 09:50:37PM -0400, Joe Toth wrote: Hi Everyone, We just launched http://beTurtle.com/ - A 'green' social networking site. If your interested in healthy living, sustainable practices, have 'green' questions or just want to make some new friends, stop on by. Let us know

Re: AbstractMethodError in logging

2007-10-23 Thread John Krasnay
On Tue, Oct 23, 2007 at 09:49:25AM -0700, Sasha O wrote: Hello Wicket people -- Love the framework so far. Getting this message, have no idea how to deal with it: Exception in thread ModificationWatcher Task java.lang.AbstractMethodError:

Re: Multiple wicket:child / tags on a single base page?

2007-11-06 Thread John Krasnay
On Tue, Nov 06, 2007 at 10:23:26PM +1100, Chris Colman wrote: In the panel example you give you must still provide all of the structural markup surrounding your panel tags in EVERY page's markup in your system and if you decide to make a system wide change of this structural markup you must

Re: Multiple wicket:child / tags on a single base page?

2007-11-07 Thread John Krasnay
On Wed, Nov 07, 2007 at 07:14:01PM +0100, Korbinian Bachl wrote: Given these subtle problems with this approach, I admit I'm warming to the multiple extend/child idea. im oposite - if i have X extends in a page, whose extend should be preferred (e.g: manipulating the head or a part

Re: Multiple wicket:child / tags on a single base page?

2007-11-07 Thread John Krasnay
On Wed, Nov 07, 2007 at 11:31:12AM +0100, Mats Norén wrote: Is the above statement really true considering that by adding abstract methods to your page you defer the creation of the markup in just the same way as the new proposed solution? BasePage.java public BasePage() {

Re: Regarding the use of AjaxFallbackDefaultDataTable

2007-11-08 Thread John Krasnay
On Wed, Nov 07, 2007 at 07:20:01PM -0800, Jeremy Lee wrote: Hi, I have a Search Form along with a AjaxFallbackDefaultDataTable on a page that I am trying to create. How it is supposed to work is as follows: 1. User accesses page (only search form is visible) 2. User enters search

Re: Matt Raible's ApacheCon presentation

2007-11-15 Thread John Krasnay
On Thu, Nov 15, 2007 at 11:35:02AM -0800, mraible wrote: Pros: * Great for Java developers, not web developers Not sure here who you mean by web developers. If you mean HTML slingers I would think the absence of taglibs and logic in the templates would be an advantage. * Tight binding

Re: Matt Raible's ApacheCon presentation

2007-11-16 Thread John Krasnay
On Fri, Nov 16, 2007 at 09:54:39AM -0800, Curtis Cooley wrote: Michael Laccetti wrote: John Krasnay wrote: To me this is the biggest con. I've worked with a number of Java devs who have trouble grokking anonymous inner classes, which you must know cold to be effective with Wicket

Re: Feature idea: sealed flag on MarkupContainer

2008-11-20 Thread John Krasnay
um 05:25 schrieb John Krasnay: Hi folks, In my current Wicket app I have a panel that contains a vertically stacked list of sub-panels. Because the precise list of sub-panels is not known until runtime, I've implemented this with a RepeatingView. My parent panel has the following methods

Re: Feature idea: sealed flag on MarkupContainer

2008-11-20 Thread John Krasnay
(Component... children) : - call empty overridable method onComponentAdd(Component child) for each component - add component protected void onComponentAdd(Component child) { /* overridable */ } Am 20.11.2008 um 12:30 schrieb John Krasnay: Yeah, I thought about

Re: Feature idea: sealed flag on MarkupContainer

2008-11-20 Thread John Krasnay
20.11.2008 um 16:32 schrieb John Krasnay: Here's the problem (also with sketchy pseudo code :) public class BasePanel extends Panel { public BasePanel(String id) { super(id); add(new Label(foo, ...)); } } public class SubPanel extends BasePanel { @Override

Re: Wicket Session grows too big real fast

2008-11-26 Thread John Krasnay
If the previous page is bookmarkable you don't need to keep a reference to the page instance; instead, just re-create the page parameters and call setResponsePage(pageClass, parameters) when the user clicks Cancel. jk On Wed, Nov 26, 2008 at 01:35:11AM -0800, jhp wrote: Well, yes references

Re: Child page with no html

2008-12-10 Thread John Krasnay
Careful! ChildPage.getComponents() is invoked before ChildPage's constructor. This will trip you up sooner or later. You can easily fix this with a model: IModel componentsModel = new AbstractReadOnlyModel() { public Object getObject() { return getComponents(); } } add(new

Re: Child page with no html

2008-12-11 Thread John Krasnay
On Thu, Dec 11, 2008 at 02:29:04AM -0800, Michael Sparer wrote: you could also just request a childId from the super-class, but I think the above way is more elegant :-) More elegant, yes, but also more verbose. Pick your poison, I guess. jk

Re: [OT] wicket users around the world

2008-12-11 Thread John Krasnay
Toronto, Canada jk On Thu, Dec 11, 2008 at 07:57:49PM +0100, francisco treacy wrote: to know a little bit more of our great (and vast) community, i was just wondering if you're keen on sharing where you come from and/or where you work with wicket... for instance, here argentinian/belgian

Re: Stateless form action in Wicket

2008-12-13 Thread John Krasnay
See http://en.wikipedia.org/wiki/Post/Redirect/Get jk On Fri, Dec 12, 2008 at 07:25:19PM -0800, Vinayak Borkar wrote: Hello, I am creating a page (say Page A) that contains a stateless form. The stateless form's action leads to page B. I observe that in Wicket, the form action is

Re: debugging

2008-12-23 Thread John Krasnay
I use Tomcat via the Eclipse WTP. Here are some quick instructions if you're using Maven: - add the wtpversion and wtpContextName elements to your maven-eclipse-plugin config plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-eclipse-plugin/artifactId

Re: anyone has some suggestion? thanks a lot

2009-01-06 Thread John Krasnay
Buy low, sell high? jk On Tue, Jan 06, 2009 at 05:55:08PM -0800, wch2001 wrote: -- View this message in context: http://www.nabble.com/Help%2CDownloadLink%2C-when-file-is-not-existed%2C-not-error-message-tp21307695p21323395.html Sent from the Wicket - User mailing list archive at

Re: sorry, what do u mean for that?

2009-01-06 Thread John Krasnay
It was a bad joke. You asked for suggestions but didn't explain what your problem was. jk On Tue, Jan 06, 2009 at 07:51:25PM -0800, wch2001 wrote: -- View this message in context:

Preserving mount point in URLs

2009-01-09 Thread John Krasnay
Hi Wicketeers, My client has a web security infrastructure in place where a transparent proxy sits in front of the application server and filters requests based on URL pattern. I am trying to fit their first Wicket-based application into this infrastructure. We would like to allow requests based

Re: Preserving mount point in URLs

2009-01-09 Thread John Krasnay
Cool, thanks. I'll give it a try. jk On Fri, Jan 09, 2009 at 08:52:44AM -0800, Igor Vaynberg wrote: change the coding strategy to use query string to encode params. see querystringcodingstrategy for necessary code. -igor

AJAX cluster failover help

2009-01-26 Thread John Krasnay
I'm doing cluster failover testing with my app and I'm running into a weird failure. The test involves failing the node where my session is active while performing UI operations. On one page in the app, I have an AjaxTabbedPanel. Clicking amongst the tabs while the failover occurs works

Re: AJAX cluster failover help

2009-01-26 Thread John Krasnay
, Jan 26, 2009 at 10:36 AM, John Krasnay j...@krasnay.ca wrote: I'm doing cluster failover testing with my app and I'm running into a weird failure. The test involves failing the node where my session is active while performing UI operations. On one page in the app, I have

Re: AJAX cluster failover help

2009-01-26 Thread John Krasnay
Indeed, 1.3.5 fixed the problem. Thanks again, Igor. jk On Mon, Jan 26, 2009 at 01:57:22PM -0500, John Krasnay wrote: We're on 1.3.3. I'll try again with 1.3.5. Thanks. jk On Mon, Jan 26, 2009 at 10:41:45AM -0800, Igor Vaynberg wrote: what wicket version are you using

Re: migration from jsf to wicket

2009-01-29 Thread John Krasnay
On Thu, Jan 29, 2009 at 12:41:31PM +0200, Martin Makundi wrote: 1) working with many attributes of an object we have some pages where we access many attributes of an object, say we want to show all 20 attributes of a person and all 10 attributes of person.getAddress(); in the

Re: Building a dynamic comma separated link list

2009-01-30 Thread John Krasnay
I did this by subclassing RepeatingView and overriding AbstractRepeater.renderChild as follows... public class SeparatorRepeatingView extends RepeatingView { private boolean firstChildRendered = false; private String separator = | ; public SeparatorRepeatingView(String id,

Re: Nested forms : don't process inner form when outer form is submitted

2009-02-10 Thread John Krasnay
Have a look at the bottom of this page: http://cwiki.apache.org/WICKET/conditional-validation.html The example shown disables the whole inner form when the outer form is submitted, meaning the inner form won't even be submitted. If you want the inner form to be submitted but just not required,

Re: Wicket source code using Maven

2009-02-17 Thread John Krasnay
I usually put this in my pom.xml so that I don't have to always remember the command line parameter: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-eclipse-plugin/artifactId configuration downloadSourcestrue/downloadSources

Re: How to make wicket text in a td bold?

2009-02-17 Thread John Krasnay
td width=20% wicket:id=personname class=personnamePerson Name/td ...somewhere in your CSS... td.personname { font-weight: bold; } jk On Tue, Feb 17, 2009 at 07:54:36AM -0800, Edwin Ansicodd wrote: have info in a table, want to make the text from wicket bold. How do I do this?

Re: AW: AW: Avoid serialization troubles with static members

2009-02-19 Thread John Krasnay
javac is kinda redundant too. Real men sling raw bytecode. jk On Thu, Feb 19, 2009 at 12:02:36PM -0600, Jeremy Thomerson wrote: vi is not only a tool, but a whole platform, so that would exclude it. Personally, I find that echo import org.apache.wicket.* MyClass.java echo import

Re: wicket-spring classpath issue

2009-02-24 Thread John Krasnay
IMHO sharing JARs across J2EE apps is not worth the trouble. - it messes up some JARs (commons-logging is a classic example) - it forces you to keep your dependent JAR versions in sync across applications. This is particularly important in an enterprise environment where changing a dependent

Re: Propper Way to Format Money

2009-02-25 Thread John Krasnay
We keep all our money amounts as ints representing the number of cents. We have a MoneyField that extends TextField and overrides getConverter(Class) to return something like this: public class MoneyConverter implements IConverter { public Object convertToObject(String value, Locale locale)

Re: How can I share text resources with multiple web applications?

2009-03-20 Thread John Krasnay
+1. Wicket IMHO does it the right way for its particular situation. Wicket differs from most Java project by the sheer number of resources and by their 1:1 correspondence with Java classes. Maven, I think, is optimized more for the more common case where a project has only a handful of resources

Re: eclipse and html extensions in src/main/java

2009-03-22 Thread John Krasnay
Works fine for me without any special configuration. I use the Eclipse JEE version and HTML files come up in the HTML Editor. Check which editor is associated with *.html files under Window Preferences, then under General/Editors/File Associations. Eclipse remembers the last editor you used to

Re: Functional testing tools comparison

2008-07-03 Thread John Krasnay
On Thu, Jul 03, 2008 at 04:41:27AM -0700, richardwilko wrote: hi, I've used selenium in the past and I do like it. However it uses domIds quite a bit, and as these are autogenerated by wicket they can prove troublesome. For example, you might get a test working, then add a new component

Re: How to build a dynamic navigation bar

2008-07-22 Thread John Krasnay
On Tue, Jul 22, 2008 at 09:59:48AM -0700, Edbay wrote: Thanks for the quick reply. Wouldn't this force all links to have the same wicket ids (linkid)? I'd like to be able to have the line items look like this: ul wicket:id=list li # Link01 text here /li li # Link02 text

Re: How to build a dynamic navigation bar

2008-07-22 Thread John Krasnay
Something like this... wicket:panel a wicket:id=linkspan wicket:id=labelFoo/span/a /wicket:panel public class MyMenuPanel extends Panel { public MyMenuPanel(String id, String label, Class pageClass) { super(id); Link link = new BookmarkablePageLink(link, pageClass); add(link);

Nested forms

2008-08-18 Thread John Krasnay
Hi folks, I find myself occasionally using nested forms in my Wicket apps. With nested forms, when the outer form is submitted, it triggers a validation and submission of any inner forms as well. In some cases I don't want this behaviour, but instead I want the inner form and outer form to be

Re: Nested forms

2008-08-19 Thread John Krasnay
On Mon, Aug 18, 2008 at 11:10:29PM +0200, Matej Knopp wrote: Can't you just override isEnabled() on the inner form and return true/false depending on whether the inner form should be processed? Hrm, something like this I suppose? public boolean isEnabled() { return

Re: Nested forms

2008-08-19 Thread John Krasnay
On Tue, Aug 19, 2008 at 09:15:55AM -0400, John Krasnay wrote: On Mon, Aug 18, 2008 at 11:10:29PM +0200, Matej Knopp wrote: Can't you just override isEnabled() on the inner form and return true/false depending on whether the inner form should be processed? Hrm, something like this I

Re: CheckGroup updateModel() bug?

2008-08-21 Thread John Krasnay
Cemal, I think you may be a closet Lisp programmer :-) jk On Thu, Aug 21, 2008 at 12:32:00PM -0700, jWeekend wrote: Ritesh, I wouldn't call it a bug because the model is updated, albeit indirectly, but perhaps in a slightly inconsistent way as you've pointed out (no setModel call), in

AbstractDefaultAjaxBehavior.findIndicatorId()

2008-08-22 Thread John Krasnay
I have a small request regarding AJAX indicators. It's sometimes awkward to implement an AJAX indicator the standard way, by implementing IAjaxIndicatorAware, since it forces me to use an explicit class where I otherwise would have used an anonymous inner class. I actually have this code in one

Re: AbstractDefaultAjaxBehavior.findIndicatorId()

2008-08-25 Thread John Krasnay
I've added https://issues.apache.org/jira/browse/WICKET-1801 to cover this. jk On Fri, Aug 22, 2008 at 09:00:36AM -0400, John Krasnay wrote: I have a small request regarding AJAX indicators. It's sometimes awkward to implement an AJAX indicator the standard way, by implementing

Ajax testing with Selenium

2008-08-28 Thread John Krasnay
I'm testing some Ajax-y Wicket pages with Selenium. One challenge I'm having is finding a good expression to use in Selenium's waitForCondition. Right now I wait for the results of the Ajax call, e.g. an appropriate element appearing, but it's sometimes difficult to get this right, e.g. if a

Re: Ajax testing with Selenium

2008-08-28 Thread John Krasnay
); jk On Thu, Aug 28, 2008 at 06:26:09PM +0200, Matej Knopp wrote: Probably not for 1.3/1.4. We could have something like that for 1.5 (where the ajax pipeline is completely new). -Matej On Thu, Aug 28, 2008 at 6:23 PM, John Krasnay [EMAIL PROTECTED] wrote: I'm testing some Ajax-y Wicket

Re: AbstractDefaultAjaxBehavior.findIndicatorId()

2008-08-29 Thread John Krasnay
On Fri, Aug 29, 2008 at 09:38:20PM +0300, Timo Rantalaiho wrote: On Fri, 22 Aug 2008, John Krasnay wrote: It's sometimes awkward to implement an AJAX indicator the standard way, by implementing IAjaxIndicatorAware, since it forces me to use an explicit class where I otherwise would have

Re: Transactions not working :/

2008-08-29 Thread John Krasnay
On Fri, Aug 29, 2008 at 09:26:19PM +0200, Markus wrote: throw new Exception(xxx); From the Spring doco: Note however that the Spring Framework's transaction infrastructure code will, by default, only mark a transaction for rollback in the case of runtime, unchecked exceptions;

Re: Discussion on Wicket Interface Speed-Up

2008-09-03 Thread John Krasnay
On Wed, Sep 03, 2008 at 04:34:34PM +0100, Al Maw wrote: I'd even go so far as to remove the need for HeaderContributor code entirely in 80% of the cases. Wicket could automatically pick up css and js files that are named the same as your component. MyComponent.java MyComponent.html

Re: Add more than one component to an Item (repeaters)

2008-09-25 Thread John Krasnay
I keep a little library of these (LinkPanel, BookmarkablePageLinkPanel, etc.) that are all just a link containing a label. It would be nice if they were part of Wicket proper. Does anyone else think so? jk On Thu, Sep 25, 2008 at 12:10:17PM +0200, Nino Saturnino Martinez Vazquez Wael wrote: I

Hooking AJAX requests

2008-09-25 Thread John Krasnay
Hi folks, I'm trying to integrate the Dean Edwards IE7.js script (http://dean.edwards.name/IE7/) into my Wicket app. For those that don't know, IE7.js helps IE6 implement certain CSS rules that it doesn't support natively (min-height, :first-child, :hover, ...) I've created a behavior that

Re: Hooking AJAX requests

2008-09-25 Thread John Krasnay
Perfect! Works like a charm. Thanks much. jk On Thu, Sep 25, 2008 at 09:07:26PM +0200, Matej Knopp wrote: You can do it in javascript using Wicket.Ajax.registerPostCallHandler(yourhandler); -Matej On Thu, Sep 25, 2008 at 9:04 PM, John Krasnay [EMAIL PROTECTED] wrote: Hi folks, I'm

Re: which browser is preferrable for Wicket 1.3

2008-10-03 Thread John Krasnay
Hehe, welcome to Web development my friend! IE6 is very old, and it contains a large number of rendering quirks that are not present in modern browsers (FireFox, Safari, Opera). IE7 is much better, but IE6 still commands a large segment of the browser market. I would suggest developing for a

Re: force page reload

2008-10-06 Thread John Krasnay
On Mon, Oct 06, 2008 at 07:36:03PM -0200, francisco treacy wrote: thanks for your help, serkan. cool, this works. as a workaround nevertheless: -i wouldn't want my app to check every single request the existence of a parameter which i am going to use in only *one* page anyway -what if i

Re: Interfaces for component hierarchies (e.g. Buttons)?

2008-10-08 Thread John Krasnay
Hi Martin, Programmatically generating the markup as you've done below is not really the Wicket way, which is probably why you're bumping up against other Wicket design decisions. I've solved similar problems using a RepeatingView as follows: ButtonPanel.html wicket:panel div class=buttons

Re: Trying to create a calendar - need some guidance

2008-10-23 Thread John Krasnay
ListView is good if you already have a list of things you want to display. For this kind of iteration you'd be better off with a RepeatingView. Here's how I might tackle it: - create a top-level panel to hold the calendar. The markup would contain your table element, and would have a

Re: Trying to create a calendar - need some guidance

2008-10-23 Thread John Krasnay
Uh, yeah, that's what I meant to say, just use a GridView :-) jk On Thu, Oct 23, 2008 at 05:14:42PM -0700, Igor Vaynberg wrote: all you need is a gridview. set columns to 7 and generate 30 items... -igor On Thu, Oct 23, 2008 at 1:47 PM, V. Jenks [EMAIL PROTECTED] wrote: Hi all.

Re: Hot deployment / Server restart

2008-10-30 Thread John Krasnay
You can fix this through Eclipse too... - double-click your Tomcat server in your Servers view - select the Modules tab on the resulting editor page - select your application module and click Edit - de-select Auto reloading enabled and click OK - save the editor page and restart Tomcat jk On

Re: Incremental migration from JSP-based applications to Wicket?

2008-11-05 Thread John Krasnay
On Wed, Nov 05, 2008 at 11:49:02AM -0500, Susan Liebeskind wrote: Igor Vaynberg wrote: i think the best way to migrate an app is to migrate it a page/pageflow at a time. running wicket inside a jsp or jsp inside wicket is always going to have gotchas you will have to work around.

Form validation and replaceable panels

2009-08-31 Thread John Krasnay
Hi folks, I have a wizard-like page with a form, and inside the form I have a panel that I replace as the user moves through the flow. In some cases, I need one of the panels to contribute a form validator to the enclosing form. Adding the validator is simple enough: I just override the panel's

Re: Form validation and replaceable panels

2009-08-31 Thread John Krasnay
Oh, sorry, missed that. Thanks! jk On Mon, Aug 31, 2009 at 02:40:33PM -0700, Igor Vaynberg wrote: later versions of wicket (1.4.0+?) have Component#onRemove() -igor On Mon, Aug 31, 2009 at 1:42 PM, John Krasnayj...@krasnay.ca wrote: Hi folks, I have a wizard-like page with a form,

Re: wicket + jquery

2009-09-02 Thread John Krasnay
Yeah, $(document).ready will not re-run upon AJAX changes. I think jQuery 1.3 has something called live selectors that kick in whenever the DOM changes. Alternatively, you could just attach some Javascript to the AjaxResponseTarget that initializes qtip for the new elements you're adding. jk On

Weird exception

2009-09-02 Thread John Krasnay
We've been getting the following exception intermittently during a performance test: Caused by: java.lang.ClassCastException: [B at org.apache.wicket.Session.pageMapForName(Session.java:928) at org.apache.wicket.PageMap.forName(PageMap.java:67) at org.apache.wicket.Page.init(Page.java:1167)

Re: Weird exception

2009-09-02 Thread John Krasnay
OC4J 10.1.3.3 Java 1.5.0_06 Red Hat Linux (not sure of the version) jk On Wed, Sep 02, 2009 at 07:31:31PM +0200, nino martinez wael wrote: What kind of container are you running it in? And java version etc..? 2009/9/2 John Krasnay j...@krasnay.ca: We've been getting the following exception

Re: Selectively ignoring required fields

2009-09-15 Thread John Krasnay
On Tue, Sep 15, 2009 at 03:10:51PM +0100, Phil Housley wrote: A good point, but I don't think it exactly applies in this case. What I really want is for each component to know whether it is required within a very small context. For example, a might have a criteria panel (one of the

Re: [offtopic[ how to attach sources to wicket jars when debugging

2009-09-29 Thread John Krasnay
I don't use m2eclipse, but I have this in my pom.xml... plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-eclipse-plugin/artifactId configuration downloadSourcestrue/downloadSources downloadJavadocstrue/downloadJavadocs

Re: Idiomatic way to reference shared images?

2009-10-21 Thread John Krasnay
On Wed, Oct 21, 2009 at 07:57:12PM +0200, Ceki Gulcu wrote: Hello, I am trying to defined shared images in a Wicket application. In my prokect, the image file help.gif is located under the src/main/java/com/foo/ folder of my project. I have created an empty class called Images. package

Re: Idiomatic way to reference shared images?

2009-10-22 Thread John Krasnay
On Thu, Oct 22, 2009 at 09:15:35AM +0200, Ceki Gulcu wrote: Hi John, Thank you for your answer. I was already aware of the idiomatic way for referencing packaged resources. It is a nice way for bundling images which are used within a package. My question was about images shared among

Re: Glue for composing panels

2009-10-29 Thread John Krasnay
Rather than having the base class pull in components from the subclass, recently I've been tackling this kind of problem by creating RepeatingViews in the base class and letting subclasses push components in by adding to the repeating view: div class=leftNav div wicket:id=leftNavChild

Re: Glue for composing panels

2009-10-29 Thread John Krasnay
On Thu, Oct 29, 2009 at 05:58:02PM -0200, Pedro Santos wrote: Nice approach, the only missing is that you hasn't how to prevent your component users from call addLeftNavChild after render phase at development time. But it is no big deal, since they will get an exception at runtime... By

Re: Easymock question

2009-12-16 Thread John Krasnay
Is UserFactory an interface or an implementation class? jk On Wed, Dec 16, 2009 at 09:02:16PM +0100, pieter claassen wrote: I am trying to mock my DAO's, but I am not sure if I understand easymock correctly. In my WicketSession I store a user ID and use this to retrieve the current logged

Re: maven-eclipse-plugin 2.6 will break your wicket projects

2009-04-03 Thread John Krasnay
FYI to anyone who's been bitten by this, there's a simple workaround. Just add the following to your pom.xml: build plugins plugin artifactIdmaven-eclipse-plugin/artifactId version2.5.1/version /plugin /plugins /build We did it in our parent POM and it's

Re: maven-eclipse-plugin 2.6 will break your wicket projects

2009-04-03 Thread John Krasnay
On Fri, Apr 03, 2009 at 04:21:13PM +0100, Gwyn Evans wrote: On Fri, Apr 3, 2009 at 3:42 PM, John Krasnay j...@krasnay.ca wrote: FYI to anyone who's been bitten by this, there's a simple workaround. Yes - use IDEA! :-) What, haven't they fixed the maven-idea-plugin yet? Your time's comin

Re: Communication between applications, one using wicket

2009-04-09 Thread John Krasnay
Your approach sounds perfectly reasonable to me. What don't you like about it? jk On Thu, Apr 09, 2009 at 10:36:39AM +0300, Cristi Manole wrote: Hello, I have a wicket application where a user starts an action on another system (different machine, outside network). I would like for this

Re: Communication between applications, one using wicket

2009-04-09 Thread John Krasnay
On Thu, Apr 09, 2009 at 07:48:10AM -0500, David Brown wrote: Hello Cristi, this is typically referred to as diparate sytems communications issue. In the past I have had some success between such sytems using a WSDL and messaging. I did not have a lot of time so I opted for the Apache Axis2

Re: Communication between applications, one using wicket

2009-04-09 Thread John Krasnay
On Thu, Apr 09, 2009 at 04:14:43PM +0300, Cristi Manole wrote: I used Axis2 before, but at the moment i don't see how it can solve my problem - meaning how to update some panel *without* doing some action repeatedly until something worth displaying to the user happens. I don't think anyone

Re: serialVersionUID

2009-04-11 Thread John Krasnay
On Sat, Apr 11, 2009 at 08:45:31AM -0500, Luther Baker wrote: A quick question - is it generally acceptable to use private static final long serialVersionUID = *1L*; for most the anonymous inner class I create using Wicket? Specifically, I'm asking about using the value (-1).

Re: serialVersionUID

2009-04-11 Thread John Krasnay
On Sat, Apr 11, 2009 at 01:31:47PM -0500, Luther Baker wrote: Thanks John, Let me take this one step farther, just to clarify. I know that in a standard web application, the web container can Serialize user HttpSessions such that one can shut an application down and upon bringing it back

Re: serialVersionUID

2009-04-11 Thread John Krasnay
On Sat, Apr 11, 2009 at 05:32:51PM -0400, Ben Tilford wrote: The purpose of the *public* static final long serialVersionUID is for long term storage or situations where you may potentially have made modifications to the class that make it incompatible with previous versions (distributed

Re: WebApp Freezes

2009-04-15 Thread John Krasnay
Sounds like you have a thread holding a lock on a critical table and subsequent threads are lining up behind it waiting for it to finish. You should check your MySQL to try and figure out who's holding the lock and why. Note that the culprit thread need not be hung up in the database. Locks are

Re: WebApp Freezes

2009-04-15 Thread John Krasnay
Heh, I haven't had to worry about connection leaks since I discovered Spring's JdbcTemplate and Hibernate, so it didn't even cross my mind. But yeah, if the app is doing it's own JDBC connection management then that is very much something J should look at. jk On Wed, Apr 15, 2009 at 05:58:11PM

Re: setConvertedInput - one form component, two fields in the model?

2009-04-21 Thread John Krasnay
Since you're dealing with setConvertedInput I presume you're implementing FormComponentPanel. In that case, you need a single model object to encapsulate the idea of a date range. For example, you could implement your own DateRange class. Pass your panel a model that returns and accepts instances

Re: Mutually dependent component and how to update a textfield when a link is clicked

2009-04-21 Thread John Krasnay
Hi Liam, Check out this page: http://cwiki.apache.org/WICKET/conditional-validation.html It has a bunch of recipes for interactions between components, e.g. requiring a text field only if a checkbox is checked or a certain submit button was used. Sounds similar to what you need to do. jk On

Re: Example for FormComponentPanel/best-practice for reusable form-components

2009-05-05 Thread John Krasnay
AddressFormComponent should extend Panel, not FormComponentPanel. FormComponentPanel is used for special cases where you have several FormComponents that work together to edit a model value, such as a date editor that has dropdowns for month and day. On a FormComponentPanel, you have to implement

Re: DropDownChoice ID's

2009-05-09 Thread John Krasnay
What is the type of the gender property of BasicDemographicInfo? jk On Sat, May 09, 2009 at 12:39:58PM -0700, Oblivian wrote: Not sure what I'm doing wrong. I need a DropDownChoice with ... option value=fFemale/option option value=mMale/option have a basic class like this ...

Re: DropDownChoice ID's

2009-05-10 Thread John Krasnay
On Sat, May 09, 2009 at 05:52:29PM -0700, Oblivian wrote: basicDemographicInfo.gender is a String and genders is ListString John Krasnay wrote: What is the type of the gender property of BasicDemographicInfo? jk On Sat, May 09, 2009 at 12:39:58PM -0700, Oblivian wrote

Re: DropDownChoice ID's

2009-05-10 Thread John Krasnay
. The values are coming across as ['m','f'] but the id's are ['0','1'] Overriding getIdValues() instead of getDisplayValues() seems to work. John Krasnay wrote: The golden rule of DropDownChoice is that the values in the list must be the same as the property you are trying to set

Re: 60% waste

2009-05-11 Thread John Krasnay
I just use names for form components and css or xpath for non-form components instead of IDs. Sometimes requires rework if the page structure changes but otherwise works OK. jk On Mon, May 11, 2009 at 08:22:40AM -0700, Douglas Ferguson wrote: I should be more clear. Has anybody had problems

Re: Apache Tomcat CSS

2009-05-12 Thread John Krasnay
The problem is likely that you've specified a relative URL to the CSS file like this... link rel=stylesheet type=text/css href=styles.css/ You need to get wicket to rewrite that href so it knows how to serve up the CSS file. The easiest way to do this is to wrap your link in wicket:link tags:

Re: Reverse geocoding with wicket contrib gmap2

2009-06-18 Thread John Krasnay
Hehe, when I first saw reverse geocoding I read reverse geolocation, as in you point to a spot on a Google map and you get teleported there. Now *there's* a browser feature I'd pay for! jk On Thu, Jun 18, 2009 at 06:46:59PM +0300, Jesse Kivialho wrote: Well I don't need that much events. The

Re: Creating a form dynamically

2009-06-19 Thread John Krasnay
I've had good results creating my child components as panels and adding them to a RepeatingView (instead of ListView). The child panels should get their IDs from RepeatingView.newChildId(). jk On Fri, Jun 19, 2009 at 10:14:12AM -0400, James Carman wrote: You could use Velocity to dynamically

Re: DateField and enabling some days

2009-07-09 Thread John Krasnay
Sorry, I don't know much about Date[Time]Field. Just trying to save you a few LoC. jk On Wed, Jul 08, 2009 at 01:35:13PM -0700, Fernando Wermus wrote: thanks for the tip. Is there some way to solve what I commented? On Wed, Jul 8, 2009 at 1:25 PM, John Krasnay j...@krasnay.ca wrote

Re: Spring and Wicket - is it worth it?

2009-07-23 Thread John Krasnay
Wow, this post generated a short burst of heat but not much light! I think the problem is your question conflates dependency injection, XML-based configuration, and the Spring framework. IMHO you have to consider these separately to understand their relative merits. Dependency injection is

Re: DropDownChoice with ID and Value

2009-07-27 Thread John Krasnay
This is an awkward way to do it, and still doesn't set the selected value back into his model. The golden rule of DropDownChoice is: objects in the list must be of the same type as the model object. If you want your model to be updated with an int, you have to give DDC a list of Integer. The

Re: DropDownChoice with ID and Value

2009-07-28 Thread John Krasnay
The thing that makes your example awkward (IMHO, of course) is that it leaves out how the value that the user selects makes its way back into the app's domain object. The OP said he wants my model updates with 1, 2, and 3. From that I understand he has some object with an int property... class

Re: Issue with AjaxLinks in ListView

2009-08-01 Thread John Krasnay
Hi Kuga, ListView re-creates all its child items on each render, which might be causing your problems. Try calling setReuseItems(true), or better still, consider using RepeatingView instead. jk On Fri, Jul 31, 2009 at 11:30:57PM -0700, Kuga wrote: Hi, Thank you for your response, here is

Re: Issue with AjaxLinks in ListView

2009-08-02 Thread John Krasnay
On Sat, Aug 01, 2009 at 09:19:05AM -0700, Kuga wrote: I have not tried replacing to RepeatingView. Will it make a difference? I have no idea. Why don't you try it? jk - To unsubscribe, e-mail:

Re: Nested forms : don't process inner form when outer form is submitted

2009-08-06 Thread John Krasnay
On Thu, Aug 06, 2009 at 02:40:13AM -0700, nytrus wrote: In the example, the inner form is enabled only when the submitter button is that of itself (i.e. I'm submitting the inner form). In all other cases the form is always disabled: Yes, that is the point. I've tried the example and in

  1   2   >