byte[] from SharedResourceReference

2014-10-07 Thread Stefan Lorenz
Hi,

is it possible to get a byte[] from a SharedResourceReference or IResource?

Thx and regards
Stefan


Re: How to get this URL pattern working in newer versions of Wicket?

2014-10-07 Thread Steve Swinsburg
Hi Paul,

Yeah the UUID will change in different placements of the app, I was just
trying to get this particular instance working :)
Just wondering why it didn't work, given that UUID? The UUID is correct for
this placement and the URL it generated was correct though it kept
redirecting until the browser stopped it.

cheers,
Steve

On Tue, Oct 7, 2014 at 3:49 AM, Paul Bors p...@bors.ws wrote:

 Hey Steve,

 You should not mount it yourself given the long session ID of
 'a79c7348-6c8b-
 4912-8cc7-3b4419344f7f' since that will change anyhow.

 To understand how Wicket handles the URL mapping see the user guide's
 Chapter 10 Wicket Links and URL generation at:
 http://wicket.apache.org/guide/guide/single.html#urls

 I guess you want to provide your own IMapperContext?


 On Mon, Oct 6, 2014 at 12:31 AM, Steve Swinsburg 
 steve.swinsb...@gmail.com
 wrote:

  Hi all,
 
  I've been working on Wicket 1.4 for a while and in upgrading to Wicket 6
  I've found an inconsistency in the way URLs are handled, specifically in
  the inmethod data grid but also the editable data grid.
 
  I have a particular context path that I need to maintain as the webapp
  rendering is inside a portal type framework.
 
  I have taken the example webapps from both 1.4 and 6 and customised them
 so
  they run in the framework.
 
  In Wicket 1.4, the page is mounted like:
 
  mount(new HybridUrlCodingStrategy(/data-grid/editable,
  EditableDataGridPage.class));
 
  and works fine. The URL is:
 
 
 http://localhost:8080/portal/tool/a79c7348-6c8b-4912-8cc7-3b4419344f7f/data-grid/editable.3
 
  In Wicket 6, the page is mounted as:
 
  mount(/data-grid/editable, EditableDataGridPage.class);
  ...
  getRootRequestMapperAsCompound().add(new MountedMapper(mountPath,
  pageClass));
 
  and it does not work. It strips my leading context bits
  (/portal/tool/UUID).
 
  I tried to mount it myself:
  mountPage(/a79c7348-6c8b-4912-8cc7-3b4419344f7f,
  EditableDataGridPage.class);
 
  But that goes into an infinite redirect loop if I mount it to the webapp
 I
  want. If I mount it to a non wicket webapp, then that mount works fine.
 
  I am not sure how to restore the old URL mapping strategy.
 
  Can anyone help?
 
  thanks,
  Steve
 



Re: byte[] from SharedResourceReference

2014-10-07 Thread Martin Grigorov
Hi,

Yes. See ByteArrayResource

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Tue, Oct 7, 2014 at 8:09 AM, Stefan Lorenz stefan.lor...@persis.de
wrote:

 Hi,

 is it possible to get a byte[] from a SharedResourceReference or IResource?

 Thx and regards
 Stefan



Re: Websocket message from Spring bean

2014-10-07 Thread Martin Grigorov
Hi,

I think it should work.
What kind of problems do you face ?

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Fri, Oct 3, 2014 at 4:55 PM, Maxim Solodovnik solomax...@gmail.com
wrote:

 Hello All,

 I wonder is it possible to send IWebSocketPushMessage from Spring bean? (I
 can access Spring beans from wicket pages, now I need backward
 compatibility)

 Thanks in advance for your help!

 --
 WBR
 Maxim aka solomax



Re: Could not clear select2Choice component model value.

2014-10-07 Thread Martin Grigorov
Hi,

You should call formComponent.clearInput() too.

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Tue, Oct 7, 2014 at 9:13 AM, MadasamySankarapandian 
madas...@mcruncher.com wrote:


 This is regarding wicket-select2 project. I could not find any mailing
 list for this project. That is why sending here. Please some one help me.

 I have created clear link to clear the form input values. After click the
 clear link,  all components values are cleared except Select2Choice
 component.

 Here with attached quickstart to recreate this problem.

 Follow below steps to recreate this problem

 * Download attachment and extract it.
 * cd select2-quickstart.
 * Then execute mvn clean package jetty:run
 * Type localhost:8080 in browser
 * Give the input to name and country field.
 * Click clear link

 Now name(*TextField*) field value is cleared and country(*Select2Choice*)
 field value is not cleared.



 --
 Thanks and regards
  Madasamy


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



Re: How to get this URL pattern working in newer versions of Wicket?

2014-10-07 Thread Martin Grigorov
Hi,

On Mon, Oct 6, 2014 at 6:31 AM, Steve Swinsburg steve.swinsb...@gmail.com
wrote:

 Hi all,

 I've been working on Wicket 1.4 for a while and in upgrading to Wicket 6
 I've found an inconsistency in the way URLs are handled, specifically in
 the inmethod data grid but also the editable data grid.

 I have a particular context path that I need to maintain as the webapp
 rendering is inside a portal type framework.

 I have taken the example webapps from both 1.4 and 6 and customised them so
 they run in the framework.

 In Wicket 1.4, the page is mounted like:

 mount(new HybridUrlCodingStrategy(/data-grid/editable,
 EditableDataGridPage.class));

 and works fine. The URL is:

 http://localhost:8080/portal/tool/a79c7348-6c8b-4912-8cc7-3b4419344f7f/data-grid/editable.3

 In Wicket 6, the page is mounted as:

 mount(/data-grid/editable, EditableDataGridPage.class);


The line above will not compile!


 ...
 getRootRequestMapperAsCompound().add(new MountedMapper(mountPath,
 pageClass));


This is equivalent to: mountPage(mountPath, pageClass)



 and it does not work. It strips my leading context bits
 (/portal/tool/UUID).


How do you set these context bits ?



 I tried to mount it myself:
 mountPage(/a79c7348-6c8b-4912-8cc7-3b4419344f7f,
 EditableDataGridPage.class);

 But that goes into an infinite redirect loop if I mount it to the webapp I
 want. If I mount it to a non wicket webapp, then that mount works fine.

 I am not sure how to restore the old URL mapping strategy.


Give us more information about your setup to be able to help you.
Especially what is the value of ServletContext#getContextPath() and what is
the value of WicketFilter#getFilterPath().
These two bits are used as prefixes for the mount paths you use for your
pages.



 Can anyone help?

 thanks,
 Steve



Re: Websocket message from Spring bean

2014-10-07 Thread Maxim Solodovnik
To be fair I haven't tried :(
I thought I will have no session/application bound to current thread
exceptions :(
I'll test and let you know

On 7 October 2014 15:21, Martin Grigorov mgrigo...@apache.org wrote:

 Hi,

 I think it should work.
 What kind of problems do you face ?

 Martin Grigorov
 Wicket Training and Consulting
 https://twitter.com/mtgrigorov

 On Fri, Oct 3, 2014 at 4:55 PM, Maxim Solodovnik solomax...@gmail.com
 wrote:

  Hello All,
 
  I wonder is it possible to send IWebSocketPushMessage from Spring bean?
 (I
  can access Spring beans from wicket pages, now I need backward
  compatibility)
 
  Thanks in advance for your help!
 
  --
  WBR
  Maxim aka solomax
 




-- 
WBR
Maxim aka solomax


Re: Websocket message from Spring bean

2014-10-07 Thread Martin Grigorov
You use request and session scoped Spring beans in WebSocket request
because such requests are not processed by Servlet filters and Spring has
no chance to set its proxy objects as request/session attributes.

But in Spring bean code you can do:
Application app = Application..get(myFilterName);
WebSocketSettings wsSettings = WebSocketSettings.Holder.get(app);
IWebSocketConnectionRegistry registry = wsSettings.getConnectionRegistry();
WebSocketPushBroadcaster broadcaster = new
WebSocketPushBroadcaster(registry);
broadcaster

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Tue, Oct 7, 2014 at 11:31 AM, Maxim Solodovnik solomax...@gmail.com
wrote:

 To be fair I haven't tried :(
 I thought I will have no session/application bound to current thread
 exceptions :(
 I'll test and let you know

 On 7 October 2014 15:21, Martin Grigorov mgrigo...@apache.org wrote:

  Hi,
 
  I think it should work.
  What kind of problems do you face ?
 
  Martin Grigorov
  Wicket Training and Consulting
  https://twitter.com/mtgrigorov
 
  On Fri, Oct 3, 2014 at 4:55 PM, Maxim Solodovnik solomax...@gmail.com
  wrote:
 
   Hello All,
  
   I wonder is it possible to send IWebSocketPushMessage from Spring bean?
  (I
   can access Spring beans from wicket pages, now I need backward
   compatibility)
  
   Thanks in advance for your help!
  
   --
   WBR
   Maxim aka solomax
  
 



 --
 WBR
 Maxim aka solomax



Re: Websocket message from Spring bean

2014-10-07 Thread Maxim Solodovnik
Thanks a lot for the tip Martin!
will give it a try and write back :)

On 7 October 2014 16:39, Martin Grigorov mgrigo...@apache.org wrote:

 You use request and session scoped Spring beans in WebSocket request
 because such requests are not processed by Servlet filters and Spring has
 no chance to set its proxy objects as request/session attributes.

 But in Spring bean code you can do:
 Application app = Application..get(myFilterName);
 WebSocketSettings wsSettings = WebSocketSettings.Holder.get(app);
 IWebSocketConnectionRegistry registry = wsSettings.getConnectionRegistry();
 WebSocketPushBroadcaster broadcaster = new
 WebSocketPushBroadcaster(registry);
 broadcaster

 Martin Grigorov
 Wicket Training and Consulting
 https://twitter.com/mtgrigorov

 On Tue, Oct 7, 2014 at 11:31 AM, Maxim Solodovnik solomax...@gmail.com
 wrote:

  To be fair I haven't tried :(
  I thought I will have no session/application bound to current thread
  exceptions :(
  I'll test and let you know
 
  On 7 October 2014 15:21, Martin Grigorov mgrigo...@apache.org wrote:
 
   Hi,
  
   I think it should work.
   What kind of problems do you face ?
  
   Martin Grigorov
   Wicket Training and Consulting
   https://twitter.com/mtgrigorov
  
   On Fri, Oct 3, 2014 at 4:55 PM, Maxim Solodovnik solomax...@gmail.com
 
   wrote:
  
Hello All,
   
I wonder is it possible to send IWebSocketPushMessage from Spring
 bean?
   (I
can access Spring beans from wicket pages, now I need backward
compatibility)
   
Thanks in advance for your help!
   
--
WBR
Maxim aka solomax
   
  
 
 
 
  --
  WBR
  Maxim aka solomax
 




-- 
WBR
Maxim aka solomax


Lost in Queueing 7.0.0M3

2014-10-07 Thread Aurèl
Hi,I'm trying to migrate my Webapp from 6.x to 7.x where the new method of
queueing give me headache.In my 6.x app (even 1.5.x) I developped my own
queueing system wich worked great, but there are now some
incompatibilities...I tried to figure out with this small app HelloWorld
:Java:public class BasePage extends WebPage{}public class HelloWorld extends
BasePage{   public HelloWorld() {   super();
//add(new Label(message, Hello
World! ADD));  queue(new Label(message, Hello World! QUEUE));   
}}BasePage.html :HelloWorld.html :Message goes here*Really
simple but i get this :*Unable to find component with id 'message' in
[TransparentWebMarkupContainer [Component id = wicket_extend2]] Expected:
'wicket_child1:wicket_extend2:message'. Found with similar names: ''
MarkupStream: [markup =
file:/C:/web/projets/eclipse-luna/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/HelloWorld/WEB-INF/classes/pnv/HelloWorld.html
   
Message goes hereThe exemple works fine when i have only one class
(BasePage)I'm sure I'm stupid... (and i'm not newbie in wicket...)Thanks !

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Lost-in-Queueing-7-0-0M3-tp4667845.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: Lost in Queueing 7.0.0M3

2014-10-07 Thread Martin Grigorov
Hi,

Please create a proper quickstart application with this code and attach it
to a ticket in JIRA.
Thanks!

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Tue, Oct 7, 2014 at 3:43 PM, Aurèl apalanc...@proginov.com wrote:

 Hi,I'm trying to migrate my Webapp from 6.x to 7.x where the new method of
 queueing give me headache.In my 6.x app (even 1.5.x) I developped my own
 queueing system wich worked great, but there are now some
 incompatibilities...I tried to figure out with this small app HelloWorld
 :Java:public class BasePage extends WebPage{}public class HelloWorld
 extends
 BasePage{   public HelloWorld() {   super();
   //add(new Label(message, Hello
 World! ADD));  queue(new Label(message, Hello World! QUEUE));
 }}BasePage.html :HelloWorld.html :Message goes here*Really
 simple but i get this :*Unable to find component with id 'message' in
 [TransparentWebMarkupContainer [Component id = wicket_extend2]] Expected:
 'wicket_child1:wicket_extend2:message'. Found with similar names: ''
 MarkupStream: [markup =

 file:/C:/web/projets/eclipse-luna/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/HelloWorld/WEB-INF/classes/pnv/HelloWorld.html
 Message goes hereThe exemple works fine when i have only one class
 (BasePage)I'm sure I'm stupid... (and i'm not newbie in wicket...)Thanks !

 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Lost-in-Queueing-7-0-0M3-tp4667845.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




alternative solution for addOrReplace()?

2014-10-07 Thread Patrick Davids
Hi all,
I have a panel, which renders a inner markupcontainer (different panels 
for different ways of displaying my model object) depending on its model 
objects type.

I do this by addOrReplace() the inner panel in an onConfigure() having 
an if instanceof; and it also iterates over a list...

I'm not sure, if it is a good solution (I dont like the instanceof 
approach), but the panel works quite good for ajax rendering and 
refreshing use-cases.

But, the addOrReplace() has one big disadvantage.
It forces to detach the model on each iteration, so on each iteration I 
get a database access to retrieve it again.

Is there anyway to keep the model attached until the entire request 
cycle is finished?


Or should I try to find complete other solution for this kind of high 
dynamic iterating panel?
Is it better to use e.g. Fragments to display a model object in 
different ways depending on its state?

Please give some inspirations... I ran out of ideas. Help!

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



Re: How to get this URL pattern working in newer versions of Wicket?

2014-10-07 Thread Paul Bors
Check out Wicket's source code and put a break point then follow through :)

On Tue, Oct 7, 2014 at 2:09 AM, Steve Swinsburg steve.swinsb...@gmail.com
wrote:

 Hi Paul,

 Yeah the UUID will change in different placements of the app, I was just
 trying to get this particular instance working :)
 Just wondering why it didn't work, given that UUID? The UUID is correct for
 this placement and the URL it generated was correct though it kept
 redirecting until the browser stopped it.

 cheers,
 Steve

 On Tue, Oct 7, 2014 at 3:49 AM, Paul Bors p...@bors.ws wrote:

  Hey Steve,
 
  You should not mount it yourself given the long session ID of
  'a79c7348-6c8b-
  4912-8cc7-3b4419344f7f' since that will change anyhow.
 
  To understand how Wicket handles the URL mapping see the user guide's
  Chapter 10 Wicket Links and URL generation at:
  http://wicket.apache.org/guide/guide/single.html#urls
 
  I guess you want to provide your own IMapperContext?
 
 
  On Mon, Oct 6, 2014 at 12:31 AM, Steve Swinsburg 
  steve.swinsb...@gmail.com
  wrote:
 
   Hi all,
  
   I've been working on Wicket 1.4 for a while and in upgrading to Wicket
 6
   I've found an inconsistency in the way URLs are handled, specifically
 in
   the inmethod data grid but also the editable data grid.
  
   I have a particular context path that I need to maintain as the webapp
   rendering is inside a portal type framework.
  
   I have taken the example webapps from both 1.4 and 6 and customised
 them
  so
   they run in the framework.
  
   In Wicket 1.4, the page is mounted like:
  
   mount(new HybridUrlCodingStrategy(/data-grid/editable,
   EditableDataGridPage.class));
  
   and works fine. The URL is:
  
  
 
 http://localhost:8080/portal/tool/a79c7348-6c8b-4912-8cc7-3b4419344f7f/data-grid/editable.3
  
   In Wicket 6, the page is mounted as:
  
   mount(/data-grid/editable, EditableDataGridPage.class);
   ...
   getRootRequestMapperAsCompound().add(new MountedMapper(mountPath,
   pageClass));
  
   and it does not work. It strips my leading context bits
   (/portal/tool/UUID).
  
   I tried to mount it myself:
   mountPage(/a79c7348-6c8b-4912-8cc7-3b4419344f7f,
   EditableDataGridPage.class);
  
   But that goes into an infinite redirect loop if I mount it to the
 webapp
  I
   want. If I mount it to a non wicket webapp, then that mount works fine.
  
   I am not sure how to restore the old URL mapping strategy.
  
   Can anyone help?
  
   thanks,
   Steve
  
 



Re: alternative solution for addOrReplace()?

2014-10-07 Thread Paul Bors
Why not use Ajax?

addOrReplace() is really for when you need the full request cycle and have
the page rendered on the server side. With Ajax you get your target for
which you can add all the components you want to refresh on the page.

Given the day and age we live in, I don't think there is a need to even
worry about browsers that do not support Ajax. Than again, that depends on
your product's requirements.

Otherwise, you can keep on using addOrReplace() but stop using instaceof
and start using Generics.
If you need an example code-snippet of that let me know and I'll dig some
out for you.

On Tue, Oct 7, 2014 at 9:51 AM, Patrick Davids patrick.dav...@nubologic.com
 wrote:

 Hi all,
 I have a panel, which renders a inner markupcontainer (different panels
 for different ways of displaying my model object) depending on its model
 objects type.

 I do this by addOrReplace() the inner panel in an onConfigure() having
 an if instanceof; and it also iterates over a list...

 I'm not sure, if it is a good solution (I dont like the instanceof
 approach), but the panel works quite good for ajax rendering and
 refreshing use-cases.

 But, the addOrReplace() has one big disadvantage.
 It forces to detach the model on each iteration, so on each iteration I
 get a database access to retrieve it again.

 Is there anyway to keep the model attached until the entire request
 cycle is finished?


 Or should I try to find complete other solution for this kind of high
 dynamic iterating panel?
 Is it better to use e.g. Fragments to display a model object in
 different ways depending on its state?

 Please give some inspirations... I ran out of ideas. Help!

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




Re: Could not clear select2Choice component model value.

2014-10-07 Thread Paul Bors
You can also ask the developer via:
https://github.com/ivaynberg/wicket-select2/issues

You should probably take a look over the open issues so that you are
familiar with that other developers faced. Maybe one of those issues might
be a road block for you?

Although you will get a faster reply from Igor or another Wicket developer
via this list :)

On Tue, Oct 7, 2014 at 4:23 AM, Martin Grigorov mgrigo...@apache.org
wrote:

 Hi,

 You should call formComponent.clearInput() too.

 Martin Grigorov
 Wicket Training and Consulting
 https://twitter.com/mtgrigorov

 On Tue, Oct 7, 2014 at 9:13 AM, MadasamySankarapandian 
 madas...@mcruncher.com wrote:

 
  This is regarding wicket-select2 project. I could not find any mailing
  list for this project. That is why sending here. Please some one help me.
 
  I have created clear link to clear the form input values. After click the
  clear link,  all components values are cleared except Select2Choice
  component.
 
  Here with attached quickstart to recreate this problem.
 
  Follow below steps to recreate this problem
 
  * Download attachment and extract it.
  * cd select2-quickstart.
  * Then execute mvn clean package jetty:run
  * Type localhost:8080 in browser
  * Give the input to name and country field.
  * Click clear link
 
  Now name(*TextField*) field value is cleared and country(*Select2Choice*)
  field value is not cleared.
 
 
 
  --
  Thanks and regards
   Madasamy
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 



Re: Could not clear select2Choice component model value.

2014-10-07 Thread Maxim Solodovnik
we recently moved this component to wicketstuff:
https://github.com/wicketstuff/core/tree/master/jdk-1.7-parent/select2-parent

to get Wicket7 compatible version


On 7 October 2014 22:56, Paul Bors p...@bors.ws wrote:

 You can also ask the developer via:
 https://github.com/ivaynberg/wicket-select2/issues

 You should probably take a look over the open issues so that you are
 familiar with that other developers faced. Maybe one of those issues might
 be a road block for you?

 Although you will get a faster reply from Igor or another Wicket developer
 via this list :)

 On Tue, Oct 7, 2014 at 4:23 AM, Martin Grigorov mgrigo...@apache.org
 wrote:

  Hi,
 
  You should call formComponent.clearInput() too.
 
  Martin Grigorov
  Wicket Training and Consulting
  https://twitter.com/mtgrigorov
 
  On Tue, Oct 7, 2014 at 9:13 AM, MadasamySankarapandian 
  madas...@mcruncher.com wrote:
 
  
   This is regarding wicket-select2 project. I could not find any mailing
   list for this project. That is why sending here. Please some one help
 me.
  
   I have created clear link to clear the form input values. After click
 the
   clear link,  all components values are cleared except Select2Choice
   component.
  
   Here with attached quickstart to recreate this problem.
  
   Follow below steps to recreate this problem
  
   * Download attachment and extract it.
   * cd select2-quickstart.
   * Then execute mvn clean package jetty:run
   * Type localhost:8080 in browser
   * Give the input to name and country field.
   * Click clear link
  
   Now name(*TextField*) field value is cleared and
 country(*Select2Choice*)
   field value is not cleared.
  
  
  
   --
   Thanks and regards
Madasamy
  
  
   -
   To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
   For additional commands, e-mail: users-h...@wicket.apache.org
  
 




-- 
WBR
Maxim aka solomax


Re: Could not clear select2Choice component model value.

2014-10-07 Thread Paul Bors
Can you update this issue then?

https://github.com/ivaynberg/wicket-select2/issues/93

On Tue, Oct 7, 2014 at 12:00 PM, Maxim Solodovnik solomax...@gmail.com
wrote:

 we recently moved this component to wicketstuff:

 https://github.com/wicketstuff/core/tree/master/jdk-1.7-parent/select2-parent

 to get Wicket7 compatible version


 On 7 October 2014 22:56, Paul Bors p...@bors.ws wrote:

  You can also ask the developer via:
  https://github.com/ivaynberg/wicket-select2/issues
 
  You should probably take a look over the open issues so that you are
  familiar with that other developers faced. Maybe one of those issues
 might
  be a road block for you?
 
  Although you will get a faster reply from Igor or another Wicket
 developer
  via this list :)
 
  On Tue, Oct 7, 2014 at 4:23 AM, Martin Grigorov mgrigo...@apache.org
  wrote:
 
   Hi,
  
   You should call formComponent.clearInput() too.
  
   Martin Grigorov
   Wicket Training and Consulting
   https://twitter.com/mtgrigorov
  
   On Tue, Oct 7, 2014 at 9:13 AM, MadasamySankarapandian 
   madas...@mcruncher.com wrote:
  
   
This is regarding wicket-select2 project. I could not find any
 mailing
list for this project. That is why sending here. Please some one help
  me.
   
I have created clear link to clear the form input values. After click
  the
clear link,  all components values are cleared except Select2Choice
component.
   
Here with attached quickstart to recreate this problem.
   
Follow below steps to recreate this problem
   
* Download attachment and extract it.
* cd select2-quickstart.
* Then execute mvn clean package jetty:run
* Type localhost:8080 in browser
* Give the input to name and country field.
* Click clear link
   
Now name(*TextField*) field value is cleared and
  country(*Select2Choice*)
field value is not cleared.
   
   
   
--
Thanks and regards
 Madasamy
   
   
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org
   
  
 



 --
 WBR
 Maxim aka solomax



Re: Could not clear select2Choice component model value.

2014-10-07 Thread Maxim Solodovnik
Done, thanks for pointing this out

On 7 October 2014 23:08, Paul Bors p...@bors.ws wrote:

 Can you update this issue then?

 https://github.com/ivaynberg/wicket-select2/issues/93

 On Tue, Oct 7, 2014 at 12:00 PM, Maxim Solodovnik solomax...@gmail.com
 wrote:

  we recently moved this component to wicketstuff:
 
 
 https://github.com/wicketstuff/core/tree/master/jdk-1.7-parent/select2-parent
 
  to get Wicket7 compatible version
 
 
  On 7 October 2014 22:56, Paul Bors p...@bors.ws wrote:
 
   You can also ask the developer via:
   https://github.com/ivaynberg/wicket-select2/issues
  
   You should probably take a look over the open issues so that you are
   familiar with that other developers faced. Maybe one of those issues
  might
   be a road block for you?
  
   Although you will get a faster reply from Igor or another Wicket
  developer
   via this list :)
  
   On Tue, Oct 7, 2014 at 4:23 AM, Martin Grigorov mgrigo...@apache.org
   wrote:
  
Hi,
   
You should call formComponent.clearInput() too.
   
Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov
   
On Tue, Oct 7, 2014 at 9:13 AM, MadasamySankarapandian 
madas...@mcruncher.com wrote:
   

 This is regarding wicket-select2 project. I could not find any
  mailing
 list for this project. That is why sending here. Please some one
 help
   me.

 I have created clear link to clear the form input values. After
 click
   the
 clear link,  all components values are cleared except Select2Choice
 component.

 Here with attached quickstart to recreate this problem.

 Follow below steps to recreate this problem

 * Download attachment and extract it.
 * cd select2-quickstart.
 * Then execute mvn clean package jetty:run
 * Type localhost:8080 in browser
 * Give the input to name and country field.
 * Click clear link

 Now name(*TextField*) field value is cleared and
   country(*Select2Choice*)
 field value is not cleared.



 --
 Thanks and regards
  Madasamy



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

   
  
 
 
 
  --
  WBR
  Maxim aka solomax
 




-- 
WBR
Maxim aka solomax


Re: alternative solution for addOrReplace()?

2014-10-07 Thread Patrick Davids
Hi Paul,
thanx for replying.

Oh, I use Ajax very heavily in this case. Thats why I said: the panel 
works quite good for ajax rendering and refreshing use-cases

Hmm... ok... I think I missed some details. I try to explain.

My page contains two sections seperated from each other.
A kind of data-entry and a kind of displaying the results.

The section which displays the results is a quite complicated panel, 
having an RefreshingView for about 30 (I will name them) sub-panels.

These sub-panels addOrReplace() an inner container while rendering itself.
And the replacement depends on my model object type.

So, my sub-panel class has a hugh knowledge about how to render the results.

On entering some data on the data-entry section I refresh the whole 
panel in the display section with all its sub-panels using Ajax. And 
this works great.
Some of the sub-panels also rerender/refresh own there own, by listening 
to events etc pepe. All this behaviours are working very well.

The only disadvantage is, using addOrReplace(), I have a heavy 
detaching/attaching situation and a performance problem.

So, the best solution for now would be, keeping my panel implementation 
as it is, but just having my models detached only once, not for iteration.

And here I dont have any idea how to solve that... :-/

thanx and kind regards
Patrick

Am 07.10.2014 17:52, schrieb Paul Bors:
 Why not use Ajax?

 addOrReplace() is really for when you need the full request cycle and have
 the page rendered on the server side. With Ajax you get your target for
 which you can add all the components you want to refresh on the page.

 Given the day and age we live in, I don't think there is a need to even
 worry about browsers that do not support Ajax. Than again, that depends on
 your product's requirements.

 Otherwise, you can keep on using addOrReplace() but stop using instaceof
 and start using Generics.
 If you need an example code-snippet of that let me know and I'll dig some
 out for you.

 On Tue, Oct 7, 2014 at 9:51 AM, Patrick Davids patrick.dav...@nubologic.com
 wrote:

 Hi all,
 I have a panel, which renders a inner markupcontainer (different panels
 for different ways of displaying my model object) depending on its model
 objects type.

 I do this by addOrReplace() the inner panel in an onConfigure() having
 an if instanceof; and it also iterates over a list...

 I'm not sure, if it is a good solution (I dont like the instanceof
 approach), but the panel works quite good for ajax rendering and
 refreshing use-cases.

 But, the addOrReplace() has one big disadvantage.
 It forces to detach the model on each iteration, so on each iteration I
 get a database access to retrieve it again.

 Is there anyway to keep the model attached until the entire request
 cycle is finished?


 Or should I try to find complete other solution for this kind of high
 dynamic iterating panel?
 Is it better to use e.g. Fragments to display a model object in
 different ways depending on its state?

 Please give some inspirations... I ran out of ideas. Help!

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





Re: alternative solution for addOrReplace()?

2014-10-07 Thread Andrea Del Bene

Hi,

could you post the code you use inside onConfigure to addOrReplace inner 
container? Maybe you could avoid detaching/attaching overriding method 
detachModels in your inner containers.

Hi Paul,
thanx for replying.

Oh, I use Ajax very heavily in this case. Thats why I said: the panel
works quite good for ajax rendering and refreshing use-cases

Hmm... ok... I think I missed some details. I try to explain.

My page contains two sections seperated from each other.
A kind of data-entry and a kind of displaying the results.

The section which displays the results is a quite complicated panel,
having an RefreshingView for about 30 (I will name them) sub-panels.

These sub-panels addOrReplace() an inner container while rendering itself.
And the replacement depends on my model object type.

So, my sub-panel class has a hugh knowledge about how to render the results.

On entering some data on the data-entry section I refresh the whole
panel in the display section with all its sub-panels using Ajax. And
this works great.
Some of the sub-panels also rerender/refresh own there own, by listening
to events etc pepe. All this behaviours are working very well.

The only disadvantage is, using addOrReplace(), I have a heavy
detaching/attaching situation and a performance problem.

So, the best solution for now would be, keeping my panel implementation
as it is, but just having my models detached only once, not for iteration.

And here I dont have any idea how to solve that... :-/

thanx and kind regards
Patrick





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



Re: alternative solution for addOrReplace()?

2014-10-07 Thread Paul Bors
I think you might have over-complicated your design.
Your use-case is quite simple, you have user input that filters the
display. It might be that there are a lot of panels to be updated but then
again it should be simple to update the parent which in turn delegates that
responsibility to the children.

Take a quick look over how Decebal implemented his Wicket-Dashboards as in
his project the entire dashboard is refreshed when adding a new panel which
in turn can be quite complicated.

His code and examples are at:
https://github.com/decebals/wicket-dashboard

Study his design and see how much of that you can apply to your page.

Otherwise I suggest you get rid of the addOrReplace() and move that logic
into your onBeforeRender() methods for those panels to update themself.

On Tue, Oct 7, 2014 at 12:43 PM, Patrick Davids 
patrick.dav...@nubologic.com wrote:

 Hi Paul,
 thanx for replying.

 Oh, I use Ajax very heavily in this case. Thats why I said: the panel
 works quite good for ajax rendering and refreshing use-cases

 Hmm... ok... I think I missed some details. I try to explain.

 My page contains two sections seperated from each other.
 A kind of data-entry and a kind of displaying the results.

 The section which displays the results is a quite complicated panel,
 having an RefreshingView for about 30 (I will name them) sub-panels.

 These sub-panels addOrReplace() an inner container while rendering itself.
 And the replacement depends on my model object type.

 So, my sub-panel class has a hugh knowledge about how to render the
 results.

 On entering some data on the data-entry section I refresh the whole
 panel in the display section with all its sub-panels using Ajax. And
 this works great.
 Some of the sub-panels also rerender/refresh own there own, by listening
 to events etc pepe. All this behaviours are working very well.

 The only disadvantage is, using addOrReplace(), I have a heavy
 detaching/attaching situation and a performance problem.

 So, the best solution for now would be, keeping my panel implementation
 as it is, but just having my models detached only once, not for iteration.

 And here I dont have any idea how to solve that... :-/

 thanx and kind regards
 Patrick

 Am 07.10.2014 17:52, schrieb Paul Bors:
  Why not use Ajax?
 
  addOrReplace() is really for when you need the full request cycle and
 have
  the page rendered on the server side. With Ajax you get your target for
  which you can add all the components you want to refresh on the page.
 
  Given the day and age we live in, I don't think there is a need to even
  worry about browsers that do not support Ajax. Than again, that depends
 on
  your product's requirements.
 
  Otherwise, you can keep on using addOrReplace() but stop using instaceof
  and start using Generics.
  If you need an example code-snippet of that let me know and I'll dig some
  out for you.
 
  On Tue, Oct 7, 2014 at 9:51 AM, Patrick Davids 
 patrick.dav...@nubologic.com
  wrote:
 
  Hi all,
  I have a panel, which renders a inner markupcontainer (different panels
  for different ways of displaying my model object) depending on its model
  objects type.
 
  I do this by addOrReplace() the inner panel in an onConfigure() having
  an if instanceof; and it also iterates over a list...
 
  I'm not sure, if it is a good solution (I dont like the instanceof
  approach), but the panel works quite good for ajax rendering and
  refreshing use-cases.
 
  But, the addOrReplace() has one big disadvantage.
  It forces to detach the model on each iteration, so on each iteration I
  get a database access to retrieve it again.
 
  Is there anyway to keep the model attached until the entire request
  cycle is finished?
 
 
  Or should I try to find complete other solution for this kind of high
  dynamic iterating panel?
  Is it better to use e.g. Fragments to display a model object in
  different ways depending on its state?
 
  Please give some inspirations... I ran out of ideas. Help!
 
  kind regards :-)
  Patrick
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 



Re: How to get this URL pattern working in newer versions of Wicket?

2014-10-07 Thread Steve Swinsburg
Hi Martin,

The context bits of /portal/tool/UUID are added by the framework that I am
using. All webapps are addressable in this way since the webapps are all
registered with the framework.

You then add placements of the webapps onto pages and they get the UUID.
This used to work fine in Wicket 1.4 but with the changes in 1.5 and up it
no longer works, for some components.

The servlet context path of this particular webapp is
/inmethod-grid-examples, and we need to use the WicketServlet, not the
WicketFilter. You can't get to a webapp directly, it all goes through the
portal framework as there are filters that inject things like authorisation
etc.

cheers,
Steve

On Tue, Oct 7, 2014 at 8:06 PM, Martin Grigorov mgrigo...@apache.org
wrote:

 Hi,

 On Mon, Oct 6, 2014 at 6:31 AM, Steve Swinsburg steve.swinsb...@gmail.com
 
 wrote:

  Hi all,
 
  I've been working on Wicket 1.4 for a while and in upgrading to Wicket 6
  I've found an inconsistency in the way URLs are handled, specifically in
  the inmethod data grid but also the editable data grid.
 
  I have a particular context path that I need to maintain as the webapp
  rendering is inside a portal type framework.
 
  I have taken the example webapps from both 1.4 and 6 and customised them
 so
  they run in the framework.
 
  In Wicket 1.4, the page is mounted like:
 
  mount(new HybridUrlCodingStrategy(/data-grid/editable,
  EditableDataGridPage.class));
 
  and works fine. The URL is:
 
 
 http://localhost:8080/portal/tool/a79c7348-6c8b-4912-8cc7-3b4419344f7f/data-grid/editable.3
 
  In Wicket 6, the page is mounted as:
 
  mount(/data-grid/editable, EditableDataGridPage.class);
 

 The line above will not compile!


  ...
  getRootRequestMapperAsCompound().add(new MountedMapper(mountPath,
  pageClass));
 

 This is equivalent to: mountPage(mountPath, pageClass)


 
  and it does not work. It strips my leading context bits
  (/portal/tool/UUID).
 

 How do you set these context bits ?


 
  I tried to mount it myself:
  mountPage(/a79c7348-6c8b-4912-8cc7-3b4419344f7f,
  EditableDataGridPage.class);
 
  But that goes into an infinite redirect loop if I mount it to the webapp
 I
  want. If I mount it to a non wicket webapp, then that mount works fine.
 
  I am not sure how to restore the old URL mapping strategy.
 

 Give us more information about your setup to be able to help you.
 Especially what is the value of ServletContext#getContextPath() and what is
 the value of WicketFilter#getFilterPath().
 These two bits are used as prefixes for the mount paths you use for your
 pages.


 
  Can anyone help?
 
  thanks,
  Steve
 



Re: How to get this URL pattern working in newer versions of Wicket?

2014-10-07 Thread Martin Grigorov
Hi,

On Tue, Oct 7, 2014 at 10:14 PM, Steve Swinsburg steve.swinsb...@gmail.com
wrote:

 Hi Martin,

 The context bits of /portal/tool/UUID are added by the framework that I am
 using. All webapps are addressable in this way since the webapps are all
 registered with the framework.

 You then add placements of the webapps onto pages and they get the UUID.
 This used to work fine in Wicket 1.4 but with the changes in 1.5 and up it
 no longer works, for some components.

 The servlet context path of this particular webapp is
 /inmethod-grid-examples, and we need to use the WicketServlet, not the
 WicketFilter. You can't get to a webapp directly, it all goes through the
 portal framework as there are filters that inject things like authorisation
 etc.


I'm afraid you are on your own here.
We don't know how your framework works and what exactly breaks.
Fire the debugger and let us know when you have more information.



 cheers,
 Steve

 On Tue, Oct 7, 2014 at 8:06 PM, Martin Grigorov mgrigo...@apache.org
 wrote:

  Hi,
 
  On Mon, Oct 6, 2014 at 6:31 AM, Steve Swinsburg 
 steve.swinsb...@gmail.com
  
  wrote:
 
   Hi all,
  
   I've been working on Wicket 1.4 for a while and in upgrading to Wicket
 6
   I've found an inconsistency in the way URLs are handled, specifically
 in
   the inmethod data grid but also the editable data grid.
  
   I have a particular context path that I need to maintain as the webapp
   rendering is inside a portal type framework.
  
   I have taken the example webapps from both 1.4 and 6 and customised
 them
  so
   they run in the framework.
  
   In Wicket 1.4, the page is mounted like:
  
   mount(new HybridUrlCodingStrategy(/data-grid/editable,
   EditableDataGridPage.class));
  
   and works fine. The URL is:
  
  
 
 http://localhost:8080/portal/tool/a79c7348-6c8b-4912-8cc7-3b4419344f7f/data-grid/editable.3
  
   In Wicket 6, the page is mounted as:
  
   mount(/data-grid/editable, EditableDataGridPage.class);
  
 
  The line above will not compile!
 
 
   ...
   getRootRequestMapperAsCompound().add(new MountedMapper(mountPath,
   pageClass));
  
 
  This is equivalent to: mountPage(mountPath, pageClass)
 
 
  
   and it does not work. It strips my leading context bits
   (/portal/tool/UUID).
  
 
  How do you set these context bits ?
 
 
  
   I tried to mount it myself:
   mountPage(/a79c7348-6c8b-4912-8cc7-3b4419344f7f,
   EditableDataGridPage.class);
  
   But that goes into an infinite redirect loop if I mount it to the
 webapp
  I
   want. If I mount it to a non wicket webapp, then that mount works fine.
  
   I am not sure how to restore the old URL mapping strategy.
  
 
  Give us more information about your setup to be able to help you.
  Especially what is the value of ServletContext#getContextPath() and what
 is
  the value of WicketFilter#getFilterPath().
  These two bits are used as prefixes for the mount paths you use for
 your
  pages.
 
 
  
   Can anyone help?
  
   thanks,
   Steve