Re: Two wicket apps

2008-11-20 Thread kan
Any ideas on it? Yet another question. In my admin application I want to have a link show client screens. The link must follow to the main site with a client already signed it (in other words the WebSession, but from different app is set to hold chosen client id). What is a way to do it? --

Re: Feature idea: sealed flag on MarkupContainer

2008-11-20 Thread Peter Ertl
Wouldn't it be more powerful to override / hook into the process of adding a component of a container? Something like that ... new WebMarkupContainer(id) { @Override public void onComponentAdd(Component child) { // check the sealed flag, decorate the child, throw exception, or do

page refresh cleans my page state

2008-11-20 Thread Singh Mukesh
Hi, I am using wicket. I have a page with one links which increase the counter value based on user click on the link, for all these actions I am using Ajax. For instance user click 5 times on link the counter shows value 5. It is ok but if I click on browsers refresh button all changes are

Re: page refresh cleans my page state

2008-11-20 Thread Ernesto Reinaldo Barreiro
store the value on the session? make it a static member variable or store it at application level? it all depends on what you want: the value to change independently for each user or be the same for all users... Ernesto On Thu, Nov 20, 2008 at 11:30 AM, Singh Mukesh [EMAIL PROTECTED] wrote:

Re: Wicket 1.3.5 behind a front-end proxy

2008-11-20 Thread Anton Veretennikov
Resolved. Hosting provider did something. Thank you all. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Generics changes in 1.4-rc1

2008-11-20 Thread aditsu
Hi, I've been using m3 for a while and just tried switching to rc1. I found several problems: - LabelTree.getNodeTextModel requires IModel and returns IModel. I was overriding it and returning a ModelString, but I can't do that anymore. Why not just return IModel? ? - RatingPanel now requires an

Re: Feature idea: sealed flag on MarkupContainer

2008-11-20 Thread John Krasnay
Yeah, I thought about that. The problem is add() is usually called from a component's constructor, so you would have a case of a constructor (indirectly) calling a non-final method, jk On Thu, Nov 20, 2008 at 11:27:39AM +0100, Peter Ertl wrote: Wouldn't it be more powerful to override / hook

Re: Feature idea: sealed flag on MarkupContainer

2008-11-20 Thread Peter Ertl
I was thinking about something like this: [warning, sketchy pseudo code will follow] method org.apache.wicket.MarkupContainer.add(Component... children) : - call empty overridable method onComponentAdd(Component child) for each component - add component protected void

RE: DateTimeField - changing the format of the date

2008-11-20 Thread Yazeed Isaacs
Hey guys Thanks for the help, but I found the solution. Its so easy. :D The DateTimeField class has a method called newDateTextField(PropertyModel model, String id). All that I did was override this method as follows: DateTimeField dateToField = new DateTimeField(dateToField, new

Display two modal windows in one request

2008-11-20 Thread Newgro
Hi *, i'm facing a problem i couldn't solve until now. Our base page contain an modal error window which is used to present the occurred error. Now i added a password request modal window on a page. If an error occurred after clicking the request button i would like to display the error window

Re: page refresh cleans my page state

2008-11-20 Thread jWeekend
Singh, Take a look at http://cwiki.apache.org/WICKET/url-coding-strategies.html HybridUrlCodingStrategy . Regards - Cemal http://www.jWeekend.co.uk http://jWeekend.co.uk Singh Mukesh wrote: Hi, I am using wicket. I have a page with one links which increase the counter value based

Re: Compoundpropertymodel with shadow map?

2008-11-20 Thread Francisco Diaz Trepat - gmail
why? simple is good. doesn't need to be complex. what part you dislike the most? f(t) On Thu, Nov 20, 2008 at 2:29 AM, Nino Saturnino Martinez Vazquez Wael [EMAIL PROTECTED] wrote: BTW this is a flawed approch.. We need something a little more intelligent.. I'll return on the subject..

Re: Validation Question

2008-11-20 Thread vishy_sb
Works like a charm Thanks a lot Cheers, vishy jWeekend wrote: Vishy, Add IConverter=Invalid Input to a properties file in, for example, MyApplication.properties for your whole application or in MyPage.properties if you want this custom message on a particular page only ...

Memory consumption per session

2008-11-20 Thread Ralf Siemon
Hi, we have recently launched our new Wicket-based website, and now we are experiencing that the memory consumption of the website is very high, so that it crashes the site regularly. When profiling the application server, we found out that there are HTTP sessions that consume up to 2 MB of

Re: Extremely confisung onBeforeRender/callOnBeforeRenderIfNotVisible behavior

2008-11-20 Thread Matej Knopp
That's first confusing point. Javadocs on callOnBeforeRenderIfNotVisible promise us that onBeforeRender will be called even if component is not visible, but it is a lie. Bad, bad javadoc! -Matej - To unsubscribe, e-mail:

Re: Memory consumption per session

2008-11-20 Thread Johan Compagner
200kb per session sounds very reasonable. Then you should be able to handle quite a lot of concurrent sessions. What kind of hardware do you use? On 11/20/08, Ralf Siemon [EMAIL PROTECTED] wrote: Hi, we have recently launched our new Wicket-based website, and now we are experiencing that

Re: Memory consumption per session

2008-11-20 Thread Jeremy Thomerson
That was only after he cut the listview sizes - problem is that his sessions are 2MB now. Still should support quite a few (1000 = 2GB), but there is probably a memory issue to address there. On Thu, Nov 20, 2008 at 9:20 AM, Johan Compagner [EMAIL PROTECTED]wrote: 200kb per session sounds very

Re: Memory consumption per session

2008-11-20 Thread Jeremy Thomerson
Your ListView instances must be holding on to domain objects. You should use LoadableDetachableModels so that the ListView doesn't hold on to references to objects. The most common memory issue is always that your components are holding on to objects directly or using Model, which holds the

Re: Generics changes in 1.4-rc1

2008-11-20 Thread Johan Compagner
Please make issues for this in jira On 11/20/08, aditsu [EMAIL PROTECTED] wrote: Hi, I've been using m3 for a while and just tried switching to rc1. I found several problems: - LabelTree.getNodeTextModel requires IModel and returns IModel. I was overriding it and returning a ModelString, but

Check a checkbox when focus on a textbox

2008-11-20 Thread vishy_sb
Hi all, I have a textbox and a checkbox in a form on my web page. I would like to automatically check the checkbox when the user starts to type something in the textbox. I believe this can be done by using some javascript. I did some research over the web and was able to find some code which is

Re: Memory consumption per session

2008-11-20 Thread Matej Knopp
200kb is quite a lot for page with listview with 50 entries (unless there's lot of other components). It's more likely that you don't detach something properly. Still, what are you hardware specs and number of concurrent users? -Matej On Thu, Nov 20, 2008 at 4:15 PM, Ralf Siemon [EMAIL

Re: Memory consumption per session

2008-11-20 Thread Johan Compagner
No if you really render 1000 rows (list items) in a list view ands those listitems have textfields or labels again then yes it could expand quite a lot But 1000 listems with maybe 4,5 components in each listitem then that will be 5000 components on just that page that will cost memory On

Re: Extremely confisung onBeforeRender/callOnBeforeRenderIfNotVisible behavior

2008-11-20 Thread Marat Radchenko
So. Is there any recommended (and hopefully not error-prone) way of handling conditional visibility? 2008/11/20 Matej Knopp [EMAIL PROTECTED]: That's first confusing point. Javadocs on callOnBeforeRenderIfNotVisible promise us that onBeforeRender will be called even if component is not

Re: Feature idea: sealed flag on MarkupContainer

2008-11-20 Thread 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 public void onComponentAdd(Component child) {

Re: Memory consumption per session

2008-11-20 Thread Igor Vaynberg
if you are planning on displaying 1000 rows per page, which is quiet uncommon for webapps, you should produce output as raw html instead of using listview and adding components inside. -igor On Thu, Nov 20, 2008 at 7:15 AM, Ralf Siemon [EMAIL PROTECTED] wrote: Hi, we have recently launched

Re: Extremely confisung onBeforeRender/callOnBeforeRenderIfNotVisible behavior

2008-11-20 Thread Igor Vaynberg
you havent actually described your usecase yet... -igor On Thu, Nov 20, 2008 at 7:33 AM, Marat Radchenko [EMAIL PROTECTED] wrote: So. Is there any recommended (and hopefully not error-prone) way of handling conditional visibility? 2008/11/20 Matej Knopp [EMAIL PROTECTED]: That's first

Re: Extremely confisung onBeforeRender/callOnBeforeRenderIfNotVisible behavior

2008-11-20 Thread Jeremy Thomerson
Like this? new YourComponent(id) { @Override public boolean isVisible() { return yourCondition; } } On Thu, Nov 20, 2008 at 9:33 AM, Marat Radchenko [EMAIL PROTECTED] wrote: So. Is there any recommended (and hopefully not error-prone) way of handling conditional

Re: Memory consumption per session

2008-11-20 Thread Sergey Didenko
BTW, is it easy to control what wicket stores in session? May be by patching wicket code? P.S. Sorry if the question is lame, I have just started studying wicket and I want to decide whether to use it in production. When profiling the application server, we found out that there are HTTP

Re: Memory consumption per session

2008-11-20 Thread Martin Makundi
What is the easiest way of embedding raw html (yes, it could/should use some xml dom which is included with wicket)? Is it possible, for example, to replace a wicket:container/ element on a panel with such raw dom content? ** Martin 2008/11/20 Igor Vaynberg [EMAIL PROTECTED]: if you are

Re: Extremely confisung onBeforeRender/callOnBeforeRenderIfNotVisible behavior

2008-11-20 Thread Marat Radchenko
That's bad because isVisible is invoked many times (50+ sometimes) per request so no complex logic can be put there. 2008/11/20 Jeremy Thomerson [EMAIL PROTECTED]: Like this? new YourComponent(id) { @Override public boolean isVisible() { return yourCondition; } } On Thu,

Re: Extremely confisung onBeforeRender/callOnBeforeRenderIfNotVisible behavior

2008-11-20 Thread Marat Radchenko
I'm trying to choose strategy for handling conditional component visibility (and we have complex tree where many components are conditionally visible). Overriding isVisible is bad, because many calls. overriding onBeforeRender and callOnBeforeRender is bad, because children visibility is

Re: Memory consumption per session

2008-11-20 Thread Martijn Dashorst
add(new Label(raw, h1Foo/h1).setEscapeModelStrings(false)); On Thu, Nov 20, 2008 at 5:00 PM, Martin Makundi [EMAIL PROTECTED] wrote: What is the easiest way of embedding raw html (yes, it could/should use some xml dom which is included with wicket)? Is it possible, for example, to replace a

Re: Memory consumption per session

2008-11-20 Thread Martin Makundi
What is the out-of-the-box xml dom generator for wicket, if I wanted to use such tool for generating the html structure? ** Martin 2008/11/20 Martijn Dashorst [EMAIL PROTECTED]: add(new Label(raw, h1Foo/h1).setEscapeModelStrings(false)); On Thu, Nov 20, 2008 at 5:00 PM, Martin Makundi [EMAIL

Re: Extremely confisung onBeforeRender/callOnBeforeRenderIfNotVisible behavior

2008-11-20 Thread Igor Vaynberg
i still dont see a concrete usecase -igor On Thu, Nov 20, 2008 at 8:04 AM, Marat Radchenko [EMAIL PROTECTED] wrote: I'm trying to choose strategy for handling conditional component visibility (and we have complex tree where many components are conditionally visible). Overriding isVisible is

Open FAQ/wiki somewhere?

2008-11-20 Thread Casper Bang
In Wicket in Action it's mentioned briefly how one could use a SimpleAttributeModifier to limit the text length of an input, by binding to a JPA @Column annotation and its length attribute. This sounds nice DRY to me (albeit perhaps a bit expensive?!) so I gave it a try: protected String

Re: Feature idea: sealed flag on MarkupContainer

2008-11-20 Thread Peter Ertl
for SubPanel the ctor is called that order - - Panel - BasePanel - SubPanel so the fields will be initialized, eh?! Am 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) {

Re: Open FAQ/wiki somewhere?

2008-11-20 Thread Michael O'Cleirigh
Hi Casper, Have you seen the reference library documentation on the main wiki: http://cwiki.apache.org/WICKET/reference-library.html Any one can create an account and then edit the wiki pages. Mike In Wicket in Action it's mentioned briefly how one could use a SimpleAttributeModifier to

Re: Open FAQ/wiki somewhere?

2008-11-20 Thread jWeekend
Casper, Something like http://cwiki.apache.org/WICKET/how-to-do-things-in-wicket.html this ? Regards - Cemal http://www.jWeekend.co.uk http://jWeekend.co.uk Casper Bang wrote: In Wicket in Action it's mentioned briefly how one could use a SimpleAttributeModifier to limit the text

Re: Feature idea: sealed flag on MarkupContainer

2008-11-20 Thread John Krasnay
On Thu, Nov 20, 2008 at 07:18:11PM +0100, Peter Ertl wrote: for SubPanel the ctor is called that order - - Panel - BasePanel calls MarkupContainer.add() calls SubPanel.onComponentAdd() (before SubPanel ctor!) - SubPanel so the fields will be initialized, eh?! Am

Re: Memory consumption per session

2008-11-20 Thread Cristiano Kliemann
Ralf, If you want to discard the generated text after rendering, you may use a detachable model, like LoadableDetachableModel: IModel model = new LoadableDetachableModel() { public Object load() { return generateMyHTML(); } } add(new Label(raw,

Re: Open FAQ/wiki somewhere?

2008-11-20 Thread Casper Bang
Oh wow, that's a virtual gold mine. Thanks!. /Casper jWeekend wrote: Casper, Something like http://cwiki.apache.org/WICKET/how-to-do-things-in-wicket.html this ? Regards - Cemal http://www.jWeekend.co.uk http://jWeekend.co.uk Casper Bang wrote: In Wicket in Action it's

Re: Extremely confisung onBeforeRender/callOnBeforeRenderIfNotVisible behavior

2008-11-20 Thread Matej Knopp
private Boolean visible = null; public boolean isVisible() { if (visible == null) { visible = [ put your complicated logic here]; } return visible; } public void onDetach() { super.onDetach(); visible = null; } What's wrong with this? -Matej On Thu, Nov 20, 2008 at 5:04 PM,

Re: Invalid URLPatternSpec for Ajax Calls in Wicket Portlet

2008-11-20 Thread krisNog
which portlet 2 patch are you referring to? Where is it available? Thanks Thijs wrote: But does it also have a problem if it's running a standalone wicket application? Btw I've run wicket portlets (with the portlet 2 patch) in Glassfish open portal portlet container(v. rc2 then) and

Re: Compoundpropertymodel with shadow map?

2008-11-20 Thread Nino Saturnino Martinez Vazquez Wael
I love simple and simple is good. But this approach has issues with hibernate if your hibernate sessions are per request and your shadowmodel lives in multiple requests and your entities has references to other entities for example 1..* etc ... In simple use cases, and possibly also when not

Re: Invalid URLPatternSpec for Ajax Calls in Wicket Portlet

2008-11-20 Thread Thijs Vonk
https://issues.apache.org/jira/browse/WICKET-1620 (Though it's still a work in process) and not yet supported by the wicket core committers On 11/20/08 9:17 PM, krisNog wrote: which portlet 2 patch are you referring to? Where is it available? Thanks Thijs wrote: But does it also have

Properties file

2008-11-20 Thread landry soules
Hello, i have a question about properties files : I want to access several variables residing in a property file, from various components of my application. What is the best way to achieve this trivial need ? Do you guys use Commons Configuration, or another api ? How do you configure it to

Re: Compoundpropertymodel with shadow map?

2008-11-20 Thread Francisco Diaz Trepat - gmail
Don't know, but LOL. This might be an instancing issue in which special handling is good for this scenario but seems to be fine for most cases. And in a lazy TDD programming way it might be good enough. Although I know from blog and other threads that you look for greatness :-) and not just code

Re: Properties file

2008-11-20 Thread jWeekend
Landry, If your properties are application wide, create MyApplication.properties (assuming you called your WebApplication subclass MyApplication) in the same package as your MyApplication class and use getString if you have a Component (or subclass, like a Page) to talk to, otherwise use

Formatting dates in Inmethod DataGrid

2008-11-20 Thread Jurek Piasek
How does one format a date in the inmethod datagrid? Thanks, Jurek.

Re: Generics changes in 1.4-rc1

2008-11-20 Thread aditsu
Johan Compagner wrote: Please make issues for this in jira Since you said issues, I created 3 issues: WICKET-1947, WICKET-1948, WICKET-1949 Adrian -- View this message in context: http://www.nabble.com/Generics-changes-in-1.4-rc1-tp20599173p20615568.html Sent from the Wicket - User