Re: after render using a behavior vs. override in the component

2008-05-18 Thread Eyal Golan
ok. But, looking at the Javadoc, this is what I see: In AbstractBehavior: /** * Called when a component that has this behavior coupled was rendered. * * @param component *the component that has this behavior coupled */ public void onRendered(Component

Re: after render using a behavior vs. override in the component

2008-05-18 Thread Johan Compagner
No no bug just java doc isnt clear enough i guess, but it is not really wrong.. What is after render? Both are true, both are called after the component is rendered only one a bit later then the other. I guess the javadoc of the component should state that this is after the page is rendered On

Re: after render using a behavior vs. override in the component

2008-05-18 Thread Eyal Golan
Thanks. :) On Sun, May 18, 2008 at 10:08 AM, Johan Compagner [EMAIL PROTECTED] wrote: No no bug just java doc isnt clear enough i guess, but it is not really wrong.. What is after render? Both are true, both are called after the component is rendered only one a bit later then the other. I

Re: Using ResourceReference in osgi bundle

2008-05-18 Thread Johan Compagner
Did you impl your own classresolver so that the class can be resolved correctly? What is the url and should the class come from a bundle? Then you have to make sure that wicket finds your class On 5/17/08, james yong [EMAIL PROTECTED] wrote: Hi, I have a javascript file inside a osgi bundle.

Re: Wicket java.lang.IllegalAccessError bug?

2008-05-18 Thread Johan Compagner
I have no idea what could cause that suddenly in 1.4 Maybe something that java 5 source compiler does? But a simple if works fine? On 5/17/08, Martin Makundi [EMAIL PROTECTED] wrote: Hi! I just upgraded from 1.3.1 to 1.4-m1 and I received the strangest of errors. Has anyone had the same

Re: Wicket java.lang.IllegalAccessError bug?

2008-05-18 Thread Martin Makundi
Yap. If you rephrase it into ifs (or change ternary false state into true) it works fine. ** Martin 2008/5/18 Johan Compagner [EMAIL PROTECTED]: I have no idea what could cause that suddenly in 1.4 Maybe something that java 5 source compiler does? But a simple if works fine? On 5/17/08,

Re: IChoiceRenderer: RadioGroup CheckBoxMultipleChoice

2008-05-18 Thread Johan Compagner
Isnt the value used by us already?? To know what checkbox/radio is selected? On 5/16/08, Hoover, William [EMAIL PROTECTED] wrote: It could be left as is and use the display value as expected (i.e. input type=checkbox id=ID_VALUE value=DISPLAY_VALUE /). Another option would be to have an

Restarting applications with Guice

2008-05-18 Thread Uwe Schäfer
hi if there is anyone suffering from https://issues.apache.org/jira/browse/WICKET-1403 , i added a quick hack to make it possible to restart the server while persisting the application´s state. not a final solution, but it works for now and makes the development cycle much faster (for me)

Re: Controlling PagingNavigation

2008-05-18 Thread Mathias P.W Nilsson
Thanks alot! This just hides the first and last link. I want to add the prev, next if the first or last is selected. -- View this message in context: http://www.nabble.com/Controlling-PagingNavigation-tp17290391p17300634.html Sent from the Wicket - User mailing list archive at Nabble.com.

Re: Controlling PagingNavigation

2008-05-18 Thread Eyal Golan
Hi Jeremy, I did something similar to what you have suggested and it works just fine. The difference is that I had to use a Navigation as well. If I try overriding newPagingNavigationLink in my Paging*Navigator*, the before and after markups are not added. Instead, I also created a class that

Re: Controlling PagingNavigation

2008-05-18 Thread Mathias P.W Nilsson
I want to HIDE the prev, next if the first or last is selected. -- View this message in context: http://www.nabble.com/Controlling-PagingNavigation-tp17290391p17301483.html Sent from the Wicket - User mailing list archive at Nabble.com.

Page pooling (for stateless pages)

2008-05-18 Thread Joel Halbert
Hi, I was wondering whether it was possible to implement pooling of stateless pages? Possibly using a custom PageMap implementation? Although newer JVM's are good at performing GC, pooling is a reasonable additional technique to use for achieving that extra bit of scalability. If anyone has

Re: Page pooling (for stateless pages)

2008-05-18 Thread Matej Knopp
Hi, first of all, I don't really think it's worth pooling pages. I can't imagine that page instance creation would have that much overhead. Also stateless pages doesn't mean they don't contain any state. The page is stateless because it's not kept between requests, but during request there's lot

Re: Page pooling (for stateless pages)

2008-05-18 Thread Johan Compagner
For stateless pages?? The whole point of stateless is that they arent kept in the session/memory. And pooling pages is not really what you want any way, you can only pool then for a single user/sessiion so you would have a pool for every session. And when do you decide to return a pooled page?

Re: Page pooling (for stateless pages)

2008-05-18 Thread Johan Compagner
For stateless pages?? The whole point of stateless is that they arent kept in the session/memory. And pooling pages is not really what you want any way, you can only pool then for a single user/sessiion so you would have a pool for every session. And when do you decide to return a pooled page?

Re: Page pooling (for stateless pages)

2008-05-18 Thread Joel Halbert
Johan, Although the pages are stateless, they can still be pooled, and re-initialised (their state cleared out) between requests. This is indeed what many java servlet containers do with stateless Servlets. It is also the a technique used by Tapestry 5 to achieve greater scalability. Rgs,

Re: Page pooling (for stateless pages)

2008-05-18 Thread Joel Halbert
The overhead incurred would of course depend on the number or requests the app was receiving, the amount of available memory and the efficiency of the chosen GC algorithm. I agree that object creation and collection is relatively efficient these days, but pooling still makes sense where it can

Re: Page pooling (for stateless pages)

2008-05-18 Thread Martijn Dashorst
We are not tapestry 5. :D Seriously: page pooling is not good for scalabity. You need to apply locks to prevent multiple threads to access the same instance, etc. There is a whole lot of additional stuff you need to make this work, adding complexity for little or quite possibly no gain at all.

Re: Page pooling (for stateless pages)

2008-05-18 Thread Joel Halbert
I would agree it's not always going to give much mileage. Given that there is no heavy weight initialization going on with pages I would tend to agree. The JVM should be able to cope with many 10's of thousands of objects created destroyed per sec, more or less system dependent, so long as

Re: Page pooling (for stateless pages)

2008-05-18 Thread Martijn Dashorst
I agree with Johan. Stateless in Wicket sense means that we don't keep the page in memory but recreate it from scratch. This means that we don't roll back state. Pooling requires us (the framework or the users) to rollback any state that was accumulated during rendering. This is really not an

Re: Page pooling (for stateless pages)

2008-05-18 Thread James Carman
If you were to add in pooling, you'd have to either provide a new hook (new lifecycle method) or a warning to the user (as you mentioned) that they have to rollback the state themselves after rendering using onAfterRender() or something. On Sun, May 18, 2008 at 8:23 AM, Martijn Dashorst [EMAIL

@SpringBean annotation

2008-05-18 Thread Stephan Koch
Hi all, I try to use the @SpringBean annotation in a class derived from LoadableDetachableModel. For whatever reason, the bean is not injected into my property, which will always be null. However, I can do MyApplication myApp = (MyApplication) Application.get(); myApp.getMySpringBeanRef()

Re: @SpringBean annotation

2008-05-18 Thread Martijn Dashorst
On 5/18/08, Stephan Koch [EMAIL PROTECTED] wrote: I have to admit that I don't know how the property injection via @SpringBean really works, if someone could elaborate on this I'd be grateful. I assume you have read this: http://cwiki.apache.org/WICKET/spring.html In it, just before the

Re: @SpringBean annotation

2008-05-18 Thread James Carman
@SpringBean only works on Components, since it uses a ComponentInstantiationListener. On Sun, May 18, 2008 at 8:54 AM, Stephan Koch [EMAIL PROTECTED] wrote: Hi all, I try to use the @SpringBean annotation in a class derived from LoadableDetachableModel. For whatever reason, the bean is not

Re: @SpringBean annotation

2008-05-18 Thread James Carman
And, this injection stuff could be yet another aspect that would be in wicket-aspects! It would be annotation-based, of course. On Sun, May 18, 2008 at 9:07 AM, Martijn Dashorst [EMAIL PROTECTED] wrote: On 5/18/08, Stephan Koch [EMAIL PROTECTED] wrote: I have to admit that I don't know how

Re: Thread safety for components

2008-05-18 Thread Johan Compagner
Accessing pages in other threads then the request thread is very bad idea. Because http session object shouldnt be touched between requests, you have no idea what the container does with your page/session. Store it on disc, replicate it to other nodes. If you want to do stuff in background

Re: Thread safety for components

2008-05-18 Thread James Carman
It may even re-use the actual session object instance for another person's session (by filling it with their stuff). On Sun, May 18, 2008 at 9:12 AM, Johan Compagner [EMAIL PROTECTED] wrote: Accessing pages in other threads then the request thread is very bad idea. Because http session object

Re: IChoiceRenderer: RadioGroup CheckBoxMultipleChoice

2008-05-18 Thread Igor Vaynberg
it is used for radios, for checkbox its on if checkedand no requestparam at all if its not. at least thats what i remember from the dark ages -igor On Sun, May 18, 2008 at 12:59 AM, Johan Compagner [EMAIL PROTECTED] wrote: Isnt the value used by us already?? To know what checkbox/radio is

Re: Select a directory in a textfield

2008-05-18 Thread Oncle Zebulon
Hi, On a form, i have a field that represents a directory (c:\mydirectory for example) and then store the information. It's a local directory. jwcarman wrote: A directory where? On the client machine? What will you do with that directory when you've selected it? On Fri, May 16, 2008

Re: @SpringBean annotation

2008-05-18 Thread Stephan Koch
martijn, james: thanks for the help! works like a charm now... -stephan Martijn Dashorst wrote: On 5/18/08, Stephan Koch [EMAIL PROTECTED] wrote: I have to admit that I don't know how the property injection via @SpringBean really works, if someone could elaborate on this I'd be grateful.

Text handling in wicket

2008-05-18 Thread Mathias P.W Nilsson
Hi! I have a lot of pages that have text description. ( Many lines of text) It can have css markup in with bold, color etc. My problem is that the site is implemented in many languages. How do you handle this? -- View this message in context:

Re: Page pooling (for stateless pages)

2008-05-18 Thread Igor Vaynberg
do you have a benchmark that shows that pooling is indeed faster? servlets are pooled because they may require heavy initialization. wicket pages are much more lightweight in comparison. -igor On Sun, May 18, 2008 at 4:36 AM, Joel Halbert [EMAIL PROTECTED] wrote: Johan, Although the pages

Re: @SpringBean annotation

2008-05-18 Thread James Carman
Martin did all the help. I just pointed out why it doesn't work! :) On Sun, May 18, 2008 at 9:34 AM, Stephan Koch [EMAIL PROTECTED] wrote: martijn, james: thanks for the help! works like a charm now... -stephan Martijn Dashorst wrote: On 5/18/08, Stephan Koch [EMAIL PROTECTED] wrote:

Re: Page pooling (for stateless pages)

2008-05-18 Thread James Carman
On Sun, May 18, 2008 at 9:47 AM, Igor Vaynberg [EMAIL PROTECTED] wrote: do you have a benchmark that shows that pooling is indeed faster? servlets are pooled because they may require heavy initialization. wicket pages are much more lightweight in comparison. And, the more heavyweight you make

Re: Select a directory in a textfield

2008-05-18 Thread James Carman
So, what do you plan to do with that directory once you collect it? On Sun, May 18, 2008 at 9:28 AM, Oncle Zebulon [EMAIL PROTECTED] wrote: Hi, On a form, i have a field that represents a directory (c:\mydirectory for example) and then store the information. It's a local directory.

Re: Text handling in wicket

2008-05-18 Thread greeklinux
Hello, do you look at the localization/i18n support from wicket? Mathias P.W Nilsson wrote: Hi! I have a lot of pages that have text description. ( Many lines of text) It can have css markup in with bold, color etc. My problem is that the site is implemented in many languages. How

Re: Text handling in wicket

2008-05-18 Thread Maurice Marrink
http://cwiki.apache.org/WICKET/i18n.html Maurice On Sun, May 18, 2008 at 3:35 PM, Mathias P.W Nilsson [EMAIL PROTECTED] wrote: Hi! I have a lot of pages that have text description. ( Many lines of text) It can have css markup in with bold, color etc. My problem is that the site is

Re: Need Help

2008-05-18 Thread Gwyn Evans
At a guess, the m1 quickstart's not been genericised... If you're getting started, I'd suggest sticking to a release 1.3 version, as 1.4-m1 is just a milestone against a moving target not a good starting point if new to Wicket. /Gwyn On Sat, May 17, 2008 at 6:24 PM, Depak Shidu [EMAIL

filter for data in security layer

2008-05-18 Thread Andrea Jahn
Hi, in our application locations are administered. A user has only rights on some of the locations, e.g. Munich, Berlin. He should be able to select one of the allowed locations in a selection box. Then on the different pages all data are depending on the actually selected location. For

Re: Page pooling (for stateless pages)

2008-05-18 Thread Eelco Hillenius
I was wondering whether it was possible to implement pooling of stateless pages? Possibly using a custom PageMap implementation? I think you can just implement the pooling mechanism yourself, and provide a custom version of IPageFactory (which is to be set in session settings). Although

Re: Text handling in wicket

2008-05-18 Thread Mathias P.W Nilsson
Yes, I have looked at it. Imaging this text Here are some long description * and it goes on and onthe bold text and on and on.. How do we handle the * and the bold text using i18n? -- View this message in context: http://www.nabble.com/Text-handling-in-wicket-tp17303050p17305344.html

Re: filter for data in security layer

2008-05-18 Thread Igor Vaynberg
something like this should probably be filter inside the database not by some external filter which forces you to load the entire dataset. -igor On Sun, May 18, 2008 at 9:39 AM, Andrea Jahn [EMAIL PROTECTED] wrote: Hi, in our application locations are administered. A user has only rights

Re: Text handling in wicket

2008-05-18 Thread Igor Vaynberg
call setescapemodelstrings(false) and wicket will not escape markup when outputting it. so if your i18n resources contain html it will be output as is. -igor On Sun, May 18, 2008 at 10:17 AM, Mathias P.W Nilsson [EMAIL PROTECTED] wrote: Yes, I have looked at it. Imaging this text Here are

Re: Text handling in wicket

2008-05-18 Thread Mathias P.W Nilsson
Doesn't this meen that if I use a class for css or id then I need to consider, html file, property file and css file. So If a designer changes the css then I need to change the property file as well. Is this really good? -- View this message in context:

Re: Text handling in wicket

2008-05-18 Thread Igor Vaynberg
i dont really understand what you are talking about -igor On Sun, May 18, 2008 at 11:25 AM, Mathias P.W Nilsson [EMAIL PROTECTED] wrote: Doesn't this meen that if I use a class for css or id then I need to consider, html file, property file and css file. So If a designer changes the css then

Re: Text handling in wicket

2008-05-18 Thread Matthew Young
He is probably talking about if resource string is html code, then there can be css class string in there like this: resource-string-x=This is span class=stand-outsomething something/span and span class=another-classsomething something/span. He is worry that if the designer change the class name

Re: Text handling in wicket

2008-05-18 Thread Mathias P.W Nilsson
Sorry for my poor english. What I meen is separation of concerns. Let's say I have html in my property file . like ( span style, or class ) for styling a certain phrase. Is this a good approach? When a designer wants to maybe change or delete a certain style he/she needs to look into the css

Re: Text handling in wicket

2008-05-18 Thread Igor Vaynberg
so use some variable substitution to construct the messages, you are free to use any kind of mechanism you want in wicket. the whole thing is pluggable. personally, if the css class changes just search and replace across the property files... -igor On Sun, May 18, 2008 at 12:43 PM, Matthew

Re: Text handling in wicket

2008-05-18 Thread Mathias P.W Nilsson
A late reply. Exactly like MYoung described it. -- View this message in context: http://www.nabble.com/Text-handling-in-wicket-tp17303050p17306976.html Sent from the Wicket - User mailing list archive at Nabble.com. - To

Re: Text handling in wicket

2008-05-18 Thread Igor Vaynberg
if you have a better way of doing this then i am all ears -igor On Sun, May 18, 2008 at 12:47 PM, Mathias P.W Nilsson [EMAIL PROTECTED] wrote: A late reply. Exactly like MYoung described it. -- View this message in context:

Re: Text handling in wicket

2008-05-18 Thread Mathias P.W Nilsson
No, I don't. Thanks for your replies. I will use what you suggested. Thanks. -- View this message in context: http://www.nabble.com/Text-handling-in-wicket-tp17303050p17307148.html Sent from the Wicket - User mailing list archive at Nabble.com.

Re: Text handling in wicket

2008-05-18 Thread Igor Vaynberg
you can install your own IStringResourceLoader that does variable substitution on the fly. it is a bit of work, not sure if it is worth it though. -igor On Sun, May 18, 2008 at 1:04 PM, Mathias P.W Nilsson [EMAIL PROTECTED] wrote: No, I don't. Thanks for your replies. I will use what you

Re: Page pooling (for stateless pages)

2008-05-18 Thread Jonathan Locke
Yes. That's what I would do. Build your application (or better yet build a quick prototype to test your scalability) simply and then profile it. If there are any hotspots, look at them then. Ayodeji Aladejebi wrote: Why do ppl really like doing extra work trying to help Wicket? For me,

Re: filter for data in security layer

2008-05-18 Thread Maurice Marrink
On Sun, May 18, 2008 at 7:26 PM, Igor Vaynberg [EMAIL PROTECTED] wrote: something like this should probably be filter inside the database not by some external filter which forces you to load the entire dataset. No that would be foolish, but that wasn't suggested. -igor On Sun, May 18, 2008

Wicket 1.4 generics question

2008-05-18 Thread Frits Jalvingh
Hello there, I'm a Wicket Virgin (hm ;-) and have just started to look at Wicket 1.4. It seems something is wrong with the generics changes there. I have a page which itself has a model: a CompoundPropertyModelSomeClass. Most basic Wicket components are generic: things like Label need a type

Re: Wicket 1.4 generics question

2008-05-18 Thread Igor Vaynberg
page was not yet generified in m1, which is what i assume you are using. 1.4m2 will be out shortly where this has been corrected, and you can always use a snapshot. -igor On Sun, May 18, 2008 at 3:14 PM, Frits Jalvingh [EMAIL PROTECTED] wrote: Hello there, I'm a Wicket Virgin (hm ;-) and

RE: How to reset the feedback panel

2008-05-18 Thread Michael Mehrle
This works - thanks a lot. BTW, was the JIRA request directed to me? Michael -Original Message- From: Eelco Hillenius [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 13, 2008 6:51 PM To: users@wicket.apache.org Subject: Re: How to reset the feedback panel In 1.3 and up (so this won't work

Re: How to reset the feedback panel

2008-05-18 Thread Eelco Hillenius
On Sun, May 18, 2008 at 6:15 PM, Michael Mehrle [EMAIL PROTECTED] wrote: This works - thanks a lot. Cool. BTW, was the JIRA request directed to me? Yes please. Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For

Re: Thread safety for components

2008-05-18 Thread Michael Allan
Brill Pappin wrote: ... So non-Wicket threads cannot generally access pages, components, models, and so forth - not safely. True? I was trying to think of a use-case for that problem... Do you have a specific use-case or is that just a potential issue you can think of? I'm thinking

Re: Need Help

2008-05-18 Thread Erik van Oosten
Try to set the compiler version (as described on http://wicket.apache.org/quickstart.html). I am not sure this is your problem. Regards, Erik. Depak Shidu wrote: i try wicket 4.1-m1 maven using mvn archetype:create -DarchetypeGroupId=org.apache.wicket

Re: Page pooling (for stateless pages)

2008-05-18 Thread Erik van Oosten
Hello, I think it would probably make more sense to cache the /result/ of stateless pages. Regards, Erik. Joel Halbert wrote: Hi, I was wondering whether it was possible to implement pooling of stateless pages? Possibly using a custom PageMap implementation? Although newer JVM's

Re: Account Activation Email generation and response processing: any design example?

2008-05-18 Thread Michael Allan
Sam Stainsby wrote: Martin Makundi wrote: The benefit in digest is that the user (or another user) cannot fabricate it... so easily. Just send a large random number ... no need for expensive hash operations. But use java.security.SecureRandom, not java.util.Random. -- Michael Allan

Re: Thread safety for components

2008-05-18 Thread Michael Allan
Brill Pappin wrote: I didn't know people were even following it :) Small town, :) I'm working on something similar. I can tell you now that I only *wish* we had used something like Wicket for LobbyThem... Ruby on Rails was the biggest mistake we made as I can attest to 8 months after the

Re: Account Activation Email generation and response processing: any design example?

2008-05-18 Thread Martin Makundi
If you use hash you do not need to store the random part into the db. Saves you some persistence trouble. 2008/5/19 Michael Allan [EMAIL PROTECTED]: Sam Stainsby wrote: Martin Makundi wrote: The benefit in digest is that the user (or another user) cannot fabricate it... so easily. Just

Re: Page pooling (for stateless pages)

2008-05-18 Thread Eelco Hillenius
I think it would probably make more sense to cache the /result/ of stateless pages. Yeah, that might make quite the difference. The best place for that would be a filter, probably defined before the Wicket filter. Tons of different options as well though. And definitively something I would only