Re: Multiple Applications In a Single Context?

2008-04-26 Thread Igor Vaynberg
you can make your entire application url aware, that shouldnt really be a problem. i think you will run into interesting things when trying to have two spring contexts share a single servlet context though. -igor On Fri, Apr 25, 2008 at 9:04 PM, Jeremy Thomerson [EMAIL PROTECTED] wrote: Has

Re: Multiple Applications In a Single Context?

2008-04-26 Thread Jeremy Thomerson
I want to try to limit the places that actually must know they're running in a multi-site context. I would also likek to avoid having separate filters for each site... So, I've been experimenting tonight with a few ways of doing it. I have this working - but could you tell me if there may be

Re: Alternative method to initialise page

2008-04-26 Thread John Patterson
Cool. I can see that you now and the links in onBeforeRender(). So is this the recommended approach for creating extendible components? What are the reasons to not to add all child components in this method? igor.vaynberg wrote: fixed in trunk for 1.4, i will fix in 1.3.x later today when

Re: Alternative method to initialise page

2008-04-26 Thread Martijn Dashorst
it is called every time the page renders. Though creating objects isn't *that* expensive, imagine recreating all your components with every request for every user, discarding all the components you already created one request earlier. Martijn On 4/26/08, John Patterson [EMAIL PROTECTED] wrote:

Re: Alternative method to initialise page

2008-04-26 Thread John Patterson
Thanks. So is this the way we should build all components that could be extended? If so, how about adding an initialisation hook to avoid this problem and the need to call super.onBeforeRender() (which I forgot recently and took me a while to find)... and also to give it a more intuitive name

Re: Alternative method to initialise page

2008-04-26 Thread Martijn Dashorst
We have discussed this over and over on the list. Search the archives. Short answer: NO. Martijn On 4/26/08, John Patterson [EMAIL PROTECTED] wrote: Thanks. So is this the way we should build all components that could be extended? If so, how about adding an initialisation hook to avoid

Re: Alternative method to initialise page

2008-04-26 Thread John Patterson
Sorry, I did find a discussion which was related [1] which ended with Igor saying: yes, but its also easy to fix. Just don't call any overridible methods inside constructors. And for everything else there is onbeforerender() If this is the recommended way to write extendible components I could

Re: Wicket Unit Test: No WebApplicationContext found: no ContextLoaderListener registered?

2008-04-26 Thread James Carman
On Sat, Apr 26, 2008 at 1:40 AM, Nino Saturnino Martinez Vazquez Wael [EMAIL PROTECTED] wrote: James Carman wrote: Why are you using the Spring injector to inject your dependencies? Can you not manually inject your dependencies? Adding stuff manually to a Spring context and then having

Re: RedirectPage - gets stuck in an endless loop

2008-04-26 Thread Johan Compagner
and what does /login do? On Sat, Apr 26, 2008 at 4:51 AM, mfs [EMAIL PROTECTED] wrote: Guys, I am using RedirectPage class to redirect to an external url, and strangely it just gets stuck in an endless loop..any idea as to what the problem could be ? i.e. new

Re: Alternative method to initialise page

2008-04-26 Thread John Patterson
John Krasnay wrote: This rule is too strict. Another way to avoid calling overridable methods from the constructor is to use a model: Models are fine for providing dynamic values but do not help you customise components by extension. For example, to provide a different type of link to

Re: Need to turn off Markupparser : Problem with param tag

2008-04-26 Thread Johan Compagner
If it is a wicket page then it has to be parsed.. On Sat, Apr 26, 2008 at 2:41 AM, hjuturu [EMAIL PROTECTED] wrote: Hi Martin/All In my page the HTML that is created is dynamic (has embedded widgets or gadgets) and we dont have control over the tags in the wicket page. or tags doesnt have

Re: Problem converting options of ListMultipleChoice

2008-04-26 Thread Johan Compagner
ListMultiplyChoice expects a Collection not an Array as the model object Else it doesnt know how to fill it (currently) public ListMultipleChoice(final String id, IModelCollectionT object, final ListT choices) so change this: ... public void setPermissions(Authority[] permissions) {

Re: Alternative method to initialise page

2008-04-26 Thread John Krasnay
On Sat, Apr 26, 2008 at 04:46:11AM -0700, John Patterson wrote: John Krasnay wrote: This rule is too strict. Another way to avoid calling overridable methods from the constructor is to use a model: Models are fine for providing dynamic values but do not help you customise

submit form to bookmarkable page

2008-04-26 Thread Doug Donohoe
Hi, I'm like to submit a form using bookmarkable page style, so that a) the form can always be submitted, regardless if the session is expired or not (think of a Google search submission e.g., http://www.google.com/search?q=wicket) b) the form remembers PageParameters that were there when the

Re: Alternative method to initialise page

2008-04-26 Thread Uwe Schäfer
John Patterson schrieb: Thanks. So is this the way we should build all components that could be extended? If so, how about adding an initialisation hook to avoid this problem and the need to call super.onBeforeRender() (which I forgot recently and took me a while to find)... and also to give

RE: Wicket Auto complete text Issue

2008-04-26 Thread Hoover, William
I'm not sure why the built-in Wicket component doesn't support this feature out-of-the-box, but here is a simple fix/solution:

Re: Alternative method to initialise page

2008-04-26 Thread Igor Vaynberg
On Sat, Apr 26, 2008 at 4:17 AM, John Patterson [EMAIL PROTECTED] wrote: Sorry, I did find a discussion which was related [1] which ended with Igor saying: yes, but its also easy to fix. Just don't call any overridible methods inside constructors. And for everything else there is

Re: submit form to bookmarkable page

2008-04-26 Thread Doug Donohoe
I assume the query values will come through in the page parameters, which is fine since I'm already using those. Thanks, -Doug igor.vaynberg wrote: override the form's action value in its oncomponenttag callback with a url to a bookmarkable page. but then you have to parse all posted

Re: Alternative method to initialise page

2008-04-26 Thread Johan Compagner
We shouldnt call it onInitialize, onFirstRender is fine, onInitialize looks like a really after constructor call to me, but it is called much later, if it is called (onvisible checks and so on) On 4/26/08, Igor Vaynberg [EMAIL PROTECTED] wrote: On Sat, Apr 26, 2008 at 4:17 AM, John Patterson

Re: Alternative method to initialise page

2008-04-26 Thread Igor Vaynberg
onBeforeFirstRender() ? , onFirstRender() is ambiguous with its relation to onbeforerender() -igor On Sat, Apr 26, 2008 at 9:35 AM, Johan Compagner [EMAIL PROTECTED] wrote: We shouldnt call it onInitialize, onFirstRender is fine, onInitialize looks like a really after constructor call to me,

Re: Wicket Unit Test: No WebApplicationContext found: no ContextLoaderListener registered?

2008-04-26 Thread Nino Saturnino Martinez Vazquez Wael
James Carman wrote: On Sat, Apr 26, 2008 at 1:40 AM, Nino Saturnino Martinez Vazquez Wael [EMAIL PROTECTED] wrote: James Carman wrote: Why are you using the Spring injector to inject your dependencies? Can you not manually inject your dependencies? Adding stuff manually to a

Re: submit form to bookmarkable page

2008-04-26 Thread Igor Vaynberg
they should -igor On Sat, Apr 26, 2008 at 9:31 AM, Doug Donohoe [EMAIL PROTECTED] wrote: I assume the query values will come through in the page parameters, which is fine since I'm already using those. Thanks, -Doug igor.vaynberg wrote: override the form's action value in

Re: Gzipping of pages (HTML output, not only resources)

2008-04-26 Thread Stefan Simik
Thxnbsp;fornbsp;advicenbsp;-nbsp;Inbsp;triednbsp;tonbsp;usenbsp;thenbsp;mentionednbsp;gzipnbsp;filternbsp;andnbsp;itnbsp;seemsnbsp;tonbsp;worknbsp;:) Inbsp;havenbsp;notnbsp;detectednbsp;anynbsp;problemnbsp;innbsp;mynbsp;application.

Re: javascript error in internet explorer

2008-04-26 Thread bglynn
I'm also having either the same issue or one very similar. The problem I'm seeing seems to be isolated to IE. The specific build version of IE 7.0.5730.11. The issue only seems to have come up on one of 5 machines and assuming the specific IE build maybe an issue. Here's a description: We are

Re: RedirectPage - gets stuck in an endless loop

2008-04-26 Thread mfs
its just an login page outside of the wicket application context...the url is constructed as http://[host-name]/login .. mfs wrote: Guys, I am using RedirectPage class to redirect to an external url, and strangely it just gets stuck in an endless loop..any idea as to what the problem

Re: javascript error in internet explorer

2008-04-26 Thread bglynn
I was able to find another machine with the same build of IE and the issue came up again. bglynn wrote: I'm also having either the same issue or one very similar. The problem I'm seeing seems to be isolated to IE. The specific build version of IE 7.0.5730.11. The issue only seems to

Re: Alternative method to initialise page

2008-04-26 Thread John Patterson
John Krasnay wrote: Sure, but your rule said Call all overridable methods from onBeforeRender(), and I gave you a working counterexample that has nothing to do with onBeforeRender. The counter example was the exact mistake that is very easy to make when designing a component that can be

Re: Wicket Unit Test: No WebApplicationContext found: no ContextLoaderListener registered?

2008-04-26 Thread Jorge Gallardo
I solved it! I modified the mock application class and it worked as I expected public class MockWicketApplication extends WicketApplication { private AnnotApplicationContextMock mockContext; @Override protected void internalInit() { mockContext = new

Re: what is the preferred way to include a javascript library to a wicket project?

2008-04-26 Thread Maurice Marrink
But this still does not fully support different versions of the lib. So if one extension uses version 1.0 of javascript lib A and another uses version 2.0, chances are you have a problem. because both extensions call some api that might not be available or has changed in the other version. just

Re: Alternative method to initialise page

2008-04-26 Thread Maurice Marrink
But as Johan has already pointed out. onBeforeFirstRender (or whatever it is called) might not be called at all if the component is not (allowed to be) rendered. This is probably going to confuse people just as much as the current situation. And if we have an initialize method which should be

Re: Alternative method to initialise page

2008-04-26 Thread John Patterson
John Patterson wrote: The counter example was the exact mistake that is very easy to make when designing a component that can be extended. So easy to make that even the mighty super genius Igor initially did it in PagingNavigation. So most mere mortal wicketeers could not be expected to

Re: Alternative method to initialise page

2008-04-26 Thread John Patterson
Mr Mean wrote: But as Johan has already pointed out. onBeforeFirstRender (or whatever it is called) might not be called at all if the component is not (allowed to be) rendered. This is probably going to confuse people just as much as the current situation. And if we have an initialize

Re: what is the preferred way to include a javascript library to a wicket project?

2008-04-26 Thread Vitaly Tsaplin
And what does this mean? What if 2 different extensions are contributing to a header 2 different versions of YUI or prototype? Is it possible in javascript? I think no. You will definitely have a conflict. One of this versions will take a precedence. Being able to include javascript libraries by

Re: what is the preferred way to include a javascript library to a wicket project?

2008-04-26 Thread Maurice Marrink
Ok, maybe i am sounding way to negative today, either that or i am not expressing myself clear enough :) I wasn't saying that letting the user include his or her desired library is without benefit. I was merely stating that it does not solve everything. Anyway, i'll shut up for today and hope my

Re: what is the preferred way to include a javascript library to a wicket project?

2008-04-26 Thread Vitaly Tsaplin
I am not talking about a level of wicket perfection :) I really like the idea to contribute to the header scripts that are locally stored in the java package if those scripts are somehow proprietary for the component being imported. But I am a bit worried about the fact that such commonly used

Re: what is the preferred way to include a javascript library to a wicket project?

2008-04-26 Thread Igor Vaynberg
but what good will that do? so components do not automatically contribute the javascript. instead you have to now do it yourself, and if you contribute an incompatible version you are still left with a nonworking component. so what is better now? wicket-datetime is not part of core, and even if

Re: what is the preferred way to include a javascript library to a wicket project?

2008-04-26 Thread Vitaly Tsaplin
| if you contribute an incompatible version you are still left with a | nonworking component. so what is better now? At least I'll be able to include the latest one. Anyway in this scenario a component author will (I hope) properly define the list of all libraries the component

Re: what is the preferred way to include a javascript library to a wicket project?

2008-04-26 Thread Nino Saturnino Martinez Vazquez Wael
Maurice Marrink wrote: But this still does not fully support different versions of the lib. So if one extension uses version 1.0 of javascript lib A and another uses version 2.0, chances are you have a problem. because both extensions call some api that might not be available or has changed in

Re: what is the preferred way to include a javascript library to a wicket project?

2008-04-26 Thread Igor Vaynberg
personally i like to be able to simply include the datepicker and not have to worry or research what javascript library it uses. but sure, i guess we can add a simple boolean datepicker.contributeDependencies() that you can then override and return false. of course then it puts burden on any

Re: what is the preferred way to include a javascript library to a wicket project?

2008-04-26 Thread Vitaly Tsaplin
-- personally i like to be able to simply include the datepicker and not -- have to worry or research what javascript library it uses. I would definitely do the same but the javascript often comes the developer hell and any hidden includes injected by the component itself can make

Re: RedirectPage - gets stuck in an endless loop

2008-04-26 Thread Jonathan Locke
some kind of exception being thrown maybe? try debugging it. it's an interesting and educational trip through wicket internals anyway. if you still can't figure it and you think it's not your problem, boil it down to a quickstart example and attach the example to a JIRA bug and someone will

Re: what is the preferred way to include a javascript library to a wicket project?

2008-04-26 Thread Igor Vaynberg
create a jira issue for the datepicker please -igor On Sat, Apr 26, 2008 at 7:21 PM, Vitaly Tsaplin [EMAIL PROTECTED] wrote: -- personally i like to be able to simply include the datepicker and not -- have to worry or research what javascript library it uses. I would

Ajax Components - render an http resource on ajax-component rendering

2008-04-26 Thread mfs
Guys, I am working on a wicket app which needs to provide inter-operability/single-sign-on support with an external mod_plsql based app. Among one of the tasks is to synchronize the session-timeouts between these two application. For now we have decided on a temporary solution (somewhat a

Re: RedirectPage - gets stuck in an endless loop

2008-04-26 Thread mfs
Its an external app on the same web-server..I think RestartResponseException would work if the /login lies in the same application-context..right ? Jonathan Locke wrote: btw, if Host is your local host (same web app), you probably want to throw a RestartResponseException instead of

Re: RedirectPage - gets stuck in an endless loop

2008-04-26 Thread mfs
Eventually its throws StackOverFlow exception... Jonathan Locke wrote: some kind of exception being thrown maybe? try debugging it. it's an interesting and educational trip through wicket internals anyway. if you still can't figure it and you think it's not your problem, boil it

Re: Alternative method to initialise page

2008-04-26 Thread John Patterson
Mr Mean wrote: Such an initialize method can easily be done by users them self with a simple factory pattern. Can you give an example of this? Mr Mean wrote: So why bloat our api with it? Building such extendable components seems to be a core feature of wicket and one of its