Re: Wicket Content Parameters

2013-08-14 Thread Cedric Gatay
Hi there, I finally open sourced the tool and added a few options as my
team requested internally : failing build if key count mismatch
(overridable via a property) and outputting empty property values to the
console while building.

You can find it here :
https://github.com/code-troopers/merge-properties-maven-plugin
@Paul, feel free to fork, improve, and so on...

Regards,

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


On Wed, Jul 31, 2013 at 7:39 PM, Paul Bors p...@bors.ws wrote:

 I won't mind taking yours and adding my tests to it with an option to fail
 the build.

 I like failing the build to grab people's attention and also generating an
 e-mail report so we all know what's missing :)

 ~ Thank you,
   Paul Bors

 -Original Message-
 From: Cedric Gatay [mailto:gata...@gmail.com]
 Sent: Wednesday, July 31, 2013 1:36 PM
 To: users@wicket.apache.org
 Subject: Re: Wicket Content Parameters

 We have a custom maven plugin aggregating multiple properties file into
 one per language. It checks and display (does not fail the build) if the
 number of keys is different. I will try to see if it can be open sourced
 soon if someone is interested in it.

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


 On Wed, Jul 31, 2013 at 5:59 PM, Paul Bors p...@bors.ws wrote:

  We have unit tests that load the master lang pack (the development
  one) and compare it key by key to all of the other language packs making
 sure that:
  * It has all the necessary keys
  * Parameters in values are not missing
  * All values are translated (with different exceptions per lang pack)
  Etc.
 
  It would be nice if such a tool existed as part of the core wicket app
  or extensions but it really depends on how your app maintains them.
  For example, we choose to maintain a single lang pack in a huge file
  in XML format to make it easier to pass it on to the translators
  instead of using many smaller files per page or panel.
 
  ~ Thank you,
Paul Bors
 
  -Original Message-
  From: Tom Norton [mailto:tomwnorton.mailing.li...@gmail.com]
  Sent: Wednesday, July 31, 2013 11:45 AM
  To: users@wicket.apache.org
  Subject: Wicket Content Parameters
 
  We just received our content back from our translators.  They
  translated everything correctly for our velocity templates.  However,
  when they translated our wicket content, they also translated the
  parameters (one translator even replaced the curly braces with
 parentheses).
 
  Does anyone know it it's possible to use the ${...} syntax for content
  parameters instead of {...}?  I ask because most translators already
  know to steer clear of the ${...} syntax, since it's the de facto
  syntax for parameters embedded into strings.
 
  Thanks,
  Tom
 
 
  -
  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




[OT] thanks

2013-08-14 Thread Pierre Goupil
Good morning,

All apologies for this totally off-topic message, but I would like to say a
big THANK YOU to Emond for his work on wicket-atmosphere.

His code is far from trivial, yet it is a real pleasure to use it.
According to me, the killer-feature is the fact that we have an
AjaxRequestTarget to work with which triggers a Comet / WebSocket response.

Thanks again, man!

Pierre

-- 
Un truc bien avec la musique, c'est que quand elle te frappe, tu n'as pas
mal.
Alors frappez-moi de musique !
Frappez-moi de musique, maintenant !

(Bob Marley : Trenchtown Rock)


Rendering conditional html tags for IE CSS targetting

2013-08-14 Thread Robert Gründler
Hi,

i'm trying to use the markup provided by html5 boilerplate:
http://html5boilerplate.com/

They use !--[if lt IE 7]   ![endif]--  comments to render different
opening html tags for different versions of Internet Explorer, easing CSS
selectors for IE.

Here's how it looks like: https://gist.github.com/pulse00/6230134

When using this markup in wicket, i see the following exception: Tag does
not have a close tag /html

It looks like wicket is getting confused by the html comments containing
html tags.

Has anyone an idea how to implement this in wicket?


regards


-robert


Re: Rendering conditional html tags for IE CSS targetting

2013-08-14 Thread Martin Grigorov
https://issues.apache.org/jira/browse/WICKET-3433


On Wed, Aug 14, 2013 at 2:17 PM, Robert Gründler r.gruend...@gmail.comwrote:

 Hi,

 i'm trying to use the markup provided by html5 boilerplate:
 http://html5boilerplate.com/

 They use !--[if lt IE 7]   ![endif]--  comments to render different
 opening html tags for different versions of Internet Explorer, easing CSS
 selectors for IE.

 Here's how it looks like: https://gist.github.com/pulse00/6230134

 When using this markup in wicket, i see the following exception: Tag does
 not have a close tag /html

 It looks like wicket is getting confused by the html comments containing
 html tags.

 Has anyone an idea how to implement this in wicket?


 regards


 -robert



Re: wicket-atmosphere EventBus.post throwing Null pointer exception sometime

2013-08-14 Thread souvikbhattacharyas
Thanks, Let me try to generate the error.  But it's quite shocking that
before mentioning the error number, it was open and after mention suddenly
you can not re produce. May be in small application it can not be reproduce
but in large production it can. Over net you will find few others also get
the issue. So, wicked people should look into it more closely.


On Tue, Aug 13, 2013 at 5:33 PM, Papegaaij [via Apache Wicket] 
ml-node+s1842946n4660867...@n4.nabble.com wrote:

 As you can see in the web.xml, the WicketFilter runs under /app. You can
 start it in jetty using the maven jetty plugin: mvn jetty:run (which will
 make
 the application available under localhost:8080/app)

 On Tuesday 13 August 2013 03:21:20 souvikbhattacharyas wrote:
  Hi,
  I have compiled the mentioned application and deployed in the glassfish
  server. But what is the url to run the same and also let me know how to
 run
  it on Jetty.
 
 
 
  --
  View this message in context:
 
 http://apache-wicket.1842946.n4.nabble.com/wicket-atmosphere-EventBus-post-
 throwing-Null-pointer-exception-sometime-tp4660815p4660865.html
 Sent from
  the Users forum mailing list archive at Nabble.com.
 
  -
  To unsubscribe, e-mail: [hidden 
  email]http://user/SendEmail.jtp?type=nodenode=4660867i=0
  For additional commands, e-mail: [hidden 
  email]http://user/SendEmail.jtp?type=nodenode=4660867i=1


 --
  If you reply to this email, your message will be added to the discussion
 below:

 http://apache-wicket.1842946.n4.nabble.com/wicket-atmosphere-EventBus-post-throwing-Null-pointer-exception-sometime-tp4660815p4660867.html
  To unsubscribe from wicket-atmosphere EventBus.post throwing Null pointer
 exception sometime, click 
 herehttp://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=4660815code=c291dmlrYmhhdHRhY2hhcnlhc0BnbWFpbC5jb218NDY2MDgxNXwtMTg5NjMzODE4MQ==
 .
 NAMLhttp://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml




-- 
Thanks  Regards,

Souvik Bhattacharya




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/wicket-atmosphere-EventBus-post-throwing-Null-pointer-exception-sometime-tp4660815p4660880.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-atmosphere EventBus.post throwing Null pointer exception sometime

2013-08-14 Thread Martin Grigorov
Hi,

I closed the ticket because the reporter didn't provide us (the Wicket
developers) with an application that reproduces the problem for a long
period.
As soon such application is attached to the ticket the ticket will be
reopened and addressed.
Please feel free to attach a quickstart application.
Thanks!


On Wed, Aug 14, 2013 at 2:59 PM, souvikbhattacharyas 
souvikbhattachar...@gmail.com wrote:

 Thanks, Let me try to generate the error.  But it's quite shocking that
 before mentioning the error number, it was open and after mention suddenly
 you can not re produce. May be in small application it can not be reproduce
 but in large production it can. Over net you will find few others also get
 the issue. So, wicked people should look into it more closely.


 On Tue, Aug 13, 2013 at 5:33 PM, Papegaaij [via Apache Wicket] 
 ml-node+s1842946n4660867...@n4.nabble.com wrote:

  As you can see in the web.xml, the WicketFilter runs under /app. You can
  start it in jetty using the maven jetty plugin: mvn jetty:run (which will
  make
  the application available under localhost:8080/app)
 
  On Tuesday 13 August 2013 03:21:20 souvikbhattacharyas wrote:
   Hi,
   I have compiled the mentioned application and deployed in the glassfish
   server. But what is the url to run the same and also let me know how to
  run
   it on Jetty.
  
  
  
   --
   View this message in context:
  
 
 http://apache-wicket.1842946.n4.nabble.com/wicket-atmosphere-EventBus-post-
 
  throwing-Null-pointer-exception-sometime-tp4660815p4660865.html
  Sent from
   the Users forum mailing list archive at Nabble.com.
  
   -
   To unsubscribe, e-mail: [hidden email]
 http://user/SendEmail.jtp?type=nodenode=4660867i=0
   For additional commands, e-mail: [hidden email]
 http://user/SendEmail.jtp?type=nodenode=4660867i=1
 
 
  --
   If you reply to this email, your message will be added to the discussion
  below:
 
 
 http://apache-wicket.1842946.n4.nabble.com/wicket-atmosphere-EventBus-post-throwing-Null-pointer-exception-sometime-tp4660815p4660867.html
   To unsubscribe from wicket-atmosphere EventBus.post throwing Null
 pointer
  exception sometime, click here
 http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=4660815code=c291dmlrYmhhdHRhY2hhcnlhc0BnbWFpbC5jb218NDY2MDgxNXwtMTg5NjMzODE4MQ==
 
  .
  NAML
 http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
 
 



 --
 Thanks  Regards,

 Souvik Bhattacharya




 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/wicket-atmosphere-EventBus-post-throwing-Null-pointer-exception-sometime-tp4660815p4660880.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




Updating form fields on dropdown selection change

2013-08-14 Thread Lucio Crusca
I have a DropDownChoice that should update some form fields when the user
selects an item. My selection-changed-listener code is along the lines of:

 form.modelChanging();

 T obj = model.getObject();
 obj.setFoo(newSelection.getFoo());
 obj.setBar(newSelection.getBar());

 form.modelChanged();
 form.clearInput();
 form.visitChildren();

The problem is that without clearInput() the form fields do not update,
while with clearInput they do update, but I loose any input also in fields
other than FOO and BAR. I need a way to update only FOO and BAR fields and
let other fields alone so that they keep their current user input.

Thanks in advance for your help.


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



Re: [OT] thanks

2013-08-14 Thread Emond Papegaaij
Hi Pierre,

Good to hear you like it! Unfortunately, we are still waiting for the rest of 
the server stack to support websockets before we can actually use it in 
production applications. Hopefully, with the release of jee7 (with jsr356) 
maintainers of httpd and ajp will finally realize they need to support 
websockets as well.

Best regards,
Emond

On Wednesday 14 August 2013 12:01:05 Pierre Goupil wrote:
 Good morning,
 
 All apologies for this totally off-topic message, but I would like to say a
 big THANK YOU to Emond for his work on wicket-atmosphere.
 
 His code is far from trivial, yet it is a real pleasure to use it.
 According to me, the killer-feature is the fact that we have an
 AjaxRequestTarget to work with which triggers a Comet / WebSocket 
response.
 
 Thanks again, man!
 
 Pierre


Re: [OT] thanks

2013-08-14 Thread Pierre Goupil
I use only Tomcat (7.0.40) and I must admit that with NIO connector and
useNative=true, the performance looks nice. I have no use for an httpd for
the moment, but I'm not in production.

I plan to load test my app, if you're interested, I can communicate the
results to you.

As a side-note, on the Tomcat list, many people are starting to talk about
better WebSockets support in Tomcat 8 and the dev seem to realize that
there is a strong expectation for them, so maybe they'll try and convince
to work hand-in-hand with the httpd / AJP people?

Anyway, thanks again and keep up the good work!

And of course a big thank you to the people from the great Wicket, too!
:-)

Regards,

Pierre


On Wed, Aug 14, 2013 at 3:33 PM, Emond Papegaaij emond.papega...@topicus.nl
 wrote:

 Hi Pierre,

 Good to hear you like it! Unfortunately, we are still waiting for the rest
 of
 the server stack to support websockets before we can actually use it in
 production applications. Hopefully, with the release of jee7 (with jsr356)
 maintainers of httpd and ajp will finally realize they need to support
 websockets as well.

 Best regards,
 Emond

 On Wednesday 14 August 2013 12:01:05 Pierre Goupil wrote:
  Good morning,
 
  All apologies for this totally off-topic message, but I would like to
 say a
  big THANK YOU to Emond for his work on wicket-atmosphere.
 
  His code is far from trivial, yet it is a real pleasure to use it.
  According to me, the killer-feature is the fact that we have an
  AjaxRequestTarget to work with which triggers a Comet / WebSocket
 response.
 
  Thanks again, man!
 
  Pierre




-- 
Un truc bien avec la musique, c'est que quand elle te frappe, tu n'as pas
mal.
Alors frappez-moi de musique !
Frappez-moi de musique, maintenant !

(Bob Marley : Trenchtown Rock)


Re: [OT] thanks

2013-08-14 Thread Dan Retzlaff
Have you considered nginx? We use httpd but our reverse-proxying needs are
pretty simple. I've been meaning to try nginx.

http://nginx.org/en/docs/http/websocket.html


On Wed, Aug 14, 2013 at 7:42 AM, Pierre Goupil goupilpie...@gmail.comwrote:

 I use only Tomcat (7.0.40) and I must admit that with NIO connector and
 useNative=true, the performance looks nice. I have no use for an httpd for
 the moment, but I'm not in production.

 I plan to load test my app, if you're interested, I can communicate the
 results to you.

 As a side-note, on the Tomcat list, many people are starting to talk about
 better WebSockets support in Tomcat 8 and the dev seem to realize that
 there is a strong expectation for them, so maybe they'll try and convince
 to work hand-in-hand with the httpd / AJP people?

 Anyway, thanks again and keep up the good work!

 And of course a big thank you to the people from the great Wicket, too!
 :-)

 Regards,

 Pierre


 On Wed, Aug 14, 2013 at 3:33 PM, Emond Papegaaij 
 emond.papega...@topicus.nl
  wrote:

  Hi Pierre,
 
  Good to hear you like it! Unfortunately, we are still waiting for the
 rest
  of
  the server stack to support websockets before we can actually use it in
  production applications. Hopefully, with the release of jee7 (with
 jsr356)
  maintainers of httpd and ajp will finally realize they need to support
  websockets as well.
 
  Best regards,
  Emond
 
  On Wednesday 14 August 2013 12:01:05 Pierre Goupil wrote:
   Good morning,
  
   All apologies for this totally off-topic message, but I would like to
  say a
   big THANK YOU to Emond for his work on wicket-atmosphere.
  
   His code is far from trivial, yet it is a real pleasure to use it.
   According to me, the killer-feature is the fact that we have an
   AjaxRequestTarget to work with which triggers a Comet / WebSocket
  response.
  
   Thanks again, man!
  
   Pierre
 



 --
 Un truc bien avec la musique, c'est que quand elle te frappe, tu n'as pas
 mal.
 Alors frappez-moi de musique !
 Frappez-moi de musique, maintenant !

 (Bob Marley : Trenchtown Rock)



Re: Rendering conditional html tags for IE CSS targetting

2013-08-14 Thread Nick Pratt
The workaround we use is to have multiple html close tags:

!--[if lt IE 7]/html![endif]--
!--[if IE 7]/html![endif]--
!--[if IE 8]/html![endif]--
!--[if gt IE 8]!--/html!--![endif]--


On Wed, Aug 14, 2013 at 7:17 AM, Robert Gründler r.gruend...@gmail.comwrote:

 Hi,

 i'm trying to use the markup provided by html5 boilerplate:
 http://html5boilerplate.com/

 They use !--[if lt IE 7]   ![endif]--  comments to render different
 opening html tags for different versions of Internet Explorer, easing CSS
 selectors for IE.

 Here's how it looks like: https://gist.github.com/pulse00/6230134

 When using this markup in wicket, i see the following exception: Tag does
 not have a close tag /html

 It looks like wicket is getting confused by the html comments containing
 html tags.

 Has anyone an idea how to implement this in wicket?


 regards


 -robert



Re: [OT] thanks

2013-08-14 Thread Emond Papegaaij
We depend heavily on ajp. Our application server needs to know the exact 
url the request was made to. This is very hard to get right with plain http 
proxying (if not impossible). The main reason we use httpd in front of our 
application server(s) is for load balancing and status information (serving 
a 503 when the application is down). Tomcat's (or JBoss in our case) 
performance has never been an issue.

Best regards,
Emond

On Wednesday 14 August 2013 07:50:50 Dan Retzlaff wrote:
 Have you considered nginx? We use httpd but our reverse-proxying 
needs are
 pretty simple. I've been meaning to try nginx.
 
 http://nginx.org/en/docs/http/websocket.html
 
 On Wed, Aug 14, 2013 at 7:42 AM, Pierre Goupil 
goupilpie...@gmail.comwrote:
  I use only Tomcat (7.0.40) and I must admit that with NIO connector 
and
  useNative=true, the performance looks nice. I have no use for an 
httpd for
  the moment, but I'm not in production.
  
  I plan to load test my app, if you're interested, I can communicate the
  results to you.
  
  As a side-note, on the Tomcat list, many people are starting to talk 
about
  better WebSockets support in Tomcat 8 and the dev seem to realize 
that
  there is a strong expectation for them, so maybe they'll try and 
convince
  to work hand-in-hand with the httpd / AJP people?
  
  Anyway, thanks again and keep up the good work!
  
  And of course a big thank you to the people from the great Wicket, 
too!
  
  :-)
  
  Regards,
  
  Pierre
  
  
  On Wed, Aug 14, 2013 at 3:33 PM, Emond Papegaaij 
  emond.papega...@topicus.nl
  
   wrote:
   
   Hi Pierre,
   
   Good to hear you like it! Unfortunately, we are still waiting for the
  
  rest
  
   of
   the server stack to support websockets before we can actually use 
it in
   production applications. Hopefully, with the release of jee7 (with
  
  jsr356)
  
   maintainers of httpd and ajp will finally realize they need to support
   websockets as well.
   
   Best regards,
   Emond
   
   On Wednesday 14 August 2013 12:01:05 Pierre Goupil wrote:
Good morning,

All apologies for this totally off-topic message, but I would like to
   
   say a
   
big THANK YOU to Emond for his work on wicket-atmosphere.

His code is far from trivial, yet it is a real pleasure to use it.
According to me, the killer-feature is the fact that we have an
AjaxRequestTarget to work with which triggers a Comet / 
WebSocket
   
   response.
   
Thanks again, man!

Pierre
  
  --
  Un truc bien avec la musique, c'est que quand elle te frappe, tu n'as 
pas
  mal.
  Alors frappez-moi de musique !
  Frappez-moi de musique, maintenant !
  
  (Bob Marley : Trenchtown Rock)


Checkboxes automatically disabled in ListView repeater

2013-08-14 Thread eugenebalt
We have a Panel which contains a WebMarkupContainer which contains a ListView
repeater. The ListView repeats rows of 3 checkboxes; its populateItem is:

protected void populateItem(ListItemEDocsPermissionModel item) {
  EDocsPermissionModel perm = item.getModelObject();

  CheckBox cb1 = new CheckBox(view_flag, new PropertyModel(perm
viewAccessFlag));
  item.add(cb1);

  CheckBox cb2 = new CheckBox(upload_flag, new PropertyModel(perm
uploadAccessFlag));
  item.add(cb2);

  CheckBox cb3 = new CheckBox(delete_flag, new PropertyModel(perm
deleteAccessFlag));
  item.add(cb3);

}

When the page is displayed all the checkboxes are mysteriously disabled.

We removed all behaviors that related to either the checkboxes or the
top-level containers (Panel and WMC). Also, we added this, for every
checkbox, to no effect:

CheckBox cb1 = new CheckBox ( .. ) {
  @Override
  public boolean isEnabled { return true; }
};
CheckBox cb2 = new CheckBox ( .. ) {
  @Override
  public boolean isEnabled { return true; }
};
CheckBox cb3 = new CheckBox ( .. ) {
  @Override
  public boolean isEnabled { return true; }
};

This didn't help. Also, the debugger shows that all the top-level containers
are themselves Enabled. The Panel is enabled and the WMC is enabled.

Any ideas? Thanks



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Checkboxes-automatically-disabled-in-ListView-repeater-tp4660888.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: Checkboxes automatically disabled in ListView repeater

2013-08-14 Thread Sven Meier

Do you have the disabled attribute in your markup source?

Sven



On 08/14/2013 04:08 PM, eugenebalt wrote:

We have a Panel which contains a WebMarkupContainer which contains a ListView
repeater. The ListView repeats rows of 3 checkboxes; its populateItem is:

protected void populateItem(ListItemEDocsPermissionModel item) {
   EDocsPermissionModel perm = item.getModelObject();

   CheckBox cb1 = new CheckBox(view_flag, new PropertyModel(perm
viewAccessFlag));
   item.add(cb1);

   CheckBox cb2 = new CheckBox(upload_flag, new PropertyModel(perm
uploadAccessFlag));
   item.add(cb2);

   CheckBox cb3 = new CheckBox(delete_flag, new PropertyModel(perm
deleteAccessFlag));
   item.add(cb3);

}

When the page is displayed all the checkboxes are mysteriously disabled.

We removed all behaviors that related to either the checkboxes or the
top-level containers (Panel and WMC). Also, we added this, for every
checkbox, to no effect:

CheckBox cb1 = new CheckBox ( .. ) {
   @Override
   public boolean isEnabled { return true; }
};
CheckBox cb2 = new CheckBox ( .. ) {
   @Override
   public boolean isEnabled { return true; }
};
CheckBox cb3 = new CheckBox ( .. ) {
   @Override
   public boolean isEnabled { return true; }
};

This didn't help. Also, the debugger shows that all the top-level containers
are themselves Enabled. The Panel is enabled and the WMC is enabled.

Any ideas? Thanks



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Checkboxes-automatically-disabled-in-ListView-repeater-tp4660888.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: Checkboxes automatically disabled in ListView repeater

2013-08-14 Thread eugenebalt
YES. That was the exact issue. Thanks Sven.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Checkboxes-automatically-disabled-in-ListView-repeater-tp4660888p4660890.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



Dead link on Wicket's home page

2013-08-14 Thread Paul Bors
On the home page the Apache Wicket 6.9.1 released
http://wicket.apache.org/2013/07/10/wicket-6.9.1-released+copy.html  link
points to
http://wicket.apache.org/2013/07/10/wicket-6.9.1-released+copy.html which is
a 404.

 

~ Thank you,

Paul Bors



RE: Updating form fields on dropdown selection change

2013-08-14 Thread Paul Bors
Take a look at how one drop-down updates the other via Ajax in the Wicket 
Examples at:
http://www.wicket-library.com/wicket-examples/ajax/choice

I suggest you do something similar instead of trying to re-implement part of 
the form processing in your code.

Besides, what is going to happen when the next version of Wicket comes along 
and the form processing changes?
You'll have to re-implement your panels.

~ Thank you,
  Paul Bors

-Original Message-
From: Lucio Crusca [mailto:lu...@sulweb.org] 
Sent: Wednesday, August 14, 2013 8:52 AM
To: users@wicket.apache.org
Subject: Updating form fields on dropdown selection change

I have a DropDownChoice that should update some form fields when the user 
selects an item. My selection-changed-listener code is along the lines of:

 form.modelChanging();

 T obj = model.getObject();
 obj.setFoo(newSelection.getFoo());
 obj.setBar(newSelection.getBar());

 form.modelChanged();
 form.clearInput();
 form.visitChildren();

The problem is that without clearInput() the form fields do not update, while 
with clearInput they do update, but I loose any input also in fields other than 
FOO and BAR. I need a way to update only FOO and BAR fields and let other 
fields alone so that they keep their current user input.

Thanks in advance for your help.


-
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: Breadcrumbs in TabbedPanel

2013-08-14 Thread Paul Bors
I suppose you're using the breadcrumbs from the wicket-extensions as per
this Wicket Library example:
http://www.wicket-library.com/wicket-examples/breadcrumb

Then see the API for the getActive() method of the IBreadCrumbModel:
http://ci.apache.org/projects/wicket/apidocs/6.0.x/org/apache/wicket/extensi
ons/breadcrumb/IBreadCrumbModel.html#getActive()

Try getting a hold to an IBreadCrumbModel reference and from your individual
tab panel set the active participant.

~ Thank you,
  Paul Bors

-Original Message-
From: Vignesh Palanisamy [mailto:vign...@mcruncher.com] 
Sent: Wednesday, August 14, 2013 12:57 AM
To: users@wicket.apache.org
Subject: Breadcrumbs in TabbedPanel

Hi all,

 Right now we are implementing Breadcrumbs in our project. And it works very
fine in all panels without any issue. But ,while using the panel as
TabbedPanel breadCrumbs didn't works. i don't know how to implement
breadcrumbs in tabbedPanel. can anyone please help us.


Thanks
Vignesh Palanisamy


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



Use Wicket as a REST API

2013-08-14 Thread robianmcd
I need Wicket to respond to a post request from AngularJS. 

I set up a page in wicket like this but the request parameters are always
empty

@MountPath(value = /api/my/rest/url)
public class MyPostHandler extends SecureWebPage {

public MyPostHandler () {
final WebRequest webRequest = (WebRequest) getRequest();
final HttpServletRequest rawRequest = (HttpServletRequest)
webRequest.getContainerRequest();

if (rawRequest.getMethod().equalsIgnoreCase(POST)) {
webRequest.getRequestParameters().getParameterNames();
//Returns an empty list
webRequest.getPostParameters().getParameterNames();
//Returns an empty list
}
}
}

The AngularJS code that is sending the POST request looks like this:

$http.post('/api/my/rest/url', {some:data, other:stuff});

Any idea what's going wrong here?
Thanks!



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Use-Wicket-as-a-REST-API-tp4660894.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



Forcing Form Validation from another Form's onValidate()

2013-08-14 Thread eugenebalt
I have a Panel (P1) which contains its own form (P1_F1).

The P1 panel also contains another panel inside itself, P1_A, which has its
own inner form (let's call it P1_A_F1).

Whenever the P_F1's validation is called, I also have to call the P1_A_F1
form validation. It doesn't get called automatically. How can I achieve
that?

In the P1_F1, I am catching onValidate() and overriding it. The problem is,
to call the validate() method, I need a FormComponent, not a Form. So I can
find the right form to additionally validate, but the method is not
available without a FormComponent. Any ideas? Thanks


P1_F1's onValidate captured:

@Override
protected void onValidate() {
  Panel P1_A = (Panel)get(P1_A);
  Form P1_A_F1 = (Form)P1_A.get(P1_A_F1);
  // how to force validation now on P1_A_F1?
}



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Forcing-Form-Validation-from-another-Form-s-onValidate-tp4660895.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: Forcing Form Validation from another Form's onValidate()

2013-08-14 Thread Paul Bors
Have you checked the Wiki pages?
https://cwiki.apache.org/confluence/display/WICKET/Nested+Forms

Which use-case are your referring to again?

~ Thank you,
  Paul Bors

-Original Message-
From: eugenebalt [mailto:eugeneb...@yahoo.com] 
Sent: Wednesday, August 14, 2013 2:20 PM
To: users@wicket.apache.org
Subject: Forcing Form Validation from another Form's onValidate()

I have a Panel (P1) which contains its own form (P1_F1).

The P1 panel also contains another panel inside itself, P1_A, which has its
own inner form (let's call it P1_A_F1).

Whenever the P_F1's validation is called, I also have to call the P1_A_F1
form validation. It doesn't get called automatically. How can I achieve
that?

In the P1_F1, I am catching onValidate() and overriding it. The problem is,
to call the validate() method, I need a FormComponent, not a Form. So I can
find the right form to additionally validate, but the method is not
available without a FormComponent. Any ideas? Thanks


P1_F1's onValidate captured:

@Override
protected void onValidate() {
  Panel P1_A = (Panel)get(P1_A);
  Form P1_A_F1 = (Form)P1_A.get(P1_A_F1);
  // how to force validation now on P1_A_F1?
}



--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/Forcing-Form-Validation-from-anot
her-Form-s-onValidate-tp4660895.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: Use Wicket as a REST API

2013-08-14 Thread robianmcd
I found that this works but I'm not sure if there is a better way of doing
this:

@MountPath(value = /api/my/rest/url)
public class MyPostHandler extends SecureWebPage {

public MyPostHandler () {
final WebRequest webRequest = (WebRequest) getRequest();
final HttpServletRequest rawRequest = (HttpServletRequest)
webRequest.getContainerRequest();

if (rawRequest.getMethod().equalsIgnoreCase(POST)) {

BufferedReader br;
  try {
  br = rawRequest.getReader();
  String jsonString = br.readLine();
  //Do something with the JSON here
  }
  catch (IOException e) {

  }

}
}
}



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Use-Wicket-as-a-REST-API-tp4660894p4660898.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: Updating form fields on dropdown selection change

2013-08-14 Thread Lucio Crusca
 Take a look at how one drop-down updates the other via Ajax in the Wicket
 Examples at:
 http://www.wicket-library.com/wicket-examples/ajax/choice

Thanks for the suggestion, that code looks good. However I don't
understand a number of things:

1. where wicket is made aware of the fact that the target is actually the
models dropdown and not something else in the form?

2. the constructor 'new AjaxFormComponentUpdatingBehavior(onchange)'
does not seem to exist in Wicket 6. Can I just use the no args
constructor?

3. Can I use the AjaxRequestTarget to update a text field also, even if in
the example it updates a dropdownchoice?




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



RE: Updating form fields on dropdown selection change

2013-08-14 Thread Paul Bors
1. where wicket is made aware of the fact that the target is actually the 
models dropdown and not something else in the form?

I'm not sure I understand this question but I think the answer you're looking 
for is: because it has a behavior attached to a component to which you can gain 
access to its model. I would suggest you take a look over chapter 16 Working 
with AJAX of the Wicket Free Guide 
(http://wicket.apache.org/learn/books/freeguide.html).


2. the constructor 'new AjaxFormComponentUpdatingBehavior(onchange)'
does not seem to exist in Wicket 6. Can I just use the no args constructor?

Wicket Library is using Wicket 1.5.10. Take a look over the Migration to 6.0 
guide:
https://cwiki.apache.org/confluence/display/WICKET/Migration+to+Wicket+6.0#MigrationtoWicket6.0-Ajax
You might want to use org.apache.wicket.ajax.form.OnChangeAjaxBehavior or some 
other subclass of AjaxEventBehavior. 


3. Can I use the AjaxRequestTarget to update a text field also, even if in the 
example it updates a dropdownchoice?

You can update any component you would like using a AjaxRequestTarget. Just 
make sure you call setOutputMarkupId(true) on the components you're planning on 
updating so that it has an ID attribute for JQuery to find it. If you don't, 
Wicket will remind you via a runtime exception :)

~ Thank you,
  Paul Bors

-Original Message-
From: Lucio Crusca [mailto:lu...@sulweb.org] 
Sent: Wednesday, August 14, 2013 2:37 PM
To: users@wicket.apache.org
Subject: RE: Updating form fields on dropdown selection change

 Take a look at how one drop-down updates the other via Ajax in the 
 Wicket Examples at:
 http://www.wicket-library.com/wicket-examples/ajax/choice

Thanks for the suggestion, that code looks good. However I don't understand a 
number of things:

1. where wicket is made aware of the fact that the target is actually the 
models dropdown and not something else in the form?

2. the constructor 'new AjaxFormComponentUpdatingBehavior(onchange)'
does not seem to exist in Wicket 6. Can I just use the no args constructor?

3. Can I use the AjaxRequestTarget to update a text field also, even if in the 
example it updates a dropdownchoice?




-
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: Updating form fields on dropdown selection change

2013-08-14 Thread Lucio Crusca
I wrote:
 2. the constructor 'new AjaxFormComponentUpdatingBehavior(onchange)'
 does not seem to exist in Wicket 6. Can I just use the no args
 constructor?

Please ignore this one, I was using
AjaxFormChoiceComponentUpdatingBehavior instead by mistake.




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



RE: Updating form fields on dropdown selection change

2013-08-14 Thread Lucio Crusca
 1. where wicket is made aware of the fact that the target is actually the
 models dropdown and not something else in the form?

 I'm not sure I understand this question but I think the answer you're
 looking for is: because it has a behavior attached to a component to which
 you can gain access to its model. I would suggest you take a look over
 chapter 16 Working with AJAX of the Wicket Free Guide
 (http://wicket.apache.org/learn/books/freeguide.html).

Sorry, it was so obvious that I didn't notice it, I'm not surprised you
aren't sure to understand... the place where wicket is being made aware of
what it should update is just inside the inner class in the only single
method that's being called: target.add(models).




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



RE: Forcing Form Validation from another Form's onValidate()

2013-08-14 Thread eugenebalt
In the final HTML, my form is flattened out, there is only Form.

In my Wicket markup, the structure is:
PANEL - FORM - SecondPanel - SecondForm

The main PANEL's FORM is being submitted, and validated. But the
SecondForm validation never gets called.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Forcing-Form-Validation-from-another-Form-s-onValidate-tp4660895p4660905.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: Forcing Form Validation from another Form's onValidate()

2013-08-14 Thread Paul Bors
In the final HTML, my form is flattened out, there is only Form.

That's because Wicket supports nested forms but HTML does not.
Wicket will hide any inner form tags but keep the Form object references.
See section 10.5 Nested Forms of the Wicket Free Guide for more details.
http://wicket.apache.org/learn/books/freeguide.html


In my Wicket markup, the structure is:
PANEL - FORM - SecondPanel - SecondForm

The main PANEL's FORM is being submitted, and validated. But the
SecondForm validation never gets called.

So you want to validate the inner nested form when submitting the outer
parent form. I take it that's the first use-case described at:
https://cwiki.apache.org/confluence/display/WICKET/Nested+Forms

all forms enabled
outer form submitted

Outer Middle Inner 
*S*   S  S

Looking over the Form's validateComponents() method it does a post order
traversal of all form components.

I would say, create a quick-start so we better understand how your code is
configured because as far as I recall this is the default behavior. Perhaps
I'm wrong, but at least a quick-start would aid in helping you without
guessing.

To create a quick start see:
http://wicket.apache.org/start/quickstart.html

~ Thank you,
  Paul Bors

--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/Forcing-Form-Validation-from-anot
her-Form-s-onValidate-tp4660895p4660905.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: Use Wicket as a REST API

2013-08-14 Thread Bas Gooren

Hi,

Yes, what you are doing is a perfectly ok way to handle this.
Optionally you could use a shared resource for this, but I say that's 
just a matter of preference.


We use something inspired by https://code.google.com/p/wicket-rest/
This gives you some abstraction over the json (or xml/...) handling.
Furthermore you can override sensible methods like doGet or doPost 
which clearly communicate intent.


Met vriendelijke groet,
Kind regards,

Bas Gooren

Op 14-8-2013 20:32, schreef robianmcd:

I found that this works but I'm not sure if there is a better way of doing
this:

@MountPath(value = /api/my/rest/url)
public class MyPostHandler extends SecureWebPage {

public MyPostHandler () {
 final WebRequest webRequest = (WebRequest) getRequest();
 final HttpServletRequest rawRequest = (HttpServletRequest)
webRequest.getContainerRequest();

 if (rawRequest.getMethod().equalsIgnoreCase(POST)) {

 BufferedReader br;
   try {
   br = rawRequest.getReader();
   String jsonString = br.readLine();
   //Do something with the JSON here
   }
   catch (IOException e) {

   }

 }
}
}



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Use-Wicket-as-a-REST-API-tp4660894p4660898.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: wicketstuff-lazymodel and wicket-bean-validation

2013-08-14 Thread Sven Meier

Hi Gabriel,

LazyModel implements IPropertyReflectionAwareModel now, so integration 
with beanvalidation should work out-of-the-box with the next release.


Best regards
Sven

On 08/13/2013 09:40 PM, Gabriel Landon wrote:

The previous code was flawed. Here's the right one!
It's far from perfect but as I'm using only IObjectClassAwareModel models
it's working!

public class LazyModelPropertyResolver implements IPropertyResolver {

@Override
public Property resolveProperty(final FormComponent? component) {
IModel? model = component.getModel();

while (true) {
if (model == null) {
return null;
}
if (model instanceof LazyModel?) {
break;
}
if (model instanceof IWrapModel?) {
model = ((IWrapModel?) 
model).getWrappedModel();
continue;
}
return null;
}

final LazyModel? lazyModel = (LazyModel?) model;

//I'm using only IObjectClassAwareModel
if (lazyModel.getTarget() instanceof IObjectClassAwareModel) {

// le nom de la proprité (qui peut être dans une chaine 
du genre
foo.bar.baz).
String fieldName = lazyModel.getPath();
if (fieldName.contains(.)) {
fieldName = StringUtils.substringAfterLast(fieldName, 
.); // on prend
le dernier champ
}

return new Property(((IObjectClassAwareModel?)
lazyModel.getTarget()).getObjectClass(), fieldName);
}

return null;
}
}




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/wicketstuff-lazymodel-and-wicket-bean-validation-tp4660857p4660872.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