Re: Accordion folding unfolding smoothly

2015-03-10 Thread Sebastien
Hi,

What component/library are you referring to?

Best regards,
Sebastien


On Mon, Mar 9, 2015 at 7:57 AM, avchavan avinash.cha...@yahoo.co.in wrote:

 any workaround possible?

 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Accordion-folding-unfolding-smoothly-tp4669851p4669891.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: Accordion folding unfolding smoothly

2015-03-10 Thread avchavan
This is what i have tried so far:

--HomePage class---
package com.proj.wicket.ui;

import java.util.ArrayList;
import java.util.List;

import org.apache.wicket.Component;
import org.apache.wicket.ajax.AjaxEventBehavior;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.attributes.AjaxRequestAttributes;
import
org.apache.wicket.ajax.attributes.AjaxRequestAttributes.EventPropagation;
import org.apache.wicket.behavior.AttributeAppender;
import org.apache.wicket.markup.head.IHeaderResponse;
import org.apache.wicket.markup.head.JavaScriptHeaderItem;
import org.apache.wicket.markup.head.PriorityHeaderItem;
import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.form.Radio;
import org.apache.wicket.markup.html.form.RadioGroup;
import org.apache.wicket.markup.html.list.ListItem;
import org.apache.wicket.markup.html.list.ListView;
import org.apache.wicket.model.Model;

@SuppressWarnings(unused)
public class HomePage extends WebPage {

public HomePage() {
final WebMarkupContainer mainContainer = new
WebMarkupContainer(mainContainer);
final WebMarkupContainer accordionContainer = new
WebMarkupContainer(accordion);

final ListServiceView persons = new ArrayListServiceView();

ServiceView view1 = new ServiceView();
ServiceView view2 = new ServiceView();
ServiceView view3 = new ServiceView();
ServiceView view4 = new ServiceView();
ServiceView view5 = new ServiceView();
ServiceView view6 = new ServiceView();
ServiceView view7 = new ServiceView();

view1.setName(David,ngog 2013);
view1.setDate(31-1-2015);
view1.setDesc(This is a Demo Desc!!!);
view1.setCode(6KH9K);
view1.setStatus(Active);

view2.setName(David,ngog 2014);
view2.setDate(31-1-2015);
view2.setDesc(This is a Demo Desc!!!);
view2.setCode(6KH9K);
view2.setStatus(Active);

view3.setName(David,ngog 2015);
view3.setDate(31-1-2015);
view3.setDesc(This is a Demo Desc!!!);
view3.setCode(6KH9K);
view3.setStatus(Inactive);

view4.setName(David,ngog 2016);
view4.setDate(31-1-2015);
view4.setDesc(This is a Demo Desc!!!);
view4.setCode(6KH9K);
view4.setStatus(Active);

view5.setName(David,ngog 2017);
view5.setDate(31-1-2015);
view5.setDesc(This is a Demo Desc!!!);
view5.setCode(6KH9K);
view5.setStatus(Inactive);

view6.setName(David,ngog 2018);
view6.setDate(31-1-2015);
view6.setDesc(This is a Demo Desc!!!);
view6.setCode(6KH9K);
view6.setStatus(Inactive);

view7.setName(David,ngog 2019);
view7.setDate(31-1-2015);
view7.setDesc(This is a Demo Desc!!!);
view7.setCode(6KH9K);
view7.setStatus(Active);

persons.add(view1);
persons.add(view2);
persons.add(view3);
persons.add(view4);
persons.add(view5);
persons.add(view6);
persons.add(view7);

final ListViewServiceView listRepeat = new
ListViewServiceView(listRepeat) {
@Override
protected void populateItem(final ListItemServiceView 
item) {
final WebMarkupContainer listContainer = new
WebMarkupContainer(listContainer);
final Label name = new Label(name, 
item.getModelObject().getName());
final Label date = new Label(date, 
item.getModelObject().getDate());
final Label status = new Label(status,
item.getModelObject().getStatus());
final WebMarkupContainer descriptionContainer = 
new
WebMarkupContainer(descriptionContainer);
final Label desc = new Label(desc, 
item.getModelObject().getDesc());
final Label code = new Label(code, 
item.getModelObject().getCode());

descriptionContainer.add(desc);
descriptionContainer.add(code);



Re: Accordion folding unfolding smoothly

2015-03-10 Thread Maxim Solodovnik
I would recommend you to try:
http://7thweb.net/wicket-jquery-ui/accordion/DefaultAccordionPage
The code will be much simplier :)

On Tue, Mar 10, 2015 at 5:02 PM, avchavan avinash.cha...@yahoo.co.in
wrote:

 This is what i have tried so far:

 --HomePage class---
 package com.proj.wicket.ui;

 import java.util.ArrayList;
 import java.util.List;

 import org.apache.wicket.Component;
 import org.apache.wicket.ajax.AjaxEventBehavior;
 import org.apache.wicket.ajax.AjaxRequestTarget;
 import org.apache.wicket.ajax.attributes.AjaxRequestAttributes;
 import
 org.apache.wicket.ajax.attributes.AjaxRequestAttributes.EventPropagation;
 import org.apache.wicket.behavior.AttributeAppender;
 import org.apache.wicket.markup.head.IHeaderResponse;
 import org.apache.wicket.markup.head.JavaScriptHeaderItem;
 import org.apache.wicket.markup.head.PriorityHeaderItem;
 import org.apache.wicket.markup.html.WebMarkupContainer;
 import org.apache.wicket.markup.html.WebPage;
 import org.apache.wicket.markup.html.basic.Label;
 import org.apache.wicket.markup.html.form.Radio;
 import org.apache.wicket.markup.html.form.RadioGroup;
 import org.apache.wicket.markup.html.list.ListItem;
 import org.apache.wicket.markup.html.list.ListView;
 import org.apache.wicket.model.Model;

 @SuppressWarnings(unused)
 public class HomePage extends WebPage {

 public HomePage() {
 final WebMarkupContainer mainContainer = new
 WebMarkupContainer(mainContainer);
 final WebMarkupContainer accordionContainer = new
 WebMarkupContainer(accordion);

 final ListServiceView persons = new
 ArrayListServiceView();

 ServiceView view1 = new ServiceView();
 ServiceView view2 = new ServiceView();
 ServiceView view3 = new ServiceView();
 ServiceView view4 = new ServiceView();
 ServiceView view5 = new ServiceView();
 ServiceView view6 = new ServiceView();
 ServiceView view7 = new ServiceView();

 view1.setName(David,ngog 2013);
 view1.setDate(31-1-2015);
 view1.setDesc(This is a Demo Desc!!!);
 view1.setCode(6KH9K);
 view1.setStatus(Active);

 view2.setName(David,ngog 2014);
 view2.setDate(31-1-2015);
 view2.setDesc(This is a Demo Desc!!!);
 view2.setCode(6KH9K);
 view2.setStatus(Active);

 view3.setName(David,ngog 2015);
 view3.setDate(31-1-2015);
 view3.setDesc(This is a Demo Desc!!!);
 view3.setCode(6KH9K);
 view3.setStatus(Inactive);

 view4.setName(David,ngog 2016);
 view4.setDate(31-1-2015);
 view4.setDesc(This is a Demo Desc!!!);
 view4.setCode(6KH9K);
 view4.setStatus(Active);

 view5.setName(David,ngog 2017);
 view5.setDate(31-1-2015);
 view5.setDesc(This is a Demo Desc!!!);
 view5.setCode(6KH9K);
 view5.setStatus(Inactive);

 view6.setName(David,ngog 2018);
 view6.setDate(31-1-2015);
 view6.setDesc(This is a Demo Desc!!!);
 view6.setCode(6KH9K);
 view6.setStatus(Inactive);

 view7.setName(David,ngog 2019);
 view7.setDate(31-1-2015);
 view7.setDesc(This is a Demo Desc!!!);
 view7.setCode(6KH9K);
 view7.setStatus(Active);

 persons.add(view1);
 persons.add(view2);
 persons.add(view3);
 persons.add(view4);
 persons.add(view5);
 persons.add(view6);
 persons.add(view7);

 final ListViewServiceView listRepeat = new
 ListViewServiceView(listRepeat) {
 @Override
 protected void populateItem(final
 ListItemServiceView item) {
 final WebMarkupContainer listContainer =
 new
 WebMarkupContainer(listContainer);
 final Label name = new Label(name,
 item.getModelObject().getName());
 final Label date = new Label(date,
 item.getModelObject().getDate());
 final Label status = new Label(status,
 item.getModelObject().getStatus());
 final WebMarkupContainer
 descriptionContainer = new
 WebMarkupContainer(descriptionContainer);
 final Label desc = new Label(desc,
 item.getModelObject().getDesc());
 final Label code = new Label(code,
 item.getModelObject().getCode());

 descriptionContainer.add(desc);
  

Re: How to load-balance on AWS with standalone Tomcats

2015-03-10 Thread Martin Grigorov
Hi,

In that case I think you don't need custom IPageStore too. It will be
redundant.
When a request comes Wicket tries to load the page from the HTTP session
first. If it is found there then it stores it at the end of the request
cycle both in the http session and in the disk (IPageStore).
Since you will have a bigger http session (ElastiCache) then I think there
is no need to copy the same data second time with a custom IPageStore impl.

I don't remember how all this works in 1.4.x, so what I say is for 1.5.0+.
This part of Wicket (IPageStore, IDataStore) has been reworked for 1.5.0
but I guess there are no big architectural changes, just implementation
changes.

Please let us know how things go!

Good luck!



Martin Grigorov
Funemployed! Available for hire!
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Tue, Mar 10, 2015 at 11:26 AM, Daniel Del Castillo dani...@optimad.com
wrote:

 Hi Martin,

 Thanks a lot for your prompt response, that's very helpful.

 With regards the session affinity, we'll have a Tomcat Session Manager,
 which is going to serialise sessions into ElastiCache, configured for each
 Tomcat instance with the same parameters and this should free us from
 sticky sessions. Is there any other concerns that I should take into
 account with regards Wicket Sessions in an environment like this?

 Regards,
 DDC

 -Original Message-
 From: Martin Grigorov [mailto:mgrigo...@apache.org]
 Sent: 09 March 2015 21:26
 To: users@wicket.apache.org
 Subject: Re: How to load-balance on AWS with standalone Tomcats

 Hi,

 I think it would be much simpler if you use Tomcat clustering support.
 Wicket 1.4.x is a bit old but as far as I remember the support for it in
 Wicket has been introduced with 1.4.1 so it should work fine in 1.4.17.

 But if Tomcat clustering in not an option for you for some reason then:
 - make sure you use session affinity (aka sticky sessions)
 - create your own IPageStore to keep the serialized view of the pages in
 shared DB (as you already figured out)
 - no need of custom ISessionStore. You need custom one only in case you
 want to put your Wicket Session instances in something else than HTTP
 Session

 I guess you are not interested in upgrading to Wicket 6.x but I'd
 recommend you to upgrade at least to 1.4.22. There were some security fixes
 in the last few releases from 1.4.x series.


 Martin Grigorov
 Funemployed! Available for hire!
 Wicket Training and Consulting
 https://twitter.com/mtgrigorov

 On Mon, Mar 9, 2015 at 6:09 PM, Daniel Del Castillo dani...@optimad.com
 wrote:

  Hi list,
 
  One of the modules of our application is completely written in Wicket
  1.4.17. This application runs on a single standalone Tomcat installation.
 
  We now need to move this to AWS servers and ensure the service is 24/7
  available. We are looking to have multiple Tomcat instances (not a
  cluster) which are load-balanced with ELB.
 
  My question is: what do I we need to do in order to achieve this? I
  now we'll have to write a IPageStore in order to serialise the page
  map into a shared database. Any suggestion on how to do this? Will we
  have to write a ISessionStore as well?
 
  I've found a solution for clustering (see link below) which I'm now
  about to test but I've thought that it'd be useful to try get some
  advice from this list.
 
  http://letsgetdugg.com/2010/02/07/clustering-wicket-for-fun-and-profit
  /
 
  Many thanks for your help.
 
  Regards,
  Daniel
  DDC
 
  --
   This transmission is confidential and intended solely
  for the person or organization to whom it is addressed. It may contain
  privileged and confidential information. If you are not the intended
  recipient, you should not copy, distribute or take any action in
  reliance on it.
 
  If you believe you received this transmission in error, please notify
  the sender as soon as possible.
 
  This e-mail has been scanned for known viruses by Mimecast for IMD.
 
  --
  -
 

 --
 This transmission is confidential and intended solely for the person or
 organization to whom it is addressed. It may contain privileged
 and confidential information. If you are not the intended recipient, you
 should not copy, distribute or take any action in reliance on it.

 If you believe you received this transmission in error, please notify the
 sender as soon as possible.

 This e-mail has been scanned for known viruses by Mimecast for IMD.

 ---




RE: How to load-balance on AWS with standalone Tomcats

2015-03-10 Thread Daniel Del Castillo
Hi Martin,

Thanks a lot for your prompt response, that's very helpful.

With regards the session affinity, we'll have a Tomcat Session Manager, which 
is going to serialise sessions into ElastiCache, configured for each Tomcat 
instance with the same parameters and this should free us from sticky sessions. 
Is there any other concerns that I should take into account with regards Wicket 
Sessions in an environment like this?

Regards,
DDC

-Original Message-
From: Martin Grigorov [mailto:mgrigo...@apache.org] 
Sent: 09 March 2015 21:26
To: users@wicket.apache.org
Subject: Re: How to load-balance on AWS with standalone Tomcats

Hi,

I think it would be much simpler if you use Tomcat clustering support.
Wicket 1.4.x is a bit old but as far as I remember the support for it in Wicket 
has been introduced with 1.4.1 so it should work fine in 1.4.17.

But if Tomcat clustering in not an option for you for some reason then:
- make sure you use session affinity (aka sticky sessions)
- create your own IPageStore to keep the serialized view of the pages in shared 
DB (as you already figured out)
- no need of custom ISessionStore. You need custom one only in case you want to 
put your Wicket Session instances in something else than HTTP Session

I guess you are not interested in upgrading to Wicket 6.x but I'd recommend you 
to upgrade at least to 1.4.22. There were some security fixes in the last few 
releases from 1.4.x series.


Martin Grigorov
Funemployed! Available for hire!
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Mon, Mar 9, 2015 at 6:09 PM, Daniel Del Castillo dani...@optimad.com
wrote:

 Hi list,

 One of the modules of our application is completely written in Wicket 
 1.4.17. This application runs on a single standalone Tomcat installation.

 We now need to move this to AWS servers and ensure the service is 24/7 
 available. We are looking to have multiple Tomcat instances (not a 
 cluster) which are load-balanced with ELB.

 My question is: what do I we need to do in order to achieve this? I 
 now we'll have to write a IPageStore in order to serialise the page 
 map into a shared database. Any suggestion on how to do this? Will we 
 have to write a ISessionStore as well?

 I've found a solution for clustering (see link below) which I'm now 
 about to test but I've thought that it'd be useful to try get some 
 advice from this list.

 http://letsgetdugg.com/2010/02/07/clustering-wicket-for-fun-and-profit
 /

 Many thanks for your help.

 Regards,
 Daniel
 DDC

 --
  This transmission is confidential and intended solely 
 for the person or organization to whom it is addressed. It may contain 
 privileged and confidential information. If you are not the intended 
 recipient, you should not copy, distribute or take any action in 
 reliance on it.

 If you believe you received this transmission in error, please notify 
 the sender as soon as possible.

 This e-mail has been scanned for known viruses by Mimecast for IMD.

 --
 -

--
This transmission is confidential and intended solely for the person or 
organization to whom it is addressed. It may contain privileged 
and confidential information. If you are not the intended recipient, you should 
not copy, distribute or take any action in reliance on it.

If you believe you received this transmission in error, please notify the 
sender as soon as possible.

This e-mail has been scanned for known viruses by Mimecast for IMD. 
---



Re: Accordion folding unfolding smoothly

2015-03-10 Thread avchavan
I have checked that already. but i am not allowed to use it.
Hence had write the entire code for accordion.
Is it possible to just add the toggle effect?

Thanks.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Accordion-folding-unfolding-smoothly-tp4669851p4669903.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: Accordion folding unfolding smoothly

2015-03-10 Thread Maxim Solodovnik
you can try to use
http://7thweb.net/wicket-jquery-ui/effect/DefaultEffectPage

On Tue, Mar 10, 2015 at 5:28 PM, avchavan avinash.cha...@yahoo.co.in
wrote:

 I have checked that already. but i am not allowed to use it.
 Hence had write the entire code for accordion.
 Is it possible to just add the toggle effect?

 Thanks.

 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Accordion-folding-unfolding-smoothly-tp4669851p4669903.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




-- 
WBR
Maxim aka solomax


Re: Accordion folding unfolding smoothly

2015-03-10 Thread Maxim Solodovnik
I guess this line:
listContainer.add(new AttributeAppender(onclick, new
Model($('+listContainer.getMarkupId()+').toggle('slow';

should be
listContainer.add(new AttributeAppender(onclick, new
Model($('#+listContainer.getMarkupId()+').toggle('slow';


On Tue, Mar 10, 2015 at 7:39 PM, avchavan avinash.cha...@yahoo.co.in
wrote:

 Not allowed to have dependency. :/

 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Accordion-folding-unfolding-smoothly-tp4669851p4669905.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




-- 
WBR
Maxim aka solomax


Re: Accordion folding unfolding smoothly

2015-03-10 Thread avchavan
Not allowed to have dependency. :/

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Accordion-folding-unfolding-smoothly-tp4669851p4669905.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: Accordion folding unfolding smoothly

2015-03-10 Thread Sebastien
Hi,

I agree with Maxim, jQuery selector for IDs is '#'.

If you are not able to use dependencies (personnaly I would have challenged
this with your hierarchy because Wicket jQuery UI is stable and already 3
years old...), you can at least see how it works/is implemented:
https://github.com/sebfz1/wicket-jquery-ui

Best regards,
Sebastien.


On Tue, Mar 10, 2015 at 3:02 PM, Maxim Solodovnik solomax...@gmail.com
wrote:

 I guess this line:
 listContainer.add(new AttributeAppender(onclick, new
 Model($('+listContainer.getMarkupId()+').toggle('slow';

 should be
 listContainer.add(new AttributeAppender(onclick, new
 Model($('#+listContainer.getMarkupId()+').toggle('slow';


 On Tue, Mar 10, 2015 at 7:39 PM, avchavan avinash.cha...@yahoo.co.in
 wrote:

  Not allowed to have dependency. :/
 
  --
  View this message in context:
 
 http://apache-wicket.1842946.n4.nabble.com/Accordion-folding-unfolding-smoothly-tp4669851p4669905.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
 
 


 --
 WBR
 Maxim aka solomax



Re: Using wicket:... tags messes up css

2015-03-10 Thread Joachim Schrod
On 03/04/15 22:03, Andreas Lundblad wrote:
 I've noticed that wicket:... tags such as wicket:enclosure messes up
 the CSS sometimes.
 
 In my particular example I have
 
 div.formRows  div {
 display: table-row;
 }
 
 and when I try to put an enclosure around a table row, the CSS child
 selector doesn't work.
 
 Is there an easy workaround (except switching deployment mode)?

Add

@Override
protected void onRender () {
IMarkupSettings markupSettings =
Application.get().getMarkupSettings();
boolean stripWicketTags =
markupSettings.getStripWicketTags();
markupSettings.setStripWicketTags(true);
super.onRender();
markupSettings.setStripWicketTags(stripWicketTags);
}

with an appropriate Javadoc to your respective classes. (I changed
line breaks to fit in 70 columns.)

Joachim

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Joachim Schrod, Roedermark, Germany
Email: jsch...@acm.org


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



RE: How to load-balance on AWS with standalone Tomcats

2015-03-10 Thread Daniel Del Castillo
Thanks for the input! I will let you know how it goes.

Cheers!
DDC


-Original Message-
From: Martin Grigorov [mailto:mgrigo...@apache.org] 
Sent: 10 March 2015 11:18
To: users@wicket.apache.org
Subject: Re: How to load-balance on AWS with standalone Tomcats

Hi,

In that case I think you don't need custom IPageStore too. It will be redundant.
When a request comes Wicket tries to load the page from the HTTP session first. 
If it is found there then it stores it at the end of the request cycle both in 
the http session and in the disk (IPageStore).
Since you will have a bigger http session (ElastiCache) then I think there is 
no need to copy the same data second time with a custom IPageStore impl.

I don't remember how all this works in 1.4.x, so what I say is for 1.5.0+.
This part of Wicket (IPageStore, IDataStore) has been reworked for 1.5.0 but I 
guess there are no big architectural changes, just implementation changes.

Please let us know how things go!

Good luck!



Martin Grigorov
Funemployed! Available for hire!
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Tue, Mar 10, 2015 at 11:26 AM, Daniel Del Castillo dani...@optimad.com
wrote:

 Hi Martin,

 Thanks a lot for your prompt response, that's very helpful.

 With regards the session affinity, we'll have a Tomcat Session 
 Manager, which is going to serialise sessions into ElastiCache, 
 configured for each Tomcat instance with the same parameters and this 
 should free us from sticky sessions. Is there any other concerns that 
 I should take into account with regards Wicket Sessions in an environment 
 like this?

 Regards,
 DDC

 -Original Message-
 From: Martin Grigorov [mailto:mgrigo...@apache.org]
 Sent: 09 March 2015 21:26
 To: users@wicket.apache.org
 Subject: Re: How to load-balance on AWS with standalone Tomcats

 Hi,

 I think it would be much simpler if you use Tomcat clustering support.
 Wicket 1.4.x is a bit old but as far as I remember the support for it 
 in Wicket has been introduced with 1.4.1 so it should work fine in 1.4.17.

 But if Tomcat clustering in not an option for you for some reason then:
 - make sure you use session affinity (aka sticky sessions)
 - create your own IPageStore to keep the serialized view of the pages 
 in shared DB (as you already figured out)
 - no need of custom ISessionStore. You need custom one only in case 
 you want to put your Wicket Session instances in something else than 
 HTTP Session

 I guess you are not interested in upgrading to Wicket 6.x but I'd 
 recommend you to upgrade at least to 1.4.22. There were some security 
 fixes in the last few releases from 1.4.x series.


 Martin Grigorov
 Funemployed! Available for hire!
 Wicket Training and Consulting
 https://twitter.com/mtgrigorov

 On Mon, Mar 9, 2015 at 6:09 PM, Daniel Del Castillo 
 dani...@optimad.com
 wrote:

  Hi list,
 
  One of the modules of our application is completely written in 
  Wicket 1.4.17. This application runs on a single standalone Tomcat 
  installation.
 
  We now need to move this to AWS servers and ensure the service is 
  24/7 available. We are looking to have multiple Tomcat instances 
  (not a
  cluster) which are load-balanced with ELB.
 
  My question is: what do I we need to do in order to achieve this? I 
  now we'll have to write a IPageStore in order to serialise the page 
  map into a shared database. Any suggestion on how to do this? Will 
  we have to write a ISessionStore as well?
 
  I've found a solution for clustering (see link below) which I'm now 
  about to test but I've thought that it'd be useful to try get some 
  advice from this list.
 
  http://letsgetdugg.com/2010/02/07/clustering-wicket-for-fun-and-prof
  it
  /
 
  Many thanks for your help.
 
  Regards,
  Daniel
  DDC
 
  
  --
   This transmission is confidential and intended 
  solely for the person or organization to whom it is addressed. It 
  may contain privileged and confidential information. If you are not 
  the intended recipient, you should not copy, distribute or take any 
  action in reliance on it.
 
  If you believe you received this transmission in error, please 
  notify the sender as soon as possible.
 
  This e-mail has been scanned for known viruses by Mimecast for IMD.
 
  
  --
  -
 

 --
  This transmission is confidential and intended solely 
 for the person or organization to whom it is addressed. It may contain 
 privileged and confidential information. If you are not the intended 
 recipient, you should not copy, distribute or take any action in 
 reliance on it.

 If you believe you received this transmission in error, please notify 
 the sender as soon as possible.

 This e-mail has been scanned for known viruses by 

Re: DataTable generics vs. IColumn generics

2015-03-10 Thread Sven Meier

Hi,

At the current implementation they need to do
cols.add(new LocationColumLocation(...));
instead of just
cols.add(new LocationColum(...));

I think you mean LocationColumnPerson.

nice feature of PropertyColums: Not to have a too strength coupling of 
what the column displays in the cell and what the data table shows.


As I see it, columns decide what to display (e.g. a person's location) 
and the component provided in #popuplateItem() decides how to display 
this information.
Let us know when you figured out how to improve separation of these 
concerns.


Have fun
Sven



Am 09.03.2015 um 10:29 schrieb Patrick Davids:

Hi Sven,
I did already implement it this way... and its working.

But my team members asked (more the client developers point of view), 
why the column-class itself is not a generic of Location, like this.


public class LocationColumn extends PropertyColumnLocation {
...
}

At the current implementation they need to do
cols.add(new LocationColumLocation(...));
instead of just
cols.add(new LocationColum(...));

Thats why I forwarded the question here, because I studied a bit the 
Column-Hierarchie code and also wondered about this strength coupling 
between T of ICellPopulator and T of rowModel and T of DataTable.



I suppose my team members see the PropertyColumn more like the usage 
of a PropertModel.
The generic of a PropertyModel is the type, which is returned by the 
expression.
The generic of a PropertyColumn is the DataTables generic / rowModel 
generic, not what its expression retrieves/returns/displays.


I think thats it...

As more as I think about this issue, maybe this could be a nice 
feature of PropertyColums.
Not to have a too strength coupling of what the column displays in the 
cell and what the data table shows.


kind regards
Patrick

Am 05.03.2015 um 18:43 schrieb Sven Meier:

Hi Patrick,

you can let your column implementation be generic:

  public class LocationColumnT extends PropertyColumnT {

  public LocationColumn(String expressionToLocation){
  super(Model.of(Location), expressionToLocation);
  }

  @Override
  public void populateItem(ItemICellPopulatorT cellItem,
String componentId, IModelT rowModel) {
  cellItem.add(new Label(componentId, new
LocationFormatModel((IModelLocation)createDataModel(rowModel),
Model.of(Session.get().getLocale();
  }
  }

What do you need more?

Regards
Sven


Am 05.03.2015 um 15:34 schrieb Patrick Davids:

Hi Sven,
thanx for feedback.

Ok, how to implement the LocationColumn more reusable?
I dont want to be bound to a Datatable of Persons.

I'd like to have a Column which works with a Locations, independently
from which model-object the expression fetches the Location.

Is there any way to do that?

best regards
Patrick

Am 05.03.2015 um 15:19 schrieb Sven Meier:

Hi,

generic T is identical for the DataTable, and it's IColumns: it's the
type of the row models.

A column is responsible to provide a cell component for a row: For
DataTable only the input (e.g. Person) is interesting, the output
(Location) doesn't matter.

Your LocationColumn should extend PropertyColumnPerson:

 public class LocationColumn extends PropertyColumnPerson{

 public LocationColumn(String expressionToLocation){
 super(Model.of(Location), expressionToLocation);
 }

 @Override
 public void populateItem(ItemICellPopulatorPerson 
cellItem,

String componentId, IModelPerson rowModel) {
 cellItem.add(new Label(componentId, new
LocationFormatModel((IModelLocation)createDataModel(rowModel),
Model.of(Session.get().getLocale();
 }
 }

Have fun
Sven

Am 05.03.2015 um 12:26 schrieb Patrick Davids:

Hi all,
whats the meaning of generic T on DataTables vs T of IColumn and T of
ICellPopulator?

As I understand its the type of object shown by the table rows.

Reading the javadoc of AbstractColumn it says T (if I understand
correct), its the type of object shown by the cell itself.

But DataTable and its internal list of columns are bound together.
T of both must be the same...

I tried to implement something like this, and here I get problems.


ListIColumnPerson, Void cols = new ArrayList();
cols.add(new PropertyColumnPerson, Void(Model.of(Name), name));
(compiler error)
cols.add(new LocationColumn(location));
(compiler error)

new DataTablePerson, Void(id, cols, new
ListDataProviderPerson(), 50);


public class LocationColumn extends PropertyColumnLocation{

public LocationColumn(String expressionToLocation){
super(Model.of(Location), expressionToLocation);
}

  @Override
public void populateItem(ItemICellPopulatorLocation cellItem,
String componentId, IModelLocation rowModel) {
cellItem.add(new Label(componentId, new
LocationFormatModel(rowModel, Model.of(Session.get().getLocale();
}
}

Also the Generic of ICellPopulator is bound to T of column.

I always thought it could 

Re: Will renderHead method be invoked when a component is rendered via wicket events?

2015-03-10 Thread Martin Grigorov
On Tue, Mar 10, 2015 at 3:11 AM, MadasamySankarapandian 
madas...@mcruncher.com wrote:

 On Mon, Mar 9, 2015 at 3:03 PM, Martin Grigorov mgrigo...@apache.org
 wrote:

  Hi,
 
  If a component is rendered then its #renderHead() should be called!
 
  On Mon, Mar 9, 2015 at 4:08 AM, MadasamySankarapandian 
  madas...@mcruncher.com wrote:
 
I am using bootstrap-timepicker.js in a single page
 application
  .
   Time picker is added in a panel which is then embedded in the page.
 When
   the entire page is reloaded, the timepicker is working fine. However,
  when
   the respective panel is displayed via Wicket events, the time picker is
  not
   rendered. I am using Component#onEvent(Ievent) method to display the
  panel.
   The javascript resource reference for timepicker is added in renderHead
   method. I would like to know if a panel is reloaded during onEvent
 call,
   will rendeHead method be invoked or not?
  
  
   Here are few code snippets to help you all understand what I am trying?
  
   public class BasePage
   {
  
   public void renderHead(IHeaderResponse response)
  
 
  Call super.renderHead(response) too.
 
  Is this a method in the page or in SelectionPanel ?!
 
This method is in BasePage.

 
   {
 response.render(JavaScriHeaderItem.forReference(new
   JavaScriptResourceReference(bootstrap-timepicker.js)));
 response.render(JavaScriHeaderItem.forReference(new
   JavaScriptResourceReference(common.js)));
   }
  
   //event is received to display panel
public void onEvent(IEvent ievent)
{
   super.onEvent(ievent)
   if(event.getPayLoad() instance of Notification)
   {
   Notification notification = (Notification) event.getPayload();
 PageParameters parameters = notification.getPageParameters()
 Panel selectedPanel = getSelectedPanel(parameters,
   notification.getPanelClass);
 BasePage.this.selectedPanel.replaceWith(selectedPanel);
  
 
  There is no Ajax here, so the whole page is re-rendered and
 #renderHead()
  should be called for all visible components.
 
Sorry here ajax is involved. In the sample code i forgot to
 add.
selectedPanel.setOutputMarkupId(true);
notification.getTarget().add(selectedPanel);


In that case only selectedPanel's #renderHead() will be called.
BasePage#renderHead() won't be called because the page is not re-rendered
with the Ajax response.

Martin Grigorov
Funemployed! Available for hire!
Wicket Training and Consulting
https://twitter.com/mtgrigorov



 
 }
 }
   }
  
  
   --
   Thanks and regards
Madasamy
  
 



 --
 Thanks and regards
  Madasamy