Re: [6.16] AjaxButton.onSubmit not working after upgrading to wicket 6

2014-07-07 Thread Michael Haitz
please provide the full stacktrace.

cheers,
Michael

Am 06.07.2014 um 05:44 schrieb smallufo small...@gmail.com:

 It seems working now.
 But such removal also make theme-switching not working :
 
 If I enable the ThemeProvider :
 
final ThemeProvider themeProvider = new
 BootswatchThemeProvider(BootswatchTheme.Flatly);
 
 settings.setJsResourceFilterName(footer-container).setThemeProvider(themeProvider);
 
 without footer-container in the BasePage
 
 wicket-bootstrap will throw
 
 WicketRuntimeException: theme does not exists: bootstrap
 
 at
 de.agilecoders.wicket.themes.settings.BootswatchThemeProvider.byName(BootswatchThemeProvider.java:49)
 
 
 So I could only use the native bootstrap theme now.
 
 
 
 
 2014-07-06 11:30 GMT+08:00 smallufo small...@gmail.com:
 
 I found where goes wrong ,
 it's RenderJavaScriptToFooterHeaderResponseDecorator that causes the
 problem.
 
 I am not familiar with wicket-bootstrap , so I mimicked wicket-bootstrap
 sample's architecture :
 
 https://github.com/l0rdn1kk0n/wicket-bootstrap/tree/master/bootstrap-samples/src/main/java/de/agilecoders/wicket/samples
 
 This is my 'not' working architecture :
 http://pastebin.com/vB3Ek2t9
 
 After removing RenderJavaScriptToFooterHeaderResponseDecorator ,
 footer-container , it works fine.
 
 http://pastebin.com/kAehvaRr
 
 
 
 
 
 2014-07-05 21:10 GMT+08:00 Francois Meillet francois.meil...@gmail.com:
 
 Run your app in debug mode and set some breakpoint.
 
 eclipse
 
 http://www.eclipse.org/jetty/documentation/current/debugging-with-intellij.html
 http://www.vogella.com/tutorials/EclipseDebugging/article.html
 
 http://help.eclipse.org/juno/index.jsp?topic=%2Forg.eclipse.jdt.doc.user%2Freference%2Fpreferences%2Frun-debug%2Fref-run_debug.htm
 
 intellij
 http://www.jetbrains.com/idea/webhelp/run-debug-configurations.html
 
 http://www.jetbrains.com/idea/webhelp/creating-and-editing-run-debug-configurations.html
 
 François Meillet
 Formation Wicket - Développement Wicket
 
 
 
 
 
 Le 5 juil. 2014 à 14:56, smallufo small...@gmail.com a écrit :
 
 2014-07-05 20:55 GMT+08:00 smallufo small...@gmail.com:
 
 
 But i still find another id6c or id6d  in the source code.
 
 
 sorry typo :
 
 But i still *cannot* find another id6c or id6d  in the source code.
 
 
 


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



Re: How to handle click on removed links - WicketRuntimeException (Component 'xxx' has been removed from page)?

2014-07-07 Thread Daniel Stoch
I think the simplest solution for now (until we invent a better one)
is to define a dedicated exception class for such case (similar to
ListenerInvocationNotAllowedException which is raised if user tries
click on disabled links). Then we can catch such exception and handle
it eg. as described by Martin in my previous post (How to handle
click on disabled links - ListenerInvocationNotAllowedException?).

--
Daniel

On Fri, Jul 4, 2014 at 5:38 PM, Ernesto Reinaldo Barreiro
reier...@gmail.com wrote:
 maybe what is needed is a fail silently ajax request ;-)


 On Fri, Jul 4, 2014 at 5:36 PM, Ernesto Reinaldo Barreiro 
 reier...@gmail.com wrote:

 Hi,


 On Fri, Jul 4, 2014 at 4:59 PM, Daniel Stoch daniel.st...@gmail.com
 wrote:

 Sorry, but for me all these solutions are hacks :).


 Why? As far as they are under control... Isn't software development
 production controlled hacks? Wicket itself is a hack and so do are
 other WEB frameworks like GWT. As far as you remain in control I do not see
 the problem. All frameworks have limitations... Why not get the best of
 them and circumvent those.


 I want to use standard components (eg. AjaxLink) to do simple things.
 I don't want to think everywhere how to handle such scenarios. It
 should be handled properly on a framework level. I think there is
 always possibility that component state on server and DOM tree on
 client browser are inconsistent (and not necessary because of push
 requests). Maybe it should be a dedicated exception on such situation
 (Component 'xxx' has been removed from page.) at least or maybe we
 can invent a better solution in core?


 I do agree that would be optimal.




 --
 Daniel

 On Fri, Jul 4, 2014 at 4:11 PM, Ernesto Reinaldo Barreiro
 reier...@gmail.com wrote:
  Maybe you could even just push JSON to client side and generate items
  content at client side which is going to be way faster
 
 
  On Fri, Jul 4, 2014 at 4:06 PM, Ernesto Reinaldo Barreiro 
  reier...@gmail.com wrote:
 
  Why don't you try routing all the click to a part of you application
 that
  is always available? E.g.
 
  1- You have a list of items that are pushed... They are in a certain
  container that is always there... At client and server side
  2- The items are pushed but instead of normal AJAX link you use link to
  the parent never changing container passing ID of item. This way click
 will
  never fail and it is still sort of object oriented...
 
 
 
  On Fri, Jul 4, 2014 at 3:59 PM, Daniel Stoch daniel.st...@gmail.com
  wrote:
 
  On Fri, Jul 4, 2014 at 3:14 PM, Martin Grigorov mgrigo...@apache.org
 
  wrote:
   Hi,
  
   You can use Atmopshere to hide/disable the client side too, not
 just the
   server side.
 
  Of course, I already do that.
  But user can click the link after state was changed on the server side
  but before these changes are pushed to client browser.
 
  --
  Daniel
 
 
  
   Martin Grigorov
   Wicket Training and Consulting
   https://twitter.com/mtgrigorov
  
  
   On Fri, Jul 4, 2014 at 1:46 PM, Daniel Stoch 
 daniel.st...@gmail.com
  wrote:
  
   On Fri, Jul 4, 2014 at 12:33 PM, Sven Meier s...@meiers.net
 wrote:
So page was rendered in a browser,
on the server component tree was changed
   
   
What triggers the change to the component tree? On which thread?
 Are
  you
using websockets?
   
Sven
  
   In general this thread is not initialized by user action but by
   application. So yes, it can be push from a server (eg. using
   Atmosphere - this is my case) or by ajax self updating behavior.
  
   --
   DS
  
   
   
   
On 07/04/2014 12:13 PM, Daniel Stoch wrote:
   
Hi all,
   
I think such question occurs from time to time on this list,
 but I
have never found a good answer how to solve such problem in
 general.
The problem is similar to my last question:
   
   
  
 
 http://apache-wicket.1842946.n4.nabble.com/How-to-handle-click-on-disabled-links-ListenerInvocationNotAllowedException-td4666287.html
but now there is a situation when link was removed from page
 (not
disabled).
   
So page was rendered in a browser, on the server component tree
 was
changed, but user clicks a link in a browser before this changes
  will
be pushed to it. It leads to an exception:
   
org.apache.wicket.WicketRuntimeException: Component 'xxx' has
 been
removed from page.
at
   
  
 
 org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:178)
at
   
  
 
 org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:862)
at
   
  
 
 org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
at
   
  
 
 org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:261)
at
   
  
 
 org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:218)
at
   
  
 
 

Re: How to handle click on removed links - WicketRuntimeException (Component 'xxx' has been removed from page)?

2014-07-07 Thread Martin Grigorov
Please create a ticket!
With a patch with the custom exception will make its processing even faster!
Thank you!

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


On Mon, Jul 7, 2014 at 11:08 AM, Daniel Stoch daniel.st...@gmail.com
wrote:

 I think the simplest solution for now (until we invent a better one)
 is to define a dedicated exception class for such case (similar to
 ListenerInvocationNotAllowedException which is raised if user tries
 click on disabled links). Then we can catch such exception and handle
 it eg. as described by Martin in my previous post (How to handle
 click on disabled links - ListenerInvocationNotAllowedException?).

 --
 Daniel

 On Fri, Jul 4, 2014 at 5:38 PM, Ernesto Reinaldo Barreiro
 reier...@gmail.com wrote:
  maybe what is needed is a fail silently ajax request ;-)
 
 
  On Fri, Jul 4, 2014 at 5:36 PM, Ernesto Reinaldo Barreiro 
  reier...@gmail.com wrote:
 
  Hi,
 
 
  On Fri, Jul 4, 2014 at 4:59 PM, Daniel Stoch daniel.st...@gmail.com
  wrote:
 
  Sorry, but for me all these solutions are hacks :).
 
 
  Why? As far as they are under control... Isn't software development
  production controlled hacks? Wicket itself is a hack and so do are
  other WEB frameworks like GWT. As far as you remain in control I do not
 see
  the problem. All frameworks have limitations... Why not get the best of
  them and circumvent those.
 
 
  I want to use standard components (eg. AjaxLink) to do simple things.
  I don't want to think everywhere how to handle such scenarios. It
  should be handled properly on a framework level. I think there is
  always possibility that component state on server and DOM tree on
  client browser are inconsistent (and not necessary because of push
  requests). Maybe it should be a dedicated exception on such situation
  (Component 'xxx' has been removed from page.) at least or maybe we
  can invent a better solution in core?
 
 
  I do agree that would be optimal.
 
 
 
 
  --
  Daniel
 
  On Fri, Jul 4, 2014 at 4:11 PM, Ernesto Reinaldo Barreiro
  reier...@gmail.com wrote:
   Maybe you could even just push JSON to client side and generate items
   content at client side which is going to be way faster
  
  
   On Fri, Jul 4, 2014 at 4:06 PM, Ernesto Reinaldo Barreiro 
   reier...@gmail.com wrote:
  
   Why don't you try routing all the click to a part of you application
  that
   is always available? E.g.
  
   1- You have a list of items that are pushed... They are in a certain
   container that is always there... At client and server side
   2- The items are pushed but instead of normal AJAX link you use
 link to
   the parent never changing container passing ID of item. This way
 click
  will
   never fail and it is still sort of object oriented...
  
  
  
   On Fri, Jul 4, 2014 at 3:59 PM, Daniel Stoch 
 daniel.st...@gmail.com
   wrote:
  
   On Fri, Jul 4, 2014 at 3:14 PM, Martin Grigorov 
 mgrigo...@apache.org
  
   wrote:
Hi,
   
You can use Atmopshere to hide/disable the client side too, not
  just the
server side.
  
   Of course, I already do that.
   But user can click the link after state was changed on the server
 side
   but before these changes are pushed to client browser.
  
   --
   Daniel
  
  
   
Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov
   
   
On Fri, Jul 4, 2014 at 1:46 PM, Daniel Stoch 
  daniel.st...@gmail.com
   wrote:
   
On Fri, Jul 4, 2014 at 12:33 PM, Sven Meier s...@meiers.net
  wrote:
 So page was rendered in a browser,
 on the server component tree was changed


 What triggers the change to the component tree? On which
 thread?
  Are
   you
 using websockets?

 Sven
   
In general this thread is not initialized by user action but by
application. So yes, it can be push from a server (eg. using
Atmosphere - this is my case) or by ajax self updating behavior.
   
--
DS
   



 On 07/04/2014 12:13 PM, Daniel Stoch wrote:

 Hi all,

 I think such question occurs from time to time on this list,
  but I
 have never found a good answer how to solve such problem in
  general.
 The problem is similar to my last question:


   
  
 
 http://apache-wicket.1842946.n4.nabble.com/How-to-handle-click-on-disabled-links-ListenerInvocationNotAllowedException-td4666287.html
 but now there is a situation when link was removed from page
  (not
 disabled).

 So page was rendered in a browser, on the server component
 tree
  was
 changed, but user clicks a link in a browser before this
 changes
   will
 be pushed to it. It leads to an exception:

 org.apache.wicket.WicketRuntimeException: Component 'xxx' has
  been
 removed from page.
 at

   
  
 
 org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:178)
 at

   
  
 
 

Re: Ajax Form Submit via jquery plugin / javascript

2014-07-07 Thread vp143
I wasnt able to get anything working... I tried adding wicket:id via jquery
to the plugin button but wicket did not recognise it.

However, I had been using wicket 6.7.0 up until then. 
I see that AjaxWizardButtonBar within the Wizard functionality has been
added in a latter wicket version which I had not found when researching.
This solved my problems perfectly!

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Ajax-Form-Submit-via-jquery-plugin-javascript-tp4666170p4666457.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: Model data lost when calling target.add before onSubmit

2014-07-07 Thread vp143
Many thanks!
I solved my original issue using AjaxWizardButtonBar which I was not aware
of as I was using an older version of Wicket.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Model-data-lost-when-calling-target-add-before-onSubmit-tp4666385p4666458.html
Sent from the Users forum mailing list archive at Nabble.com.

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



wicket-select2 - adding sub categories seen in select2

2014-07-07 Thread Vishal Popat
Hi,

Is it possible to add categories to the lists in wicket-select2 like seen in 
http://ivaynberg.github.io/select2/#basics (The Time Zone labels)?
Also is it possible to add functionality like the flag images as well?

Regards
Vishal

Contribution to Wicket WIKI

2014-07-07 Thread Štefan Šimík
I would like to ask, how is possible to update WIKI.

I found som info at:
https://cwiki.apache.org/confluence/display/WICKET/How+to+contribute+documentation+to+the+Wiki

but I cannot find any link for editing of the page (I am logged in, as
common user).

Stefan


Re: Contribution to Wicket WIKI

2014-07-07 Thread Martin Grigorov
Hi,

Since a while the WIKI is locked up for editing by everyone because there
was too much spam (according to Apache sysadmins).
Give us your WIKI id and we will add you to the list of editors.

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


On Mon, Jul 7, 2014 at 7:12 PM, Štefan Šimík stefan.si...@gmail.com wrote:

 I would like to ask, how is possible to update WIKI.

 I found som info at:

 https://cwiki.apache.org/confluence/display/WICKET/How+to+contribute+documentation+to+the+Wiki

 but I cannot find any link for editing of the page (I am logged in, as
 common user).

 Stefan



wicket portlet in Liferay 6.2

2014-07-07 Thread Ciocoiu Elvis
Hi,

I'm facing a problem with wicketstuff-portlet-6.16 in Liferay 6.2. I'm
using AjaxLink in a portlet and WicketAjax call failure with: Error while
parsing response: Invalid XML. I know there were some problems (starting
with wicket 1.5.9) but this problems were solved using a custom
IRequestCycleProvider. Can anybody help me with an answer if some
workaround is needed in wicketstuff-portlet 6.16?

Thank you

-- 
_
Elvis Ciocoiu
Senior Consultant

Everlight Solutions ROMANIA

address: http://www.everlight.ro http://www.synthesys.ro/
e-mail: elvis.cioc...@everlight.ro elvis.cioc...@synthesys.ro
mobile : (40) 0745 13 75 85

This message and any attachments contain information, which may be
confidential or privileged.
If you are not the intended recipient, please refrain from any
disclosure, copying, distribution or use of this information.
Please be aware that such actions are prohibited. If you have received
this transmission in error, kindly notify us by email to
off...@everlight.ro off...@synthesys.ro. We appreciate your cooperation.


Displaying Images Stored in DB on Openshift

2014-07-07 Thread David Beer
Hi All

I am developing and application that is running on openshift. The
application is still in heavy development, using wicket 6.14 at the moment.
I am running Wildlfy 8.1.0 and testing locally.

The problem I am facing is simply that the images that I am storing are not
being displayed on Openshift but work fine locally. I am retrieving the
image as a byte[] from the database and then displaying the Image.

I have tried using a simple ByteArray Resource like the following:

ThumbnailImageResource imageResource = new ThumbnailImageResource(new
ByteArrayResource(image/jpeg, userAccount.getProfileimage().getFile()),
150);
Image profileImage = new Image(profileImage, imageResource);
add(profileImage);

However on Openshift the image does not display. There is no error logged
just no image and the resource link does not seem to work either.

Any thoughts would be most helpful.

Thanks

David


Re: Feedback/Error message.

2014-07-07 Thread Paul Bors
Have a look at the Sortable DataTable:
https://cwiki.apache.org/confluence/display/WICKET/Simple+Sortable+DataTable+Example

It has a build in message for when there are no results matching your
filter or the model is empty.
You can override it to display your own custom message as well.


On Sat, Jun 21, 2014 at 9:11 AM, K kondetiudayki...@gmail.com wrote:

 Hi

 I am trying to build a web application in which i have to display list of
 items on search...

 this part has been done but i have to add a errror message in the same page
 if the search result comes out null...

 I am using DataView for displaying the results. using condition in java is
 simple but for the unreachable id that i mention in condition the mark up
 is
 not being rendered if the condition is true.

 any help is well appriciated...

 Thanks


 -

 K
 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Feedback-Error-message-tp1874404p4666330.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: [6.16] AjaxButton.onSubmit not working after upgrading to wicket 6

2014-07-07 Thread smallufo
sorry , There is no stack trace.
Because it triggers nothing , the server doesn't receive anything.



2014-07-07 14:21 GMT+08:00 Michael Haitz michael.ha...@1und1.de:

 please provide the full stacktrace.

 cheers,
 Michael

 Am 06.07.2014 um 05:44 schrieb smallufo small...@gmail.com:

  It seems working now.
  But such removal also make theme-switching not working :
 
  If I enable the ThemeProvider :
 
 final ThemeProvider themeProvider = new
  BootswatchThemeProvider(BootswatchTheme.Flatly);
 
 
 settings.setJsResourceFilterName(footer-container).setThemeProvider(themeProvider);
 
  without footer-container in the BasePage
 
  wicket-bootstrap will throw
 
  WicketRuntimeException: theme does not exists: bootstrap
 
  at
 
 de.agilecoders.wicket.themes.settings.BootswatchThemeProvider.byName(BootswatchThemeProvider.java:49)
 
 
  So I could only use the native bootstrap theme now.
 
 
 
 
  2014-07-06 11:30 GMT+08:00 smallufo small...@gmail.com:
 
  I found where goes wrong ,
  it's RenderJavaScriptToFooterHeaderResponseDecorator that causes the
  problem.
 
  I am not familiar with wicket-bootstrap , so I mimicked wicket-bootstrap
  sample's architecture :
 
 
 https://github.com/l0rdn1kk0n/wicket-bootstrap/tree/master/bootstrap-samples/src/main/java/de/agilecoders/wicket/samples
 
  This is my 'not' working architecture :
  http://pastebin.com/vB3Ek2t9
 
  After removing RenderJavaScriptToFooterHeaderResponseDecorator ,
  footer-container , it works fine.
 
  http://pastebin.com/kAehvaRr
 
 
 
 
 
  2014-07-05 21:10 GMT+08:00 Francois Meillet francois.meil...@gmail.com
 :
 
  Run your app in debug mode and set some breakpoint.
 
  eclipse
 
 
 http://www.eclipse.org/jetty/documentation/current/debugging-with-intellij.html
  http://www.vogella.com/tutorials/EclipseDebugging/article.html
 
 
 http://help.eclipse.org/juno/index.jsp?topic=%2Forg.eclipse.jdt.doc.user%2Freference%2Fpreferences%2Frun-debug%2Fref-run_debug.htm
 
  intellij
  http://www.jetbrains.com/idea/webhelp/run-debug-configurations.html
 
 
 http://www.jetbrains.com/idea/webhelp/creating-and-editing-run-debug-configurations.html
 
  François Meillet
  Formation Wicket - Développement Wicket
 
 
 
 
 
  Le 5 juil. 2014 à 14:56, smallufo small...@gmail.com a écrit :
 
  2014-07-05 20:55 GMT+08:00 smallufo small...@gmail.com:
 
 
  But i still find another id6c or id6d  in the source code.
 
 
  sorry typo :
 
  But i still *cannot* find another id6c or id6d  in the source
 code.
 
 
 


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