Re: LoadableDetachable

2010-01-07 Thread Ilja Pavkovic
Hi,

> I was under the assumption that wicket calls detach on LoadableDeatchable
>  automatically on each request.
> 
> Is this not true?
One of your components must have your model as default model. Either

setModel(myModel); 

Otherwise you have to do the detach on your own:

public void onDetach() {
myModel.detach();
super.onDetach();
}

Best Regards,
Ilja Pavkovic
-- 
binaere bauten gmbh · tempelhofer ufer 1a · 10961 berlin

   +49 · 171 · 9342 465

Handelsregister: HRB 115854 - Amtsgericht Charlottenburg
Geschäftsführer: Dipl.-Inform. Ilja Pavkovic, Dipl.-Inform. Jost Becker

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



WARN BorderBodyResolver

2010-01-07 Thread Anton Veretennikov
Good day,

I'm a bit confused, can't understand what i really need to do after
getting this warning:

Please consider to change your java code to something like:
c.add(getBodyContainer()); for the component hierarchy to better
reflect the markup hierarchy. For example, say that you have a border
class in which you do: 'WebMarkupContainer div = new
WebMarkupContainer("roundDiv"); add(div);' you should now do
'add(div); div.add(getBodyContainer());'. Please fix this before
Wicket 1.4

-- Tony

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: RadioGroup with radio objects with same values

2010-01-07 Thread Xavier López
Hi,

I've also noticed this behavior, but with null values (a RadioGroup with
null modelObject, two RadioChoices with null modelObject).
Under IE, all of them appeared selected :) (wicket 1.3.5)

Cheers,
Xavier

2010/1/6 Kogel, Jonck-van-der 

> Hi,
> I have a radiogroup that is built up dynamically, so I don't know ahead
> of time what the choices are going to be. Now I noticed that if I have 3
> radio buttons in a RadioGroup and let's say they all have the same value
> (are all empty for example), the selected radio button will be the last
> one in the group. Let me give an example:
>
> RadioGroup
> * value1 = "foo"
> * value2 = "foo"
> * value3 = "foo"
>
> So all 3 radio choices have the value "foo". The persisted value is also
> "foo", so all are "valid" so to speak and therefore the one that gets
> selected is the 3d one. However, I would like it to be the first. Could
> someone point me in the right direction how I should go about overriding
> this behavior so it takes the first value it encounters instead of the
> last?
>
> Thanks, Jonck
>



-- 
"Klein bottle for rent--inquire within."


Re: question about swarm

2010-01-07 Thread Olger Warnier
Hi Emond, 

Very nice. Could you think of a way to support your scenario and a way to 
support anonymous classes in a way that you don't have to specify a 
MyPageClass$1$2 and we don't have to impose a change in the hive file ?

Kind Regards,

Olger

On 6 jan 2010, at 14:03, Emond Papegaaij wrote:

> Hi Olger,
> 
> The InPrincipal annotation is something we developed as an alternative for 
> the 
> hive files (which we find difficult to maintain, not only with anonymous 
> inner 
> classes). Principals are defined by a set of classes with annotations 
> defining 
> things like implies relations between principals and DataPermissions. 
> ComponentPermissions are created by scanning for components with the 
> InPrincipal annotation and creating the permissions for those. We are 
> thinking 
> about releasing this code, perhaps by including it in wicket-security.
> 
> When using a hive file, you define your principals, each with a set of 
> permissions. Currently, you can use ComponentPermission, DataPermission and 
> AllPermissions. My suggestion is to add another permission that gives 
> permissions to a component and all of its subclasses (including anonymous 
> classes), something like:
> 
> permission ${ComponentSubclassPermission} "MyPage", "inherit, render;
> 
> This would give you permission for MyPage and its subclasses. You can define 
> the alias for ComponentSubclassPermission in SwarmPolicyFileHiveFactory. I 
> think that this is the way Swarm/Wasp is 'supposed to be used'.
> 
> Best regards,
> Emond
> 
> On Wednesday 06 January 2010 13:09:09 Olger Warnier wrote:
>> Hi Emond,
>> 
>> Thanks for your comments, Interesting matter. Extending ComponentPermission
>> to change the behavior sounds like an option. I can't find the
>> @InPrincipal annotation in the wicket-security project, is this something
>> specific ?
>> 
>> When you look at it from the 'hive' side: It is the standard way of working
>> with Swarm/Wasp, isn't it ? That current way has a quite fragile way to
>> define the authorization rules on anonymous inner classes. How to deal
>> with that ?
>> 
>> Is it an option to contribute your annotations with a specific
>> AnnotatedPermission ? That would be really great.
>> 
>> Kind Regards,
>> 
>> Olger
>> 
>> On 6 jan 2010, at 12:52, Emond Papegaaij wrote:
>>> Hi,
>>> 
>>> Your change breaks some functionality. It is now no longer possible to
>>> grant permissions for anonymous inner classes at all, you are now forced
>>> to grant the permission on the superclass. This might seem sensible when
>>> using a hive file, but it is not when permissions are configured in other
>>> ways.
>>> 
>>> We create permissions by annotating components with an @InPrincipal
>>> annotation. It is possible to create a (abstract) component and have
>>> multiple, anonymous subclasses, each with their own @InPrincipal
>>> annotation.
>>> 
>>> I think, this should be fixed with a special ComponentPermission: one
>>> that does not only give permission to the specified class, but also to
>>> its subclasses. This could be achieved by extending ComponentPermission
>>> and overriding the implies method. The first part of the the path array
>>> should contain the classname of the component.
>>> 
>>> Best regards,
>>> Emond Papegaaij
>>> 
>>> On Thursday 31 December 2009 23:31:34 Olger Warnier wrote:
 Hi Sam,
 
 Found the way to solve it. It is fixed in the trunk. Still need to fix
 the build server - so a check out and build of the whole is probably
 best. An anonymous class will act like its' parent now.
 
 Happy new year (to you all).
 
 Olger
 
 On 31 dec 2009, at 22:43, s...@sambarrow.com wrote:
> In my opinion, that's how it should work; just seems like common sense
> to me. Even for regular (non-anonymous) classes, it would be useful
> although that's not as important.
> 
> As far as the technical part I have no idea. I've only been working
> with swam for 3 days. But I will do some looking at the source code.
> 
> Sent via BlackBerry from T-Mobile
> 
> -Original Message-
> From: Olger Warnier 
> Date: Thu, 31 Dec 2009 22:35:22
> To: 
> Subject: Re: question about swarm
> 
> Hi Sam & Jeremy,
> 
> Together with the remark that Jeremy made - I agree, it is quite
> fragile - I had a look at the code that does the checks. I could
> 'assume' that an anonymous class needs the same rights as the 'normal'
> class. so when your CreateItemPage has the proper rights, an anonymous
> variant has the similar rights.
> 
> The other way is some kind of inheritance assumption. This needs some
> kind of syntax in the hive file like the 'inherit' that is currently
> available. This inherit is more page with child component 'inheritance'
> and not like in OO thinking (If understand this completely). With this
> in mind, I would say that treating an anonymous class as the cla

How to close a Wicket application?

2010-01-07 Thread Giovanni
I am using Spring + Wicket.

When the Wicket application starts, if some important configuration is missing, 
I want to close all the application context, destroying all the Spring beans, 
including also the Wicket application, which is configured as a Spring bean by 
SpringWebApplicationFactory.

I used the close() (I also tried stop() and destroy() methods) of the 
ApplicationContext, but it doesn't destroy the Wicket app.

I then searched for a method of Wicket Application, which allows to stop/close 
the webapp, but I did not find it.

How is it possible to stop a Wicket application from inside the application 
itself (that is suicide)?

Best regards,
giovanni



  

Re: How to close a Wicket application?

2010-01-07 Thread Martin Grigorov
On Thu, 2010-01-07 at 02:15 -0800, Giovanni wrote:
> I am using Spring + Wicket.
> 
> When the Wicket application starts, if some important configuration is 
> missing, I want to close all the application context, destroying all the 
> Spring beans, including also the Wicket application, which is configured as a 
> Spring bean by SpringWebApplicationFactory.
> 
> I used the close() (I also tried stop() and destroy() methods) of the 
> ApplicationContext, but it doesn't destroy the Wicket app.
> 
> I then searched for a method of Wicket Application, which allows to 
> stop/close the webapp, but I did not find it.
> 
> How is it possible to stop a Wicket application from inside the application 
> itself (that is suicide)?
One option is to use the underlying JMX capabilities of the application
server and request stop/undeploy of the application. 
Another option is to set a flag (application scope) and modify the
RequestCycle to always redirect to some "Sorry, the application doesn't
work" page if that flag is set to true.
> 
> Best regards,
> giovanni
> 
> 
> 
>   



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: How to close a Wicket application?

2010-01-07 Thread Erik van Oosten
There is no hook in Wicket to stop. Wicket normally starts and ends with 
the web context it is running in. So ending the application is done by 
undeploying the web-app. You'll need to find hooks in your serlvet 
container. Spring will automatically shutdown with the web context as well.


Regards,
   Erik.

Giovanni wrote:

I am using Spring + Wicket.

When the Wicket application starts, if some important configuration is missing, 
I want to close all the application context, destroying all the Spring beans, 
including also the Wicket application, which is configured as a Spring bean by 
SpringWebApplicationFactory.

I used the close() (I also tried stop() and destroy() methods) of the 
ApplicationContext, but it doesn't destroy the Wicket app.

I then searched for a method of Wicket Application, which allows to stop/close 
the webapp, but I did not find it.

How is it possible to stop a Wicket application from inside the application 
itself (that is suicide)?

Best regards,
giovanni
  
  


--
Erik van Oosten
http://day-to-day-stuff.blogspot.com/



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: How to close a Wicket application?

2010-01-07 Thread Martijn Dashorst
Call System.exit(1) ... that will do the trick.

Always nice to see all applications deployed to a container disappear.

Martijn

On Thu, Jan 7, 2010 at 12:03 PM, Erik van Oosten  wrote:
> There is no hook in Wicket to stop. Wicket normally starts and ends with the
> web context it is running in. So ending the application is done by
> undeploying the web-app. You'll need to find hooks in your serlvet
> container. Spring will automatically shutdown with the web context as well.
>
> Regards,
>   Erik.
>
> Giovanni wrote:
>>
>> I am using Spring + Wicket.
>>
>> When the Wicket application starts, if some important configuration is
>> missing, I want to close all the application context, destroying all the
>> Spring beans, including also the Wicket application, which is configured as
>> a Spring bean by SpringWebApplicationFactory.
>>
>> I used the close() (I also tried stop() and destroy() methods) of the
>> ApplicationContext, but it doesn't destroy the Wicket app.
>>
>> I then searched for a method of Wicket Application, which allows to
>> stop/close the webapp, but I did not find it.
>>
>> How is it possible to stop a Wicket application from inside the
>> application itself (that is suicide)?
>>
>> Best regards,
>> giovanni
>>
>
> --
> Erik van Oosten
> http://day-to-day-stuff.blogspot.com/
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>



-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.4 increases type safety for web applications
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.4

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



is wicket+seam+ejb3 stable?

2010-01-07 Thread Haulyn Jason
Hi, all:
I am wicket fans, I always make my applications to work with
wicket+guice+ibatis. Now we have a new project, we need to make wicket
work with ejb3. I think maybe seam is a good idea, but i am not familiar
with this. Can anyone share experience? 

Thanks very much.

--
Thanks!

VVThumb Microproduction

Location: A1-2, Qilu Software Park 
  No. 1 Shunhua Rd High-Tech Development Zone
  Jinan, China 250101
Linkedin: http://www.linkedin.com/in/haulyn

Haulyn Jason

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



DiskPageStore file increasing to max size by only refreshing a HomePage

2010-01-07 Thread manuelbarzi
Hi,

- the scenario is this:

jmeter stress-testing (10 simultaneous users with no ramp-up and an
infinite-loop cycle) a wicket application (extends SpringWebApplication) by
only refreshing the HomePage.

- the result is:

observing the disk, the pagemap file for each session (10 items), there is
an "infinite" increasing (about 10kb each one) up to arriving the 10MB
(default max size for diskpagestore).

opening the pagemap file (text editor) there is a repetition of the same
HomePage serialized "infinite" times til arriving the max size allowed for
the file...

- the question is:

why is this happening? shouldn't the pagemap only store the "new" pages, but
only conserving "one" reference to a page that was already serialized? why
is it serializing the same page (HomePage) to the infinite?


Re: DiskPageStore file increasing to max size by only refreshing a HomePage

2010-01-07 Thread Matej Knopp
Just because it's the same page class it doesn't mean it's the same
page instance. How does the URL that you invoke look like?

-Matej

On Thu, Jan 7, 2010 at 12:32 PM, manuelbarzi  wrote:
> Hi,
>
> - the scenario is this:
>
> jmeter stress-testing (10 simultaneous users with no ramp-up and an
> infinite-loop cycle) a wicket application (extends SpringWebApplication) by
> only refreshing the HomePage.
>
> - the result is:
>
> observing the disk, the pagemap file for each session (10 items), there is
> an "infinite" increasing (about 10kb each one) up to arriving the 10MB
> (default max size for diskpagestore).
>
> opening the pagemap file (text editor) there is a repetition of the same
> HomePage serialized "infinite" times til arriving the max size allowed for
> the file...
>
> - the question is:
>
> why is this happening? shouldn't the pagemap only store the "new" pages, but
> only conserving "one" reference to a page that was already serialized? why
> is it serializing the same page (HomePage) to the infinite?
>

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



RE: Autosize modal window

2010-01-07 Thread Kogel, Jonck-van-der
Hi Ilja,
Ok, that's good, I'm not using PageCreator. But how do I then make the 
ModalWindow autosize? Perhaps I'm missing something in the JavaDocs but I can't 
find it anywhere.

Thanks, Jonck 

-Original Message-
From: Ilja Pavkovic [mailto:ilja.pavko...@binaere-bauten.de] 
Sent: woensdag 6 januari 2010 17:23
To: users@wicket.apache.org
Subject: Re: Autosize modal window

Hi,

according to the inline documentation of ModalWindow you can only autosize if 
you add components and don't use  ModalWindow.PageCreator

something like

ModalWindow modalWindow = new ModalWindow(); modalWindow.add(new 
MyPanel(modalWindow.getComponentId());



Best Regards,
Ilja Pavkovic

Am Mittwoch, 6. Januar 2010 17:12:05 schrieb Kogel, Jonck-van-der:
> Hi,
> Is it possible to have a modal window auto-size depending on its 
> contents? I've been fiddling with header contributions and such but 
> can't get it to work.
> 
> Thanks!
> 
> Jonck
> 

--
binaere bauten gmbh · tempelhofer ufer 1a · 10961 berlin

   +49 · 171 · 9342 465

Handelsregister: HRB 115854 - Amtsgericht Charlottenburg
Geschäftsführer: Dipl.-Inform. Ilja Pavkovic, Dipl.-Inform. Jost Becker

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



InspectorBug on 1.3.5

2010-01-07 Thread Xavier López
Hi,

I'm trying to use the InspectorBug in wicket 1.3.5. I extracted it from the
wicket-examples source code.
The problem is, every page is treated as stateless, soI can get no
information on component's models. I get info on Application and Session,
but about the Pages, debugging through the code I find out that the problem
is that the page never gets an Id (Page.getId()) so the IPageMapEntry can be
retrieved...

public InspectorBug(final String id, final WebPage page)
{
super(id);
PageParameters parameters = new PageParameters();
parameters.put("pageId", page.getId());
Link link = new BookmarkablePageLink("link", InspectorPage.class,
parameters);
link.add(new Image("bug"));
add(link);
}

public InspectorPage(final PageParameters parameters)
{
add(new ApplicationView("application", Application.get()));
add(new SessionView("session", Session.get()));
IPageMapEntry entry = null;
try
{
entry = getPageMap().getEntry(parameters.getInt("pageId"));
}
catch (StringValueConversionException e)
{
// Ignore
}
add(new PageView("page", entry == null ? null : entry.getPage()));
add(new Image("bug"));
add(new BookmarkablePageLink("allsessions",
LiveSessionsPage.class));
add(new Label("wicketVersion",
getApplication().getFrameworkSettings().getVersion()));
}

I also noticed that Page.setId() is only called when the Page is put into
the PageMap (which makes sense, and is also stated by the comments on Page's
constructors)
"// A Page's id is not determined until setId is called when the
Page is
// added to a PageMap in the Session."

I suppose this is not working because in InspectorBug's construction, the
page isn't in the pagemap yet, so it has no id.
Is there any workaround to get the InspectorBug panel working ?

Cheers,
Xavier


Re: question about swarm

2010-01-07 Thread Emond Papegaaij
Well, provided you've implemented the ComponentSubclassPermission, you could 
overwrite the alias for ComponentPermission by subclassing the 
SwarmPolicyFileHiveFactory like this:

public class MyFileHiveFactory extends SwarmPolicyFileHiveFactory {
public MyFileHiveFactory(ActionFactory actionFactory) {
super(actionFactory);
setAlias("ComponentPermission", 
my.ComponentSubclassPermission");
}
}

This would replace the usage of ComponentPermission by 
ComponentSubclassPermission and requires no change to the hive file.

Emond


On Thursday 07 January 2010 11:09:52 Olger Warnier wrote:
> Hi Emond,
> 
> Very nice. Could you think of a way to support your scenario and a way to
>  support anonymous classes in a way that you don't have to specify a
>  MyPageClass$1$2 and we don't have to impose a change in the hive file ?
> 
> Kind Regards,
> 
> Olger
> 
> On 6 jan 2010, at 14:03, Emond Papegaaij wrote:
> > Hi Olger,
> >
> > The InPrincipal annotation is something we developed as an alternative
> > for the hive files (which we find difficult to maintain, not only with
> > anonymous inner classes). Principals are defined by a set of classes with
> > annotations defining things like implies relations between principals and
> > DataPermissions. ComponentPermissions are created by scanning for
> > components with the InPrincipal annotation and creating the permissions
> > for those. We are thinking about releasing this code, perhaps by
> > including it in wicket-security.
> >
> > When using a hive file, you define your principals, each with a set of
> > permissions. Currently, you can use ComponentPermission, DataPermission
> > and AllPermissions. My suggestion is to add another permission that gives
> > permissions to a component and all of its subclasses (including anonymous
> > classes), something like:
> >
> > permission ${ComponentSubclassPermission} "MyPage", "inherit, render;
> >
> > This would give you permission for MyPage and its subclasses. You can
> > define the alias for ComponentSubclassPermission in
> > SwarmPolicyFileHiveFactory. I think that this is the way Swarm/Wasp is
> > 'supposed to be used'.
> >
> > Best regards,
> > Emond
> >
> > On Wednesday 06 January 2010 13:09:09 Olger Warnier wrote:
> >> Hi Emond,
> >>
> >> Thanks for your comments, Interesting matter. Extending
> >> ComponentPermission to change the behavior sounds like an option. I
> >> can't find the
> >> @InPrincipal annotation in the wicket-security project, is this
> >> something specific ?
> >>
> >> When you look at it from the 'hive' side: It is the standard way of
> >> working with Swarm/Wasp, isn't it ? That current way has a quite fragile
> >> way to define the authorization rules on anonymous inner classes. How to
> >> deal with that ?
> >>
> >> Is it an option to contribute your annotations with a specific
> >> AnnotatedPermission ? That would be really great.
> >>
> >> Kind Regards,
> >>
> >> Olger
> >>
> >> On 6 jan 2010, at 12:52, Emond Papegaaij wrote:
> >>> Hi,
> >>>
> >>> Your change breaks some functionality. It is now no longer possible to
> >>> grant permissions for anonymous inner classes at all, you are now
> >>> forced to grant the permission on the superclass. This might seem
> >>> sensible when using a hive file, but it is not when permissions are
> >>> configured in other ways.
> >>>
> >>> We create permissions by annotating components with an @InPrincipal
> >>> annotation. It is possible to create a (abstract) component and have
> >>> multiple, anonymous subclasses, each with their own @InPrincipal
> >>> annotation.
> >>>
> >>> I think, this should be fixed with a special ComponentPermission: one
> >>> that does not only give permission to the specified class, but also to
> >>> its subclasses. This could be achieved by extending ComponentPermission
> >>> and overriding the implies method. The first part of the the path array
> >>> should contain the classname of the component.
> >>>
> >>> Best regards,
> >>> Emond Papegaaij
> >>>
> >>> On Thursday 31 December 2009 23:31:34 Olger Warnier wrote:
>  Hi Sam,
> 
>  Found the way to solve it. It is fixed in the trunk. Still need to fix
>  the build server - so a check out and build of the whole is probably
>  best. An anonymous class will act like its' parent now.
> 
>  Happy new year (to you all).
> 
>  Olger
> 
>  On 31 dec 2009, at 22:43, s...@sambarrow.com wrote:
> > In my opinion, that's how it should work; just seems like common
> > sense to me. Even for regular (non-anonymous) classes, it would be
> > useful although that's not as important.
> >
> > As far as the technical part I have no idea. I've only been working
> > with swam for 3 days. But I will do some looking at the source code.
> >
> > Sent via BlackBerry from T-Mobile
> >
> > -Original Message-
> > From: Olger Warnier 
> > Date: Thu, 31 Dec 2009 22:35:

Re: DiskPageStore file increasing to max size by only refreshing a HomePage

2010-01-07 Thread manuelbarzi
the url is this: http://localhost:9090/test/


Re: DiskPageStore file increasing to max size by only refreshing a HomePage

2010-01-07 Thread Johan Compagner
if you constantly target exactly that url
then that will be a new page everytime because thats just a bookmarkable
url.
not an instance url.

On Thu, Jan 7, 2010 at 12:52, manuelbarzi  wrote:

> the url is this: http://localhost:9090/test/
>


Re: How to close a Wicket application?

2010-01-07 Thread Giovanni
Hi Martjin,

I tried with System.exit(1) on Weblogic, but it is also stopping the whole 
Weblogic server. It seems that this solution is too strong. :)

Maybe the solution ofMartin Grigorov is softer.

At the end, we are using the ApplicationContext.close() method, which seems to 
stop the Spring beans, except the Wicket bean (I don't understand why). Then, 
if a user tries to call a Wicket page, he will get an error, not because the 
Wicket app is down, but because the collaborating Spring beans are down.

regards,
giovanni







From: Martijn Dashorst 
To: users@wicket.apache.org
Sent: Thu, January 7, 2010 12:13:53 PM
Subject: Re: How to close a Wicket application?

Call System.exit(1) ... that will do the trick.

Always nice to see all applications deployed to a container disappear.

Martijn

On Thu, Jan 7, 2010 at 12:03 PM, Erik van Oosten  wrote:
> There is no hook in Wicket to stop. Wicket normally starts and ends with the
> web context it is running in. So ending the application is done by
> undeploying the web-app. You'll need to find hooks in your serlvet
> container. Spring will automatically shutdown with the web context as well.
>
> Regards,
>   Erik.
>
> Giovanni wrote:
>>
>> I am using Spring + Wicket.
>>
>> When the Wicket application starts, if some important configuration is
>> missing, I want to close all the application context, destroying all the
>> Spring beans, including also the Wicket application, which is configured as
>> a Spring bean by SpringWebApplicationFactory.
>>
>> I used the close() (I also tried stop() and destroy() methods) of the
>> ApplicationContext, but it doesn't destroy the Wicket app.
>>
>> I then searched for a method of Wicket Application, which allows to
>> stop/close the webapp, but I did not find it.
>>
>> How is it possible to stop a Wicket application from inside the
>> application itself (that is suicide)?
>>
>> Best regards,
>> giovanni
>>
>
> --
> Erik van Oosten
> http://day-to-day-stuff.blogspot.com/
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>



-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.4 increases type safety for web applications
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.4

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org


  

Re: Autosize modal window

2010-01-07 Thread Ilja Pavkovic
Hi,

I forgot the following line: modalWindow.setUseInitialHeight(false);

Best Regards,
Ilja Pavkovic

Am Donnerstag, 7. Januar 2010 12:40:25 schrieb Kogel, Jonck-van-der:
> Hi Ilja,
> Ok, that's good, I'm not using PageCreator. But how do I then make the
>  ModalWindow autosize? Perhaps I'm missing something in the JavaDocs but I
>  can't find it anywhere.
> 
> Thanks, Jonck
> 
> -Original Message-
> From: Ilja Pavkovic [mailto:ilja.pavko...@binaere-bauten.de]
> Sent: woensdag 6 januari 2010 17:23
> To: users@wicket.apache.org
> Subject: Re: Autosize modal window
> 
> Hi,
> 
> according to the inline documentation of ModalWindow you can only autosize
>  if you add components and don't use  ModalWindow.PageCreator
> 
> something like
> 
> ModalWindow modalWindow = new ModalWindow(); modalWindow.add(new
>  MyPanel(modalWindow.getComponentId());
> 
> 
> 
> Best Regards,
>   Ilja Pavkovic
> 
> Am Mittwoch, 6. Januar 2010 17:12:05 schrieb Kogel, Jonck-van-der:
> > Hi,
> > Is it possible to have a modal window auto-size depending on its
> > contents? I've been fiddling with header contributions and such but
> > can't get it to work.
> >
> > Thanks!
> >
> > Jonck
> 
> --
> binaere bauten gmbh · tempelhofer ufer 1a · 10961 berlin
> 
>+49 · 171 · 9342 465
> 
> Handelsregister: HRB 115854 - Amtsgericht Charlottenburg
> Geschäftsführer: Dipl.-Inform. Ilja Pavkovic, Dipl.-Inform. Jost Becker
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 
> 
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 

-- 
binaere bauten gmbh · tempelhofer ufer 1a · 10961 berlin

   +49 · 171 · 9342 465

Handelsregister: HRB 115854 - Amtsgericht Charlottenburg
Geschäftsführer: Dipl.-Inform. Ilja Pavkovic, Dipl.-Inform. Jost Becker

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: DiskPageStore file increasing to max size by only refreshing a HomePage

2010-01-07 Thread manuelbarzi
if this is the behaviour by default, then, how do you avoid a DoS attack? i
mean, to put an example, if a simple app like this receives thousand of
users just refreshing the home page, then the pagestore will be
overloaded... may this become a disk I/O overhead and its other possible
consequences.


Re: DiskPageStore file increasing to max size by only refreshing a HomePage

2010-01-07 Thread Matej Knopp
You have the exact same problem with every stateful application. If
you want to avoid a DoS attack (which isn't really always possible)
you need a good firewall.

-Matej

On Thu, Jan 7, 2010 at 2:29 PM, manuelbarzi  wrote:
> if this is the behaviour by default, then, how do you avoid a DoS attack? i
> mean, to put an example, if a simple app like this receives thousand of
> users just refreshing the home page, then the pagestore will be
> overloaded... may this become a disk I/O overhead and its other possible
> consequences.
>

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: is wicket+seam+ejb3 stable?

2010-01-07 Thread Martin Grigorov
Mind wicketstuff-core/javaee as well.
It is used by more people and it works for sure.
There are two Seam integrations, one in wicketstuff and one in Seam
itself. I can tell nothing about their status. 

On Thu, 2010-01-07 at 19:18 +0800, Haulyn Jason wrote:
> Hi, all:
> I am wicket fans, I always make my applications to work with
> wicket+guice+ibatis. Now we have a new project, we need to make wicket
> work with ejb3. I think maybe seam is a good idea, but i am not familiar
> with this. Can anyone share experience? 
> 
> Thanks very much.
> 
> --
> Thanks!
> 
> VVThumb Microproduction
> 
> Location: A1-2, Qilu Software Park 
>   No. 1 Shunhua Rd High-Tech Development Zone
>   Jinan, China 250101
> Linkedin: http://www.linkedin.com/in/haulyn
> 
> Haulyn Jason
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 
> 



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: DiskPageStore file increasing to max size by only refreshing a HomePage

2010-01-07 Thread manuelbarzi
hmmm... but we are talking about something very basic: the home page!
there's no way to avoid repetition of this page in pagestore? i guess
pagestore does not repeat other internal pages (with extended url - not home
page - if their are correctly independent, no new object references inside
on each reload and so on, let's say) by following internal rules (based on
object state and references), why couldn't it be applied a similar mechanism
for the home page?

On Thu, Jan 7, 2010 at 2:31 PM, Matej Knopp  wrote:

> You have the exact same problem with every stateful application. If
> you want to avoid a DoS attack (which isn't really always possible)
> you need a good firewall.
>
> -Matej
>
> On Thu, Jan 7, 2010 at 2:29 PM, manuelbarzi  wrote:
> > if this is the behaviour by default, then, how do you avoid a DoS attack?
> i
> > mean, to put an example, if a simple app like this receives thousand of
> > users just refreshing the home page, then the pagestore will be
> > overloaded... may this become a disk I/O overhead and its other possible
> > consequences.
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


SV: DiskPageStore file increasing to max size by only refreshing a HomePage

2010-01-07 Thread Wilhelmsen Tor Iver
> hmmm... but we are talking about something very basic: the home page!

Have you set it unversioned? How about trying to make it stateless?

- Tor Iver


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: DiskPageStore file increasing to max size by only refreshing a HomePage

2010-01-07 Thread Matej Knopp
You can make your home page stateless. Of course that limits what
components you can put on it.

-Matej

On Thu, Jan 7, 2010 at 2:42 PM, manuelbarzi  wrote:
> hmmm... but we are talking about something very basic: the home page!
> there's no way to avoid repetition of this page in pagestore? i guess
> pagestore does not repeat other internal pages (with extended url - not home
> page - if their are correctly independent, no new object references inside
> on each reload and so on, let's say) by following internal rules (based on
> object state and references), why couldn't it be applied a similar mechanism
> for the home page?
>
> On Thu, Jan 7, 2010 at 2:31 PM, Matej Knopp  wrote:
>
>> You have the exact same problem with every stateful application. If
>> you want to avoid a DoS attack (which isn't really always possible)
>> you need a good firewall.
>>
>> -Matej
>>
>> On Thu, Jan 7, 2010 at 2:29 PM, manuelbarzi  wrote:
>> > if this is the behaviour by default, then, how do you avoid a DoS attack?
>> i
>> > mean, to put an example, if a simple app like this receives thousand of
>> > users just refreshing the home page, then the pagestore will be
>> > overloaded... may this become a disk I/O overhead and its other possible
>> > consequences.
>> >
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Autosize modal window

2010-01-07 Thread Stefan Jozsa
Yes, it can be resized.
Do something like this:

public void show(AjaxRequestTarget target, ...) {
// ...
super.show(target);
// ...
int height = YOUR_COMPUTED_HEIGHT;
int width = YOUR_COMPUTED_WIDTH;
target.appendJavascript(""//
+ "var thisWindow = Wicket.Window.get();\n"//
+ "if (thisWindow) {\n"//
+ "thisWindow.window.style.width = \"" + width 
+ "em\";\n"//
+ "thisWindow.content.style.height = \"" + 
height + "em\";\n"//
+ "thisWindow.center();\n"//
+ "}"//
);
}

Stefan



  

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Autosize modal window

2010-01-07 Thread Stefan Jozsa
Forgot:

public MyModalWindow  extends ModalWindow {

   public MyModalWindow(String id) {
   super(id);
   setResizable(false);
   setWidthUnit("em");
   setHeightUnit("em");
   setContent(new MyWindowPanel(this.getContentId()));
   // ...
   }
}

Stefan



  

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



RE: Autosize modal window

2010-01-07 Thread Kogel, Jonck-van-der
Ok, great, the height is indeed autosizing nicely now. Is there any way to have 
the width autosize as well?

Thanks, Jonck


-Original Message-
From: Ilja Pavkovic [mailto:ilja.pavko...@binaere-bauten.de] 
Sent: donderdag 7 januari 2010 13:51
To: users@wicket.apache.org
Cc: Kogel, Jonck-van-der
Subject: Re: Autosize modal window

Hi,

I forgot the following line: modalWindow.setUseInitialHeight(false);

Best Regards,
Ilja Pavkovic

Am Donnerstag, 7. Januar 2010 12:40:25 schrieb Kogel, Jonck-van-der:
> Hi Ilja,
> Ok, that's good, I'm not using PageCreator. But how do I then make the  
> ModalWindow autosize? Perhaps I'm missing something in the JavaDocs 
> but I  can't find it anywhere.
> 
> Thanks, Jonck
> 
> -Original Message-
> From: Ilja Pavkovic [mailto:ilja.pavko...@binaere-bauten.de]
> Sent: woensdag 6 januari 2010 17:23
> To: users@wicket.apache.org
> Subject: Re: Autosize modal window
> 
> Hi,
> 
> according to the inline documentation of ModalWindow you can only 
> autosize  if you add components and don't use  ModalWindow.PageCreator
> 
> something like
> 
> ModalWindow modalWindow = new ModalWindow(); modalWindow.add(new  
> MyPanel(modalWindow.getComponentId());
> 
> 
> 
> Best Regards,
>   Ilja Pavkovic
> 
> Am Mittwoch, 6. Januar 2010 17:12:05 schrieb Kogel, Jonck-van-der:
> > Hi,
> > Is it possible to have a modal window auto-size depending on its 
> > contents? I've been fiddling with header contributions and such but 
> > can't get it to work.
> >
> > Thanks!
> >
> > Jonck
> 
> --
> binaere bauten gmbh · tempelhofer ufer 1a · 10961 berlin
> 
>+49 · 171 · 9342 465
> 
> Handelsregister: HRB 115854 - Amtsgericht Charlottenburg
> Geschäftsführer: Dipl.-Inform. Ilja Pavkovic, Dipl.-Inform. Jost 
> Becker
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 
> 
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 

--
binaere bauten gmbh · tempelhofer ufer 1a · 10961 berlin

   +49 · 171 · 9342 465

Handelsregister: HRB 115854 - Amtsgericht Charlottenburg
Geschäftsführer: Dipl.-Inform. Ilja Pavkovic, Dipl.-Inform. Jost Becker



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: datagrid error

2010-01-07 Thread Igor Racic
Hi,

Yes, that solved the issue.

Thank you,
Igor


2010/1/6 Matej Knopp 

> Caused by: java.util.MissingResourceException: Unable to find property:
> 'id1' for component: grid1:header:header:id1
>
> You are missing property id1 for column header in your property file.
>
> -Matej
>
> On Wed, Jan 6, 2010 at 6:35 PM, Igor Racic  wrote:
> > Hi,
> >
> > I am trying to "adapt" datagrid example and can't resolve following:
> >
> > ERROR - RequestCycle   - Exception in rendering component:
> > [Component id = id1]
> > org.apache.wicket.WicketRuntimeException: Exception in rendering
> component:
> > [Component id = id1]
> >at org.apache.wicket.Component.renderComponent(Component.java:2658)
> >at
> > org.apache.wicket.markup.html.WebComponent.onRender(WebComponent.java:62)
> >at org.apache.wicket.Component.render(Component.java:2450)
> >at
> >
> com.inmethod.grid.common.ColumnsHeaderRepeater.onRender(ColumnsHeaderRepeater.java:142)
> >at org.apache.wicket.Component.render(Component.java:2450)
> >at
> > org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1414)
> >at
> >
> org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1577)
> >at
> >
> org.apache.wicket.MarkupContainer.renderAssociatedMarkup(MarkupContainer.java:675)
> >at
> >
> org.apache.wicket.markup.html.panel.Panel.onComponentTagBody(Panel.java:114)
> >at org.apache.wicket.Component.renderComponent(Component.java:2619)
> >at
> org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1512)
> >at org.apache.wicket.Component.render(Component.java:2450)
> >at
> > org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1414)
> >at
> >
> org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1577)
> >at
> >
> org.apache.wicket.MarkupContainer.renderAssociatedMarkup(MarkupContainer.java:675)
> >at
> >
> org.apache.wicket.markup.html.panel.Panel.onComponentTagBody(Panel.java:114)
> >at org.apache.wicket.Component.renderComponent(Component.java:2619)
> >at
> org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1512)
> >at org.apache.wicket.Component.render(Component.java:2450)
> >at
> > org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1414)
> >at
> > org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1528)
> >at org.apache.wicket.Page.onRender(Page.java:1545)
> >at org.apache.wicket.Component.render(Component.java:2450)
> >at org.apache.wicket.Page.renderPage(Page.java:914)
> >at
> >
> org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:261)
> >at
> >
> org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:105)
> >at
> >
> org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1258)
> >at org.apache.wicket.RequestCycle.step(RequestCycle.java:1329)
> >at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1428)
> >at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
> >at
> > org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:479)
> >at
> >
> org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:312)
> >at
> >
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089)
> >at
> > org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)
> >at
> >
> org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
> >at
> > org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
> >at
> > org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
> >at
> org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
> >at
> > org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
> >at org.mortbay.jetty.Server.handle(Server.java:295)
> >at
> > org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:503)
> >at
> >
> org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:827)
> >at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:511)
> >at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:210)
> >at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:379)
> >at
> >
> org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:226)
> >at
> >
> org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
> > Caused by: java.util.MissingResourceException: Unable to find property:
> > 'id1' for component: grid1:header:header:id1
> > [class=com.inmethod.grid.column.AbstractColumn$1]
> >at org.apache.wicket.Localizer.getString(Localizer.java:344)
> >at org.apache.wicket.Localizer.getString(Localizer.java:138)
> >at
> >
> org.apache.wicket.model.ResourceModel$AssignmentW

DropDownChoice and selected value...

2010-01-07 Thread Facundo Miquel
Hello all..First of all, I know that this has been discussed here, I searched the archives but could not find an answer, or at least understand one, so please If someone can help me I would greatly appreciate it...I have a small problem with Drop Down Choices and the selected value when editing an existing record... and I wanted to validate that I'm doing things the correct way.. and if so.. if there is a known issuethe scenario is as follows...I created an extended class (just to simplify my work) to generate DDC from a multivalues tables (aka, a table where one holds different types of things.. countries, cities, status codes, etc..).The rest of the mail will be in RED for readability...In my tables I'm required to store the code and not the value so basically I created the following class..(these are fractions.. I'm attaching the actual clasess..)public class mvDropDownChoice extends DropDownChoice {...	static List mvValues = null;	@SuppressWarnings("serial")	public mvDropDownChoice(String id, String mvCode, IModel model) {		super(id, new PropertyModel(model, id),sysMultivaluesProvider.getMVList(mvCode),new IChoiceRenderer() {			public String getDisplayValue(Object object) {		        SysMultivalues mv = (SysMultivalues) object;		        return mv.getMvMeaning();   		    }		    public String getIdValue(Object object, int index) {		    	if (index == -1)		    		return null;		    	return ((SysMultivalues)mvValues.get(index)).getMvCode();			    }		});		mvValues = sysMultivaluesProvider.getMVList(mvCode);	}.now I call this in the following way..---import net.databinder.valid.hib.ValidDataForm;@AuthorizeInstantiation(Roles.USER)public class updateUserProfile extends Panel{	private static final long serialVersionUID = 2834437668800017171L;	EditForm form;...	public updateUserProfile(String id, String userId) {		super(id);		final Integer userIdInt = Integer.parseInt(userId);		add(form = new EditForm("userProfileForm", Long.parseLong(userId.trim(;			}		protected class EditForm extends ValidDataForm {		@SuppressWarnings({ "serial", "unchecked" })		public EditForm(String id, Long userId) {			super(id, SecUsers.class,userId);			add(new TextField("userName").setRequired(true));			.			add(new mvDropDownChoice("userProfile.country","COUNTRY", this.getModel()));.and this generates the following HTML output--