Re: same data set shows for all users

2009-09-16 Thread McIlwee, Craig
You do realize that there is a single instance of the Application, not one per user, right? Your application holds an OrderDatabase and whenever a user enters a new date range they are altering the contents of the Map in that OrderDatabase. So user A sets a date range and fetch is called,

Re: AjaxRequestTarget javascript execution order

2009-10-10 Thread McIlwee, Craig
Have you tried prependJavascript(String) instead of append? Javadoc: Adds javascript that will be evaluated on the client side before components are replaced Sounds like what you're looking for if I'm understanding your question correctly. Craig _ From: Daniele Dellafiore

Re: how to inject arbitrary javascript code to a component markup?

2009-10-10 Thread McIlwee, Craig
If your component is a MarkupContainer you can override getAssociatedMarkupStream(boolean) and build the markup on the fly. So maybe still have the HTML file that you read in as a template with some place holder string and in the override you replace the place holder with stuff you want to be

Re: how to inject arbitrary javascript code to a component markup?

2009-10-10 Thread McIlwee, Craig
Didn't think of that approach, looks good. But to clear up my previous suggestion since I guess I wasn't clear enough and its useful in other situations also, you need to _override_ getAssociatedMarkupStream(boolean), not just call it. public static final String JAVASCRIPT_PLACEHOLDER =

Re: ajax autocomplete

2009-11-12 Thread McIlwee, Craig
Allow me to translate: He tries auto complete example locally (under tomcat in windows) but isn't presented with any auto complete suggestions. The example works for him online. (I think... took a few reads) Craig _ From: nino martinez wael [] To:

Re: Updating a Dynamic Image with AJAX (and JFreeChart)

2009-11-13 Thread McIlwee, Craig
Look at the source of the DynamicImageResource class. The getResourceState method does something like (sorry for the lame pseudocode) 'if image data is null then save and return value of getImageData else return the previous image data'. So its gonna call your getImageData() method once and

Re: Wicket 1.5 experiences

2009-12-02 Thread McIlwee, Craig
IMO, looking up EJBs through JNDI is better than relying on injection. Make the hostname (localhost, another ip, etc) part of the JNDI URL configurable and you give yourself the flexibility of being able to deploy them locally or in another VM. If you are using EJBs with JPA this will allow

Re: Wicket 1.5 experiences

2009-12-03 Thread McIlwee, Craig
-12-03 03:46 keltezéssel, McIlwee, Craig írta: IMO, looking up EJBs through JNDI is better than relying on injection. Make the hostname (localhost, another ip, etc) part of the JNDI URL configurable and you give yourself the flexibility of being able to deploy them locally or in another VM

Re: Location of html files

2009-12-06 Thread McIlwee, Craig
I agree that you should have a strong reason to change the default, and IMO 'I don't like it' isn't good enough. What happens if you want to reuse components that live in that jar elsewhere? Putting the jar that contains the component on the classpath won't be sufficient because you'll only

Re: Very Basic Hello World - Applet

2009-12-09 Thread McIlwee, Craig
Really? I've never written applets before, is there some limitation that would prevent it from being fetched as a shared resource? If not then add a wicket:id attribute to the applet tag, create a Label with the same wicket ID, and then use an AttributeModifier to create the code attribute on

Re: CachingPage

2009-12-10 Thread McIlwee, Craig
So you want your page to output some content that doesn't live in HomePage.html, but from memory/db/etc instead? If that's the case, overrride hasAssociatedMarkup() and return false (tells wicket there's no HomePage.html to look for) and then in onRender() write your content using

Re: Can you attach multiple AjaxFormComponentUpda tingBehavior to the same component?

2009-12-14 Thread McIlwee, Craig
Only 1 per event will work because the script to trigger the behavior is inlined on the element (input onclick='ajax call to a behavior's url' /). CompoundAjaxBehavior was mentioned as a possible feature for wicket 1.5/2.0 at the link below, but that was 2 years ago so I don't know how

Re: Session preserved Page/Page property

2009-12-16 Thread McIlwee, Craig
I think you answered your own question, you said you wanted properties that persisted through the session so store them in the session. Either create your own subclass with setters/getters for your properties or you could possibly open up the visibility of Session.setAttribute(String, Object).

Re: Ajax not firing onSubmit after back-button press

2009-12-18 Thread McIlwee, Craig
Maybe wicket thinks that the ajax behavior belongs to a page that isn't the current/active page and therefore is ignoring it? Just a guess, and I am likely to be wrong, but I

CheckboxMultipleChoice: isEnabled() vs isEnabledInHierarchy()

2009-12-24 Thread McIlwee, Craig
I've just noticed that CheckboxMultipleChoice uses isEnabled() when rendering, but I think most other form components use isEnabledInHierarchy(). I like that most of the form components use the hierarchy method because it allows me to create a read only version of my forms by disabling the

Re: Quick question - Bad to serialize a class ref erence?

2009-12-28 Thread McIlwee, Craig
I doubt it's a problem, but if you're worried about the class reference you can introduce a middle man that will handle the serialization as a string: class ClassHolder implements Serializable { private Class? clazz; // constructor, setter, and getter omitted... private void

Re: log4j question with wicket

2009-07-24 Thread McIlwee, Craig
I doubt this is a wicket problem, I can redirect all logging for each of my wars to their own file with no trouble. First, what slf4j implementation are you using? Second, have a look at this page: I know that its for JBoss,


2010-03-29 Thread McIlwee, Craig
Have you tried using firebug to see what the POSTed values are? That may shed some light on the problem... _ From: victorTrapiello [] To: Sent: Mon, 29 Mar 2010 02:19:29 -0400 Subject: Re: PROBLEM WITH PAY PAL INTEGRATION that´s is

Re: better way setting up ID for a Wicket compone nt?

2010-03-30 Thread McIlwee, Craig
There's a good reason that markup ID doesn't match wicket ID. If I have a panel with a few form components, and then put 2 of those panels on the same page, then your approach would break things like document.getElementId(...) because there would be more than 1 element w/ same ID. Craig

Re: What happens after browser's 'back' but ton?

2010-04-06 Thread McIlwee, Craig
As long as you prevent the browser from caching the page with the form (just the page itself, caching the resources is fine) then when the user hits back wicket will pull the old page instance from the pagemap and rerender it. That page instance is the same one that was used the first time, so

Re: Help with Reports

2010-04-07 Thread McIlwee, Craig
Don't have any code handy right now, but I've used this before for jasper reports and it worked out well - Original Message - From: chinedu efoagui [] To: users

Re: How to get stable DOM IDs without hacks?

2010-04-12 Thread McIlwee, Craig
Like Pierre said, component.setMarkupId(component.getId()) will work, but it was discussed just a couple of weeks ago why that's a bad approach. The thread isn't appearing on nabble though, not sure why that is. Anyway, a safer approach (to prevent duplicate ID issues) is to generate your

Re: How to get stable DOM IDs without hacks?

2010-04-13 Thread McIlwee, Craig
Not quite true. What I've done is the past is record my tests w/ the IDE then export to Java. Once you've got the JUnit generated for you it's not too hard to take a quick pass and convert all of the ID lookups to XPath lookups. If you know for sure when writing the test that the ID really