Re: write files to relative path

2016-02-03 Thread Karl-Heinz Golz
Hi,
actually I use it as temp folder and it is OK when it is going to be
erased after redeployment.

The business case is I want to show images via fancybox.
I did that so far via dynamic link and when a user clicks a small image
the data of the big image are delivered in onClick (read from database).

The problem is, fancybox does not handle that 100% correctly. For
example, the automatic resize function does not work if the viewport is
smaller than the image.
But that works well when the images are stored on files. Therefore I'm
going to add this interim step: if the user clicks the small image then
the big image is written to a file and fancybox can read that.

Any recommendations how to handle that in a better way are very welcome.


Am 03.02.2016 um 15:19 schrieb Tobias Soloschenko:
> Hi,
>
> why do you want to write something into the path of a temporary deployed web 
> application? The file is going to be erased after redeployment of your webapp.
>
> I would consider a temp folder or a "working folder" for those files.
>
> kind regards
>
> Tobias
>
>> Am 03.02.2016 um 14:48 schrieb Karl-Heinz Golz :
>>
>> thank you very much, now it works well with:
>>
>> fos = new
>> FileOutputStream(StartApplication.class.getResource("XXX").getPath() +
>> "file1.jpg");
>>
>>
>>> Am 03.02.2016 um 14:25 schrieb Ernesto Reinaldo Barreiro:
>>> Hi,
>>>
>>> StartApplication.class.getResource("HomePage.html").getUrl.getFile? Or
>>> something similar? Mind that this might be inside a temp folder that will
>>> be blown up next time you restart
>>>
>>> On Wed, Feb 3, 2016 at 2:08 PM, Karl-Heinz Golz >>> wrote:
>>>> I'm using Tomcat 8.
>>>> Writing to an absolute path (even outside of the application) works well:
>>>> fos = new FileOutputStream("/home/XXX/file1.jpg");
>>>>
>>>> Therefore I assumed that it should be possible inside of the
>>>> application, too.
>>>> I thought my problem is to correctly figure out the relative path.
>>>>
>>>>
>>>>> Am 03.02.2016 um 13:29 schrieb Ernesto Reinaldo Barreiro:
>>>>> Maybe I'm mistaken but I doubt in some application servers you might be
>>>>> able to do that
>>>>>
>>>>> On Wed, Feb 3, 2016 at 1:27 PM, Karl-Heinz Golz <
>>>> karl-heinz.g...@t-online.de
>>>>>> wrote:
>>>>>> Hi,
>>>>>> sorry for my simple question. I have already wasted some time  but it
>>>>>> seems I have a blackout
>>>>>> and therefore I want to ask you.
>>>>>>
>>>>>> I need to write files to a folder XXX relative to the application
>>>> classes:
>>>>>> XXX
>>>>>> StartApplication.java
>>>>>> HomePage.java
>>>>>> HomePage.html
>>>>>> ...
>>>>>>
>>>>>> The question is ??? in:
>>>>>> FileOutputStream fos = new FileOutputStream (???);
>>>>>>
>>>>>> many thanks in advance
>>>>>> Karl-Heinz
>>>>>>
>>>>>> -
>>>>>> 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
>>
>> -
>> 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
>


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



Re: write files to relative path

2016-02-03 Thread Karl-Heinz Golz
thank you very much, now it works well with:

 fos = new
FileOutputStream(StartApplication.class.getResource("XXX").getPath() +
"file1.jpg");


Am 03.02.2016 um 14:25 schrieb Ernesto Reinaldo Barreiro:
> Hi,
>
> StartApplication.class.getResource("HomePage.html").getUrl.getFile? Or
> something similar? Mind that this might be inside a temp folder that will
> be blown up next time you restart
>
> On Wed, Feb 3, 2016 at 2:08 PM, Karl-Heinz Golz > wrote:
>> I'm using Tomcat 8.
>> Writing to an absolute path (even outside of the application) works well:
>> fos = new FileOutputStream("/home/XXX/file1.jpg");
>>
>> Therefore I assumed that it should be possible inside of the
>> application, too.
>> I thought my problem is to correctly figure out the relative path.
>>
>>
>> Am 03.02.2016 um 13:29 schrieb Ernesto Reinaldo Barreiro:
>>> Maybe I'm mistaken but I doubt in some application servers you might be
>>> able to do that
>>>
>>> On Wed, Feb 3, 2016 at 1:27 PM, Karl-Heinz Golz <
>> karl-heinz.g...@t-online.de
>>>> wrote:
>>>> Hi,
>>>> sorry for my simple question. I have already wasted some time  but it
>>>> seems I have a blackout
>>>> and therefore I want to ask you.
>>>>
>>>> I need to write files to a folder XXX relative to the application
>> classes:
>>>> XXX
>>>> StartApplication.java
>>>> HomePage.java
>>>> HomePage.html
>>>> ...
>>>>
>>>> The question is ??? in:
>>>> FileOutputStream fos = new FileOutputStream (???);
>>>>
>>>> many thanks in advance
>>>> Karl-Heinz
>>>>
>>>> -
>>>> 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
>>
>>
>


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



Re: write files to relative path

2016-02-03 Thread Karl-Heinz Golz
I'm using Tomcat 8.
Writing to an absolute path (even outside of the application) works well:
fos = new FileOutputStream("/home/XXX/file1.jpg");

Therefore I assumed that it should be possible inside of the
application, too.
I thought my problem is to correctly figure out the relative path.


Am 03.02.2016 um 13:29 schrieb Ernesto Reinaldo Barreiro:
> Maybe I'm mistaken but I doubt in some application servers you might be
> able to do that
>
> On Wed, Feb 3, 2016 at 1:27 PM, Karl-Heinz Golz > wrote:
>> Hi,
>> sorry for my simple question. I have already wasted some time  but it
>> seems I have a blackout
>> and therefore I want to ask you.
>>
>> I need to write files to a folder XXX relative to the application classes:
>>
>> XXX
>> StartApplication.java
>> HomePage.java
>> HomePage.html
>> ...
>>
>> The question is ??? in:
>> FileOutputStream fos = new FileOutputStream (???);
>>
>> many thanks in advance
>> Karl-Heinz
>>
>> -
>> 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



write files to relative path

2016-02-03 Thread Karl-Heinz Golz
Hi,
sorry for my simple question. I have already wasted some time  but it
seems I have a blackout
and therefore I want to ask you.

I need to write files to a folder XXX relative to the application classes:

XXX
StartApplication.java
HomePage.java
HomePage.html
...

The question is ??? in:
FileOutputStream fos = new FileOutputStream (???);

many thanks in advance
Karl-Heinz

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



Re: MarkupException after session time out

2015-02-17 Thread Karl-Heinz Golz
Hi Martin,

"throw RestartResponseException()" solves my problem.

Thank you.


Am 17.02.2015 um 14:50 schrieb Martin Grigorov:
> Hi,
>
> On Tue, Feb 17, 2015 at 2:07 PM, Karl-Heinz Golz <
> karl-heinz.g...@t-online.de> wrote:
>
>> hello,
>>
>> I'm faced with an error in following situation:
>> User opens a webpage (e.g. Page1), do some other things, comes back
>> after session time out and click some link (onClick-event) on the page.
>>
>> Then following exception is thrown:
>>
>> at
>>
>> org.apache.wicket.markup.MarkupStream.throwMarkupException(MarkupStream.java:526)
>> at
>> org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1438)
>> at
>> org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1557)
>> at
>>
>> org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1532)
>> at
>>
>> org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1487)
>> at
>>
>> org.apache.wicket.markup.html.panel.DefaultMarkupSourcingStrategy.onComponentTagBody(DefaultMarkupSourcingStrategy.java:71)
>> . . .
>>
>> I try to avoid that like this:
>>
>> public class Page1 extends WebPage {
>>
>>   public Page1() {
>> if (!UserSession.get().isUserSignedOn()) {
>> setResponsePage(new StartPage());
>>
> If you need to cancel the processing of the Page in its constructor you
> should use "throw RestartResponseException()".
>
>
>> return;
>> } else
>> normalHandling();
>>   }
>>   . . .
>> }
>>
>> I can see in log file that the if/else works as expected: the StartPage
>> is handled (but not shown).
>> But after that it tries to render Page1 again which throws the exception.
>>
>> What I finally want is: users should be led to the StartPage after
>> session time out in any case.
>>
>> Any recommendations how I should handle this are very welcome.
>>
>> Many thanks in advance
>> Karl-Heinz
>>
>>
>>
>> -
>> 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: MarkupException after session time out

2015-02-17 Thread Karl-Heinz Golz
I forgot to mention: I'm using Wicket 6.17

Am 17.02.2015 um 13:07 schrieb Karl-Heinz Golz:
> hello,
>
> I'm faced with an error in following situation:
> User opens a webpage (e.g. Page1), do some other things, comes back
> after session time out and click some link (onClick-event) on the page.
>
> Then following exception is thrown:
>
> at
> org.apache.wicket.markup.MarkupStream.throwMarkupException(MarkupStream.java:526)
> at
> org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1438)
> at
> org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1557)
> at
> org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1532)
> at
> org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1487)
> at
> org.apache.wicket.markup.html.panel.DefaultMarkupSourcingStrategy.onComponentTagBody(DefaultMarkupSourcingStrategy.java:71)
> . . .
> 
> I try to avoid that like this:
>
> public class Page1 extends WebPage {
>
>   public Page1() {
> if (!UserSession.get().isUserSignedOn()) {
> setResponsePage(new StartPage());
> return;
> } else
> normalHandling();
>   }
>   . . .
> }
>
> I can see in log file that the if/else works as expected: the StartPage
> is handled (but not shown).
> But after that it tries to render Page1 again which throws the exception.
>
> What I finally want is: users should be led to the StartPage after
> session time out in any case.
>
> Any recommendations how I should handle this are very welcome.
>
> Many thanks in advance
> Karl-Heinz
>
>
>
> -
> 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



MarkupException after session time out

2015-02-17 Thread Karl-Heinz Golz
hello,

I'm faced with an error in following situation:
User opens a webpage (e.g. Page1), do some other things, comes back
after session time out and click some link (onClick-event) on the page.

Then following exception is thrown:

at
org.apache.wicket.markup.MarkupStream.throwMarkupException(MarkupStream.java:526)
at
org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1438)
at
org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1557)
at
org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1532)
at
org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1487)
at
org.apache.wicket.markup.html.panel.DefaultMarkupSourcingStrategy.onComponentTagBody(DefaultMarkupSourcingStrategy.java:71)
. . .

I try to avoid that like this:

public class Page1 extends WebPage {

  public Page1() {
if (!UserSession.get().isUserSignedOn()) {
setResponsePage(new StartPage());
return;
} else
normalHandling();
  }
  . . .
}

I can see in log file that the if/else works as expected: the StartPage
is handled (but not shown).
But after that it tries to render Page1 again which throws the exception.

What I finally want is: users should be led to the StartPage after
session time out in any case.

Any recommendations how I should handle this are very welcome.

Many thanks in advance
Karl-Heinz



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



access to url at http 404

2014-09-23 Thread Karl-Heinz Golz
Hello,

is it possible to get the incorrect url when error 404 occurs?

I would like to inspect this url and react differently for
- users who want access but did a mistake in the url or
  bookmarked an url which is no longer valid
  -> show StartPage (with some more functionality)
- others who want to access through "brute-force" by adding garbage to
the url
  -> show a short error page
 
I am using Wicket 6.17.0.

many thanks in advance
Karl-Heinz


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



Re: java.lang.IllegalArgumentException: Argument 'name' may not be null or empty.

2014-08-11 Thread Karl-Heinz Golz
Hi Martin,

I checked the logs and I can confirm: the reason for all exceptions was
the url:
https://www.tierfundus.de/wicket/bookmarkable/

But I wonder how can such a url happen? I'm almost sure the user did not
modify the url in her browser manually.
 
Regards/Karl-heinz


Am 09.08.2014 um 15:34 schrieb Martin Grigorov:
> Hi,
>
> This kind of error may happen with request like
> http://localhost:8080/wicket/bookmarkable/, assuming the app home page is
> at http://localhost:8080/
> I'll add a ticket to improve the default mappers for this case.
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
>
> On Fri, Aug 8, 2014 at 1:26 PM, Karl-Heinz Golz > wrote:
>> Hello,
>>
>> sometimes following exception is thrown (wicket 6.5.0):
>>
>> org.apache.wicket.DefaultExceptionMapper: Unexpected error occurred
>> java.lang.IllegalArgumentException: Argument 'name' may not be null or
>> empty.
>> at org.apache.wicket.util.lang.Args.notEmpty(Args.java:64)
>> at
>>
>> org.apache.wicket.core.request.mapper.AbstractComponentMapper.getPageClass(AbstractComponentMapper.java:137)
>> at
>>
>> org.apache.wicket.core.request.mapper.BookmarkableMapper.parseRequest(BookmarkableMapper.java:110)
>> at
>>
>> org.apache.wicket.core.request.mapper.AbstractBookmarkableMapper.mapRequest(AbstractBookmarkableMapper.java:282)
>> at
>>
>> org.apache.wicket.request.mapper.CompoundRequestMapper.mapRequest(CompoundRequestMapper.java:152)
>> at
>>
>> org.apache.wicket.protocol.https.HttpsMapper.mapRequest(HttpsMapper.java:92)
>> at
>>
>> org.apache.wicket.request.cycle.RequestCycle.resolveRequestHandler(RequestCycle.java:183)
>> at
>>
>> org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:208)
>> at
>>
>> org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:282)
>> at
>>
>> org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:244)
>> at
>>
>> org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:188)
>> at
>>
>> org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:267)
>> at
>>
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>> at
>>
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>> at
>> net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:203)
>> at
>> net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:181)
>> at
>>
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>> at
>>
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>> at
>>
>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
>> at
>>
>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
>> at
>>
>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
>> at
>>
>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
>> at
>> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:555)
>> at
>>
>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>> at
>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
>> at
>> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
>> at
>>
>> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
>> at
>> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
>> at java.lang.Thread.run(Thread.java:701)
>>
>>
>> That occured approximately once per month and I ignored it but today it
>> happened already about 10 times.
>> Therefore I would like to find out what the reason is.
>>
>> Could someone give me a hint.
>>
>> Thanks in advance
>> Karl-Heinz
>>
>>
>>
>>
>>
>>
>>


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



java.lang.IllegalArgumentException: Argument 'name' may not be null or empty.

2014-08-08 Thread Karl-Heinz Golz
Hello,

sometimes following exception is thrown (wicket 6.5.0):

org.apache.wicket.DefaultExceptionMapper: Unexpected error occurred
java.lang.IllegalArgumentException: Argument 'name' may not be null or
empty.
at org.apache.wicket.util.lang.Args.notEmpty(Args.java:64)
at
org.apache.wicket.core.request.mapper.AbstractComponentMapper.getPageClass(AbstractComponentMapper.java:137)
at
org.apache.wicket.core.request.mapper.BookmarkableMapper.parseRequest(BookmarkableMapper.java:110)
at
org.apache.wicket.core.request.mapper.AbstractBookmarkableMapper.mapRequest(AbstractBookmarkableMapper.java:282)
at
org.apache.wicket.request.mapper.CompoundRequestMapper.mapRequest(CompoundRequestMapper.java:152)
at
org.apache.wicket.protocol.https.HttpsMapper.mapRequest(HttpsMapper.java:92)
at
org.apache.wicket.request.cycle.RequestCycle.resolveRequestHandler(RequestCycle.java:183)
at
org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:208)
at
org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:282)
at
org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:244)
at
org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:188)
at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:267)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:203)
at
net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:181)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:555)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:701)


That occured approximately once per month and I ignored it but today it
happened already about 10 times.
Therefore I would like to find out what the reason is.

Could someone give me a hint.

Thanks in advance
Karl-Heinz








Re: problem with old jQuery version in wicket 6.16.0

2014-07-13 Thread Karl-Heinz Golz
thank you, Sebastien. It works now.


Am 13.07.2014 14:35, schrieb Sebastien:
> Hi Karl-Heinz,
>
> That's because jquery-xx.js is not a plugin by itself, so you cannot use
> JQueryPluginResourceReference. Use a JavaScriptResourceReference instead.
> JQueryPluginResourceReference depends on JQueryResourceReference, that's
> why you get a circular dependency exception..
>
> Best regards,
> Sebastien.
>
>
> On Sun, Jul 13, 2014 at 2:24 PM, Karl-Heinz Golz <
> karl-heinz.g...@t-online.de> wrote:
>
>> hello,
>>
>> I'm upgrading wicket from version 6.5.0 to version 6.16.0 (including
>> jQuery 1.11.1 now).
>> But I have to use jQuery 1.8.3, instead. I tried to achieve that with
>> following code in StartAplication#init.:
>>
>> IJavaScriptLibrarySettings settings = getJavaScriptLibrarySettings();
>> settings.setJQueryReference(new
>> JQueryPluginResourceReference(Startseite.class, "query-1.8.3.min.js"));
>>
>> Following RuntimeException is thrown:
>> org.apache.wicket.resource.CircularDependencyException: Circular
>> dependency detected in the dependency chain
>> [JavaScriptReferenceHeaderItem(scope:
>> org.apache.wicket.ajax.AbstractDefaultAjaxBehavior; name:
>> res/js/wicket-ajax-jquery-debug.js; locale: null; style: null;
>> variation: null, null), JavaScriptReferenceHeaderItem(scope:
>> org.apache.wicket.ajax.AbstractDefaultAjaxBehavior; name:
>> res/js/wicket-ajax-jquery.js; locale: null; style: null; variation:
>> null, null), JavaScriptReferenceHeaderItem(scope:
>> org.apache.wicket.ajax.AbstractDefaultAjaxBehavior; name:
>> res/js/wicket-event-jquery.js; locale: null; style: null; variation:
>> null, null), JavaScriptReferenceHeaderItem(scope:
>> de.khg.fundus.Startseite; name: jquery-1.8.3.min.js; locale: null;
>> style: null; variation: null, null)].
>> JavaScriptReferenceHeaderItem(scope: de.khg.fundus.Startseite; name:
>> jquery-1.8.3.min.js; locale: null; style: null; variation: null, null)
>> is already in the chain.
>>
>> What's my mistake?
>>
>> Thanks in advance
>> Karl-Heinz
>>
>> -
>> 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



problem with old jQuery version in wicket 6.16.0

2014-07-13 Thread Karl-Heinz Golz
hello,

I'm upgrading wicket from version 6.5.0 to version 6.16.0 (including 
jQuery 1.11.1 now).
But I have to use jQuery 1.8.3, instead. I tried to achieve that with
following code in StartAplication#init.:

IJavaScriptLibrarySettings settings = getJavaScriptLibrarySettings();
settings.setJQueryReference(new
JQueryPluginResourceReference(Startseite.class, "query-1.8.3.min.js"));

Following RuntimeException is thrown:
org.apache.wicket.resource.CircularDependencyException: Circular
dependency detected in the dependency chain
[JavaScriptReferenceHeaderItem(scope:
org.apache.wicket.ajax.AbstractDefaultAjaxBehavior; name:
res/js/wicket-ajax-jquery-debug.js; locale: null; style: null;
variation: null, null), JavaScriptReferenceHeaderItem(scope:
org.apache.wicket.ajax.AbstractDefaultAjaxBehavior; name:
res/js/wicket-ajax-jquery.js; locale: null; style: null; variation:
null, null), JavaScriptReferenceHeaderItem(scope:
org.apache.wicket.ajax.AbstractDefaultAjaxBehavior; name:
res/js/wicket-event-jquery.js; locale: null; style: null; variation:
null, null), JavaScriptReferenceHeaderItem(scope:
de.khg.fundus.Startseite; name: jquery-1.8.3.min.js; locale: null;
style: null; variation: null, null)].
JavaScriptReferenceHeaderItem(scope: de.khg.fundus.Startseite; name:
jquery-1.8.3.min.js; locale: null; style: null; variation: null, null)
is already in the chain.

What's my mistake?

Thanks in advance
Karl-Heinz

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



Re: wicket form and browser back

2013-10-01 Thread Karl-Heinz Golz
Thank you Martin and Michael.

I will try that and hope, the combination of setVersioned(false) and
using AJAX for all form components will solve my problem.

Am 01.10.2013 11:57, schrieb Michael Mosmann:
> AFAIK does a browser back bypass everything on the page. Maybe it is
> better to avoid paging if there is dependent state on different pages
> (use ajax instead and make it single-page).
> 
> michael:)
> 

Am 01.10.2013 11:08, schrieb Martin Grigorov:
> I'm not sure this is possible.
> But you can use AjaxFormComponentUpdatingBehavior("change") to update
> the
> server state once a form component is changed at the client side.
>
>
> Am 01.10.13 10:53, schrieb Karl-Heinz Golz:
>> Thank you, Martin, that works well.
>> But next question:
>> when a user goes back and forward via browser back and forward buttons,
>> then already filled in fields will be empty (using Firefox).
>> Is it possible to handle browser back the same way like form submit?
>> That is, browser back causes a trip to the server and wicket gives
>> controll to my application the same way it would be done when the user
>> presses the submit button?
>>
>>
>> Am 01.10.2013 09:59, schrieb Martin Grigorov:> Hi,
>>> Mark the page as non-versioned (Page.setVersioned(false)).
>>> This way there won't be previous version of page. When the user uses
>>> browser back button she will go to the previous page, not to the
>>> previous
>>> version of the current page.
>>>
>>>
>>> On Tue, Oct 1, 2013 at 9:35 AM, Karl-Heinz Golz
>> >>> wrote:
>>>>
>>>> hello,
>>>>
>>>> I know that is an ongoing discussion point for years but nevertheless
>>>> I would like to ask you whether there are good solutions in the
>>>> meantime.
>>>> In my web application (WICKET 6.5) there is a quite big form and I
>>>> want to detect and react when a user goes back to an older version of
>>>> this form using the browser back button. When the user hits the submit
>>>> button on that older version he will lose data. I would like to avoid
>>>> that in some way.
>>>>
>>>> Suggestions and experiences are very welcome.
>>>>
>>>> Many thanks in advance
>>>> Karl-Heinz
>>>>
>>>>
>>>>
>>>> -
>>>> 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
>>
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 

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



Re: wicket form and browser back

2013-10-01 Thread Karl-Heinz Golz
Thank you, Martin, that works well.
But next question:
when a user goes back and forward via browser back and forward buttons,
then already filled in fields will be empty (using Firefox).
Is it possible to handle browser back the same way like form submit?
That is, browser back causes a trip to the server and wicket gives
controll to my application the same way it would be done when the user
presses the submit button?


Am 01.10.2013 09:59, schrieb Martin Grigorov:> Hi,
>
> Mark the page as non-versioned (Page.setVersioned(false)).
> This way there won't be previous version of page. When the user uses
> browser back button she will go to the previous page, not to the previous
> version of the current page.
>
>
> On Tue, Oct 1, 2013 at 9:35 AM, Karl-Heinz Golz
> wrote:
>
>>
>>
>> hello,
>>
>> I know that is an ongoing discussion point for years but nevertheless
>> I would like to ask you whether there are good solutions in the meantime.
>> In my web application (WICKET 6.5) there is a quite big form and I
>> want to detect and react when a user goes back to an older version of
>> this form using the browser back button. When the user hits the submit
>> button on that older version he will lose data. I would like to avoid
>> that in some way.
>>
>> Suggestions and experiences are very welcome.
>>
>> Many thanks in advance
>> Karl-Heinz
>>
>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>

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



wicket form and browser back

2013-10-01 Thread Karl-Heinz Golz


hello,

I know that is an ongoing discussion point for years but nevertheless
I would like to ask you whether there are good solutions in the meantime.
In my web application (WICKET 6.5) there is a quite big form and I
want to detect and react when a user goes back to an older version of
this form using the browser back button. When the user hits the submit
button on that older version he will lose data. I would like to avoid
that in some way.

Suggestions and experiences are very welcome.

Many thanks in advance
Karl-Heinz



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



Re: how to log an External Link

2013-03-28 Thread Karl-Heinz Golz
Hi Dan,
many thanks, works well.

/Karl

Am 28.03.2013 16:48, schrieb Dan Retzlaff:
> An external link by definition does not make a request to your Wicket
> application. The user simply bounces off to the given URL. Consider using a
> normal Link, and throwing RedirectToUrlException in its onClick.
> 
> On Thu, Mar 28, 2013 at 9:44 AM, Karl-Heinz Golz <
> karl-heinz.g...@t-online.de> wrote:
> 
>> hello,
>>
>> I need a link to outside of my wicket application and I'am using an
>> ExternalLink for that. That works well.
>>
>> Now I would like to write a log message when a user clicks on that link.
>> Their is no onClick() and I can't figure out, how to achieve that.
>>
>> Suggestions are very welcome.
>>
>> Thanks in advance
>> Karl
>>
>>
>> -
>> 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



how to log an External Link

2013-03-28 Thread Karl-Heinz Golz
hello,

I need a link to outside of my wicket application and I'am using an
ExternalLink for that. That works well.

Now I would like to write a log message when a user clicks on that link.
Their is no onClick() and I can't figure out, how to achieve that.

Suggestions are very welcome.

Thanks in advance
Karl


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



Re: ConcurrentModificationException with Fancybox

2012-11-15 Thread Karl-Heinz Golz
Now it works :))
Thank you very much for your prompt support.


Am 15.11.2012 17:15, schrieb Martin Grigorov:
> Yes. There is no need to add it again and again for each request.
> 
> 
> On Thu, Nov 15, 2012 at 6:11 PM, Karl-Heinz Golz <
> karl-heinz.g...@t-online.de> wrote:
> 
>>
>> Yes, I do it in getHomePage:
>>
>> public class StartApplication extends WebApplication {
>>
>> @Override
>> public void init() {
>> . . .
>> }
>>
>>  @Override
>> public Class getHomePage() {
>>
>> IPackageResourceGuard packageResourceGuard =
>> getResourceSettings().getPackageResourceGuard();
>> if (packageResourceGuard instanceof SecurePackageResourceGuard)
>> {
>> SecurePackageResourceGuard guard = (SecurePackageResourceGuard)
>> packageResourceGuard;
>> guard.addPattern("+*.htm");
>> }
>>
>> return Anmelden.class;
>> }
>> }
>>
>>
>> I have to move it to Init?
>>
>>
>> Am 15.11.2012 17:02, schrieb Martin Grigorov:
>>> Hi,
>>>
>>> Do you add white-list patterns to SecurePackageResourceGuard somewhere
>>> outside of MyApplication#init() ?
>>>
>>> The exception says that SecurePackageResourceGuard's patterns list is
>> being
>>> modified during the request processing.
>>> It should be changed only at application startup.
>>>
>>>
>>> On Thu, Nov 15, 2012 at 5:52 PM, Karl-Heinz Golz <
>>> karl-heinz.g...@t-online.de> wrote:
>>>
>>>>
>>>> hello,
>>>>
>>>> I'm using wicket 1.5.9.
>>>> My application shows some dynamic pictures via fancybox (native without
>>>> e.g. visural wicket).
>>>> That works almost well, i.e. you click the small picture and you get the
>>>> big picture via fancybox. And you can click through the show (up to 3
>>>> pictures) properly.
>>>>
>>>> But sometimes (about 1 of 10) when you click on a picture a
>>>> ConcurrentModificationException is thrown.
>>>>
>>>> Below you find the exception and an extract of my coding.
>>>>
>>>> Maybe someone can give me a hint what's wrong.
>>>> Many thanks in advance
>>>> Karl-Heinz
>>>>
>>>> org.apache.wicket.DefaultExceptionMapper: Unexpected error occurred
>>>> java.util.ConcurrentModificationException
>>>> at
>> java.util.ArrayList$Itr.checkForComodification(ArrayList.java:819)
>>>> at java.util.ArrayList$ListItr.previous(ArrayList.java:846)
>>>> at
>>>>
>>>>
>> org.apache.wicket.util.collections.ReverseListIterator.next(ReverseListIterator.java:51)
>>>> at
>>>>
>>>>
>> org.apache.wicket.markup.html.SecurePackageResourceGuard.acceptAbsolutePath(SecurePackageResourceGuard.java:179)
>>>> at
>>>>
>>>>
>> org.apache.wicket.markup.html.PackageResourceGuard.accept(PackageResourceGuard.java:71)
>>>> at
>>>>
>>>>
>> org.apache.wicket.request.resource.PackageResource.accept(PackageResource.java:468)
>>>> at
>>>>
>>>>
>> org.apache.wicket.request.resource.PackageResource.internalGetResourceStream(PackageResource.java:445)
>>>> at
>>>>
>>>>
>> org.apache.wicket.request.resource.PackageResource.getResourceStream(PackageResource.java:410)
>>>> at
>>>>
>>>>
>> org.apache.wicket.request.resource.PackageResource.newResourceResponse(PackageResource.java:240)
>>>> at
>>>>
>>>>
>> org.apache.wicket.request.resource.AbstractResource.respond(AbstractResource.java:497)
>>>> at
>>>>
>>>>
>> org.apache.wicket.request.handler.resource.ResourceRequestHandler.respond(ResourceRequestHandler.java:74)
>>>> at
>>>>
>>>>
>> org.apache.wicket.request.handler.resource.ResourceReferenceRequestHandler.respond(ResourceReferenceRequestHandler.java:105)
>>>> at
>>>>
>>>>
>> org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:784)
>>>> at
>>>>
>>>>
>> org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
>>>> at
>>>>
>> org.apache.wi

Re: ConcurrentModificationException with Fancybox

2012-11-15 Thread Karl-Heinz Golz

Yes, I do it in getHomePage:

public class StartApplication extends WebApplication {

@Override
public void init() {
. . .
}   

 @Override
public Class getHomePage() {

IPackageResourceGuard packageResourceGuard =
getResourceSettings().getPackageResourceGuard();
if (packageResourceGuard instanceof SecurePackageResourceGuard)
{
SecurePackageResourceGuard guard = (SecurePackageResourceGuard)
packageResourceGuard;
guard.addPattern("+*.htm");
}

return Anmelden.class;
}
}


I have to move it to Init?


Am 15.11.2012 17:02, schrieb Martin Grigorov:
> Hi,
> 
> Do you add white-list patterns to SecurePackageResourceGuard somewhere
> outside of MyApplication#init() ?
> 
> The exception says that SecurePackageResourceGuard's patterns list is being
> modified during the request processing.
> It should be changed only at application startup.
> 
> 
> On Thu, Nov 15, 2012 at 5:52 PM, Karl-Heinz Golz <
> karl-heinz.g...@t-online.de> wrote:
> 
>>
>> hello,
>>
>> I'm using wicket 1.5.9.
>> My application shows some dynamic pictures via fancybox (native without
>> e.g. visural wicket).
>> That works almost well, i.e. you click the small picture and you get the
>> big picture via fancybox. And you can click through the show (up to 3
>> pictures) properly.
>>
>> But sometimes (about 1 of 10) when you click on a picture a
>> ConcurrentModificationException is thrown.
>>
>> Below you find the exception and an extract of my coding.
>>
>> Maybe someone can give me a hint what's wrong.
>> Many thanks in advance
>> Karl-Heinz
>>
>> org.apache.wicket.DefaultExceptionMapper: Unexpected error occurred
>> java.util.ConcurrentModificationException
>> at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:819)
>> at java.util.ArrayList$ListItr.previous(ArrayList.java:846)
>> at
>>
>> org.apache.wicket.util.collections.ReverseListIterator.next(ReverseListIterator.java:51)
>> at
>>
>> org.apache.wicket.markup.html.SecurePackageResourceGuard.acceptAbsolutePath(SecurePackageResourceGuard.java:179)
>> at
>>
>> org.apache.wicket.markup.html.PackageResourceGuard.accept(PackageResourceGuard.java:71)
>> at
>>
>> org.apache.wicket.request.resource.PackageResource.accept(PackageResource.java:468)
>> at
>>
>> org.apache.wicket.request.resource.PackageResource.internalGetResourceStream(PackageResource.java:445)
>> at
>>
>> org.apache.wicket.request.resource.PackageResource.getResourceStream(PackageResource.java:410)
>> at
>>
>> org.apache.wicket.request.resource.PackageResource.newResourceResponse(PackageResource.java:240)
>> at
>>
>> org.apache.wicket.request.resource.AbstractResource.respond(AbstractResource.java:497)
>> at
>>
>> org.apache.wicket.request.handler.resource.ResourceRequestHandler.respond(ResourceRequestHandler.java:74)
>> at
>>
>> org.apache.wicket.request.handler.resource.ResourceReferenceRequestHandler.respond(ResourceReferenceRequestHandler.java:105)
>> at
>>
>> org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:784)
>> at
>>
>> org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
>> at
>> org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:255)
>> at
>>
>> org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:212)
>> at
>>
>> org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:283)
>> at
>>
>> org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:188)
>> at
>>
>> org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:244)
>> at
>>
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
>> at
>>
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
>> at
>>
>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
>> at
>>
>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
>> at
>>
>> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
>> at
>>
>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
>> at
>>

ConcurrentModificationException with Fancybox

2012-11-15 Thread Karl-Heinz Golz

hello,

I'm using wicket 1.5.9.
My application shows some dynamic pictures via fancybox (native without
e.g. visural wicket).
That works almost well, i.e. you click the small picture and you get the
big picture via fancybox. And you can click through the show (up to 3
pictures) properly.

But sometimes (about 1 of 10) when you click on a picture a
ConcurrentModificationException is thrown.

Below you find the exception and an extract of my coding.

Maybe someone can give me a hint what's wrong.
Many thanks in advance
Karl-Heinz

org.apache.wicket.DefaultExceptionMapper: Unexpected error occurred
java.util.ConcurrentModificationException
at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:819)
at java.util.ArrayList$ListItr.previous(ArrayList.java:846)
at
org.apache.wicket.util.collections.ReverseListIterator.next(ReverseListIterator.java:51)
at
org.apache.wicket.markup.html.SecurePackageResourceGuard.acceptAbsolutePath(SecurePackageResourceGuard.java:179)
at
org.apache.wicket.markup.html.PackageResourceGuard.accept(PackageResourceGuard.java:71)
at
org.apache.wicket.request.resource.PackageResource.accept(PackageResource.java:468)
at
org.apache.wicket.request.resource.PackageResource.internalGetResourceStream(PackageResource.java:445)
at
org.apache.wicket.request.resource.PackageResource.getResourceStream(PackageResource.java:410)
at
org.apache.wicket.request.resource.PackageResource.newResourceResponse(PackageResource.java:240)
at
org.apache.wicket.request.resource.AbstractResource.respond(AbstractResource.java:497)
at
org.apache.wicket.request.handler.resource.ResourceRequestHandler.respond(ResourceRequestHandler.java:74)
at
org.apache.wicket.request.handler.resource.ResourceReferenceRequestHandler.respond(ResourceReferenceRequestHandler.java:105)
at
org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:784)
at
org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
at
org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:255)
at
org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:212)
at
org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:283)
at
org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:188)
at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:244)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1001)
at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
at
org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1770)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)




   


---

Link linkImg1 = new Link("img1big") {
private static final long serialVersionUID = 1L;

@Override
public void onClick() {
setResponsePage(new ShowImage(fall.getImage1Big(),
fall.getImage1ContentType(),
fall.getImage1Title()));
}
};
add(linkImg1);

Image img1 = new NonCachingImage("img1small");
if (fall.getImage1Small() != null) {
img1.setImageResource(new
ByteArrayResource(fall.getImage1ContentType(), fall.getImage1Small()));
linkImg1.add(AttributeModifier.replace("rel", "fancyshow"));
} else {
img1.setImageResourceReference(new
PackageResourceReference(StartPage.class, "images/null.png"));
img1.add(AttributeModifier.replace("class", "hideme"));
}
linkImg1.add(img1);



_ShowImage.html_









---
_ShowImage.class_

public class ShowImage extends WebPage implements Serializable {
private static final long serialVersionUID = 1L;

public ShowImage (byte[] img, String contentType, String title) {
  Image img2