Re: spring 3.1 wicket auth integration

2011-03-01 Thread moèz ben rhouma
https://cwiki.apache.org/WICKET/spring-security-and-wicket-auth-roles.html

2011/2/28 wic...@geofflancaster.com wic...@geofflancaster.com

 Can anyone point me to a tutorial or example on getting spring 3.x setup
 and working with wicket-auth-roles for an AuthenticatedWebApplication?

 Thanks in advance.

 
 mail2web.com – Enhanced email for the mobile individual based on
 Microsoft®
 Exchange - http://link.mail2web.com/Personal/EnhancedEmail



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




Panel update after Ajax Submit

2011-03-01 Thread Dmitriy Neretin
Hello everybody!

Hope someone can help me. I don't really understand, what I should add as
ajax target :(

So, I have an abstract class Index where I add all my panels (3) and it is
my masterlayout. I add the panels in the index class like this:

add(new ShoppingCartPanel(id, anotherMehod);

The appropriate Markup has just following tags (ShoppingCartPanel.html):
wicket:panel
 Content
/wicketpanel

In the other Page (that inherits from Index) I have implemented the
AjaxSubmitLink:

add(new AjaxSubmitLink(addtocart) {
@Override
protected void onSubmit(AjaxRequestTarget target, Form form) {
target.addComponent(?);

What I want is, when the link is activated the panel should be updated...

First: I don't really understand what I have add to the addComponent()
method ?
Second: Where schould I set setOutputMarupId(true) ?

Thank You!


Re: Panel update after Ajax Submit

2011-03-01 Thread Josh Kamau
Hi there,

If you want to refresh the panel, call setOutputMarkupId(true)  on the panel
, then add the panel to the target.

If the Ajax Link  is on the same panel, you can call
this.setOutputMarkupId(true) , and you can also add MyPanel.this to the
target.

The point is , what ever you want to refresh via ajax must have
outputMarkupId set to true.

Hope that helps.

Josh.

On Tue, Mar 1, 2011 at 11:51 AM, Dmitriy Neretin 
dmitriy.nere...@googlemail.com wrote:

 Hello everybody!

 Hope someone can help me. I don't really understand, what I should add as
 ajax target :(

 So, I have an abstract class Index where I add all my panels (3) and it is
 my masterlayout. I add the panels in the index class like this:

 add(new ShoppingCartPanel(id, anotherMehod);

 The appropriate Markup has just following tags (ShoppingCartPanel.html):
 wicket:panel
  Content
 /wicketpanel

 In the other Page (that inherits from Index) I have implemented the
 AjaxSubmitLink:

 add(new AjaxSubmitLink(addtocart) {
@Override
protected void onSubmit(AjaxRequestTarget target, Form form) {
target.addComponent(?);

 What I want is, when the link is activated the panel should be updated...

 First: I don't really understand what I have add to the addComponent()
 method ?
 Second: Where schould I set setOutputMarupId(true) ?

 Thank You!



Re: Perfomance of IDataProvider

2011-03-01 Thread Juansoft
Thanks a lot for your replies, truly.

With the ideas that all have contributed i write a LDM that store a object
that is recovered in iterator and also a id for this object (to recover to
the database after).

I think this will be useful for people who start using Dataview,and are
somewhat confused with the operation. 

public class DetachableContactModel extends LoadableDetachableModel
{
 private long id;

 public DetachableContactModel(Contact c)
{
super(c); //wraps object in model (that is transient internally and
is deleted when method detach fires)
this.id = c.getId();
//this is not a transient member, that store de id of the object for
get from the database after
}

  protected Object load()
{

Object ret;
ret=this.getObject();

if(ret == null)
  { 
   //If user click remove link for one row, internal transient
object is null and should get load object  from data layer
   return getContactsDB().get(id); }
else
   {
 //If program execute this, means that dataview is painting rows
and render process of page not ends yet  
 return this.getObject(); }

}

}

If you use a AjaxLink in a dataview row that gets the modelobject
IDataProvider not calls iterator method and only is called load method from
LDM, getting the ContactsDB object from database (because this.getObject();
returns null )

And if you use normal link, full page is reloaded and again calls iterator
method, and model for each row (in this case return getContactsDB().get(id);
never be executed), etc...

I think that LDM in conjunction of IDataProvider and DataView are designed
for use in projects that implements persistence data layer such as hibernate
(and this is not mentioned in wicket documentation).

In the small projects not need have necessarily persistence layer, in my
humble opinion... if you write hand made dao o service layer for a few
tables or entities you only need a few methods that execute for example
stored procedures that inset, select and update rows in tables.

In this case that is not exists caching the implementation that i seen in
wicket oficial examples and in other more pages result in a lack of
performance because your prehistoric data access layer (handmade recalls) do
not caching nothing!

I hope reviews!


-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Perfomance-of-IDataProvider-tp3325777p3329554.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Getting Javascript function return value in Wicket

2011-03-01 Thread drf
Just want to add that the call to the class which would encapsulate the code
to call the javascript function and get the result would not be in the
constructor, rather in the onclick() of a button or the applyState() of the
wizard.


-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Getting-Javascript-function-return-value-in-Wicket-tp3327794p3329641.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Wicket-3438 seems to cause issues if a form is removed

2011-03-01 Thread Alexander Landsnes Keül
Upgraded to wicket 1.4.16 yesterday, and it seems to cause issues when a form 
is removed after submit. Problem is probably related to the change in 
Wicket-3438 (https://issues.apache.org/jira/browse/WICKET-3438 
https://issues.apache.org/jira/browse/WICKET-3438 )

 

The usage we have a few places is something like this

onSubmit() {

  updateData();

  replacePanel();

}

 

Used to work fine, but looking at Form#process(IFormSubmittingComponent 
submittingComponent)  it first delegates the submit to our button 
implementation, then calls parameters.remove(getHiddenFieldId()); 

getHiddenFieldId() tries to look up the page to check if it's stateless, but as 
the panel containing the form has been replaced already the form has no parent 
page. 

 

The only place I've encountered that is in parameters.remove(hiddenFieldId); 
could be solved by retrieving the parameter before delegating the submit, and 
removing the parameter after processing is done. Looking at the code it doesn't 
seem like it would be a terribly good idea to remove all the parameters before 
delegating the process, but retrieving it shouldn't be an issue. The rest of 
the parameter cleanup seems to be safe even if the form is removed.

 

Alex



Re: [ANN] Plugin WicketForge 0.9.0 available for IDEA 9+

2011-03-01 Thread Minas Manthos
Unfortunately I'm not familiar with scala... but everyone is welcome to join
wicketforge and help to improve it... also java profs...

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/ANN-Plugin-WicketForge-0-9-0-available-for-IDEA-9-tp3326870p3329698.html
Sent from the Users forum mailing list archive at Nabble.com.

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



TEST

2011-03-01 Thread Zoltán Nagy
Hi!

I've received this message when I tried to answer a question:

Delivery to the following recipient failed permanently:

 users@wicket.apache.org

 Technical details of permanent failure:
 Google tried to deliver your message, but it was rejected by the recipient
 domain. We recommend contacting the other email provider for further
 information about the cause of this error. The error that the other server
 returned was: 552 552 spam score (5.0) exceeded threshold
 (FREEMAIL_ENVFROM_END_DIGIT,
 FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL,URI_HEX
 (state 18).



It seems to be something serious error with the mailing server if I could
trigger the spam filter only with 2 sentences.

-- 
Zoltán Nagy


Re: How to prevent user from double-clicking a non-Ajax component

2011-03-01 Thread Zoltán Nagy
Hi!

I think Wicket Ajax should prevent this on the client side.
As a workaround you can disable the sumbit button from javascript event
handler and re-enable it from wicket ajax response.



2011/2/28 eugenebalt eugeneb...@yahoo.com

 How do we prevent the user from double-clicking a non-Ajax component?

 When the submit occurs, isEnabled is set to false for the Wicket Button.
 If the user does a quick double click on the button, its throws a wicket
 runtime excpetion saying the component is disabled.

 Thanks

 --
Zoltán Nagy


Re: Panel update after Ajax Submit

2011-03-01 Thread Dmitriy Neretin
Thanks for reply,

If you want to refresh the panel, call setOutputMarkupId(true)  on the panel
 , then add the panel to the target.


Does it mean I should call setOutputMarkUpId(true) in the constructor of the
panel? If I do so, the layout of the panel is destroyed.


 If the Ajax Link  is on the same panel, you can call
 this.setOutputMarkupId(true) , and you can also add MyPanel.this to the
 target.


No, the link is not on the same panel. This is actually the point that I
don't really understand. What should I add, if the link not on the panel.


 The point is , what ever you want to refresh via ajax must have
 outputMarkupId set to true.

 Hope that helps.

 Josh.

 On Tue, Mar 1, 2011 at 11:51 AM, Dmitriy Neretin 
 dmitriy.nere...@googlemail.com wrote:

  Hello everybody!
 
  Hope someone can help me. I don't really understand, what I should add as
  ajax target :(
 
  So, I have an abstract class Index where I add all my panels (3) and it
 is
  my masterlayout. I add the panels in the index class like this:
 
  add(new ShoppingCartPanel(id, anotherMehod);
 
  The appropriate Markup has just following tags (ShoppingCartPanel.html):
  wicket:panel
   Content
  /wicketpanel
 
  In the other Page (that inherits from Index) I have implemented the
  AjaxSubmitLink:
 
  add(new AjaxSubmitLink(addtocart) {
 @Override
 protected void onSubmit(AjaxRequestTarget target, Form form) {
 target.addComponent(?);
 
  What I want is, when the link is activated the panel should be updated...
 
  First: I don't really understand what I have add to the addComponent()
  method ?
  Second: Where schould I set setOutputMarupId(true) ?
 
  Thank You!
 



Re: TEST

2011-03-01 Thread Martijn Dashorst
HTML email raises the score pretty much.

Martijn

On Tue, Mar 1, 2011 at 1:45 PM, Zoltán Nagy zberke...@gmail.com wrote:
 Hi!

 I've received this message when I tried to answer a question:

 Delivery to the following recipient failed permanently:

     users@wicket.apache.org

 Technical details of permanent failure:
 Google tried to deliver your message, but it was rejected by the recipient
 domain. We recommend contacting the other email provider for further
 information about the cause of this error. The error that the other server
 returned was: 552 552 spam score (5.0) exceeded threshold
 (FREEMAIL_ENVFROM_END_DIGIT,
 FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL,URI_HEX
 (state 18).



 It seems to be something serious error with the mailing server if I could
 trigger the spam filter only with 2 sentences.

 --
 Zoltán Nagy




-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com

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



Re: Panel update after Ajax Submit

2011-03-01 Thread Pedro Santos
Hi, if you update the panel within the form, you need to update it's submit
link component outside this panel also.
onsubmit(target){
  target.addComponent(formPanel);
  target.addComponent(submitLinkNotNestedInsideTheFormPanel);
}

On Tue, Mar 1, 2011 at 9:51 AM, Dmitriy Neretin 
dmitriy.nere...@googlemail.com wrote:

 Thanks for reply,

 If you want to refresh the panel, call setOutputMarkupId(true)  on the
 panel
  , then add the panel to the target.
 

 Does it mean I should call setOutputMarkUpId(true) in the constructor of
 the
 panel? If I do so, the layout of the panel is destroyed.


  If the Ajax Link  is on the same panel, you can call
  this.setOutputMarkupId(true) , and you can also add MyPanel.this to the
  target.
 

 No, the link is not on the same panel. This is actually the point that I
 don't really understand. What should I add, if the link not on the panel.


  The point is , what ever you want to refresh via ajax must have
  outputMarkupId set to true.
 
  Hope that helps.
 
  Josh.
 
  On Tue, Mar 1, 2011 at 11:51 AM, Dmitriy Neretin 
  dmitriy.nere...@googlemail.com wrote:
 
   Hello everybody!
  
   Hope someone can help me. I don't really understand, what I should add
 as
   ajax target :(
  
   So, I have an abstract class Index where I add all my panels (3) and it
  is
   my masterlayout. I add the panels in the index class like this:
  
   add(new ShoppingCartPanel(id, anotherMehod);
  
   The appropriate Markup has just following tags
 (ShoppingCartPanel.html):
   wicket:panel
Content
   /wicketpanel
  
   In the other Page (that inherits from Index) I have implemented the
   AjaxSubmitLink:
  
   add(new AjaxSubmitLink(addtocart) {
  @Override
  protected void onSubmit(AjaxRequestTarget target, Form form)
 {
  target.addComponent(?);
  
   What I want is, when the link is activated the panel should be
 updated...
  
   First: I don't really understand what I have add to the addComponent()
   method ?
   Second: Where schould I set setOutputMarupId(true) ?
  
   Thank You!
  
 




-- 
Pedro Henrique Oliveira dos Santos


Re: TEST

2011-03-01 Thread Zoltán Nagy
Thanks! I turn off formating.

2011/3/1 Martijn Dashorst martijn.dasho...@gmail.com

 HTML email raises the score pretty much.

 Martijn


--
Zoltán Nagy

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



Re: Panel update after Ajax Submit

2011-03-01 Thread Dmitriy Neretin
No, the panel is outside! What I just want, is that the panel shows me the
result of the submit.
But I did it :)

Hier is my solution:

1. Call in the constructor of the panel setOutputMarkUpId(true);
2. Instantiate the panel Class in the abstract Class (masterlayout) as field
and return it back with a simple getter.
3. In the AjaxSubmitLink: target.addComponent(call the getter from an
abstract class);

I don't know, if it was right, but it works now :)

What do the experts mean?

On 1 March 2011 14:04, Pedro Santos pedros...@gmail.com wrote:

 Hi, if you update the panel within the form, you need to update it's submit
 link component outside this panel also.
 onsubmit(target){
  target.addComponent(formPanel);
  target.addComponent(submitLinkNotNestedInsideTheFormPanel);
 }

 On Tue, Mar 1, 2011 at 9:51 AM, Dmitriy Neretin 
 dmitriy.nere...@googlemail.com wrote:

  Thanks for reply,
 
  If you want to refresh the panel, call setOutputMarkupId(true)  on the
  panel
   , then add the panel to the target.
  
 
  Does it mean I should call setOutputMarkUpId(true) in the constructor of
  the
  panel? If I do so, the layout of the panel is destroyed.
 
 
   If the Ajax Link  is on the same panel, you can call
   this.setOutputMarkupId(true) , and you can also add MyPanel.this to the
   target.
  
 
  No, the link is not on the same panel. This is actually the point that I
  don't really understand. What should I add, if the link not on the panel.
 
 
   The point is , what ever you want to refresh via ajax must have
   outputMarkupId set to true.
  
   Hope that helps.
  
   Josh.
  
   On Tue, Mar 1, 2011 at 11:51 AM, Dmitriy Neretin 
   dmitriy.nere...@googlemail.com wrote:
  
Hello everybody!
   
Hope someone can help me. I don't really understand, what I should
 add
  as
ajax target :(
   
So, I have an abstract class Index where I add all my panels (3) and
 it
   is
my masterlayout. I add the panels in the index class like this:
   
add(new ShoppingCartPanel(id, anotherMehod);
   
The appropriate Markup has just following tags
  (ShoppingCartPanel.html):
wicket:panel
 Content
/wicketpanel
   
In the other Page (that inherits from Index) I have implemented the
AjaxSubmitLink:
   
add(new AjaxSubmitLink(addtocart) {
   @Override
   protected void onSubmit(AjaxRequestTarget target, Form
 form)
  {
   target.addComponent(?);
   
What I want is, when the link is activated the panel should be
  updated...
   
First: I don't really understand what I have add to the
 addComponent()
method ?
Second: Where schould I set setOutputMarupId(true) ?
   
Thank You!
   
  
 



 --
 Pedro Henrique Oliveira dos Santos



Re: Panel update after Ajax Submit

2011-03-01 Thread Zoltán Nagy
Hi!

2011/3/1 Dmitriy Neretin dmitriy.nere...@googlemail.com:
 Thanks for reply,

 If you want to refresh the panel, call setOutputMarkupId(true)  on the panel
 , then add the panel to the target.


 Does it mean I should call setOutputMarkUpId(true) in the constructor of the
 panel? If I do so, the layout of the panel is destroyed.



You should set it before you first send out the component (normal
pageRender or in on ajax response). You can set it in the constructor
or some time before Rendering.


-- 
Zoltán Nagy

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



Re: Wicket-3438 seems to cause issues if a form is removed

2011-03-01 Thread Pedro Santos
Hi it is a bug, I created https://issues.apache.org/jira/browse/WICKET-3488

On Tue, Mar 1, 2011 at 8:30 AM, Alexander Landsnes Keül 
alexander.landsnes.k...@visma.no wrote:

 Upgraded to wicket 1.4.16 yesterday, and it seems to cause issues when a
 form is removed after submit. Problem is probably related to the change in
 Wicket-3438 (https://issues.apache.org/jira/browse/WICKET-3438 
 https://issues.apache.org/jira/browse/WICKET-3438 )



 The usage we have a few places is something like this

 onSubmit() {

  updateData();

  replacePanel();

 }



 Used to work fine, but looking at Form#process(IFormSubmittingComponent
 submittingComponent)  it first delegates the submit to our button
 implementation, then calls parameters.remove(getHiddenFieldId());

 getHiddenFieldId() tries to look up the page to check if it's stateless,
 but as the panel containing the form has been replaced already the form has
 no parent page.



 The only place I've encountered that is in
 parameters.remove(hiddenFieldId); could be solved by retrieving the
 parameter before delegating the submit, and removing the parameter after
 processing is done. Looking at the code it doesn't seem like it would be a
 terribly good idea to remove all the parameters before delegating the
 process, but retrieving it shouldn't be an issue. The rest of the parameter
 cleanup seems to be safe even if the form is removed.



 Alex




-- 
Pedro Henrique Oliveira dos Santos


Re: Displaying table in a modalDialog

2011-03-01 Thread Zoltán Nagy
Hi!

Yes, i've also run into this problem.
See the sources of the generated page, something will be between the
table and th/tr/tbody/thead tags. The browser simply drops your
generated list content or  takes it outside of your table tags.

2011/2/28 Josh Kamau joshnet2...@gmail.com:
 Has anyone else experienced this problem?

 Or do i need to create a quickstart?

 Josh.

 On Mon, Feb 28, 2011 at 8:19 PM, Josh Kamau joshnet2...@gmail.com wrote:

 Hi there,

 I am
  trying to use a list view in a modal dialog. But all the time the modal
 dialog shows everything else except what is inside the table/table tags

 Here is the panel that am setting as the modal dialog content.

 Panel.html

     wicket:panel
         form wicket:id=frmProject
             div id=content
                 div style=margin: 2px 0pt 10px;
                     div style=float: right;1 selected of 13/div

                     input type=checkbox wicket:id=selector/
 Select/Deselect All

                 /div

                 div wicket:id=projectUsers
                     span wicket:id=lbTest/span
                 table class=grid_list_table
                     thead
                         tr
                             th style=width: 10px;input
 type=checkbox/th
                             thFirst Nameimg src=img/desc.png
 class=sort/th
                             thLast Name/th
                             th style=width: 50%;/th
                         /tr
                     /thead
                     tbody
                         tr class=odd wicket:id=checkList
                             tdinput type=checkbox checked=checked
 wicket:id=checkbox/td
                             td wicket:id=lbFirstNameBob/td
                             td wicket:id=lbLastNameSmith/td
                             td/td
                         /tr
                     /tbody
                 /table
                 /div
             /div
         /form
     /wicket:panel

 Here is the Java class

 package com.printgate.webportal.panels;

 import java.util.List;

 import org.apache.wicket.ajax.AjaxRequestTarget;
 import org.apache.wicket.ajax.form.AjaxFormChoiceComponentUpdatingBehavior;
 import org.apache.wicket.markup.html.basic.Label;
 import org.apache.wicket.markup.html.form.Check;
 import org.apache.wicket.markup.html.form.CheckGroup;
 import org.apache.wicket.markup.html.form.CheckGroupSelector;
 import org.apache.wicket.markup.html.form.Form;
 import org.apache.wicket.markup.html.list.ListItem;
 import org.apache.wicket.markup.html.list.ListView;
 import org.apache.wicket.markup.html.panel.Panel;
 import org.apache.wicket.model.CompoundPropertyModel;
 import org.apache.wicket.model.LoadableDetachableModel;

 import com.google.inject.Inject;
 import com.printgate.webportal.dao.ProjectDao;
 import com.printgate.webportal.dao.UserDao;
 import com.printgate.webportal.entities.Project;
 import com.printgate.webportal.entities.User;
 import java.util.ArrayList;

 public class ModifyUsersPanel extends Panel {

     /**
      *
      */
     private static final long serialVersionUID = 1L;
     private FormModifyUsersPanel frmProject;
     private ListViewUser lstUsers;
     private CheckGroupUser chbUsers;
     @Inject
     private ProjectDao projectDao;
     @Inject
     private UserDao userDao;
     private ListUser projectUsers = new ArrayListUser();

     public ModifyUsersPanel(String id, final Project project) {
         super(id);

         projectUsers = userDao.getAllUsers();

         frmProject = new FormModifyUsersPanel(frmProject, new
 CompoundPropertyModelModifyUsersPanel(ModifyUsersPanel.this));
         frmProject.setOutputMarkupId(true);

         chbUsers = new CheckGroupUser(projectUsers);
         chbUsers.add(new AjaxFormChoiceComponentUpdatingBehavior() {

             private static final long serialVersionUID = 1L;

             @Override
             protected void onUpdate(AjaxRequestTarget target) {
                 projectDao.updateProject(project);
             }
         });

         lstUsers = new ListViewUser(checkList, new
 LoadableDetachableModelListUser() {

             private static final long serialVersionUID = 1L;

             @Override
             protected ListUser load() {
                 return userDao.getAllUsers();
             }
         }) {

             /**
              *
              */
             private static final long serialVersionUID = 1L;

             @Override
             protected void populateItem(ListItemUser item) {

                 item.add(new CheckUser(checkbox, item.getModel()));
                 item.add(new Label(lbFirstName,
 item.getModelObject().getFirstname()));
                 item.add(new Label(lbLastName,
 item.getModelObject().getLastname()));
             }
         };
         lstUsers.setReuseItems(true);
         chbUsers.add(lstUsers);
         frmProject.add(chbUsers);
         frmProject.add(new CheckGroupSelector(selector, chbUsers));


RE: Perfomance of IDataProvider

2011-03-01 Thread MZemeck
Here's a start, please anyone correct me if I've made any mistakes...

public class ListLDM extends LoadableDetachableModelList {
 
private String id;
 
public ListLDM(List l, String id) {
//constructor with primed model
super(l);
this.id = id;
}
 
public ListLDM(String id) {
//constructor with empty model
this.id = id;
}

@Override
protected List load() {
return service.getList(id);
}

}



From:   John Owen jo...@globalscape.com
To: users@wicket.apache.org users@wicket.apache.org
Date:   02/28/2011 05:35 PM
Subject:RE: Perfomance of IDataProvider



An example with a list would be quite useful.

Regards

-Original Message-
From: mzem...@osc.state.ny.us [mailto:mzem...@osc.state.ny.us] 
Sent: Monday, February 28, 2011 3:10 PM
To: users@wicket.apache.org
Subject: Re: Perfomance of IDataProvider

If I understand where you are going I completely agree the example is a 
little misleading.  Some ways to think about it differently... 

id is synonymous with a small sub-set of the entire result-set which 
can be used to rehydrate the detached model

The model is the data you want to provide to a repeater for instance, so 
this can be a single Contact model (one query for each row) or a 
ContactList (one query per page with pagination).  Retrieving a list 
instead of each contact individually would be more efficient.

If you need an example let me know...




From:   Juansoft andresnet2...@yahoo.es
To: users@wicket.apache.org
Date:   02/28/2011 03:53 PM
Subject:Re: Perfomance of IDataProvider



First render thanks for your replies.

@vov: If i use this:

  public IModelEntity model(Entity entity)
  {
return new ModelEntity(entity);
 } 

In this case the memory footprint of the session grows because you return
Model object that is not a transient object(or this is what I've read in
wicket documentation...!!) .  ¿This means that if you dataview have 100 
rows
you have 100 ModelEntity stored in your session?

¿To avoid this do not exist LoadableDetachableModel what is detached after
page rendering?


@James Carman:

This is the aspect of the most LoadableDetachableModel used in DataView
examples. Specifically in wicket official examples. For each row in 
DataView
this create new DetachableContactModel , store his ID. After in method
populateItem of Dataview, getModelObject() call result in direct call to
DetachableContactModel.load() that again return object to a database.

Using hibernate this object is cached (or so I have understood), but if 
use
hand made DAO (like me) that simply query and return a POJO populated this
result in more database conections and querys! Am I right?


public class DetachableContactModel extends LoadableDetachableModel
{
private long id;
 
  protected ContactsDatabase getContactsDB()
   {

return DatabaseLocator.getDatabase();
   }

/**
 * @param c
 */
public DetachableContactModel(Contact c)
{ 
this(c.getid())
}

/**
 * @param id
 */
public DetachableContactModel(long id)
{
if (id == 0)
{
throw new IllegalArgumentException();
}
this.id = id;
}

/**
 * @see java.lang.Object#hashCode()
 */
public int hashCode()
{
return Long.valueOf(id).hashCode();
}

/**
 * used for dataview with ReuseIfModelsEqualStrategy item reuse 
strategy
 *
 * @see org.apache.wicket.markup.repeater.ReuseIfModelsEqualStrategy
 * @see java.lang.Object#equals(java.lang.Object)
 */
public boolean equals(final Object obj)
{
if (obj == this)
{
return true;
}
else if (obj == null)
{
return false;
}
else if (obj instanceof DetachableContactModel)
{
DetachableContactModel other = (DetachableContactModel)obj;
return other.id == this.id;
}
return false;
}

/**
 * @see org.apache.wicket.model.LoadableDetachableModel#load()
 */
@Override
protected Object load()
{
// loads contact from the database 
return getContactsDB().get(id); 
}
 
 
}



-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Perfomance-of-IDataProvider-tp3325777p3328345.html


Sent from the Users forum mailing list archive at Nabble.com.

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






Notice: This communication, including any attachments, is intended solely 
for the use of the individual or entity to which it is addressed. This 
communication may contain information that is protected from disclosure 
under State and/or Federal law. 

Re: Just 100K per session? That would be my dream come true! (Anyone here who has tuned session size before?)

2011-03-01 Thread Antoine van Wel
*bump*

I'm one of those people who is reading :-)


Antoine


On Mon, Feb 21, 2011 at 3:11 PM, Per p...@hamburg.de wrote:


 Hi,

 I am measuring it in a profiler after the request has been completed,
 but thanks for the hint.

 In case anyone else is reading, I have been playing with the
 onComponentTag() and onComponentTagBody() methods on the weekend, and
 I've been able to reduce my page sizes significantly. Admittedly, this
 comes at the expense of flexibility and beauty, but I'm only doing this
 in the inner loops of very few pages, so who cares :-)  Will write a
 summary with a couple of hints once I stop drowning in work.

 Cheers,
 Per


  Reading in the other thread that a session size of 100K or less
  is achievable, I'll admit defeat now: I have not been able to shrink
 some of
  my pages(!) to less than 200K, not to mention the sessions. Despite
 LDMs,
  CompoundPropertyModels, and no, there are no domain objects in
 there, and no
  finals.

 How are you measuring this? Keep in mind that if you calculate when a
 request is still processing, you might still be measuring temporary
 data (e.g. for LoadableDetachableModel, you would also measure the
 transientModelObject, and same for any proxies (Spring/ Guice) you
 might use.

 Eelco

 -
 To unsubscribe, e-mail: [hidden email]
 /user/SendEmail.jtp?type=nodenode=3316743i=0
 For additional commands, e-mail: [hidden email]
 /user/SendEmail.jtp?type=nodenode=3316743i=1



 
 If you reply to this email, your message will be added to the
 discussion below:
 http://apache-wicket.1842946.n4.nabble.com/Just-100K-per-session-That-would-be-my-dream-come-true-Anyone-here-who-has-tuned-session-size-before-tp3308014p3316743.html

 To unsubscribe from Just 100K per session? That would be my dream come
 true! (Anyone here who has tuned session size before?), click here
 http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=3308014code=cGVyQGhhbWJ1cmcuZGV8MzMwODAxNHwtMjI2MTAwMzE0.



 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Just-100K-per-session-That-would-be-my-dream-come-true-Anyone-here-who-has-tuned-session-size-before-tp3308014p3317403.html
 Sent from the Users forum mailing list archive at Nabble.com.

 -
 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: Displaying table in a modalDialog

2011-03-01 Thread Josh Kamau
Thanks Zoltan,

How did you resolve the issue? In my case ,  the entire table/table tag
is removed. If i put a test label just outside the table tag, it is
displayed.

Josh.

On Tue, Mar 1, 2011 at 5:22 PM, Zoltán Nagy zberke...@gmail.com wrote:

 Hi!

 Yes, i've also run into this problem.
 See the sources of the generated page, something will be between the
 table and th/tr/tbody/thead tags. The browser simply drops your
 generated list content or  takes it outside of your table tags.

 2011/2/28 Josh Kamau joshnet2...@gmail.com:
  Has anyone else experienced this problem?
 
  Or do i need to create a quickstart?
 
  Josh.
 
  On Mon, Feb 28, 2011 at 8:19 PM, Josh Kamau joshnet2...@gmail.com
 wrote:
 
  Hi there,
 
  I am
   trying to use a list view in a modal dialog. But all the time the modal
  dialog shows everything else except what is inside the table/table
 tags
 
  Here is the panel that am setting as the modal dialog content.
 
  Panel.html
 
  wicket:panel
  form wicket:id=frmProject
  div id=content
  div style=margin: 2px 0pt 10px;
  div style=float: right;1 selected of 13/div
 
  input type=checkbox wicket:id=selector/
  Select/Deselect All
 
  /div
 
  div wicket:id=projectUsers
  span wicket:id=lbTest/span
  table class=grid_list_table
  thead
  tr
  th style=width: 10px;input
  type=checkbox/th
  thFirst Nameimg src=img/desc.png
  class=sort/th
  thLast Name/th
  th style=width: 50%;/th
  /tr
  /thead
  tbody
  tr class=odd wicket:id=checkList
  tdinput type=checkbox checked=checked
  wicket:id=checkbox/td
  td wicket:id=lbFirstNameBob/td
  td wicket:id=lbLastNameSmith/td
  td/td
  /tr
  /tbody
  /table
  /div
  /div
  /form
  /wicket:panel
 
  Here is the Java class
 
  package com.printgate.webportal.panels;
 
  import java.util.List;
 
  import org.apache.wicket.ajax.AjaxRequestTarget;
  import
 org.apache.wicket.ajax.form.AjaxFormChoiceComponentUpdatingBehavior;
  import org.apache.wicket.markup.html.basic.Label;
  import org.apache.wicket.markup.html.form.Check;
  import org.apache.wicket.markup.html.form.CheckGroup;
  import org.apache.wicket.markup.html.form.CheckGroupSelector;
  import org.apache.wicket.markup.html.form.Form;
  import org.apache.wicket.markup.html.list.ListItem;
  import org.apache.wicket.markup.html.list.ListView;
  import org.apache.wicket.markup.html.panel.Panel;
  import org.apache.wicket.model.CompoundPropertyModel;
  import org.apache.wicket.model.LoadableDetachableModel;
 
  import com.google.inject.Inject;
  import com.printgate.webportal.dao.ProjectDao;
  import com.printgate.webportal.dao.UserDao;
  import com.printgate.webportal.entities.Project;
  import com.printgate.webportal.entities.User;
  import java.util.ArrayList;
 
  public class ModifyUsersPanel extends Panel {
 
  /**
   *
   */
  private static final long serialVersionUID = 1L;
  private FormModifyUsersPanel frmProject;
  private ListViewUser lstUsers;
  private CheckGroupUser chbUsers;
  @Inject
  private ProjectDao projectDao;
  @Inject
  private UserDao userDao;
  private ListUser projectUsers = new ArrayListUser();
 
  public ModifyUsersPanel(String id, final Project project) {
  super(id);
 
  projectUsers = userDao.getAllUsers();
 
  frmProject = new FormModifyUsersPanel(frmProject, new
  CompoundPropertyModelModifyUsersPanel(ModifyUsersPanel.this));
  frmProject.setOutputMarkupId(true);
 
  chbUsers = new CheckGroupUser(projectUsers);
  chbUsers.add(new AjaxFormChoiceComponentUpdatingBehavior() {
 
  private static final long serialVersionUID = 1L;
 
  @Override
  protected void onUpdate(AjaxRequestTarget target) {
  projectDao.updateProject(project);
  }
  });
 
  lstUsers = new ListViewUser(checkList, new
  LoadableDetachableModelListUser() {
 
  private static final long serialVersionUID = 1L;
 
  @Override
  protected ListUser load() {
  return userDao.getAllUsers();
  }
  }) {
 
  /**
   *
   */
  private static final long serialVersionUID = 1L;
 
  @Override
  protected void populateItem(ListItemUser item) {
 
  item.add(new CheckUser(checkbox, 

RE: Perfomance of IDataProvider

2011-03-01 Thread Juansoft
Thank for the replies!

 
MZemeck wrote:
 
 Here's a start, please anyone correct me if I've made any mistakes...
 
 public class ListLDM extends LoadableDetachableModelList {
  
 private String id;
  
 public ListLDM(List l, String id) {
 //constructor with primed model
 super(l);
 this.id = id;
 }
  
 public ListLDM(String id) {
 //constructor with empty model
 this.id = id;
 }
 
 @Override
 protected List load() {
 return service.getList(id);
 }
 
 }
 
 
 

In this example , the object that you're wrap in the inner model (List l
that you are send in super() constructor) is not used anywhere... ¿i'm
wrong? in this case , ¿why should be using this (in reference a List l in
constructor)?




-
Another wicket newbie programmer

Wicket en Español - 

http://aprendiendowicket.wordpress.com 
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Perfomance-of-IDataProvider-tp3325777p3330259.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Perfomance of IDataProvider

2011-03-01 Thread James Carman
It is referenced by the superclass (LoadableDetachableModel in this
case).  It will cache the list until after the request cycle is
complete.  Upon subsequent request cycles, the load() method will be
called to re-load the list.

On Tue, Mar 1, 2011 at 12:51 PM, Juansoft andresnet2...@yahoo.es wrote:
 Thank for the replies!


 MZemeck wrote:

 Here's a start, please anyone correct me if I've made any mistakes...

 public class ListLDM extends LoadableDetachableModelList {

         private String id;

         public ListLDM(List l, String id) {
                 //constructor with primed model
                 super(l);
                 this.id = id;
         }

         public ListLDM(String id) {
                 //constructor with empty model
                 this.id = id;
         }

         @Override
         protected List load() {
                 return service.getList(id);
         }

 }




 In this example , the object that you're wrap in the inner model (List l
 that you are send in super() constructor) is not used anywhere... ¿i'm
 wrong? in this case , ¿why should be using this (in reference a List l in
 constructor)?




 -
 Another wicket newbie programmer
 
 Wicket en Español -

 http://aprendiendowicket.wordpress.com
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Perfomance-of-IDataProvider-tp3325777p3330259.html
 Sent from the Users forum mailing list archive at Nabble.com.

 -
 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: Perfomance of IDataProvider

2011-03-01 Thread MZemeck
super(l) stores the model as an instance variable on the superclass.  When 
getObject() is called on the LDM, it checks to see if the instance 
variable (the model object) is null.  If it is null, load() will be called 
to populate the model.  Once the request is complete the model is detached 
(instance variable set to null).  Then the cycle repeats...

A use case for super(l) is SortableDataProvider (SDP) seen below and taken 
from Wicket repeaters example.  The SDP retrieves the records of interest 
for pagination using iterator(), then creates a model.  If the object was 
not passed into the DetachableContactModel, the load() method would make 
another db call to populate the model.

public class SortableContactDataProvider extends SortableDataProviderContact 
{

public SortableContactDataProvider() {
// set default sort
setSort(firstName, SortOrder.ASCENDING);
}

public IteratorContact iterator(int first, int count) {
return service.find(first, count, getSort()).iterator();
}

 
public int size() {
return service.getCount();
}

public IModelContact model(Contact object) {
return new DetachableContactModel(object);
} 

} 





From:   James Carman ja...@carmanconsulting.com
To: users@wicket.apache.org
Date:   03/01/2011 01:11 PM
Subject:Re: Perfomance of IDataProvider
Sent by:jcar...@carmanconsulting.com



It is referenced by the superclass (LoadableDetachableModel in this
case).  It will cache the list until after the request cycle is
complete.  Upon subsequent request cycles, the load() method will be
called to re-load the list.

On Tue, Mar 1, 2011 at 12:51 PM, Juansoft andresnet2...@yahoo.es wrote:
 Thank for the replies!


 MZemeck wrote:

 Here's a start, please anyone correct me if I've made any mistakes...

 public class ListLDM extends LoadableDetachableModelList {

 private String id;

 public ListLDM(List l, String id) {
 //constructor with primed model
 super(l);
 this.id = id;
 }

 public ListLDM(String id) {
 //constructor with empty model
 this.id = id;
 }

 @Override
 protected List load() {
 return service.getList(id);
 }

 }




 In this example , the object that you're wrap in the inner model (List 
l
 that you are send in super() constructor) is not used anywhere... ¿i'm
 wrong? in this case , ¿why should be using this (in reference a List l 
in
 constructor)?




 -
 Another wicket newbie programmer
 
 Wicket en Español -

 http://aprendiendowicket.wordpress.com
 --
 View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Perfomance-of-IDataProvider-tp3325777p3330259.html

 Sent from the Users forum mailing list archive at Nabble.com.

 -
 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






Notice: This communication, including any attachments, is intended solely 
for the use of the individual or entity to which it is addressed. This 
communication may contain information that is protected from disclosure 
under State and/or Federal law. Please notify the sender immediately if 
you have received this communication in error and delete this email from 
your system. If you are not the intended recipient, you are requested not 
to disclose, copy, distribute or take any action in reliance on the 
contents of this information.

Re: Vote/Veto: Should I put 1.5 RC1 on App Engine into production this week?

2011-03-01 Thread Fernando O.
Interesting, I'm also migrating to Wicket 1.5 with GAE

First a comment: In addition to what you mention I had to change the default
HeaderRenderStrategy to
org.apache.wicket.markup.renderStrategy.ParentFirstHeaderRenderStrategy
 since it's rendering the child headers before parents and that doesn't work
for me. I tried reverting the call order in renderHead() but didn't work.

Now a question:
Did you use Ajax? .

I'm getting the following error and I don't know what could be the problem
(I'm a wicket newbie :S )

Last cause: STREAMED
WicketMessage: Method onRequest of interface
org.apache.wicket.behavior.IBehaviorListener targeted at
org.apache.wicket.ajax.markup.html.form.AjaxButton$1@161b0bc on
component [ [Component id = postCommentButton]] threw an exception

Root cause:

java.lang.IllegalStateException: STREAMED
 at org.mortbay.jetty.Request.getReader(Request.java:935)
 at 
org.apache.wicket.protocol.http.servlet.ServletWebRequest.generatePostParameters(ServletWebRequest.java:250)
 at 
org.apache.wicket.protocol.http.servlet.ServletWebRequest.getPostRequestParameters(ServletWebRequest.java:294)
 at 
org.apache.wicket.protocol.http.servlet.ServletWebRequest.access$000(ServletWebRequest.java:60)
 at 
org.apache.wicket.protocol.http.servlet.ServletWebRequest$1.getParameterValues(ServletWebRequest.java:331)
 at 
org.apache.wicket.request.parameter.CombinedRequestParametersAdapter.getParameterValues(CombinedRequestParametersAdapter.java:88)
 at 
org.apache.wicket.markup.html.form.FormComponent.getInputAsArray(FormComponent.java:702)
 at 
org.apache.wicket.markup.html.form.FormComponent.inputChanged(FormComponent.java:871)
 at org.apache.wicket.markup.html.form.Form$9.component(Form.java:1045)
 at org.apache.wicket.markup.html.form.Form$9.component(Form.java:1041)
 at 
org.apache.wicket.util.visit.Visits.visitPostOrderHelper(Visits.java:274)
 at 
org.apache.wicket.util.visit.Visits.visitPostOrderHelper(Visits.java:263)
 at 
org.apache.wicket.util.visit.Visits.visitPostOrderHelper(Visits.java:263)
 at org.apache.wicket.util.visit.Visits.visitPostOrder(Visits.java:246)
 at 
org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrder(FormComponent.java:344)
 at 
org.apache.wicket.markup.html.form.Form.visitFormComponentsPostOrder(Form.java:980)
 at org.apache.wicket.markup.html.form.Form.inputChanged(Form.java:1039)
 at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:706)
 at 
org.apache.wicket.ajax.form.AjaxFormSubmitBehavior.onEvent(AjaxFormSubmitBehavior.java:148)
 at 
org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:166)
 at 
org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:300)
 at java.lang.reflect.Method.invoke(Method.java:616)
 at 
com.google.appengine.tools.development.agent.runtime.Runtime.invoke(Runtime.java:100)
 at 
org.apache.wicket.RequestListenerInterface.internalInvoke(RequestListenerInterface.java:259)
 at 
org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:240)
 at 
org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.invokeListener(ListenerInterfaceRequestHandler.java:178)
 at 
org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:157)
 at 
org.apache.wicket.request.RequestHandlerStack.executeRequestHandler(RequestHandlerStack.java:84)
 at 
org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:205)
 at 
org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:247)
 at 
org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:138)


Thanks!


On Sun, Feb 13, 2011 at 4:25 PM, Per p...@hamburg.de wrote:


 Hi Martin,

 yes, I used your utility, it was great to get me started!  Funny enough,
 I had prepared several questions (which I then ended up answering by
 myself and never posted), and in each of them I was referring to your
 utility. Almost asked you directly, but figured it out before I did.
 I'll make sure it's mentioned in the overall summary once I am through
 with this.


 Two items maybe worth mentioning already, since you asked: If you use
 the always-on feature in GAE, there's a much higher chance that your
 session gets deserialised on a node that was not in use yet. You get an
 exception like this:


 Caused by: java.lang.IllegalStateException: PageManager for application
 quickstart not registered.
 at

 org.apache.wicket.page.MyPersistentPageManager$SessionEntry.getPageStore(MyPersistentPageManager.java:117)
 at

 org.apache.wicket.page.MyPersistentPageManager$SessionEntry.readObject(MyPersistentPageManager.java:292)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at

 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
   

Re: Displaying table in a modalDialog

2011-03-01 Thread Zoltán Nagy
exactly. the problem is on the client side.

I don't know a really good solution but these workaround could solve it:
- turn off generating wicket: tags:
Application.get().getMarkupSettings().setStripWicketTags(true);
- don't use table at all, use divs instead
- use separate templates for development and production environment.
only in production environment (where rendering wicket: tags is
disabled) use table tags.


2011/3/1 Josh Kamau joshnet2...@gmail.com:
 Thanks Zoltan,

 How did you resolve the issue? In my case ,  the entire table/table tag
 is removed. If i put a test label just outside the table tag, it is
 displayed.

 Josh.



-- 
Zoltán Nagy

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



Re: Displaying table in a modalDialog

2011-03-01 Thread Josh Kamau
Thanks Zultan for your feedback. Striping wicket tags didnt help. Anything
other than a table works. Does it mean it is Illegal to use table tags
inside inside a modal dialog?

Josh.

On Tue, Mar 1, 2011 at 10:09 PM, Zoltán Nagy zberke...@gmail.com wrote:

 exactly. the problem is on the client side.

 I don't know a really good solution but these workaround could solve it:
 - turn off generating wicket: tags:
 Application.get().getMarkupSettings().setStripWicketTags(true);
 - don't use table at all, use divs instead
 - use separate templates for development and production environment.
 only in production environment (where rendering wicket: tags is
 disabled) use table tags.


 2011/3/1 Josh Kamau joshnet2...@gmail.com:
  Thanks Zoltan,
 
  How did you resolve the issue? In my case ,  the entire table/table
 tag
  is removed. If i put a test label just outside the table tag, it is
  displayed.
 
  Josh.
 


 --
 Zoltán Nagy

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




Re: CheckBoxMultipleChoice.getInput() = NULL after switch to AjaxSubmit

2011-03-01 Thread Pedro Santos
Hi, send a quickstart, I tried to simulate here without
success, CheckBoxMultipleChoice is working fine.

On Wed, Feb 23, 2011 at 2:20 PM, eugenebalt eugeneb...@yahoo.com wrote:


 Yes, I've tried both the first one and the second one with
 onclick/onchange. The problem is still happening.
 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/CheckBoxMultipleChoice-getInput-NULL-after-switch-to-AjaxSubmit-tp3317829p3321391.html
 Sent from the Users forum mailing list archive at Nabble.com.

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




-- 
Pedro Henrique Oliveira dos Santos


Re: Displaying table in a modalDialog

2011-03-01 Thread James Carman
Did you check the javadocs for ModalWindow?

If you want to use form in modal window component make sure that you
put the modal window itself in another form (nesting forms is legal in
Wicket) and that the form on modal window is submitted before the
window get closed.

I don't know if that will help or not, but you seem to be using a form
in the modal window.  Also, I believe it works better with pages than
with panels.  You might try that.


On Tue, Mar 1, 2011 at 2:14 PM, Josh Kamau joshnet2...@gmail.com wrote:
 Thanks Zultan for your feedback. Striping wicket tags didnt help. Anything
 other than a table works. Does it mean it is Illegal to use table tags
 inside inside a modal dialog?

 Josh.

 On Tue, Mar 1, 2011 at 10:09 PM, Zoltán Nagy zberke...@gmail.com wrote:

 exactly. the problem is on the client side.

 I don't know a really good solution but these workaround could solve it:
 - turn off generating wicket: tags:
 Application.get().getMarkupSettings().setStripWicketTags(true);
 - don't use table at all, use divs instead
 - use separate templates for development and production environment.
 only in production environment (where rendering wicket: tags is
 disabled) use table tags.


 2011/3/1 Josh Kamau joshnet2...@gmail.com:
  Thanks Zoltan,
 
  How did you resolve the issue? In my case ,  the entire table/table
 tag
  is removed. If i put a test label just outside the table tag, it is
  displayed.
 
  Josh.
 


 --
 Zoltán Nagy

 -
 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: Just 100K per session? That would be my dream come true! (Anyone here who has tuned session size before?)

2011-03-01 Thread Per
Hi Antoine,

I have started collecting my hints over here:

http://www.small-improvements.com/blog/technical/tuning-wicket-session-size

Please note that much of it may be considered hacks and bad practice (I 
am just a Wicket user, not a Wicket master). There may be better ways to 
achieve the same results. I'd love to get feedback on these suggestions! 
So give it a shot and tell me how you went!

Good luck!
Per


 *bump*

 I'm one of those people who is reading :-)


 Antoine


 On Mon, Feb 21, 2011 at 3:11 PM, Per [hidden email] 
 /user/SendEmail.jtp?type=nodenode=3330006i=0 wrote:

 
 
  Hi,
 
  I am measuring it in a profiler after the request has been completed,
  but thanks for the hint.
 
  In case anyone else is reading, I have been playing with the
  onComponentTag() and onComponentTagBody() methods on the weekend, and
  I've been able to reduce my page sizes significantly. Admittedly, this
  comes at the expense of flexibility and beauty, but I'm only doing this
  in the inner loops of very few pages, so who cares :-)  Will write a
  summary with a couple of hints once I stop drowning in work.
 
  Cheers,
  Per
 
 
   Reading in the other thread that a session size of 100K or less
   is achievable, I'll admit defeat now: I have not been able to shrink
  some of
   my pages(!) to less than 200K, not to mention the sessions. Despite
  LDMs,
   CompoundPropertyModels, and no, there are no domain objects in
  there, and no
   finals.
 
  How are you measuring this? Keep in mind that if you calculate when a
  request is still processing, you might still be measuring temporary
  data (e.g. for LoadableDetachableModel, you would also measure the
  transientModelObject, and same for any proxies (Spring/ Guice) you
  might use.
 
  Eelco
 
  -
  To unsubscribe, e-mail: [hidden email]
  /user/SendEmail.jtp?type=nodenode=3316743i=0
  For additional commands, e-mail: [hidden email]
  /user/SendEmail.jtp?type=nodenode=3316743i=1
 
 
 
  
 
  If you reply to this email, your message will be added to the
  discussion below:
  
 http://apache-wicket.1842946.n4.nabble.com/Just-100K-per-session-That-would-be-my-dream-come-true-Anyone-here-who-has-tuned-session-size-before-tp3308014p3316743.html
  
 http://apache-wicket.1842946.n4.nabble.com/Just-100K-per-session-That-would-be-my-dream-come-true-Anyone-here-who-has-tuned-session-size-before-tp3308014p3316743.html?by-user=t
 
  To unsubscribe from Just 100K per session? That would be my dream come
  true! (Anyone here who has tuned session size before?), click here
  
 http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=3308014code=cGVyQGhhbWJ1cmcuZGV8MzMwODAxNHwtMjI2MTAwMzE0
  
 http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=3308014code=cGVyQGhhbWJ1cmcuZGV8MzMwODAxNHwtMjI2MTAwMzE0by-user=t.
  

 
 
 
  --
  View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Just-100K-per-session-That-would-be-my-dream-come-true-Anyone-here-who-has-tuned-session-size-before-tp3308014p3317403.html
  
 http://apache-wicket.1842946.n4.nabble.com/Just-100K-per-session-That-would-be-my-dream-come-true-Anyone-here-who-has-tuned-session-size-before-tp3308014p3317403.html?by-user=t
  Sent from the Users forum mailing list archive at Nabble.com.
 
  -
  To unsubscribe, e-mail: [hidden email] 
 /user/SendEmail.jtp?type=nodenode=3330006i=1
  For additional commands, e-mail: [hidden email] 
 /user/SendEmail.jtp?type=nodenode=3330006i=2
 
 

 -
 To unsubscribe, e-mail: [hidden email] 
 /user/SendEmail.jtp?type=nodenode=3330006i=3
 For additional commands, e-mail: [hidden email] 
 /user/SendEmail.jtp?type=nodenode=3330006i=4



 
 If you reply to this email, your message will be added to the 
 discussion below:
 http://apache-wicket.1842946.n4.nabble.com/Just-100K-per-session-That-would-be-my-dream-come-true-Anyone-here-who-has-tuned-session-size-before-tp3308014p3330006.html
  

 To unsubscribe from Just 100K per session? That would be my dream come 
 true! (Anyone here who has tuned session size before?), click here 
 http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=3308014code=cGVyQGhhbWJ1cmcuZGV8MzMwODAxNHwtMjI2MTAwMzE0.
  




-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Just-100K-per-session-That-would-be-my-dream-come-true-Anyone-here-who-has-tuned-session-size-before-tp3308014p3330425.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: 

Re: Displaying table in a modalDialog

2011-03-01 Thread Josh Kamau
Hi James,

I use a form in a moda window. i have also put the modal window inside
another form (i have called it modal window holder)

Josh.

On Tue, Mar 1, 2011 at 10:19 PM, James Carman ja...@carmanconsulting.comwrote:

 Did you check the javadocs for ModalWindow?

 If you want to use form in modal window component make sure that you
 put the modal window itself in another form (nesting forms is legal in
 Wicket) and that the form on modal window is submitted before the
 window get closed.

 I don't know if that will help or not, but you seem to be using a form
 in the modal window.  Also, I believe it works better with pages than
 with panels.  You might try that.


 On Tue, Mar 1, 2011 at 2:14 PM, Josh Kamau joshnet2...@gmail.com wrote:
  Thanks Zultan for your feedback. Striping wicket tags didnt help.
 Anything
  other than a table works. Does it mean it is Illegal to use table tags
  inside inside a modal dialog?
 
  Josh.
 
  On Tue, Mar 1, 2011 at 10:09 PM, Zoltán Nagy zberke...@gmail.com
 wrote:
 
  exactly. the problem is on the client side.
 
  I don't know a really good solution but these workaround could solve it:
  - turn off generating wicket: tags:
  Application.get().getMarkupSettings().setStripWicketTags(true);
  - don't use table at all, use divs instead
  - use separate templates for development and production environment.
  only in production environment (where rendering wicket: tags is
  disabled) use table tags.
 
 
  2011/3/1 Josh Kamau joshnet2...@gmail.com:
   Thanks Zoltan,
  
   How did you resolve the issue? In my case ,  the entire
 table/table
  tag
   is removed. If i put a test label just outside the table tag, it is
   displayed.
  
   Josh.
  
 
 
  --
  Zoltán Nagy
 
  -
  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: Displaying table in a modalDialog

2011-03-01 Thread Pedro Santos
Hi Josh, CheckGroup is set to render body only by default. As it correspond
to your table tag, it will be skipped. You can
call frmUserList.setRenderBodyOnly(false) or bind the CheckGroup component
to another tag in the markup, that can be skipped.

On Tue, Mar 1, 2011 at 4:10 PM, Josh Kamau joshnet2...@gmail.com wrote:

 Hi there,

 I havent gotten a solution for this yet. The problem is , when i display a
 table inside a modal dialog, the table tags disappear completly. Attached
 please find a quickstart demonstrating the same

 Kind regards.
 Josh.


 On Tue, Mar 1, 2011 at 8:15 PM, Josh Kamau joshnet2...@gmail.com wrote:

 Thanks Zoltan,

 How did you resolve the issue? In my case ,  the entire table/table
 tag is removed. If i put a test label just outside the table tag, it is
 displayed.

 Josh.


 On Tue, Mar 1, 2011 at 5:22 PM, Zoltán Nagy zberke...@gmail.com wrote:

 Hi!

 Yes, i've also run into this problem.
 See the sources of the generated page, something will be between the
 table and th/tr/tbody/thead tags. The browser simply drops your
 generated list content or  takes it outside of your table tags.

 2011/2/28 Josh Kamau joshnet2...@gmail.com:
  Has anyone else experienced this problem?
 
  Or do i need to create a quickstart?
 
  Josh.
 
  On Mon, Feb 28, 2011 at 8:19 PM, Josh Kamau joshnet2...@gmail.com
 wrote:
 
  Hi there,
 
  I am
   trying to use a list view in a modal dialog. But all the time the
 modal
  dialog shows everything else except what is inside the table/table
 tags
 
  Here is the panel that am setting as the modal dialog content.
 
  Panel.html
 
  wicket:panel
  form wicket:id=frmProject
  div id=content
  div style=margin: 2px 0pt 10px;
  div style=float: right;1 selected of 13/div
 
  input type=checkbox wicket:id=selector/
  Select/Deselect All
 
  /div
 
  div wicket:id=projectUsers
  span wicket:id=lbTest/span
  table class=grid_list_table
  thead
  tr
  th style=width: 10px;input
  type=checkbox/th
  thFirst Nameimg src=img/desc.png
  class=sort/th
  thLast Name/th
  th style=width: 50%;/th
  /tr
  /thead
  tbody
  tr class=odd wicket:id=checkList
  tdinput type=checkbox
 checked=checked
  wicket:id=checkbox/td
  td wicket:id=lbFirstNameBob/td
  td wicket:id=lbLastNameSmith/td
  td/td
  /tr
  /tbody
  /table
  /div
  /div
  /form
  /wicket:panel
 
  Here is the Java class
 
  package com.printgate.webportal.panels;
 
  import java.util.List;
 
  import org.apache.wicket.ajax.AjaxRequestTarget;
  import
 org.apache.wicket.ajax.form.AjaxFormChoiceComponentUpdatingBehavior;
  import org.apache.wicket.markup.html.basic.Label;
  import org.apache.wicket.markup.html.form.Check;
  import org.apache.wicket.markup.html.form.CheckGroup;
  import org.apache.wicket.markup.html.form.CheckGroupSelector;
  import org.apache.wicket.markup.html.form.Form;
  import org.apache.wicket.markup.html.list.ListItem;
  import org.apache.wicket.markup.html.list.ListView;
  import org.apache.wicket.markup.html.panel.Panel;
  import org.apache.wicket.model.CompoundPropertyModel;
  import org.apache.wicket.model.LoadableDetachableModel;
 
  import com.google.inject.Inject;
  import com.printgate.webportal.dao.ProjectDao;
  import com.printgate.webportal.dao.UserDao;
  import com.printgate.webportal.entities.Project;
  import com.printgate.webportal.entities.User;
  import java.util.ArrayList;
 
  public class ModifyUsersPanel extends Panel {
 
  /**
   *
   */
  private static final long serialVersionUID = 1L;
  private FormModifyUsersPanel frmProject;
  private ListViewUser lstUsers;
  private CheckGroupUser chbUsers;
  @Inject
  private ProjectDao projectDao;
  @Inject
  private UserDao userDao;
  private ListUser projectUsers = new ArrayListUser();
 
  public ModifyUsersPanel(String id, final Project project) {
  super(id);
 
  projectUsers = userDao.getAllUsers();
 
  frmProject = new FormModifyUsersPanel(frmProject, new
  CompoundPropertyModelModifyUsersPanel(ModifyUsersPanel.this));
  frmProject.setOutputMarkupId(true);
 
  chbUsers = new CheckGroupUser(projectUsers);
  chbUsers.add(new AjaxFormChoiceComponentUpdatingBehavior() {
 
  private static final long serialVersionUID = 1L;
 
  @Override
  protected void onUpdate(AjaxRequestTarget target) {

Re: Displaying table in a modalDialog

2011-03-01 Thread Sven Meier

Hi Pedro,

good catch.

I've never liked it that CheckGroup is the only component which uses 
setRenderBodyOnly(true) by default :(

Not very consistent and thus something to watch out for.

Regards

Sven

Am 01.03.2011 20:29, schrieb Pedro Santos:

Hi Josh, CheckGroup is set to render body only by default. As it correspond
to your table tag, it will be skipped. You can
call frmUserList.setRenderBodyOnly(false) or bind the CheckGroup component
to another tag in the markup, that can be skipped.

On Tue, Mar 1, 2011 at 4:10 PM, Josh Kamaujoshnet2...@gmail.com  wrote:


Hi there,

I havent gotten a solution for this yet. The problem is , when i display a
table inside a modal dialog, the table tags disappear completly. Attached
please find a quickstart demonstrating the same

Kind regards.
Josh.


On Tue, Mar 1, 2011 at 8:15 PM, Josh Kamaujoshnet2...@gmail.com  wrote:


Thanks Zoltan,

How did you resolve the issue? In my case ,  the entiretable/table
tag is removed. If i put a test label just outside thetable  tag, it is
displayed.

Josh.


On Tue, Mar 1, 2011 at 5:22 PM, Zoltán Nagyzberke...@gmail.com  wrote:


Hi!

Yes, i've also run into this problem.
See the sources of the generated page, something will be between the
table and th/tr/tbody/thead tags. The browser simply drops your
generated list content or  takes it outside of your table tags.

2011/2/28 Josh Kamaujoshnet2...@gmail.com:

Has anyone else experienced this problem?

Or do i need to create a quickstart?

Josh.

On Mon, Feb 28, 2011 at 8:19 PM, Josh Kamaujoshnet2...@gmail.com

wrote:



Hi there,

I am
  trying to use a list view in a modal dialog. But all the time the

modal

dialog shows everything else except what is inside thetable/table

tags


Here is the panel that am setting as the modal dialog content.

Panel.html

 wicket:panel
 form wicket:id=frmProject
 div id=content
 div style=margin: 2px 0pt 10px;
 div style=float: right;1 selected of 13/div

 input type=checkbox wicket:id=selector/
Select/Deselect All

 /div

 div wicket:id=projectUsers
 span wicket:id=lbTest/span
 table class=grid_list_table
 thead
 tr
 th style=width: 10px;input
type=checkbox/th
 thFirst Nameimg src=img/desc.png
class=sort/th
 thLast Name/th
 th style=width: 50%;/th
 /tr
 /thead
 tbody
 tr class=odd wicket:id=checkList
 tdinput type=checkbox

checked=checked

wicket:id=checkbox/td
 td wicket:id=lbFirstNameBob/td
 td wicket:id=lbLastNameSmith/td
 td/td
 /tr
 /tbody
 /table
 /div
 /div
 /form
 /wicket:panel

Here is the Java class

package com.printgate.webportal.panels;

import java.util.List;

import org.apache.wicket.ajax.AjaxRequestTarget;
import

org.apache.wicket.ajax.form.AjaxFormChoiceComponentUpdatingBehavior;

import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.form.Check;
import org.apache.wicket.markup.html.form.CheckGroup;
import org.apache.wicket.markup.html.form.CheckGroupSelector;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.list.ListItem;
import org.apache.wicket.markup.html.list.ListView;
import org.apache.wicket.markup.html.panel.Panel;
import org.apache.wicket.model.CompoundPropertyModel;
import org.apache.wicket.model.LoadableDetachableModel;

import com.google.inject.Inject;
import com.printgate.webportal.dao.ProjectDao;
import com.printgate.webportal.dao.UserDao;
import com.printgate.webportal.entities.Project;
import com.printgate.webportal.entities.User;
import java.util.ArrayList;

public class ModifyUsersPanel extends Panel {

 /**
  *
  */
 private static final long serialVersionUID = 1L;
 private FormModifyUsersPanel  frmProject;
 private ListViewUser  lstUsers;
 private CheckGroupUser  chbUsers;
 @Inject
 private ProjectDao projectDao;
 @Inject
 private UserDao userDao;
 private ListUser  projectUsers = new ArrayListUser();

 public ModifyUsersPanel(String id, final Project project) {
 super(id);

 projectUsers = userDao.getAllUsers();

 frmProject = new FormModifyUsersPanel(frmProject, new
CompoundPropertyModelModifyUsersPanel(ModifyUsersPanel.this));
 frmProject.setOutputMarkupId(true);

 chbUsers = new CheckGroupUser(projectUsers);
 chbUsers.add(new AjaxFormChoiceComponentUpdatingBehavior() {

 private static final long serialVersionUID = 1L;


Re: Just 100K per session? That would be my dream come true! (Anyone here who has tuned session size before?)

2011-03-01 Thread robert.mcguinness
Per,

Awesome summary.  Much obliged.

Rob

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Just-100K-per-session-That-would-be-my-dream-come-true-Anyone-here-who-has-tuned-session-size-before-tp3308014p3330455.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Just 100K per session? That would be my dream come true! (Anyone here who has tuned session size before?)

2011-03-01 Thread Cristi Manole
yup, nice read. tks for sharing

onComponentTag saved my arse too in the past. Probably that's why I don't
think it's that ugly anymore :)

On Tue, Mar 1, 2011 at 2:41 PM, robert.mcguinness 
robert.mcguinness@gmail.com wrote:

 Per,

 Awesome summary.  Much obliged.

 Rob

 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Just-100K-per-session-That-would-be-my-dream-come-true-Anyone-here-who-has-tuned-session-size-before-tp3308014p3330455.html
 Sent from the Users forum mailing list archive at Nabble.com.

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




Re: Just 100K per session? That would be my dream come true! (Anyone here who has tuned session size before?)

2011-03-01 Thread Antoine van Wel
Hi Per,

easy to read, good advice... Even the easiest stuff made me wonder
whether I did that right... Excellent to see all these tips together.


Thanks a bunch!


Antoine


On Tue, Mar 1, 2011 at 8:21 PM, Per p...@hamburg.de wrote:
 Hi Antoine,

 I have started collecting my hints over here:

 http://www.small-improvements.com/blog/technical/tuning-wicket-session-size

 Please note that much of it may be considered hacks and bad practice (I
 am just a Wicket user, not a Wicket master). There may be better ways to
 achieve the same results. I'd love to get feedback on these suggestions!
 So give it a shot and tell me how you went!

 Good luck!
 Per


 *bump*

 I'm one of those people who is reading :-)


 Antoine


 On Mon, Feb 21, 2011 at 3:11 PM, Per [hidden email]
 /user/SendEmail.jtp?type=nodenode=3330006i=0 wrote:

 
 
  Hi,
 
  I am measuring it in a profiler after the request has been completed,
  but thanks for the hint.
 
  In case anyone else is reading, I have been playing with the
  onComponentTag() and onComponentTagBody() methods on the weekend, and
  I've been able to reduce my page sizes significantly. Admittedly, this
  comes at the expense of flexibility and beauty, but I'm only doing this
  in the inner loops of very few pages, so who cares :-)  Will write a
  summary with a couple of hints once I stop drowning in work.
 
  Cheers,
  Per
 
 
   Reading in the other thread that a session size of 100K or less
   is achievable, I'll admit defeat now: I have not been able to shrink
  some of
   my pages(!) to less than 200K, not to mention the sessions. Despite
  LDMs,
   CompoundPropertyModels, and no, there are no domain objects in
  there, and no
   finals.
 
  How are you measuring this? Keep in mind that if you calculate when a
  request is still processing, you might still be measuring temporary
  data (e.g. for LoadableDetachableModel, you would also measure the
  transientModelObject, and same for any proxies (Spring/ Guice) you
  might use.
 
  Eelco
 
  -
  To unsubscribe, e-mail: [hidden email]
  /user/SendEmail.jtp?type=nodenode=3316743i=0
  For additional commands, e-mail: [hidden email]
  /user/SendEmail.jtp?type=nodenode=3316743i=1
 
 
 
 
 
  If you reply to this email, your message will be added to the
  discussion below:
 
 http://apache-wicket.1842946.n4.nabble.com/Just-100K-per-session-That-would-be-my-dream-come-true-Anyone-here-who-has-tuned-session-size-before-tp3308014p3316743.html
 http://apache-wicket.1842946.n4.nabble.com/Just-100K-per-session-That-would-be-my-dream-come-true-Anyone-here-who-has-tuned-session-size-before-tp3308014p3316743.html?by-user=t
 
  To unsubscribe from Just 100K per session? That would be my dream come
  true! (Anyone here who has tuned session size before?), click here
 
 http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=3308014code=cGVyQGhhbWJ1cmcuZGV8MzMwODAxNHwtMjI2MTAwMzE0
 http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=3308014code=cGVyQGhhbWJ1cmcuZGV8MzMwODAxNHwtMjI2MTAwMzE0by-user=t.

 
 
 
  --
  View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Just-100K-per-session-That-would-be-my-dream-come-true-Anyone-here-who-has-tuned-session-size-before-tp3308014p3317403.html
 http://apache-wicket.1842946.n4.nabble.com/Just-100K-per-session-That-would-be-my-dream-come-true-Anyone-here-who-has-tuned-session-size-before-tp3308014p3317403.html?by-user=t
  Sent from the Users forum mailing list archive at Nabble.com.
 
  -
  To unsubscribe, e-mail: [hidden email]
 /user/SendEmail.jtp?type=nodenode=3330006i=1
  For additional commands, e-mail: [hidden email]
 /user/SendEmail.jtp?type=nodenode=3330006i=2
 
 

 -
 To unsubscribe, e-mail: [hidden email]
 /user/SendEmail.jtp?type=nodenode=3330006i=3
 For additional commands, e-mail: [hidden email]
 /user/SendEmail.jtp?type=nodenode=3330006i=4



 
 If you reply to this email, your message will be added to the
 discussion below:
 http://apache-wicket.1842946.n4.nabble.com/Just-100K-per-session-That-would-be-my-dream-come-true-Anyone-here-who-has-tuned-session-size-before-tp3308014p3330006.html

 To unsubscribe from Just 100K per session? That would be my dream come
 true! (Anyone here who has tuned session size before?), click here
 http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=3308014code=cGVyQGhhbWJ1cmcuZGV8MzMwODAxNHwtMjI2MTAwMzE0.




 --
 View this message in context: 
 

Re: Just 100K per session? That would be my dream come true! (Anyone here who has tuned session size before?)

2011-03-01 Thread MZemeck
Great stuff, could you let us know when you have completed a 'final' 
version so I can check back?



From:   Per p...@hamburg.de
To: users@wicket.apache.org
Date:   03/01/2011 02:22 PM
Subject:Re: Just 100K per session? That would be my dream come 
true! (Anyone here who has tuned session size before?)



Hi Antoine,

I have started collecting my hints over here:

http://www.small-improvements.com/blog/technical/tuning-wicket-session-size


Please note that much of it may be considered hacks and bad practice (I 
am just a Wicket user, not a Wicket master). There may be better ways to 
achieve the same results. I'd love to get feedback on these suggestions! 
So give it a shot and tell me how you went!

Good luck!
Per


 *bump*

 I'm one of those people who is reading :-)


 Antoine


 On Mon, Feb 21, 2011 at 3:11 PM, Per [hidden email] 
 /user/SendEmail.jtp?type=nodenode=3330006i=0 wrote:

 
 
  Hi,
 
  I am measuring it in a profiler after the request has been completed,
  but thanks for the hint.
 
  In case anyone else is reading, I have been playing with the
  onComponentTag() and onComponentTagBody() methods on the weekend, and
  I've been able to reduce my page sizes significantly. Admittedly, this
  comes at the expense of flexibility and beauty, but I'm only doing 
this
  in the inner loops of very few pages, so who cares :-)  Will write a
  summary with a couple of hints once I stop drowning in work.
 
  Cheers,
  Per
 
 
   Reading in the other thread that a session size of 100K or less
   is achievable, I'll admit defeat now: I have not been able to 
shrink
  some of
   my pages(!) to less than 200K, not to mention the sessions. Despite
  LDMs,
   CompoundPropertyModels, and no, there are no domain objects in
  there, and no
   finals.
 
  How are you measuring this? Keep in mind that if you calculate when a
  request is still processing, you might still be measuring temporary
  data (e.g. for LoadableDetachableModel, you would also measure the
  transientModelObject, and same for any proxies (Spring/ Guice) you
  might use.
 
  Eelco
 
  -
  To unsubscribe, e-mail: [hidden email]
  /user/SendEmail.jtp?type=nodenode=3316743i=0
  For additional commands, e-mail: [hidden email]
  /user/SendEmail.jtp?type=nodenode=3316743i=1
 
 
 
  
 
  If you reply to this email, your message will be added to the
  discussion below:
  
 
http://apache-wicket.1842946.n4.nabble.com/Just-100K-per-session-That-would-be-my-dream-come-true-Anyone-here-who-has-tuned-session-size-before-tp3308014p3316743.html
 

 
http://apache-wicket.1842946.n4.nabble.com/Just-100K-per-session-That-would-be-my-dream-come-true-Anyone-here-who-has-tuned-session-size-before-tp3308014p3316743.html?by-user=t

 
  To unsubscribe from Just 100K per session? That would be my dream 
come
  true! (Anyone here who has tuned session size before?), click here
  
 
http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=3308014code=cGVyQGhhbWJ1cmcuZGV8MzMwODAxNHwtMjI2MTAwMzE0
 

 
http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=3308014code=cGVyQGhhbWJ1cmcuZGV8MzMwODAxNHwtMjI2MTAwMzE0by-user=t
. 

 
 
 
  --
  View this message in context: 
 
http://apache-wicket.1842946.n4.nabble.com/Just-100K-per-session-That-would-be-my-dream-come-true-Anyone-here-who-has-tuned-session-size-before-tp3308014p3317403.html
 

 
http://apache-wicket.1842946.n4.nabble.com/Just-100K-per-session-That-would-be-my-dream-come-true-Anyone-here-who-has-tuned-session-size-before-tp3308014p3317403.html?by-user=t

  Sent from the Users forum mailing list archive at Nabble.com.
 
  -
  To unsubscribe, e-mail: [hidden email] 
 /user/SendEmail.jtp?type=nodenode=3330006i=1
  For additional commands, e-mail: [hidden email] 
 /user/SendEmail.jtp?type=nodenode=3330006i=2
 
 

 -
 To unsubscribe, e-mail: [hidden email] 
 /user/SendEmail.jtp?type=nodenode=3330006i=3
 For additional commands, e-mail: [hidden email] 
 /user/SendEmail.jtp?type=nodenode=3330006i=4



 
 If you reply to this email, your message will be added to the 
 discussion below:
 
http://apache-wicket.1842946.n4.nabble.com/Just-100K-per-session-That-would-be-my-dream-come-true-Anyone-here-who-has-tuned-session-size-before-tp3308014p3330006.html
 


 To unsubscribe from Just 100K per session? That would be my dream come 
 true! (Anyone here who has tuned session size before?), click here 
 
http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=3308014code=cGVyQGhhbWJ1cmcuZGV8MzMwODAxNHwtMjI2MTAwMzE0
. 




-- 
View this message in 

Re: Just 100K per session? That would be my dream come true! (Anyone here who has tuned session size before?)

2011-03-01 Thread Cristi Manole
I found this useful also :

http://www.small-improvements.com/10-things-about-apache-wicket-i-love/wicket:pageMapName/wicket-8

[same site, same author, kudos Per]

On Tue, Mar 1, 2011 at 3:13 PM, mzem...@osc.state.ny.us wrote:

 Great stuff, could you let us know when you have completed a 'final'
 version so I can check back?



 From:   Per p...@hamburg.de
 To: users@wicket.apache.org
 Date:   03/01/2011 02:22 PM
 Subject:Re: Just 100K per session? That would be my dream come
 true! (Anyone here who has tuned session size before?)



 Hi Antoine,

 I have started collecting my hints over here:

 http://www.small-improvements.com/blog/technical/tuning-wicket-session-size


 Please note that much of it may be considered hacks and bad practice (I
 am just a Wicket user, not a Wicket master). There may be better ways to
 achieve the same results. I'd love to get feedback on these suggestions!
 So give it a shot and tell me how you went!

 Good luck!
 Per


  *bump*
 
  I'm one of those people who is reading :-)
 
 
  Antoine
 
 
  On Mon, Feb 21, 2011 at 3:11 PM, Per [hidden email]
  /user/SendEmail.jtp?type=nodenode=3330006i=0 wrote:
 
  
  
   Hi,
  
   I am measuring it in a profiler after the request has been completed,
   but thanks for the hint.
  
   In case anyone else is reading, I have been playing with the
   onComponentTag() and onComponentTagBody() methods on the weekend, and
   I've been able to reduce my page sizes significantly. Admittedly, this
   comes at the expense of flexibility and beauty, but I'm only doing
 this
   in the inner loops of very few pages, so who cares :-)  Will write a
   summary with a couple of hints once I stop drowning in work.
  
   Cheers,
   Per
  
  
Reading in the other thread that a session size of 100K or less
is achievable, I'll admit defeat now: I have not been able to
 shrink
   some of
my pages(!) to less than 200K, not to mention the sessions. Despite
   LDMs,
CompoundPropertyModels, and no, there are no domain objects in
   there, and no
finals.
  
   How are you measuring this? Keep in mind that if you calculate when a
   request is still processing, you might still be measuring temporary
   data (e.g. for LoadableDetachableModel, you would also measure the
   transientModelObject, and same for any proxies (Spring/ Guice) you
   might use.
  
   Eelco
  
   -
   To unsubscribe, e-mail: [hidden email]
   /user/SendEmail.jtp?type=nodenode=3316743i=0
   For additional commands, e-mail: [hidden email]
   /user/SendEmail.jtp?type=nodenode=3316743i=1
  
  
  
  
  
   If you reply to this email, your message will be added to the
   discussion below:
  
 

 http://apache-wicket.1842946.n4.nabble.com/Just-100K-per-session-That-would-be-my-dream-come-true-Anyone-here-who-has-tuned-session-size-before-tp3308014p3316743.html

  

 http://apache-wicket.1842946.n4.nabble.com/Just-100K-per-session-That-would-be-my-dream-come-true-Anyone-here-who-has-tuned-session-size-before-tp3308014p3316743.html?by-user=t
 
  
   To unsubscribe from Just 100K per session? That would be my dream
 come
   true! (Anyone here who has tuned session size before?), click here
  
  

 http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=3308014code=cGVyQGhhbWJ1cmcuZGV8MzMwODAxNHwtMjI2MTAwMzE0

  

 http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=3308014code=cGVyQGhhbWJ1cmcuZGV8MzMwODAxNHwtMjI2MTAwMzE0by-user=t
 .
 
  
  
  
   --
   View this message in context:
 

 http://apache-wicket.1842946.n4.nabble.com/Just-100K-per-session-That-would-be-my-dream-come-true-Anyone-here-who-has-tuned-session-size-before-tp3308014p3317403.html

  

 http://apache-wicket.1842946.n4.nabble.com/Just-100K-per-session-That-would-be-my-dream-come-true-Anyone-here-who-has-tuned-session-size-before-tp3308014p3317403.html?by-user=t
 
   Sent from the Users forum mailing list archive at Nabble.com.
  
   -
   To unsubscribe, e-mail: [hidden email]
  /user/SendEmail.jtp?type=nodenode=3330006i=1
   For additional commands, e-mail: [hidden email]
  /user/SendEmail.jtp?type=nodenode=3330006i=2
  
  
 
  -
  To unsubscribe, e-mail: [hidden email]
  /user/SendEmail.jtp?type=nodenode=3330006i=3
  For additional commands, e-mail: [hidden email]
  /user/SendEmail.jtp?type=nodenode=3330006i=4
 
 
 
  
  If you reply to this email, your message will be added to the
  discussion below:
 

 http://apache-wicket.1842946.n4.nabble.com/Just-100K-per-session-That-would-be-my-dream-come-true-Anyone-here-who-has-tuned-session-size-before-tp3308014p3330006.html

 
  

Re: Wicket philosophy, modelObject isVisible, isEnabled, CSS

2011-03-01 Thread Jonathan Locke
one other possibility you didn't mention is to nest or layer models. you
could use an attribute modifier with a view-adapting model that wraps the
data model to provide translation from a pure data model into a value
appropriate for the view layer. this would preserve abstraction better. make
sense?


-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-philosophy-modelObject-isVisible-isEnabled-CSS-tp3328174p3330528.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Displaying table in a modalDialog

2011-03-01 Thread Zoltán Nagy
That's right. I haven't seen the attached zip.


2011/3/1 Pedro Santos pedros...@gmail.com:
 Hi Josh, CheckGroup is set to render body only by default. As it correspond
 to your table tag, it will be skipped. You can
 call frmUserList.setRenderBodyOnly(false) or bind the CheckGroup component
 to another tag in the markup, that can be skipped.



-- 
Zoltán Nagy

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



Re: Vote/Veto: Should I put 1.5 RC1 on App Engine into production this week?

2011-03-01 Thread Per
Hi Fernando,

I didn't come across your problems, although I use TONS of Wicket AJAX. :-)

But what helped me sort my problems and thoughts was to create a 
quickstart (see the main docs), and to start with a minimal example. 
Then enhance it step by step until the quickstart shows the same problem 
like in production using the real app. You may want to try that too.  My 
application is fairly large and complex, and yet I didn't have to change 
the header strategy nor did I get the STREAMED error. Chances are 
there's something in your setup that's not a 100% required. Or if it is, 
you'd find out by using the minimalistic quickstart route, growing it 
step by step.

Cheers,
Per


 Interesting, I'm also migrating to Wicket 1.5 with GAE

 First a comment: In addition to what you mention I had to change the 
 default
 HeaderRenderStrategy to
 org.apache.wicket.markup.renderStrategy.ParentFirstHeaderRenderStrategy
  since it's rendering the child headers before parents and that 
 doesn't work
 for me. I tried reverting the call order in renderHead() but didn't work.

 Now a question:
 Did you use Ajax? .

 I'm getting the following error and I don't know what could be the 
 problem
 (I'm a wicket newbie :S )

 Last cause: STREAMED
 WicketMessage: Method onRequest of interface
 org.apache.wicket.behavior.IBehaviorListener targeted at
 org.apache.wicket.ajax.markup.html.form.AjaxButton$1@161b0bc on
 component [ [Component id = postCommentButton]] threw an exception

 Root cause:

 java.lang.IllegalStateException: STREAMED
  at org.mortbay.jetty.Request.getReader(Request.java:935)
  at 
 org.apache.wicket.protocol.http.servlet.ServletWebRequest.generatePostParameters(ServletWebRequest.java:250)
  at 
 org.apache.wicket.protocol.http.servlet.ServletWebRequest.getPostRequestParameters(ServletWebRequest.java:294)
  at 
 org.apache.wicket.protocol.http.servlet.ServletWebRequest.access$000(ServletWebRequest.java:60)
  at 
 org.apache.wicket.protocol.http.servlet.ServletWebRequest$1.getParameterValues(ServletWebRequest.java:331)
  at 
 org.apache.wicket.request.parameter.CombinedRequestParametersAdapter.getParameterValues(CombinedRequestParametersAdapter.java:88)
  at 
 org.apache.wicket.markup.html.form.FormComponent.getInputAsArray(FormComponent.java:702)
  at 
 org.apache.wicket.markup.html.form.FormComponent.inputChanged(FormComponent.java:871)
  at 
 org.apache.wicket.markup.html.form.Form$9.component(Form.java:1045)
  at 
 org.apache.wicket.markup.html.form.Form$9.component(Form.java:1041)
  at 
 org.apache.wicket.util.visit.Visits.visitPostOrderHelper(Visits.java:274)
  at 
 org.apache.wicket.util.visit.Visits.visitPostOrderHelper(Visits.java:263)
  at 
 org.apache.wicket.util.visit.Visits.visitPostOrderHelper(Visits.java:263)
  at 
 org.apache.wicket.util.visit.Visits.visitPostOrder(Visits.java:246)
  at 
 org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrder(FormComponent.java:344)
  at 
 org.apache.wicket.markup.html.form.Form.visitFormComponentsPostOrder(Form.java:980)
  at 
 org.apache.wicket.markup.html.form.Form.inputChanged(Form.java:1039)
  at 
 org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:706)
  at 
 org.apache.wicket.ajax.form.AjaxFormSubmitBehavior.onEvent(AjaxFormSubmitBehavior.java:148)
  at 
 org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:166)
  at 
 org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:300)
  at java.lang.reflect.Method.invoke(Method.java:616)
  at 
 com.google.appengine.tools.development.agent.runtime.Runtime.invoke(Runtime.java:100)
  at 
 org.apache.wicket.RequestListenerInterface.internalInvoke(RequestListenerInterface.java:259)
  at 
 org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:240)
  at 
 org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.invokeListener(ListenerInterfaceRequestHandler.java:178)
  at 
 org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:157)
  at 
 org.apache.wicket.request.RequestHandlerStack.executeRequestHandler(RequestHandlerStack.java:84)
  at 
 org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:205)
  at 
 org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:247)
  at 
 org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:138)


 Thanks!


 On Sun, Feb 13, 2011 at 4:25 PM, Per [hidden email] 
 /user/SendEmail.jtp?type=nodenode=3330365i=0 wrote:

 
  Hi Martin,
 
  yes, I used your utility, it was great to get me started!  Funny 
 enough,
  I had prepared several questions (which I then ended up answering by
  myself and never posted), and in each of them I was referring to your
  utility. Almost asked you directly, but figured 

Re: My failed 1.5 migration. Advice on HttpSessionDataStore and/or Jetty clustering needed

2011-03-01 Thread Attila Király
Your last exception seems pretty similar to those mentioned in
https://issues.apache.org/jira/browse/WICKET-3470 (especially the last one
also related to GAE: loading a persisted session at application startup).

Attila

2011/3/1 Per Fragemann p...@small-improvements.com


 Hi all,

 I'm running a pretty complex web application on Wicket 1.4 and Google App
 Engine, and want to move to Wicket 1.5.  Now before you think GAE,
 whatever..., please hear me out! :-)   GAE is radically clustered, and
 problems showing here may eventually surface in other clustered environments
 too. Maybe not as instantly as on GAE, but possibly harder to track then.

 While most things work fine currently in 1.4 (except multitab-support), the
 1.5 migration was a bit of a desaster, and I had to revert it. I reduced my
 problem back to a simple quickstart (see attached). Using Martin's
 gae-initialiser, I got it running easily, but here's the problem:

 * Add an AJAX component onto a page, e.g. an AjaxButton, and let it modify
 the page by updating a label's model to a random number. Click it a couple
 of times.
 * Now go to a different page.
 * Use the browsers back button.

 When I test this locally the following happens: If the render-strategy is
 ONE_PASS_RENDER or REDIRECT_TO_RENDER, the page has been reset to its
 original state when we return to it. when using REDIRECT_TO_BUFFER, the page
 displays the right version (e.g. just like we left it). Sweet.

 Now, when testing this on the remote GAE server however, things go bad:
 one-pass and redirect-to-render continue to not work. But redirect-to-buffer
 now displays a random version of the page after pushing the back button! I
 can even go back and forward, and get different versions of the page each
 time! I suppose the different nodes of App Engine have different page
 versions each.

 So basically the whole page-serialisation concept is out of order here
 (while it works fine on 1.4, and also works fine in 1.5 without using GAE)

 Maybe a missing history entry while using the back button isn't that bad,
 but I reckon the broken history is *also* to blame for countless
 page-expired errors I got, which then led me to roll back the release and
 deploy Wicket 1.4 again.


 IMO, the bugfix in https://issues.apache.org/jira/browse/WICKET-3483 hints
 at the problem, but only fights the symptom, not the root cause. The fix
 wants to avoid that null pages screw up the finding of pages. But when a
 null page just got passed into the PersistentPageManager, it's not enough to
 properly ignore it; something else seems to be broken in the first place. To
 my limited understanding we encounter null here because there's a check in
 DefaultPageStore:


public Serializable prepareForSerialization(final String sessionId,
 final Object object)
{
if (pageDataStore.isReplicated())
{
return null;
}

 The current implementation of the HttpSessionDataStore returns 'true' in
 its isReplicated() method, so a null page gets returned then serialised by
 the above method, and later it gets deserialised into null again, and then
 wicket decides to re-render that page from scratch because it can't deal
 with a null object/find the right page in the pagestore.

 Now, I wonder, how this is supposed to work at all? How can the
 prepareForSerialisation method simply return and then serialise null, and
 still expect things to work out later on?

 So I thought it might make more sense to return false in the
 isReplicatedMethod of HttpSessionDataStore, to force the DefaultPageStore
 down the other part. When I do that, *something* is indeed serialised and
 wants to get deserialised. However, now I run into a new exciting problem:

 Nested in javax.servlet.ServletException:
 org.apache.wicket.WicketRuntimeException: There is no application attached
 to current thread pool-4-thread-1:
 org.apache.wicket.WicketRuntimeException: There is no application attached
 to current thread pool-4-thread-1
at org.apache.wicket.Application.get(Application.java:227)
at org.apache.wicket.Session.get(Session.java:154)
at
 org.apache.wicket.page.DefaultPageManagerContext.getSessionAttribute(DefaultPageManagerContext.java:63)
at
 org.apache.wicket.pageStore.memory.HttpSessionDataStore.getPageTable(HttpSessionDataStore.java:128)
at
 org.apache.wicket.pageStore.memory.HttpSessionDataStore.storeData(HttpSessionDataStore.java:108)
at
 org.apache.wicket.pageStore.DefaultPageStore.storePageData(DefaultPageStore.java:107)
at
 org.apache.wicket.pageStore.DefaultPageStore.restoreAfterSerialization(DefaultPageStore.java:287)
at
 org.apache.wicket.page.PersistentPageManager$SessionEntry.readObject(PersistentPageManager.java:240)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
 

RE: spring 3.1 wicket auth integration

2011-03-01 Thread Geoff Lancaster
I've seen that wiki but it's for spring 3.0 and wicket 1.3. I need a
solution for spring 3.1 and wicket 1.4+

-Original Message-
From: moèz ben rhouma [mailto:benrhouma.m...@gmail.com] 
Sent: Tuesday, March 01, 2011 2:04 AM
To: users@wicket.apache.org; wic...@geofflancaster.com
Subject: Re: spring 3.1 wicket auth integration

https://cwiki.apache.org/WICKET/spring-security-and-wicket-auth-roles.html

2011/2/28 wic...@geofflancaster.com wic...@geofflancaster.com

 Can anyone point me to a tutorial or example on getting spring 3.x 
 setup and working with wicket-auth-roles for an
AuthenticatedWebApplication?

 Thanks in advance.

 
 mail2web.com – Enhanced email for the mobile individual based on 
 Microsoft® Exchange - http://link.mail2web.com/Personal/EnhancedEmail



 -
 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