Spring's AbstractMessageSource : read new label from DB

2008-06-23 Thread Marieke Vandamme
Hello, I don't know if my question is Spring related or wicket related, but i guess it's wicket related so... If not, my apologies, but please tell me so i can post my question to the correct mailinglist. I use the org.springframework.context.support.AbstractMessageSource to read my labels

Re: Spring's AbstractMessageSource : read new label from DB

2008-06-23 Thread Marieke Vandamme
Hello again, maybe some more clarification why I guess this is wicket related. org.apache.wicket.resource.loader.IStringResourceLoader is the implementation that is used in wicket to get the label from the DB, because there the necessary function of the Spring MessageSource is called. The

Confused

2008-06-23 Thread egolan74
Hi, I have a page that holds a list (of Strings). In the constructor, I initialize the list. Then I call a Panel with this list to create a ListView of something. In a Modal window I set the list to have data in. The problem is that the list is initialized whenever I refresh the page (F5) (the

Re: Confused

2008-06-23 Thread Martin Makundi
Hi! Here is a good example of a list model: public abstract class AbstractListChoiceModelS extends AbstractReadOnlyModelList? extends S { @Override public final ListS getObject() { return getChoices(); } public abstract ListS getChoices(); } Now change your code as follows:

Re: Regarding Loacale

2008-06-23 Thread Wilhelmsen Tor Iver
When I, on the fly, change the language to something else (de_CH), the Locale in my application is not changed. Looking at Wicket 1.3 and 1.4 sources, the locale is picked up in the Session constructor, so presumably you need to nuke the Wicket session or let it expire before trying a new

Re: wicket servlet mapping to subdirectory

2008-06-23 Thread Thomas Lutz
Thanks Igor ! I removed the filter init params, tried with a fresh 1.3.x from subversion, still did not work. But :-), it's not wicket's fault, it's f* oc4j. The redirect after the login page (I am using the acegi+wicket approach from the wiki) is not handled right.. oc4j does a

Re: Confused

2008-06-23 Thread egolan74
Thanks Martin, That really helped. Though I did something else and now I have a new problem. It's an Ajax problem now. Here's what I did: In the constructor: idsModel = new LoadableDetachableModel() { private static final long serialVersionUID = 1L;

Re: Confused

2008-06-23 Thread Martin Makundi
I did not quite follow nor grasp what you are trying to do... my only question is, are you using the same object instance on two different pages? That does not work (serialization breaks the connection). ** Martin 2008/6/23 egolan74 [EMAIL PROTECTED]: Thanks Martin, That really helped.

Re: Confused

2008-06-23 Thread Eyal Golan
OK, I'll try to explain. 1. I have a page that has a list of links. 2. The list is taken from the database the sageDal.getPreference(..) method that I showed. 3. This list can be configured by the user. 4. I made a Modal window that shows the user all available links (also taken from the DB). 5.

Re: Confused

2008-06-23 Thread Martin Makundi
Ok. I do not have experience with Modal windows in wicket, but do you actually repaint the original page to even reflect the changes? If you repaint it, and your model loads the data from DB, and the data still does not show the changes (try to use breakpoints and debugger to confirm this), you

Invisible fields in wicket

2008-06-23 Thread andresc
Hi everybody, this is my first post in the list. I would like to ask for advice on the following topic: I am developing a view with wicket, which contains a somewhat intensive logic behind. For instance, when I select an option in a drop down choice, some fields are disabled, while other fields

Re: Confused

2008-06-23 Thread Eyal Golan
Well, my problem is more of an Ajax one (I think). The database is changing. I have a setter in my original Panel that is executed when the Modal is pressed OK. It stopped in the breakpoint. I looked in the DB and saw the changes. When pressing F5, I got the updated list. So the problem is: how

RE: Session end method

2008-06-23 Thread Zappaterrini, Larry
Ah, I see that now. I didn't dig deep enough. When I first started working with Wicket sessions I was assuming (bad I know!) that Session.invalidate would be called when the HttpSession timed out. I noticed that it actually wasn't, so I then assumed (again!) that Wicket wasn't handling any

Re: wicket:head and HeaderContributors

2008-06-23 Thread Igor Vaynberg
On Sun, Jun 22, 2008 at 11:50 PM, Jürgen Lind [EMAIL PROTECTED] wrote: Hi, Igor Vaynberg wrote: you can put the javascript that uses your library into window's onload or ondomready event, so it will be executed later. wicket-event.js and WicketEventReference class make it easy. would

Re: Spring's AbstractMessageSource : read new label from DB

2008-06-23 Thread Igor Vaynberg
application.get().getresourcesettings().getlocalizer().clearcache(); -igor On Mon, Jun 23, 2008 at 1:27 AM, Marieke Vandamme [EMAIL PROTECTED] wrote: Hello again, maybe some more clarification why I guess this is wicket related. org.apache.wicket.resource.loader.IStringResourceLoader is the

Re: Confused

2008-06-23 Thread Martin Makundi
So the problem is: how can I tell my Model (detachable) that there was change in the database? Ok. I haven't worked with detachable models, but I would guess you just detach it so that it has to re-initialize itself? ** Martin

Re: Regarding Loacale

2008-06-23 Thread Igor Vaynberg
no. session also has setlocale(locale) so you can call that on every request if you wanted to... -igor On Mon, Jun 23, 2008 at 3:39 AM, Wilhelmsen Tor Iver [EMAIL PROTECTED] wrote: When I, on the fly, change the language to something else (de_CH), the Locale in my application is not changed.

Including wicket in JSPs?

2008-06-23 Thread Jan . Koops
Hello ! We are using a JSP-based content management system for navigation, page layout etc. Now we're evaluating Wicket as our application framework: A Wicket application should appear in the center of the JSP based layout and navigation. Has somebody already included a wicket page via

Re: wicket servlet mapping to subdirectory

2008-06-23 Thread Igor Vaynberg
hmm, i remember some people were complaining about oracle server before as well. you might want to search the mailing list. -igor On Mon, Jun 23, 2008 at 4:48 AM, Thomas Lutz [EMAIL PROTECTED] wrote: Thanks Igor ! I removed the filter init params, tried with a fresh 1.3.x from subversion,

RE: Session end method

2008-06-23 Thread Zappaterrini, Larry
I see. So then would the best place to do session cleanup be in WebApplication.sessionDestroyed? I guess the question really boils down to: where is the best place to clean up session related resources to ensure that they are freed in all instances regardless of which ISessionStore implementation

Re: Palette within a ModalWindow

2008-06-23 Thread egolan74
Hi, Can you send a code example of how you have used the setContent , ModalWindow and Pallete all together? I used the same as the examples of ModalWindow with a Page. And the Page has the Pallete. There aren't many examples of Palette. Thanks, Eyal Kai Mütz (Old) wrote: Hi, I want to

Re: Session end method

2008-06-23 Thread Eyal Golan
Regarding the cleaning Session issue. Suppose I set expire time to very long time. Suppose the user didn't log out, but just turned off the computer. Is the Session still alive? Until it is expired? If so, I guess I'll make a mechanism for using the same Session if the user comes again. On Mon,

Re: Confused

2008-06-23 Thread Eyal Golan
Got it!! The problem was in the LinksPanel: In the constructor I got the Model and did this: final ListLinkContainer links = new ArrayListLinkContainer(); ListString linksIds = (ListString) linksIdsModel.getObject(); for (String linkId : linksIds) {

Re: Including wicket in JSPs?

2008-06-23 Thread jnorris
Hi Jan, I have a legacy home-grown jsp application where I'm showing wicket pages in the content area using an inframe tag. Initially I had a problem that turned out to be caused by not using the closing tag for the iframe. Here's an example that works in IE6/7: head style

Re: wicket servlet mapping to subdirectory

2008-06-23 Thread Thomas Lutz
I searched the list, but I guess nobody tried to map to a subdirectory so far... or combine it with acegi. I've made some progress, though, basically the only solution yet was removing the filter, and handle the filter stuff in my customized wicket session. not very beautiful, but it works.

Re: Session end method

2008-06-23 Thread Igor Vaynberg
what resources are those? like i said before, by the time you get notification that the session is expired you can no longer access attributes within session. -igor On Mon, Jun 23, 2008 at 8:29 AM, Zappaterrini, Larry [EMAIL PROTECTED] wrote: I see. So then would the best place to do session

Re: Including wicket in JSPs?

2008-06-23 Thread Igor Vaynberg
http://herebebeasties.com/2007-03-01/jsp-and-wicket-sitting-in-a-tree/ google is your friend -igor On Mon, Jun 23, 2008 at 8:24 AM, [EMAIL PROTECTED] wrote: Hello ! We are using a JSP-based content management system for navigation, page layout etc. Now we're evaluating Wicket as our

Re: Invisible fields in wicket

2008-06-23 Thread andresc
Thanks Igor, I'll try it out igor.vaynberg wrote: see component.setOutputMarkupPlaceHolderTag(true). that should cure your ailment. -igor -- View this message in context: http://www.nabble.com/Invisible-fields-in-wicket-tp18069101p18073249.html Sent from the Wicket - User mailing

RE: Session end method

2008-06-23 Thread Zappaterrini, Larry
Say for instance the session contains a resource such as a database connection or a thread (Eyal's original question) that needs to be freed when the session is invalidated. Is there (or should there) be a more intuitive way to handle this use case than Nino's solution of providing a custom

Re: Session end method

2008-06-23 Thread Igor Vaynberg
well. a session cannot contain a thing like a thread or a database connection because everything in session must be serializable. -igor On Mon, Jun 23, 2008 at 10:14 AM, Zappaterrini, Larry [EMAIL PROTECTED] wrote: Say for instance the session contains a resource such as a database connection

RE: Session end method

2008-06-23 Thread Zappaterrini, Larry
Sorry, contains was too strong of a word. Let's say when the session is invalidated that a heavyweight object contained in a global repository must be freed. Come to think of it, even something as simple as logging information about the session when it is invalidated fits this description.

Re: Session end method

2008-06-23 Thread Igor Vaynberg
it is impossible to have this method on Session. session is stored within httpsession and like i said, when that times out you can no longer access its attributes - eg the Session object. if you want to know when a session times out add httpsessionlistener to your webapp. -igor On Mon, Jun 23,

Re: Invisible fields in wicket

2008-06-23 Thread andresc
Thanks a lot, Igor. It worked really great! igor.vaynberg wrote: see component.setOutputMarkupPlaceHolderTag(true). that should cure your ailment. -igor -- View this message in context: http://www.nabble.com/Invisible-fields-in-wicket-tp18069101p18074714.html Sent from the Wicket -

PageableListView and Detachable Models

2008-06-23 Thread Jürgen Lind
Hi, I a currently a bit stuck in dealing with a PageableListView and a detachable model. I have build my own model that wraps a list of search results that should exists as long as the page remains the same, i.e. across all requests that go to the same page such as for navigation or sort

Re: PageableListView and Detachable Models

2008-06-23 Thread Igor Vaynberg
detach() is indeed called in the end of every request. what exactly is your requirement? you want to run the query once, upon page entry, and then always reuse the same resultset without doing another query? in that case store the list of ids in your resultset as a property of the page. the model

howto query which domain?

2008-06-23 Thread Nino Saturnino Martinez Vazquez Wael
Hi I have a vhost which has several serveraliases, how can I check for which one is being triggered? Something like this: if serveralias=myalias then{ RequestHeadder add domain myalias } I've tried location, but it does not seem to be the thing.. -- -Wicket for love Nino Martinez Wael

What is DateTextFields Max and Min date or range?

2008-06-23 Thread taygolf
Hey guys I have been looking and I wanted to know what the DateTextField max and min dates were. so if my user wanted to click back to say December 1950 could they? I know it is not very practical and I do not think this will happen but I wanted to see how far back they could go and how far ahead

relative location for css/javascript

2008-06-23 Thread okrohne
Hi, I place my html files and css/javascript in different folders under the web root dir: /pages /templates /css /javascript /images I use this structure outside the java packages as we use Adobe GoLive for designing the pages. I followed the Wiki suggestions to add resource folders and to use

Re: PageableListView and Detachable Models

2008-06-23 Thread Jürgen Lind
Hi Igor, thanks for your reply. Igor Vaynberg wrote: detach() is indeed called in the end of every request. what exactly is your requirement? you want to run the query once, upon page entry, and then always reuse the same resultset without doing another query? This is indeed what I would

DropDownChoice setting other DropDownChoice using AJAX results in null at submit

2008-06-23 Thread Giuliano Caliari
Hello, I have a page in which there are 2 DropDownChoices. Both have to be set with an initial value. The first DDC called mapCategory is populated from a simple List. The second DDC, chosenArmy is populated by a List of objects (Army) that can change, based on the value of the first DDC and

Re: PageableListView and Detachable Models

2008-06-23 Thread Jürgen Lind
Hi, I am still a bit confused about one thing in the remark below: how can the model of the list view return the required items? Should not the model be unaware that it is used by a list view? J. in that case store the list of ids in your resultset as a property of the page. the model of the

render PageParameters

2008-06-23 Thread Scott Swank
Is there code available to me to generate the the http get parameter string that corresponds to a PageParameters instance? I am generating links from our confirmation e-mail back to bookmarkable pages in our application. Thank you, Scott

Re: PageableListView and Detachable Models

2008-06-23 Thread Igor Vaynberg
the model can be aware that it is used by the listview. the separation here is that the listview is unaware of where or how its list is built. for database stuff i prefer using dataview, it has database semantics more closely built into it. -igor On Mon, Jun 23, 2008 at 1:55 PM, Jürgen Lind

Re: PageableListView and Detachable Models

2008-06-23 Thread Jürgen Lind
Ok, but since I pass the model into the constructor of the listview, how is the model informed which part of the data to load? Is there a method that I have been missing? J. Igor Vaynberg wrote: the model can be aware that it is used by the listview. the separation here is that the listview is

Re: PageableListView and Detachable Models

2008-06-23 Thread Igor Vaynberg
well, thats part of the problem with listview :) see idataprovider and dataview if you do want to use listview then you have to implement your own List interface that loads windows of data at a time depending on which get(index) is used. -igor On Mon, Jun 23, 2008 at 2:16 PM, Jürgen Lind

SubmitLink enter listener

2008-06-23 Thread Mathias P.W Nilsson
Hi! How can I get SubmitLink , AjaxSubmitLink and preferrably Link, AjaxLink to respond to enter? I'd hoped that submit did this but maybe this requires javascript? -- View this message in context: http://www.nabble.com/SubmitLink-enter-listener-tp18078769p18078769.html Sent from the Wicket -

Re: render PageParameters

2008-06-23 Thread Jeremy Thomerson
You could do something like: WebRequestEncoder encoder = new WebRequestEncoder(new AppendingStringBuffer(your-url)); for (Iterator it = parameters.entrySet().iterator(); it.hasNext(); ) { Entry entry = (Entry) it.next(); encoder.addValue((String)

Google friendly urls

2008-06-23 Thread Mathias P.W Nilsson
Hi! I'm trying to get my wicket urls to work with google spiders. Right now I have the ?wicket:interface=:1 and I was just wondering. Do I have to use PageParameters to get urls like ?Brand=34 I now pass objects to a pages constructor. Thanks Like ListItemFilter filters = new

Re: SubmitLink enter listener

2008-06-23 Thread Igor Vaynberg
form.setdefaultbutton(link) -igor On Mon, Jun 23, 2008 at 2:21 PM, Mathias P.W Nilsson [EMAIL PROTECTED] wrote: Hi! How can I get SubmitLink , AjaxSubmitLink and preferrably Link, AjaxLink to respond to enter? I'd hoped that submit did this but maybe this requires javascript? -- View

Re: SubmitLink enter listener

2008-06-23 Thread Mathias P.W Nilsson
Ahh thanks. :) -- View this message in context: http://www.nabble.com/SubmitLink-enter-listener-tp18078769p18079153.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL

Re: Google friendly urls

2008-06-23 Thread Igor Vaynberg
setResponsePage( new ItemPage( filters ) ) ; that wont work because it does not generate a bookmarkable url. you have to encode filters in pageparameters and use bookmarkable page links, such as: add(new bookmarkablepagelink(ItemPage.class, filtersPageParameters)); you can also use

Re: render PageParameters

2008-06-23 Thread Scott Swank
That should do it. Thank you Jeremy. On Mon, Jun 23, 2008 at 2:29 PM, Jeremy Thomerson [EMAIL PROTECTED] wrote: You could do something like: WebRequestEncoder encoder = new WebRequestEncoder(new AppendingStringBuffer(your-url)); for (Iterator it =

Re: Google friendly urls

2008-06-23 Thread Mathias P.W Nilsson
Thanks! But this you meen I need to check for every parameter that could be excepted. @SuppressWarnings( unchecked ) public ItemInterceptor( PageParameters parameters ){ filters = new LinkedListItemFilter(); Sort sort =

Re: Google friendly urls

2008-06-23 Thread Igor Vaynberg
pretty much. once you have to go this route you lose wicket's automagic state management ability and have to marshal objects to url and back yourself like you would in struts, etc. -igor On Mon, Jun 23, 2008 at 3:22 PM, Mathias P.W Nilsson [EMAIL PROTECTED] wrote: Thanks! But this you meen I

Re: Google friendly urls

2008-06-23 Thread Mathias P.W Nilsson
Ok thanks. So If I need a google friendly website I need to go with the parsing of PageParameters. That makes sense of course. -- View this message in context: http://www.nabble.com/Google-friendly-urls-tp18079064p18079925.html Sent from the Wicket - User mailing list archive at Nabble.com.

Re: Google friendly urls

2008-06-23 Thread Jeremy Thomerson
Of course, you can make your code below significantly smaller by doing something like (I haven't checked this code for 100% accuracy): Long brandId = params.getLong(brand) if (StringUtils.isEmpty(brandId) == false) { brand = yourDao.getBrand(brandId); } You get the point - remove the big loop

How to create a cacheable image resource for a image file?

2008-06-23 Thread Justin Morgan - Logic Sector
In my web app there are a bunch of static image files that live outside the WAR in various places on the host's file system (also outside the purview of the httpd server too). To serve up these images within my Wicket app, I've been reading their bytes via a File object and returning

Re: How to create a cacheable image resource for a image file?

2008-06-23 Thread Jeremy Thomerson
I'm pretty sure you'll find an answer in the archives. For instance, there's a bunch of suggestions here: http://www.nabble.com/Image-from-resource-outside-tomcat-container-to17276444.html#a17276444 -- Jeremy Thomerson http://www.wickettraining.com On Mon, Jun 23, 2008 at 7:04 PM, Justin

Re: DropDownChoice setting other DropDownChoice using AJAX results in null at submit

2008-06-23 Thread Timo Rantalaiho
On Mon, 23 Jun 2008, Giuliano Caliari wrote: When the user sets the value on the first DDC, the value of the second DDC is set without problems, even the selected value is set correctly. The problem is that if the user changes the value on the first DDC (mapCategory) and then submits, the

generics

2008-06-23 Thread Igor Vaynberg
development of the 1.4 branch has been quiet lately, this is because the core team has been busy working on an alternative way of generifiing the framework. an early result of that effort can be found here [1]. The key difference in [1] is that we have decoupled the component from the type of the