How to Perform LessThan or GreaterThan Validations Effectively?

2013-04-30 Thread madmax108
Hi,
I have a form in which I'm taking in numeric values from the user, let's say
1,2,3,4,5. Now, I also have defaults specifying the maximum or minimum
values for the entered numbers (eg. 1,2,3 should be greater than x,y,and z
respectively (with no upper limit), while 4 and 5 should be less than a and
b respectively(with no lower limit)). 

What would be the best way to carry out such comparison validations using
Wicket (I'm on 6.5)?

Thanks in advance



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-Perform-LessThan-or-GreaterThan-Validations-Effectively-tp4658402.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: How to Perform LessThan or GreaterThan Validations Effectively?

2013-04-30 Thread Sven Meier

IFormValidator

Regards
Sven

On 04/30/2013 09:09 AM, madmax108 wrote:

Hi,
I have a form in which I'm taking in numeric values from the user, let's say
1,2,3,4,5. Now, I also have defaults specifying the maximum or minimum
values for the entered numbers (eg. 1,2,3 should be greater than x,y,and z
respectively (with no upper limit), while 4 and 5 should be less than a and
b respectively(with no lower limit)).

What would be the best way to carry out such comparison validations using
Wicket (I'm on 6.5)?

Thanks in advance



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-Perform-LessThan-or-GreaterThan-Validations-Effectively-tp4658402.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: Server and client side validation

2013-04-30 Thread Cedric Gatay
Hi,

Your blog post helped me write my first version of the integration between
JSR303 (bean-validation) and client side validation using parsley.js. You
can find the current work on this Github repository:
https://github.com/code-troopers/wicket-jsr303-parsley

Regards,

__
Cedric Gatay (@Cedric_Gatay http://twitter.com/Cedric_Gatay)
http://code-troopers.com | http://www.bloggure.info | http://cedric.gatay.fr


On Wed, Apr 24, 2013 at 7:23 PM, Cedric Gatay gata...@gmail.com wrote:

 Thanks Martin,
 I was just wondering how I could do that. Nice library and nice
 integration with Wicket.

 Regards
 Le 24 avr. 2013 18:07, Martin Grigorov mgrigo...@apache.org a écrit :

 Hi,

 I just posted a new article at
 http://wicketinaction.com/2013/04/server-and-client-side-validation/about
 integrating Wicket with client side validation library.

 Enjoy!

 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com http://jweekend.com/




Re: Server and client side validation

2013-04-30 Thread Martin Grigorov
Thanks for sharing, Cedric!
Well done!


On Tue, Apr 30, 2013 at 9:19 AM, Cedric Gatay gata...@gmail.com wrote:

 Hi,

 Your blog post helped me write my first version of the integration between
 JSR303 (bean-validation) and client side validation using parsley.js. You
 can find the current work on this Github repository:
 https://github.com/code-troopers/wicket-jsr303-parsley

 Regards,

 __
 Cedric Gatay (@Cedric_Gatay http://twitter.com/Cedric_Gatay)
 http://code-troopers.com | http://www.bloggure.info |
 http://cedric.gatay.fr


 On Wed, Apr 24, 2013 at 7:23 PM, Cedric Gatay gata...@gmail.com wrote:

  Thanks Martin,
  I was just wondering how I could do that. Nice library and nice
  integration with Wicket.
 
  Regards
  Le 24 avr. 2013 18:07, Martin Grigorov mgrigo...@apache.org a écrit
 :
 
  Hi,
 
  I just posted a new article at
 
 http://wicketinaction.com/2013/04/server-and-client-side-validation/about
  integrating Wicket with client side validation library.
 
  Enjoy!
 
  --
  Martin Grigorov
  jWeekend
  Training, Consulting, Development
  http://jWeekend.com http://jweekend.com/
 
 




-- 
Martin Grigorov
Wicket Training  Consulting
http://jWeekend.com http://jweekend.com/


Re: Saving checked choices from CheckGroup

2013-04-30 Thread Martin Grigorov
Hi,

it sounds like you need listView.setReuseItems(true)


On Tue, Apr 30, 2013 at 12:45 PM, Merlijn lucas...@gmail.com wrote:

 Hi everybody,

 I am making a filter for a searchfield where users can choose which items
 they want to choose. For this I am using a CheckGroup to show all the
 options. Now, whenever I choose an item and use the submit button, the
 other
 items get removed from the list. How can I make sure that the checked
 choices get remembered and the non-checked kept in the list?

 Kind regards,

 Merlijn



 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Saving-checked-choices-from-CheckGroup-tp4658408.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




-- 
Martin Grigorov
Wicket Training  Consulting
http://jWeekend.com http://jweekend.com/


Re: Session messages

2013-04-30 Thread Martin Grigorov
Hi,

Wicket uses temporary Sessions for stateless application.
Adding a feedback message to such session will live till the end of the
current request. Since the response page is rendered in the same
request/response cycle the feedback messages should be still reachable.



On Mon, Apr 29, 2013 at 11:41 PM, Bertrand Guay-Paquet 
ber...@step.polymtl.ca wrote:

 Hello,

 When using the Sessions info(), error() and success() methods, and the
 session is not bound, the messages are lost. This can happen easily when on
 stateless pages. The fix for this is easy: I need to make sure the session
 is bound and call Session.bind().

 However, I think it would be nice for the Session to get bound
 automatically when adding messages to it. Otherwise, the messages are
 silently discarded and the cause is not so obvious. What do you think,
 should I open an issue for this?

 Regards,
 Bertrand

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




-- 
Martin Grigorov
Wicket Training  Consulting
http://jWeekend.com http://jweekend.com/


Re: Saving checked choices from CheckGroup

2013-04-30 Thread Merlijn
Nope, added in the code. This is my code 

 public QuickSearchFilterPanel(String id) {
super(id);
Form form = new Form(filterform);

ListClasslt;? classes = resultItemHandlerPool.getTypes();
types = new ArrayListIModellt;Classlt;?();

if (classes != null) {
for (final Class? clazz : classes) {
IModelClasslt;? model = new IModelClasslt;?() {
@Override
public Class? getObject() {
return clazz;
}

@Override
public void setObject(Class? object) {

}

@Override
public void detach() {

}
};

types.add(model);
}
}

group = new CheckGroupIModellt;Classlt;?(checkboxgroup, new
PropertyModelCollectionlt;IModellt;Classlt;?(this, types));
group.add(new CheckGroupSelector(checkall));

ListView typesListview = new
ListViewIModellt;Classlt;?(typesList, new
PropertyModelListlt;IModellt;Classlt;?(this, types)) {
@Override
protected void populateItem(final
ListItemIModellt;Classlt;? item) {
final IModelClasslt;? classModel =
item.getModelObject();
Check checkbox = new CheckClasslt;?(check,
classModel);
Label className = new Label(className,
classModel.getObject().getSimpleName());
item.add(checkbox, className);
}
};
typesListview.setReuseItems(true);
group.add(typesListview);
form.add(group);

Button saveButton = new Button(saveButton) {
@Override
public void onSubmit() {
super.onSubmit();
}
};
form.add(saveButton);
add(form);
}

public ListClasslt;? getSearchableTypes() {
ListClasslt;? searchableTypes = new ArrayListClasslt;?();

for (IModelClasslt;? type : types) {
searchableTypes.add(type.getObject());
}
return searchableTypes;

}



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Saving-checked-choices-from-CheckGroup-tp4658408p4658411.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: [Wicket 1.4.9] StackOverflow wicket-ajax.js with IE8 64bits

2013-04-30 Thread M4xime
Hi,

In the end, I have to find a workaround to fix this bug.

Do you think that overriding a part of wicket's js code can work ?

Is there a part of the code of a more recent version that can be used to
replace the incriminated code? 

Thanks !




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-1-4-9-StackOverflow-wicket-ajax-js-with-IE8-64bits-tp4658229p4658412.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: [Wicket 1.4.9] StackOverflow wicket-ajax.js with IE8 64bits

2013-04-30 Thread Martin Grigorov
Hi,

The simplest solution is to decrease the number of steps which
FunctionsExecutor can do before using setTimeout() to start a new stack.


On Tue, Apr 30, 2013 at 2:05 PM, M4xime maxime.nou...@capgemini.com wrote:

 Hi,

 In the end, I have to find a workaround to fix this bug.

 Do you think that overriding a part of wicket's js code can work ?

 Is there a part of the code of a more recent version that can be used to
 replace the incriminated code?

 Thanks !




 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Wicket-1-4-9-StackOverflow-wicket-ajax-js-with-IE8-64bits-tp4658229p4658412.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




-- 
Martin Grigorov
Wicket Training  Consulting
http://jWeekend.com http://jweekend.com/


Skip dynamically an item in populateItem of ListView

2013-04-30 Thread Marco Di Sabatino Di Diodoro
Hi all,

Which is the best way to skip dynamically an item in populateItem of ListView. 
Currently I use setEnable and setVisible, but I like to know if there was a 
better approach. 

Regards
Marco


--

Dott. Marco Di Sabatino Di Diodoro
mdisabatinodidiod...@gmail.com





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



Re: Skip dynamically an item in populateItem of ListView

2013-04-30 Thread Maxim Solodovnik
Maybe you can filter List prior to populate items from it?



On Tue, Apr 30, 2013 at 8:01 PM, Marco Di Sabatino Di Diodoro 
mdisabatinodidiod...@gmail.com wrote:

 Hi all,

 Which is the best way to skip dynamically an item in populateItem of
 ListView.
 Currently I use setEnable and setVisible, but I like to know if there was
 a better approach.

 Regards
 Marco


 --

 Dott. Marco Di Sabatino Di Diodoro
 mdisabatinodidiod...@gmail.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: Skip dynamically an item in populateItem of ListView

2013-04-30 Thread Marco Di Sabatino Di Diodoro

On Apr 30, 2013, at 3:19 PM, Maxim Solodovnik wrote:

 Maybe you can filter List prior to populate items from it?

No, I can not filter the List before.

M
 
 
 
 On Tue, Apr 30, 2013 at 8:01 PM, Marco Di Sabatino Di Diodoro 
 mdisabatinodidiod...@gmail.com wrote:
 
 Hi all,
 
 Which is the best way to skip dynamically an item in populateItem of
 ListView.
 Currently I use setEnable and setVisible, but I like to know if there was
 a better approach.
 
 Regards
 Marco
 
 
 --
 
 Dott. Marco Di Sabatino Di Diodoro
 mdisabatinodidiod...@gmail.com
 
 
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
 -- 
 WBR
 Maxim aka solomax

--

Dott. Marco Di Sabatino Di Diodoro
Tel. +39 3939065570

Tirasa S.r.l.
Viale D'Annunzio 267 - 65127 Pescara
Tel +39 0859116307 / FAX +39 085973
http://www.tirasa.net

Apache Syncope PMC Member
http://people.apache.org/~mdisabatino







Re: Skip dynamically an item in populateItem of ListView

2013-04-30 Thread Nick Pratt
Surely the list is provided to the ListView (either via a List or
IModelList).  So just wrap that List or IModel in another IModel
(LoadableDetachableModel) and then filter the List contents inside the
getObject() call.

N


On Tue, Apr 30, 2013 at 9:21 AM, Marco Di Sabatino Di Diodoro 
marco.disabat...@tirasa.net wrote:


 On Apr 30, 2013, at 3:19 PM, Maxim Solodovnik wrote:

  Maybe you can filter List prior to populate items from it?

 No, I can not filter the List before.

 M
 
 
 
  On Tue, Apr 30, 2013 at 8:01 PM, Marco Di Sabatino Di Diodoro 
  mdisabatinodidiod...@gmail.com wrote:
 
  Hi all,
 
  Which is the best way to skip dynamically an item in populateItem of
  ListView.
  Currently I use setEnable and setVisible, but I like to know if there
 was
  a better approach.
 
  Regards
  Marco
 
 
  --
 
  Dott. Marco Di Sabatino Di Diodoro
  mdisabatinodidiod...@gmail.com
 
 
 
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
  --
  WBR
  Maxim aka solomax

 --

 Dott. Marco Di Sabatino Di Diodoro
 Tel. +39 3939065570

 Tirasa S.r.l.
 Viale D'Annunzio 267 - 65127 Pescara
 Tel +39 0859116307 / FAX +39 085973
 http://www.tirasa.net

 Apache Syncope PMC Member
 http://people.apache.org/~mdisabatino








RE: hello

2013-04-30 Thread Laura G
http://catalogobiblico.com/wp-content/themes/twentytwelve/nba.php?svylbs802tca














































































































I go to a lot of movies. There's something about a big screen, a dark room, 
sticky floors, and stale popcorn that's qualitatively better than watching a 
movie at home, no matter how big your television is (or how sticky your floors 
are). But, perhaps I'm just a dupe, programmed for consumption. -- Jamie 
Zawinski

Re: Session messages

2013-04-30 Thread Bertrand Guay-Paquet

Hi,

This is not the behavior I'm getting. I created a stateless page with this:

add(new FencedFeedbackPanel(feedback));
add(new StatelessLinkVoid(success) {
@Override
public void onClick() {
getSession().info(Success message (without bind()));
setResponsePage(SessionMessagePage.class);
}
});
add(new StatelessLinkVoid(successBind) {
@Override
public void onClick() {
getSession().bind();
getSession().info(Success message (with bind()));
setResponsePage(SessionMessagePage.class);
}
});

The success link does not display a session message in the feedback 
panel if the session is temporary. It does work when the session is 
bound however.


I stepped inside FenceFeedbackPanel#newFeedbackMessagesModel() and 
compared the Session object returned by getSession() there and in the 
success link. They are not the same java object.


On 30/04/2013 7:07 AM, Martin Grigorov wrote:

Hi,

Wicket uses temporary Sessions for stateless application.
Adding a feedback message to such session will live till the end of the
current request. Since the response page is rendered in the same
request/response cycle the feedback messages should be still reachable.



On Mon, Apr 29, 2013 at 11:41 PM, Bertrand Guay-Paquet 
ber...@step.polymtl.ca wrote:


Hello,

When using the Sessions info(), error() and success() methods, and the
session is not bound, the messages are lost. This can happen easily when on
stateless pages. The fix for this is easy: I need to make sure the session
is bound and call Session.bind().

However, I think it would be nice for the Session to get bound
automatically when adding messages to it. Otherwise, the messages are
silently discarded and the cause is not so obvious. What do you think,
should I open an issue for this?

Regards,
Bertrand

--**--**-
To unsubscribe, e-mail: 
users-unsubscribe@wicket.**apache.orgusers-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: Session messages

2013-04-30 Thread Martin Grigorov
On Tue, Apr 30, 2013 at 5:44 PM, Bertrand Guay-Paquet 
ber...@step.polymtl.ca wrote:

 Hi,

 This is not the behavior I'm getting. I created a stateless page with this:

 add(new FencedFeedbackPanel(feedback**));
 add(new StatelessLinkVoid(success) {
 @Override
 public void onClick() {
 getSession().info(Success message (without bind()));
 setResponsePage(**SessionMessagePage.class);
 }
 });
 add(new StatelessLinkVoid(**successBind) {
 @Override
 public void onClick() {
 getSession().bind();
 getSession().info(Success message (with bind()));
 setResponsePage(**SessionMessagePage.class);
 }
 });

 The success link does not display a session message in the feedback
 panel if the session is temporary. It does work when the session is bound
 however.

 I stepped inside FenceFeedbackPanel#**newFeedbackMessagesModel() and
 compared the Session object returned by getSession() there and in the
 success link. They are not the same java object.


Put a breakpoint in MyApplication#newSession() and see where the session is
created the second time




 On 30/04/2013 7:07 AM, Martin Grigorov wrote:

 Hi,

 Wicket uses temporary Sessions for stateless application.
 Adding a feedback message to such session will live till the end of the
 current request. Since the response page is rendered in the same
 request/response cycle the feedback messages should be still reachable.



 On Mon, Apr 29, 2013 at 11:41 PM, Bertrand Guay-Paquet 
 ber...@step.polymtl.ca wrote:

  Hello,

 When using the Sessions info(), error() and success() methods, and the
 session is not bound, the messages are lost. This can happen easily when
 on
 stateless pages. The fix for this is easy: I need to make sure the
 session
 is bound and call Session.bind().

 However, I think it would be nice for the Session to get bound
 automatically when adding messages to it. Otherwise, the messages are
 silently discarded and the cause is not so obvious. What do you think,
 should I open an issue for this?

 Regards,
 Bertrand

 --**
 --**-
 To unsubscribe, e-mail: 
 users-unsubscribe@wicket.**apa**che.orghttp://apache.org
 users-unsubscribe@**wicket.apache.orgusers-unsubscr...@wicket.apache.org
 

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





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




-- 
Martin Grigorov
Wicket Training  Consulting
http://jWeekend.com http://jweekend.com/


Re: Session messages

2013-04-30 Thread Bas Gooren

Hi,

Since you are redirecting to another stateless page 
(setResponsePage(Class)), the browser is redirected to the new url which 
creates a new, temporary session for the second request.


If you don't link to another page (so no setResponsePage call), it will 
work, since the response is rendered in the same request cycle as the 
request.


Met vriendelijke groet,
Kind regards,

Bas Gooren

Op 30-4-2013 17:44, schreef Bertrand Guay-Paquet:

Hi,

This is not the behavior I'm getting. I created a stateless page with 
this:


add(new FencedFeedbackPanel(feedback));
add(new StatelessLinkVoid(success) {
@Override
public void onClick() {
getSession().info(Success message (without bind()));
setResponsePage(SessionMessagePage.class);
}
});
add(new StatelessLinkVoid(successBind) {
@Override
public void onClick() {
getSession().bind();
getSession().info(Success message (with bind()));
setResponsePage(SessionMessagePage.class);
}
});

The success link does not display a session message in the feedback 
panel if the session is temporary. It does work when the session is 
bound however.


I stepped inside FenceFeedbackPanel#newFeedbackMessagesModel() and 
compared the Session object returned by getSession() there and in the 
success link. They are not the same java object.


On 30/04/2013 7:07 AM, Martin Grigorov wrote:

Hi,

Wicket uses temporary Sessions for stateless application.
Adding a feedback message to such session will live till the end of the
current request. Since the response page is rendered in the same
request/response cycle the feedback messages should be still reachable.



On Mon, Apr 29, 2013 at 11:41 PM, Bertrand Guay-Paquet 
ber...@step.polymtl.ca wrote:


Hello,

When using the Sessions info(), error() and success() methods, and the
session is not bound, the messages are lost. This can happen easily 
when on
stateless pages. The fix for this is easy: I need to make sure the 
session

is bound and call Session.bind().

However, I think it would be nice for the Session to get bound
automatically when adding messages to it. Otherwise, the messages are
silently discarded and the cause is not so obvious. What do you think,
should I open an issue for this?

Regards,
Bertrand

--**--**- 

To unsubscribe, e-mail: 
users-unsubscribe@wicket.**apache.orgusers-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: Session messages

2013-04-30 Thread Martin Grigorov
On Tue, Apr 30, 2013 at 5:58 PM, Bas Gooren b...@iswd.nl wrote:

 Hi,

 Since you are redirecting to another stateless page
 (setResponsePage(Class)), the browser is redirected to the new url which
 creates a new, temporary session for the second request.

 If you don't link to another page (so no setResponsePage call), it will
 work, since the response is rendered in the same request cycle as the
 request.


Correct!
Wicket needs to make the redirect to change the url in the browser address
bar. And renders the page in the second request ...
So you may be right - org.apache.wicket.Session#addFeedbackMessage() should
bind the session. Or at least write a warning for temporary sessions.



 Met vriendelijke groet,
 Kind regards,

 Bas Gooren

 Op 30-4-2013 17:44, schreef Bertrand Guay-Paquet:

  Hi,

 This is not the behavior I'm getting. I created a stateless page with
 this:

 add(new FencedFeedbackPanel(feedback**));
 add(new StatelessLinkVoid(success) {
 @Override
 public void onClick() {
 getSession().info(Success message (without bind()));
 setResponsePage(**SessionMessagePage.class);
 }
 });
 add(new StatelessLinkVoid(**successBind) {
 @Override
 public void onClick() {
 getSession().bind();
 getSession().info(Success message (with bind()));
 setResponsePage(**SessionMessagePage.class);
 }
 });

 The success link does not display a session message in the feedback
 panel if the session is temporary. It does work when the session is bound
 however.

 I stepped inside FenceFeedbackPanel#**newFeedbackMessagesModel() and
 compared the Session object returned by getSession() there and in the
 success link. They are not the same java object.

 On 30/04/2013 7:07 AM, Martin Grigorov wrote:

 Hi,

 Wicket uses temporary Sessions for stateless application.
 Adding a feedback message to such session will live till the end of the
 current request. Since the response page is rendered in the same
 request/response cycle the feedback messages should be still reachable.



 On Mon, Apr 29, 2013 at 11:41 PM, Bertrand Guay-Paquet 
 ber...@step.polymtl.ca wrote:

  Hello,

 When using the Sessions info(), error() and success() methods, and the
 session is not bound, the messages are lost. This can happen easily
 when on
 stateless pages. The fix for this is easy: I need to make sure the
 session
 is bound and call Session.bind().

 However, I think it would be nice for the Session to get bound
 automatically when adding messages to it. Otherwise, the messages are
 silently discarded and the cause is not so obvious. What do you think,
 should I open an issue for this?

 Regards,
 Bertrand

 --**--**-

 To unsubscribe, e-mail: 
 users-unsubscribe@wicket.**apa**che.orghttp://apache.org
 users-unsubscribe@**wicket.apache.orgusers-unsubscr...@wicket.apache.org
 
 For additional commands, e-mail: users-h...@wicket.apache.org





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





-- 
Martin Grigorov
Wicket Training  Consulting
http://jWeekend.com http://jweekend.com/


DataTable multiple sort columns

2013-04-30 Thread Lucio Crusca
Hello *,

is there a way/what's the cleaner way to support multiple sort columns with 
DataTable? I know it's up to the SortableDataProvider to provide sorted rows, 
no matter how, but the SortParam class seems to support only one sort 
criterium at a time. e.g. the DataTable is aware only of the *last* sorted 
column. Even if I kept track of other columns (e.g. previously clicked for 
sorting), I still have no clue about how to provide a visual feedback to the 
user about what columns are being included in the sort criteria.






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



Re: Session messages

2013-04-30 Thread Bertrand Guay-Paquet
Thanks for your replies. I can confirm the described behavior without 
setResponsePage().


I created issue WICKET-5165 for this.

On 30/04/2013 12:05 PM, Martin Grigorov wrote:

On Tue, Apr 30, 2013 at 5:58 PM, Bas Gooren b...@iswd.nl wrote:


Hi,

Since you are redirecting to another stateless page
(setResponsePage(Class)), the browser is redirected to the new url which
creates a new, temporary session for the second request.

If you don't link to another page (so no setResponsePage call), it will
work, since the response is rendered in the same request cycle as the
request.


Correct!
Wicket needs to make the redirect to change the url in the browser address
bar. And renders the page in the second request ...
So you may be right - org.apache.wicket.Session#addFeedbackMessage() should
bind the session. Or at least write a warning for temporary sessions.



Met vriendelijke groet,
Kind regards,

Bas Gooren

Op 30-4-2013 17:44, schreef Bertrand Guay-Paquet:

  Hi,

This is not the behavior I'm getting. I created a stateless page with
this:

 add(new FencedFeedbackPanel(feedback**));
 add(new StatelessLinkVoid(success) {
 @Override
 public void onClick() {
 getSession().info(Success message (without bind()));
 setResponsePage(**SessionMessagePage.class);
 }
 });
 add(new StatelessLinkVoid(**successBind) {
 @Override
 public void onClick() {
 getSession().bind();
 getSession().info(Success message (with bind()));
 setResponsePage(**SessionMessagePage.class);
 }
 });

The success link does not display a session message in the feedback
panel if the session is temporary. It does work when the session is bound
however.

I stepped inside FenceFeedbackPanel#**newFeedbackMessagesModel() and
compared the Session object returned by getSession() there and in the
success link. They are not the same java object.

On 30/04/2013 7:07 AM, Martin Grigorov wrote:


Hi,

Wicket uses temporary Sessions for stateless application.
Adding a feedback message to such session will live till the end of the
current request. Since the response page is rendered in the same
request/response cycle the feedback messages should be still reachable.



On Mon, Apr 29, 2013 at 11:41 PM, Bertrand Guay-Paquet 
ber...@step.polymtl.ca wrote:

  Hello,

When using the Sessions info(), error() and success() methods, and the
session is not bound, the messages are lost. This can happen easily
when on
stateless pages. The fix for this is easy: I need to make sure the
session
is bound and call Session.bind().

However, I think it would be nice for the Session to get bound
automatically when adding messages to it. Otherwise, the messages are
silently discarded and the cause is not so obvious. What do you think,
should I open an issue for this?

Regards,
Bertrand

--**--**-

To unsubscribe, e-mail: 
users-unsubscribe@wicket.**apa**che.orghttp://apache.org
users-unsubscribe@**wicket.apache.orgusers-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org




--**--**-
To unsubscribe, e-mail: 
users-unsubscribe@wicket.**apache.orgusers-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: DataTable multiple sort columns

2013-04-30 Thread Jesse Long

Hi Lucio,

Its something I'd be interested in pursuing myself, but the real problem 
is how to display the sort state to the user. With single sort state, 
you just show an arrow next to the column used for sorting.


You could use a Palette type component as a top toolbar, allowing the 
user to add from available columns in the left to the sort columns in 
the right, and sort them in the order that they were added to the right 
hand side of the palette.


You dont need to use SortableDataProvider (which supports 
SingleSortState), you can use any subclass of ISortableDataProvider and 
you can support whatever ISortState you want.


Cheers,
Jesse

On 30/04/2013 18:48, Lucio Crusca wrote:

Hello *,

is there a way/what's the cleaner way to support multiple sort columns with
DataTable? I know it's up to the SortableDataProvider to provide sorted rows,
no matter how, but the SortParam class seems to support only one sort
criterium at a time. e.g. the DataTable is aware only of the *last* sorted
column. Even if I kept track of other columns (e.g. previously clicked for
sorting), I still have no clue about how to provide a visual feedback to the
user about what columns are being included in the sort criteria.






-
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: DataTable multiple sort columns

2013-04-30 Thread Lucio Crusca
In data Tuesday 30 April 2013 19:14:12, Jesse Long ha scritto:
 Hi Lucio,
 
 Its something I'd be interested in pursuing myself, but the real problem
 is how to display the sort state to the user. 

How about this?

ascii-art font=monospaced

| |^ | ^ |   |
| Name  2 | Color  3 | Price | Available   1 |
|   v |  | v | v |

/ascii-art


That would mean the primary sorting is by availability descending (1), then by 
name (2) descending and finally by color (3) ascending. Price is unsorted. 
Clicking a column, instead of only toggling direction, could switch between 
ascending, descending and unsorted. Clicking unsorted columns could make them 
be the primary sort column and shift other sort columns priority by 1.

A more intuitive alternative would be to make the single arrows clickable, in 
addition to columns names, and clicking columns names would only toggle 
between sorted/unsorted states, with unsorted-sorted transition moving the 
column to the primary sort criteria as above.

Would it be hard to obtain that with current wicket components?

 You could use a Palette type component as a top toolbar, allowing the
 user to add from available columns in the left to the sort columns in
 the right, and sort them in the order that they were added to the right
 hand side of the palette.

That's another way to do it. I don't like it very much to be honest, but I 
guess it's only a matter of taste.

 You dont need to use SortableDataProvider (which supports
 SingleSortState), you can use any subclass of ISortableDataProvider and
 you can support whatever ISortState you want.

Thanks for the hint, I hadn't realized that before.


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



Wicket free guide updated.

2013-04-30 Thread Andrea Del Bene

Hi,

I've just released an updated version of the guide with some typo 
corrections. I've also added a revision date on the cover page to help 
comparing different versions of the guide.


http://code.google.com/p/wicket-guide/

Bye! :)

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



Re: Wicket free guide updated.

2013-04-30 Thread Pablo Borges
nice.

*Thank You

:)
*


2013/4/30 Andrea Del Bene an.delb...@gmail.com

 Hi,

 I've just released an updated version of the guide with some typo
 corrections. I've also added a revision date on the cover page to help
 comparing different versions of the guide.

 http://code.google.com/p/**wicket-guide/http://code.google.com/p/wicket-guide/

 Bye! :)

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




Re: Wicket free guide updated.

2013-04-30 Thread ORACLEADF
Thank You



-
Regards
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-free-guide-updated-tp4658427p4658429.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: Wicket free guide updated.

2013-04-30 Thread Paul Bors
I've been proof reading your book starting 2 weeks ago.
So far I am in chapter 8 on page 51 and yes, there are a lot of grammar and
typos (on average about 5-8 a page).

I kept annotating the PDF format since I'm reading it on an iPad.
Once I get 1/2 way through the book I'll open a ticket on your project's
site and upload the annotated PDF file.

~ Thank you,
  Paul Bors

-Original Message-
From: Andrea Del Bene [mailto:an.delb...@gmail.com] 
Sent: Tuesday, April 30, 2013 2:13 PM
To: users@wicket.apache.org
Subject: Wicket free guide updated.

Hi,

I've just released an updated version of the guide with some typo
corrections. I've also added a revision date on the cover page to help
comparing different versions of the guide.

http://code.google.com/p/wicket-guide/

Bye! :)

-
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: Wicket free guide updated.

2013-04-30 Thread Andrea Del Bene

Thank you Paul. I look forward to it!

I've been proof reading your book starting 2 weeks ago.
So far I am in chapter 8 on page 51 and yes, there are a lot of grammar and
typos (on average about 5-8 a page).

I kept annotating the PDF format since I'm reading it on an iPad.
Once I get 1/2 way through the book I'll open a ticket on your project's
site and upload the annotated PDF file.

~ Thank you,
   Paul Bors




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



Re: DataTable multiple sort columns

2013-04-30 Thread Jesse Long

Hi Lucio,

I like the idea of 3 states, ascending, descending and none for each 
column. You will need to create a new interface that extends 
ISortableDataProvider which provides a default sort order for when the 
user deselects all columns (you must always have some sort order, so 
when the user deselects all sorting, fall back to default).


All of this would not be possible with the existing header toolbar, but 
it would not be too difficult to implement an extended header toolbar to 
know about multiple sort columns, and render the sort state/priority of 
the column. I do think however that your header would be very busy.


How often are your users actually going to want to order by multiple 
fields? A hybrid approach might work better - normal single sort state 
from clicking on headers, or expand collapsible palette for complex 
sorting as is needed the added benefit here is that you can add features 
like add remove and reorder columns in this panel. I use a collapsible 
panel for filtering and it seems to work quite nicely.


Cheers,
Jesse

On 30/04/2013 19:44, Lucio Crusca wrote:

In data Tuesday 30 April 2013 19:14:12, Jesse Long ha scritto:

Hi Lucio,

Its something I'd be interested in pursuing myself, but the real problem
is how to display the sort state to the user.

How about this?

ascii-art font=monospaced

| |^ | ^ |   |
| Name  2 | Color  3 | Price | Available   1 |
|   v |  | v | v |

/ascii-art


That would mean the primary sorting is by availability descending (1), then by
name (2) descending and finally by color (3) ascending. Price is unsorted.
Clicking a column, instead of only toggling direction, could switch between
ascending, descending and unsorted. Clicking unsorted columns could make them
be the primary sort column and shift other sort columns priority by 1.

A more intuitive alternative would be to make the single arrows clickable, in
addition to columns names, and clicking columns names would only toggle
between sorted/unsorted states, with unsorted-sorted transition moving the
column to the primary sort criteria as above.

Would it be hard to obtain that with current wicket components?


You could use a Palette type component as a top toolbar, allowing the
user to add from available columns in the left to the sort columns in
the right, and sort them in the order that they were added to the right
hand side of the palette.

That's another way to do it. I don't like it very much to be honest, but I
guess it's only a matter of taste.


You dont need to use SortableDataProvider (which supports
SingleSortState), you can use any subclass of ISortableDataProvider and
you can support whatever ISortState you want.

Thanks for the hint, I hadn't realized that before.


-
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



Wicket upgrades in the 6.x trunk to date

2013-04-30 Thread Paul Bors
For your own curiosity, there goes a table of Wicket 6.x releases as
composed from the project's home page J

 


Release Date 

Version 

Bug Fixes 

Improvements 

New Features 


09/05/2012 

6.0.0 http://wicket.apache.org/2012/09/05/wicket-6.0.0-released.html  

- 

- 

- 


10/04/2012 

6.1.0 http://wicket.apache.org/2012/10/04/wicket-6.1.0-released.html  

27 

6 

1 


10/08/2012 

6.1.1 http://wicket.apache.org/2012/10/08/wicket-6.1.1-released.html  

2 

0 

0 


10/23/2012 

6.2.0 http://wicket.apache.org/2012/10/23/wicket-6.2.0-released.html  

25 

7 

3 


11/16/2012 

6.3.0 http://wicket.apache.org/2012/11/16/wicket-6.3.0-released.html  

15 

7 

0 


12/14/2012 

6.4.0 http://wicket.apache.org/2012/12/14/wicket-6.4.0-released.html  

23 

8 

4 


01/23/2013 

6.5.0 http://wicket.apache.org/2013/01/23/wicket-6.5.0-released.html  

21 

10 

0 


02/15/2013 

6.6.0 http://wicket.apache.org/2013/02/15/wicket-6.6.0-released.html  

18 

11 

0 


04/12/2013 

6.7.0 http://wicket.apache.org/2013/04/12/wicket-6.7.0-released.html  

50 

25 

0 


 

Total 

181

74

8 

 

~ Thank you,

   Paul Bors