Re: Dateparsing error kendo AjaxDateTimePicker only in March, May, October

2016-03-01 Thread hfriederichs
I'm not allowed to re-open the issue, so I added a comment to the closed
issue.


Thank you so far

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Dateparsing-error-kendo-AjaxDateTimePicker-only-in-March-May-October-tp4673756p4673787.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: Dateparsing error kendo AjaxDateTimePicker only in March, May, October

2016-03-01 Thread hfriederichs
EEE is the abbreviated day,  the full day-name.
But EEE doesn't work either.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Dateparsing-error-kendo-AjaxDateTimePicker-only-in-March-May-October-tp4673756p4673782.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: Dateparsing error kendo AjaxDateTimePicker only in March, May, October

2016-03-01 Thread hfriederichs
That solved the problem, thank you Sebastian!

By he way, when I use E in my date pattern, like in " d  ", that
still doesn't work.

When the datetimepicker is displayed first,  it renders ok:

dinsdag 1 maart 2016

(dinsdag=tuesday, maart=march in Dutch)

But when I change the date, I get:

Error while parsing datetime: date was ' 17 maart 2016' and time was
'19.00'





--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Dateparsing-error-kendo-AjaxDateTimePicker-only-in-March-May-October-tp4673756p4673779.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: Dateparsing error kendo AjaxDateTimePicker only in March, May, October

2016-03-01 Thread hfriederichs
It's a Locale thing...

I Have:

@Override
public Locale getLocale() {
return new Locale("nl", "NL");
}

When I change this to ("en", "US") it works fine for me too.

And I discovered another thing: the dutch short, three letter forms for
months are the same as in English, except for March, May and October ('mrt',
'mei', 'okt' versus 'Mar', 'May' and 'Oct'), which explains the odd
behaviour I mentioned in my first post.

Perhaps Dutch is not supported for this kind of GUI translations? 
I'd rather not change to the English Locale.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Dateparsing-error-kendo-AjaxDateTimePicker-only-in-March-May-October-tp4673756p4673772.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: Dateparsing error kendo AjaxDateTimePicker only in March, May, October

2016-03-01 Thread hfriederichs
It's not a DatePicker, but a AjaxDateTimePicker. 
I discovered it is indeed a pattern issue.
This is my code:

private final static String dateDisplay = "dd MMM ";
private final static String timeDisplay = "HH.mm";
scheduleDateTimeField = new AjaxDateTimePicker("scheduledatumtijd",
planDateModel, dateDisplay, timeDisplay) {

etcetera.

It works when I change dateDisplay to "dd MM ", so that the month parses
to a two digit number in stead of a shortened String (like 'Mar', 'Apr'...).



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Dateparsing-error-kendo-AjaxDateTimePicker-only-in-March-May-October-tp4673756p4673763.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: Dateparsing error kendo AjaxDateTimePicker only in March, May, October

2016-03-01 Thread hfriederichs
I upgraded Wicket, Wicket JQuery and KendoUI to 7.2.0.

Same problem.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Dateparsing-error-kendo-AjaxDateTimePicker-only-in-March-May-October-tp4673756p4673758.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



Dateparsing error kendo AjaxDateTimePicker only in March, May, October

2016-03-01 Thread hfriederichs
Good morning/afternoon/evening

I'm using a com.googlecode.wicket.kendo.ui.form.datetime.AjaxDateTimePicker
version 7.1.0 on top of Wicket 7.1.0

Since today, march 1st, I get this error when I pick a month:

Error while parsing datetime: date was '01 Mar 2016' and time was '17:30'.

And this is very, very strange: I'm getting this error only when choosing
March, May and October, and not in the other months...

Regards, Hans



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Dateparsing-error-kendo-AjaxDateTimePicker-only-in-March-May-October-tp4673756.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: Bug in wicket-jqueryui Kendo DateTimePicker?

2015-12-28 Thread hfriederichs
Hello Sebastien,

Thank you for your quick response!

Best regards, Hans

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Bug-in-wicket-jqueryui-Kendo-DateTimePicker-tp4673069p4673116.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: Bug in wicket-jqueryui Kendo DateTimePicker?

2015-12-24 Thread hfriederichs
Hello Sebastien,

It's the day of the week.
SimpleDateFormat's javadoc:


Date and TimePattern Result 
"EEE, MMM d, ''yy"  Wed, Jul 4, '01  


Hans

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Bug-in-wicket-jqueryui-Kendo-DateTimePicker-tp4673069p4673072.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



Bug in wicket-jqueryui Kendo DateTimePicker?

2015-12-24 Thread hfriederichs
Hello,

I'm using wicket-jquery-ui version 6.21.0. (and Wicket 6.20.0)
I'm adding a
com.googlecode.wicket.kendo.ui.form.datetime.AjaxDateTimePicker:

private final static String dateDisplay = "EEE d MMM ";
private final static String timeDisplay = "HH.mm";

DateTimePicker scheduleDateTimeField = new
AjaxDateTimePicker("planDateTime", planDateModel, dateDisplay, timeDisplay)
{
... etcetera

At first page rendering, the displayed Date is as it should be: 'do 24 dec
2015' ('do' is short for thursday in the Dutch Locale)

However, after selecting another Date in the picker, it shows: EEE 25 dec
2015, and the right rendering never appears again.

A bug or am I doing something wrong?

Regards, Hans Friederichs


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Bug-in-wicket-jqueryui-Kendo-DateTimePicker-tp4673069.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: HomePage reloads on every Ajax submit

2015-10-30 Thread hfriederichs
I figured it out, it wasn't a Wicket thing.

Someone changed our script for setting up an application server in Eclipse
WDT, making it ssl-only (secure cookie).
So when I switched to https, everything worked fine.

Makes perfect sense, in hindsight, the page comes up in http, but no request
can be serviced.

So Wicket's not the blame, but it would have been nice to have had a simple
error or warning on this, but I don't know if that is possible at all.

Thanks to Martin and Ernesto for their replies.


Regards, Hans

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/HomePage-reloads-on-every-Ajax-submit-tp4672412p4672438.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: HomePage reloads on every Ajax submit

2015-10-29 Thread hfriederichs
I stripped my application to essntials: one application, one webpage, one
form, two textfields, the first one with AjaxFormComponentUpdatingBehavior
the second with AjaxFormSubmitBehavior.

The page reloads when, after I enter something in tf1:
* I place the cursor in tf2
* I click on empty space around the fields
* I hit 'Enter'
* I hit 'Tab'
* Any action...

Please, anyone a suggestion? 


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/HomePage-reloads-on-every-Ajax-submit-tp4672412p4672423.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: HomePage reloads on every Ajax submit

2015-10-28 Thread hfriederichs
That didn't make any difference...
Still no errors.
When I open the application in a browser, the homepage loads once.
Strangely, on every Ajax submit, the homepage loads twice.

Regards

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/HomePage-reloads-on-every-Ajax-submit-tp4672412p4672414.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



HomePage reloads on every Ajax submit

2015-10-28 Thread hfriederichs
Hello,

I'm using Wicket 6.8.0 on Eclipse WDT (WebSphere application server).
This is my nth Wicket Application, but I can't figure out why 
keeps happening.
Whether a TextField or a Button, the corresponding AjaxFormSubmitBehavior is
never executed, instead, the Constructor of the homepage is executed again
and again.
There are no errors, no stacktraces, no warnings. Tried everything I can
think of. Must be something simple...

Please help!!

Regards, Hans


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/HomePage-reloads-on-every-Ajax-submit-tp4672412.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Wicket 6 migration (AbstractValidator has been removed)

2013-06-11 Thread hfriederichs
Same here.
What should you do? Implement an IValidor?

Regards 



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-6-migration-AbstractValidator-has-been-removed-tp4657184p4659386.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: Infomessage ExternalLink in case of a missing URL

2013-04-18 Thread hfriederichs
I'm sorry, but I don't understand you at all.

How is iteration over a javascript array of urls give me a button that opens
a wikipage if a url can be found in a database, and how does that same
iteration produce a feedback message if not?

I'm completely lost here.




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Infomessage-ExternalLink-in-case-of-a-missing-URL-tp4658015p4658085.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: Infomessage ExternalLink in case of a missing URL

2013-04-18 Thread hfriederichs
But I want the button to be there allways, and to be clickable allways.
Just conditional behaviour on it's Click event

Can't this be done? It seems so simple?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Infomessage-ExternalLink-in-case-of-a-missing-URL-tp4658015p4658074.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: Infomessage ExternalLink in case of a missing URL

2013-04-16 Thread hfriederichs
Hi,

Thank you, but isn't that only possible during the first load of the page?
When a user is finished with one application/wiki-url, he might enter a new
code for another application, while he stays on the same page. At that
point, I can't add or remove components anymore...?

Grts, Hans





--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Infomessage-ExternalLink-in-case-of-a-missing-URL-tp4658015p4658021.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



Infomessage ExternalLink in case of a missing URL

2013-04-16 Thread hfriederichs
Hello to y'all,

I'm facing a nasty problem for a very simple requirement. In my application
a user can enter an application code for working with that application
(deployments and so on).
Now I want to add a button that opens a Wiki-documentation page for that
application in a new browser tab. The URL for the wiki-page is stored in the
same database table as is the application code. I implemented this at first
with an ExternalLink, but I want to show an information message if the URL
is not entered in the database.

I can't get that done with an ExternalLink, so I used a Link instead. Well,
that gives the possibility to display info messages, but then I have to open
the URL myself by something like:

public void onClick() {
String docRef = getRefFromDb();
if (docRef == null) {
info("Please supply wiki-url first");
return;
}
RedirectRequestHandler redirectRequestHandler = new
RedirectRequestHandler(docRef);
   
RequestCycle.get().scheduleRequestHandlerAfterCurrent(redirectRequestHandler);  

}

Obviously I leave my page when the link is clicked, so I added
onBeforeRender() in which I add PopupSettings if the url is found, so at
least I have a new window for the wiki-page (but I want a new tab). And if
not, I have to nullify the PopupSettings...

This is very awkward.

Please, anyone, a simple solution?
Btw, I'm (still) using Wicket 1.5.4.

Regards, Hans




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Infomessage-ExternalLink-in-case-of-a-missing-URL-tp4658015.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: Conditional Popup

2012-06-04 Thread hfriederichs

Thomas Götz-2 wrote
> 
> As an alternative, you could use an AjaxLink and push the popup-opener JS
> to teh frontend, then you could have your decision logic (wether to open
> it or not) in the backend (Wicket layer).
>
> 

But, how would you do that?

if  (condition) {
   info("Do this first");
} else {
   activate JS-popup-opener 
}

And furthermore, I need to pass data to the popup-page, so I would have to
stick that in the Session?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Conditional-Popup-tp4649649p4649708.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: Conditional Popup

2012-06-04 Thread hfriederichs
No suggestions? Anyone?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Conditional-Popup-tp4649649p4649706.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: Conditional Popup

2012-06-01 Thread hfriederichs

Martin Grigorov-4 wrote
> 
> try with:
> 
> if (condition) { setPopupSettings(nonNull) } else { setPopupSettings(null)
> }
> 
> 

This doesn't work. The condition has to be checked every time the link is
clicked, so within the onCLick().
setPopupSettings(null) gives the current page as popup.

Maybe this information is relevant: The link is part of a row in a repeater
(within the populateItem of a ListView).



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Conditional-Popup-tp4649649p4649670.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: Conditional Popup

2012-06-01 Thread hfriederichs

Thomas Götz-2 wrote
> 
> 
> PopupSettings popupSettings = new PopupSettings() {
> @Override
> public String getPopupJavaScript() {
> return "if(!condition) return false; " +
> super.getPopupJavaScript();
> }
> };
> 
> 

I'm sorry, but I don't understand your code. My condition is in the
Java/Wicket-layer, how can you put that between double quotes?


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Conditional-Popup-tp4649649p4649665.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: Conditional Popup

2012-06-01 Thread hfriederichs
For other questions I had earlier on, I created quickstarts, but, since I'm
working on a very complex application, I couldn't reproduce the problem in a
quickstart. I spent hours and hours copying more and more of my application
into the quickstart, but to no avail.

So again, it's a simple question: how to make a conditional popup.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Conditional-Popup-tp4649649p4649654.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: Conditional Popup

2012-06-01 Thread hfriederichs
A quick-start costs me one or two hours; in the end, maybe I will. But I
think this is a reasonably simple question, so I'll await some
straightforward suggestions first.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Conditional-Popup-tp4649649p4649651.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



Conditional Popup

2012-06-01 Thread hfriederichs
Hello,

I have a wicket PopupPage that answers a wicket link, but I don't want it to
popup when certain conditions are not met. In that case I want an
info-message.

So I tried something like:
final Link theLink = new Link(...) {

public void onClick() {
if (condition) {
   info("Do this first");
} else {
  setPopupSettings(thePopupSettings);   
  setResponsePage(thePopupPage);
}
};

But no matter what I try, the popuppage always comes.




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Conditional-Popup-tp4649649.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Wicket and JPA: please a simple way to go

2012-05-16 Thread hfriederichs

Martin Grigorov-4 wrote
> 
> Apart of that, doing manual transaction management is just silly.
> Better let the "layers" to do this for you instead of spreading such
> kind of logic all over your code.
> 

Martin,

I have that logic at one place in my little silly application, and it's
perfect for it's goal, without config thingies, and the chance of big
changes in the future are zero. So let's not talk of that, I'll give you
another example - this time on a huge scale. 
My company is, as I mentioned earlier on, a big fat insurance company. As
all other companies in this branch, we started some ten years ago with the
biggest layer of decoupling there is: a centralized SOA/ESB.
And it turned out to be an enormous fiasco, it overcomplicated things on a
huge scale and has cost millions and millions. (It did generate a lot of
interesting work for me and lots of colleagues, though.) 
And now we are dismantling it, and turning back to point-to-point solutions.
As a result, things are getting more stable every day... And no, we are not
experiencing the disadvantages of the 'spaghetti' of zillions of
point-to-point connections, because there aren't so many. And yes, it's
great that we're having less and less 'scattered' functionality, like hidden
business rules in vetro-actions.
To be short: we didn't need it, and we better had not done it.

Hans



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-and-JPA-i-please-i-a-simple-way-to-go-tp4628562p4641131.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Wicket and JPA: please a simple way to go

2012-05-16 Thread hfriederichs

Tom Eugelink wrote
> 
> For example, wicket convention dictates that all labels should be put in
> property files. I decided not to do that. I fully understand the
> advantages, but for this project I'm simply not going to add an additional
> label component and a property file just to get "Name" on the screen. Yes,
> if it must be internationalized I have to rework my code, but as it stands
> the application probably won't have to be, and I would have added the
> abstraction for nothing.
> 
> 

Tom,

Just an afterthought - I can't figure out the English word for the Dutch
'nabrander'. As it happens, my afterthought has to do with another
(non-existing) Dutch word: /hoevaakheid/. Translated to English you would
also get an non-existing word: /howoftenness/.
Maybe that's funny, maybe not. 
But apart from that, I think howoftenness is a very important and often
neglected concept. And your example is a perfect application of good use of
howoftenness.
How many 'layers of decoupling' have been written that turned out to be
useless... Had one only thought of howoftenness...

Hans

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-and-JPA-i-please-i-a-simple-way-to-go-tp4628562p4641067.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Wicket and JPA: please a simple way to go

2012-05-14 Thread hfriederichs
It isn't; the database requirements are. I expected to get that done in an
hour or so, so that I could quickly continue with the more advanced and
complex functions. In the end it cost me a day.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-and-JPA-i-please-i-a-simple-way-to-go-tp4628562p4632270.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Wicket and JPA: please a simple way to go

2012-05-13 Thread hfriederichs
Tom,

I couldn't agree more, you hit the spot. Indeed it's all about balance,
don't over- (nor under-)architecture things. My application will be used by
maybe 5 people, and requires some very simple CRUD-implemetations on a
database table with maybe 100 rows (eventually).

Here's what I will do: stick the EntityManagerFactory in the
WicketApplication's subclass as Igor suggested (OK, without injection, but
never use injection for injection's sake); same goes for UserTransactions
for the CUD-part; make a DatabaseFacadeThing with all the necessary actions;
that thing uses the WicketApplication's subclass and will be used by the
Wicket components when needed. As a matter of fact, I already did make it,
and it works fine. And there's only the JPA-obligatory persistence.xml, no
other configs, components, and whatsoever.

Igor, thanks again for your 'dry swum code sample'. Btw: em.close() is not
allowed in a container-managed entity manager (JPA 5.9.1).

For all the other suggestions (not JPA): thank you, I will look at them,
just out of curiosity, because my 
company is a big, fat, obese insurance company, and big, fat, obese
creatures don't move a lot and don't like to move.
So it is JPA, and it will be so for ever and ever, in line with the
company's daily definition of 'ever and ever'.

Regards, Hans

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-and-JPA-i-please-i-a-simple-way-to-go-tp4628562p4630326.html
Sent from the Users forum mailing list archive at Nabble.com.

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



RE: Wicket and JPA: please a simple way to go

2012-05-13 Thread hfriederichs
All standards are equal, but some (like JPA) are more equal than others,
that's what you mean?

Well, a short look at the history of computing shows that technologies with
obvious and proven qualities, 
unanimously supported by experts, sometimes still don't survive. Other
qualities are needed...

In my company, JPA is the way to go.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-and-JPA-i-please-i-a-simple-way-to-go-tp4628562p4630088.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Wicket and JPA: please a simple way to go

2012-05-12 Thread hfriederichs
Igor,

I suspect you didn't realize when you got up this morning that at the end of
the day you would acquire eternal fame, but there it is. To get it working
with WebSphere is another matter; let's call it a challenge... 

I'll consider all the things mentioned here, thanks to you all.

Regards etc...

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-and-JPA-i-please-i-a-simple-way-to-go-tp4628562p4629413.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Wicket and JPA: please a simple way to go

2012-05-12 Thread hfriederichs
I have things working, in two versions: one with a
'PersistenceManagerSingleton' I wrote, ugly, and one based on jndi-lookups
of both the EntityManager and the UserTransaction, ugly too, for sticking to
jndi-lookups. A third I am thinking of is create an EJB-project alongside my
WebModule, so I can do my Injection stuff there. A fourth could be the
wicketstuff JEE-module.

I think you're missing my point. It doesn´t matter that there are loads of
examples. As I see it, they are all far too complex for such simple a task.

And I think I´m missing your point: I still don't get what's technology
specific about JPA. Isn't it just a Java API like JMS or JaxWS?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-and-JPA-i-please-i-a-simple-way-to-go-tp4628562p4629356.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Wicket and JPA: please a simple way to go

2012-05-12 Thread hfriederichs
James, what is technology specific about JPA?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-and-JPA-i-please-i-a-simple-way-to-go-tp4628562p4629309.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Wicket and JPA: please a simple way to go

2012-05-12 Thread hfriederichs
Igor, 

Josh suggested CDI as an alternative, in that respect it's the same as other
approaches I've tried: to cumbersome, to complex for my goals, so in respect
to what I want I don't think it's great.

I'll look into the wicket-jee module in wicketstuff, but it is yet another
extra 'thingy' you need for something that's so simple and basic... I wonder
if anyone has ever coined the phrase 'boiler plate xml' or 'boiler plate
components'. Maybe a quiz is a good idea. The Question is: fetch one row
from a straightforward table in let's say an onclick of a wicket button,
using jpa. The respondent that has the simplest solution gets eternal fame.

> Of course, the CDI-blog goes with the usual great-gratitude-comments of
> developers who couldn't figure it out either.

>> whats wrong with that?

Who says there's something wrong with that? It's just irony.

Thanks anyways

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-and-JPA-i-please-i-a-simple-way-to-go-tp4628562p4629186.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Wicket and JPA: please a simple way to go

2012-05-12 Thread hfriederichs
I looked at it, shortly. It's a perfect example of what I mean. I looked at a
blog by Igor V. And there we go again: you have to do this; and than that.
And then configure this. And don't forget to add a line in xml.
And in the end, put it all together and it's so great. 

I don't think so. 

I think JPA has to make life easier, and it does for me when I'm not using
Wicket: inject an EntityManager and do my db-stuff. That's how it should be,
IMHO.

Of course, the CDI-blog goes with the usual great-gratitude-comments of
developers who couldn't figure it out either.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-and-JPA-i-please-i-a-simple-way-to-go-tp4628562p4628598.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 and JPA: please a simple way to go

2012-05-12 Thread hfriederichs
Hello,

I'm using wicket 1.5.4, and I tried various approaches in using Wicket and
JPA (using webshere/open jpa). I looked at several posts here, but I keep
ending up writing /more/ boiler plate code and configuration than with plain
old jdbc.
So.
I don't want to write factories. I don't want to write Managers. I don't
want to use Guice. I'd like to inject an EntityManager, but there's no
Servlet, and injecting it in a ServletContextListener obviously doesn't
work.
If your response is like: look at this forum for '' please don't
respond.

Please help 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-and-JPA-i-please-i-a-simple-way-to-go-tp4628562.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: wicket 1.5.4 on websphere 7

2012-01-31 Thread hfriederichs
Hello,

I doubt if I can help, but in my company we also have wicket (1.5.4) on
WebSphere 7 (fp21).
And it works fine, no problems. In addition to
com.ibm.ws.webcontainer.invokeFiltersCompatibility we also have
com.ibm.ws.webcontainer.assumefiltersuccessonsecurityerror set to true in
the webcontainer. I don't recall why I did this, but it had to do with
access to static files.

Hope it helps.

Regards, Hans Friederichs


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/wicket-1-5-4-on-websphere-7-tp4343774p4343925.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: Error 404: File not found: /bookmarkable/org.apache.wicket.markup.html.link.PopupCloseLink$ClosePopupPage

2012-01-29 Thread hfriederichs
Just to get this out of my system: I spent hours and hours and hours trying
to solve this (Error 404: File not found:
/bookmarkable/org.apache.wicket.markup.html.link.PopupCloseLink$ClosePopupPage).
Nobody could help me here. Tried a quickstart, couldn't reproduce it there,
so obviously in my specific case Wicket decides to go left at some austere
point where it should go right.
And my usecase is so simple: press a button that closes a PopupPage. And it
worked fine in some older Wicket version. 
This is so frustrating. Another example. Just this week I upgraded to Wicket
1.5.4, and all of a sudden all my Dropdownboxes generated warnings and
behaved differently (not showing the wright default value). I fixed this,
but again it cost me a lot of time.

And the 404... In the end I fixed that too:

public class WindowClosingButtonThatRealyWorks extends Button {
private static final long serialVersionUID = -8141558420171531381L;

public WindowClosingButtonThatRealyWorks(String id, IModel 
model) {
super(id, model);
addClosingBehaviour();
}

private void addClosingBehaviour() {
this.add(new AttributeAppender("onclick", new
Model("window.close()"), ";"));
}
}

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Error-404-File-not-found-bookmarkable-org-apache-wicket-markup-html-link-PopupCloseLink-ClosePopupPae-tp4169232p4338715.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: Error 404: File not found: /bookmarkable/org.apache.wicket.markup.html.link.PopupCloseLink$ClosePopupPage

2011-12-07 Thread hfriederichs
I found this in my application server log:

FFDC Exception:com.ibm.ws.webcontainer.webapp.WebAppErrorReport
SourceId:com.ibm.ws.webcontainer.servlet.FilterProxyServlet.dispatch
ProbeId:312
Reporter:com.ibm.ws.webcontainer.servlet.FilterProxyServlet@6d846d84
com.ibm.ws.webcontainer.webapp.WebAppErrorReport: SRVE0190E: File not found:
/bookmarkable/org.apache.wicket.markup.html.link.PopupCloseLink$ClosePopupPage

I don't think I'm doing something wrong. As I mentioned, it worked fine in
1.4.x, and it's just a PopupCloseLink, nothing fancy. And the 404 doesn't
relate to something I made, but to a Wicket class.

Something in my web.xml? Where should I look? 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Error-404-File-not-found-bookmarkable-org-apache-wicket-markup-html-link-PopupCloseLink-ClosePopupPae-tp4169232p4170408.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



Error 404: File not found: /bookmarkable/org.apache.wicket.markup.html.link.PopupCloseLink$ClosePopupPage

2011-12-07 Thread hfriederichs
See the subject for my issue.
I have a popuppage:

public class ThePopupPage extends WebPage {

 public ThePopupPage (long processID) {
// Do stuff for the page's content
PopupCloseLink closeLink = new PopupCloseLink("close"); 
closeLink.setOutputMarkupId(true);
add(closeLink); 
 }
}

Clicking the PopupCloseLink generates the 404 error.
I'm experiencing this after I migrated to 1.5(.3)


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Error-404-File-not-found-bookmarkable-org-apache-wicket-markup-html-link-PopupCloseLink-ClosePopupPae-tp4169232p4169232.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: Event or Notice when a ListView's Model changes

2011-12-06 Thread hfriederichs
But when the event is processed, I'm not in an AjaxRequest.

Anyway, I have something working, now, I am able to update a version field
(by sending an inter-component event in the onBeforeRender() of the 
ListView that has it's own Form; the Event is processed by another Form at
the top of the same Panel - that's where  the version field is), but I still
need an AbstractAjaxTimerBehavior - now at 3 seconds - to make the updates
visible for the user. That worries me, I would like to have an update
interval of a second, or even less, but I wonder if this is wise. My
solution now on the receiving side looks something like:

 add(new AbstractAjaxTimerBehavior(Duration.seconds(3)) {  // add to the Fom
@Override
public void onEvent(Component component, IEvent event) {
if (event.getPayload() instanceof ProcessReadyNotfication) {
==> Update VersionField
super.onEvent(component, event);
}
}

@Override
protected void onTimer(AjaxRequestTarget target) {
// This can take up to 3 seconds!
target.add(VersionField);
 }
});

Of course, I would like something like:

@Override
public void onEvent(Component component, IEvent event) {
if (event.getPayload() instanceof ProcessReadyNotfication) {
==> Update VersionField

target.add(VersionField);
super.onEvent(component, event);
}
}

But I don't have a AjaxRequestTarget there, and obtaining one by
AjaxRequestTarget.get() causes an IllegalStateException (As far as I can
remember).

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Event-or-Notice-when-a-ListView-s-Model-changes-tp4157030p4166278.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: Event or Notice when a ListView's Model changes

2011-12-06 Thread hfriederichs
I'm trying to do this, to send an Event in the DataView's onBeforeRender(), 
but now I encounter another issue. On the receiving side of the Event, in
the onEvent(Component component, IEvent event), I need a
AjaxRequestTarget. Can I create an  AjaxRequestTarget and pass it with the
Event?
I tried this with new AjaxRequestTarget(getPage()), but it doesn't work. 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Event-or-Notice-when-a-ListView-s-Model-changes-tp4157030p4164550.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: Event or Notice when a ListView's Model changes

2011-12-04 Thread hfriederichs
I'm sorry if my writing is confusing. But there isn't a label that outputs
the state, because the list shows /only/ finished processes. 
Maybe the following flow explains what happens:
- A user chooses an application he wants to deploy to a certain stage, let's
say production
- When he has chosen, a label shows the current version of the application
in production
- The user clicks the 'deploybutton', as a result of which a row is inserted
with state 'unfinished'
- Another thread picks up the process and executes a script that deploys the
application
- At the end of this, that other thread updates the state-field to
'finished'
- At the bottom of the panel my listview with finished processes is updated,
and the user will notice that because I added a
AjaxSelfUpdatingTimerBehavior.
- But when the list is refreshed I want the version label that I mentioned
in the beginning to be refreshed also, because there's a new current version

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Event-or-Notice-when-a-ListView-s-Model-changes-tp4157030p4158203.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: Event or Notice when a ListView's Model changes

2011-12-04 Thread hfriederichs
But the List isn't updated by a user's action. There's a decoupling here: the
user's action inserts a row that has a 'state-column' that's initialized
with, let's call it 'unfinished'. The processes are executed asynchronously
by another thread, that, after some minutes, updates the state-column to
'finished'.
My ListView represents a list of finished processes, so you can never know
when the selection on the database changes. So how do I know when an update
has taken place? I need a sort of listener there.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Event-or-Notice-when-a-ListView-s-Model-changes-tp4157030p4158107.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: Event or Notice when a ListView's Model changes

2011-12-04 Thread hfriederichs
Yes, I'm sorry, I wrote /I tried various methods, onChange and the like/ by
which I meant onModelChanged(). But onModelChanged() isn't called when a row
is added. I think that makes sense, because the backing List on itself
hasn't changed.
Furthermore, I experimented by replacing the ListView by a DataView, but no
calling of onModelChanged() there either.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Event-or-Notice-when-a-ListView-s-Model-changes-tp4157030p4157831.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



Event or Notice when a ListView's Model changes

2011-12-04 Thread hfriederichs
Hello,

I have a Wicket ListView, who's Model is based on a select on a
process-database. Users can initiate a (deploy-)process, and when the
process is finished, a row is added in the database, and so also in the
ListView's Model's backing List. When this happens, I want to rerender
another part of the same Panel. That other part has it's own Form. So I need
an event when a row is added. The Wicket Events to send after that I can
figure out for myself, my concern is about reacting to the database inserts.
I tried various methods, onChange and the like, on various components, but
to no avail. 

Please help, I'm using Wicket 1.5.3

Regards,

Hans

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Event-or-Notice-when-a-ListView-s-Model-changes-tp4157030p4157030.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: Apache Wicket is a Flawed Framework

2011-11-18 Thread hfriederichs

heikki wrote:
> 
> - and in my opinion the stuff you need to do to achieve "normal" URLs (no
> ?, no version number, no nothing) is just a pain. *Every* URL, for
> stateless or stateless pages or whatever, should be "normal", otherwise it
> is just not acceptable -- users never want to see those
> complicated-looking URLs under any circumstance
> 
> 

Here I totally agree. I think there are very few developers who understand
this. An URL is a technical entity, and, if they had a choice, the vast
majority of internet-users could very well do without it.
URL's are /not/ user friendly.

It's better now, but in the early days it was very cumbersome to help my >80
father (y'all understand >80, I presume) on the phone: 'No, dad, just type
h-t-t-p-:-/-/.'.

I really think this is a flaw in wicket, caused by a collective blank spot
of it's otherwise very clever developers.

But I really love Wicket, I managed to develop a quite complex application
that's robust and easy to use, and it's only my second web application ever,
the first being a Servlet with html-spawning only...


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Apache-Wicket-is-a-Flawed-Framework-tp4080411p4083524.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



Unchanging url's

2011-11-17 Thread hfriederichs
Hello,

I read many posts on this, tried may suggestions, must be stupid, but I
can't figure it out.
I'm using Wicket 1.5.3, an application with a number of tabbed panels.

My application's url is, lets say http://localhost:9080/context/

When I enter this URL, the browse immediately changes this to
http://localhost:9080/context/?0

I don't want that!!

When I enter userdata and switch some tabs, nothing happens, but when I hit
F5 the URL changes to
http://localhost:9080/context/?9 or another number, depending on my
activity.

I don't want that!!

When I enter passed url's like http://localhost:9080/context/?37 or
http://localhost:9080/context/?154, I
get the prefilled pages that correspond to those url's.

I have no need for that!!

I just want http://localhost:9080/context/ to be addressable from my
favorites, that's all. 

Even CTRL+F5 doesn't give me a clean page, I have to remove the ?xx part
with my mouse.

Please help!

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Unchanging-url-s-tp4080178p4080178.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: Migrating a ResourceStreamRequestTarget to a ResourceStreamRequestHandler (2)

2011-11-16 Thread hfriederichs
Hello,

Yes, I did, realizing that it's a bit of a coarse solution. As it happens,
my application main function is to execute scripts for automated deployment
on a WebSphere platform, so users work with a JEE-application they select
from a wicket Ajax-textfield with application build versions that's
connected with our Nexus repository (that at it's turn is populated with
Maven-builds by Hudson).
So, these users want to download builds, installation manuals, reports, and
the like for inspection and reference. As a result, /any/ download is
dynamically created at runtime, so there is no wish for caching, on the
contrary, and it's not to be expected that it will be.

Nevertheless, I will delve into the
org.apache.wicket.request.resource.AbstractResource.ResourceResponse#setCacheDuration,
because I like fitting solutions, and not over-sized ones: I tend to believe
that that is what you are hinting at in your reply.

I just have to figure out how the setCacheDuration can be applied to the
AbstractResourceStreams that I use.

Many thanks!

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Migrating-a-ResourceStreamRequestTarget-to-a-ResourceStreamRequestHandler-2-tp4019661p4077423.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: Migrating a ResourceStreamRequestTarget to a ResourceStreamRequestHandler (2)

2011-11-12 Thread hfriederichs
I solved the issue by many trial and error sessions. Maybe I can spare
someone else this ordeal.

In Firefox an Chrome it now works as in IE, by adding this statement in the
init() of my WicketApplication:

getResourceSettings().setDefaultCacheDuration(Duration.NONE);

Regards, Hans Friederichs

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Migrating-a-ResourceStreamRequestTarget-to-a-ResourceStreamRequestHandler-2-tp4019661p4034881.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: Migrating a ResourceStreamRequestTarget to a ResourceStreamRequestHandler (2)

2011-11-09 Thread hfriederichs
Made a quick start, but couldn't reproduce the issue, it worked in FireFox...
Be it on a Jetty-server, and I have to cope with WebSphere...

Well, I'll strip my application down to the essentials that I have in the
quick start, and then build up one by one, I guess.

Many thanks, so far!



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Migrating-a-ResourceStreamRequestTarget-to-a-ResourceStreamRequestHandler-2-tp4019661p4020304.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



Migrating a ResourceStreamRequestTarget to a ResourceStreamRequestHandler (2)

2011-11-09 Thread hfriederichs
I managed to pinpoint my issue. I'm starting a new topic in order to exclude
information I
now think isn't relevant anymore.
I don't think it's a caching problem any longer, but that is has to do with
a hanging
thread or something that's not closed properly, that is, when using Firefox
and Chrome. 
In IE8: no problems, works as it did in 1.4.18 with the Wicket
ResourceStreamRequestTarget.
My code again:

Link downloadInstallationmanualButton = new
Link("downloadinstallationmanual", new Model()) {

@Override
public void onClick() {
   if (user didn't supply any data) {
info("Please supply this and that");
return;
}
//create an subclass of AbstractResourceStream called
InstallationManualResourceStream
InstallationManualResourceStream theInstallationManualResourceStream
= new InstallationManualResourceStream();
if (theInstallationManualResourceStream.manualNotfound) {
info("No manual found for your input");
return;
}
ResourceStreamRequestTarget resourceStreamRequestTarget = new
ResourceStreamRequestTarget(
theInstallationManualResourceStream,
theFileName);
RequestCycle.get().setRequestTarget(resourceStreamRequestTarget);
} 

(The underlying InputStream is closed properly, even in Firefox.)
The problem is in the last statement: 
/RequestCycle.get().setRequestTarget(resourceStreamRequestTarget);/
This statement causes something to hang, so that in a new RequestCycle, the
onclick() isn't
fired anymore (and never again). When I omit this statement, the onClick()
fires each time. 

I don't think I'm doing something wrong, certainly not after I discovered
that it works in IE8.

Maybe this is relevant: the underlying InputStream is part of a
ZipInputstream. Bij 'newing' my
InstallationManualResourceStream, the ZipInputStream is read until an
installation manual is found (hence
the /theInstallationManualResourceStream.manualNotfound()/ and it's info
message), 
and then 'handed over' to the Wicket AbstractResourceStream.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Migrating-a-ResourceStreamRequestTarget-to-a-ResourceStreamRequestHandler-2-tp4019661p4019661.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: Migrating a ResourceStreamRequestTarget to a ResourceStreamRequestHandler

2011-11-08 Thread hfriederichs
In adddition: it works fine in IE8!
I'm using firefox 8.0;
Chrome 11.0.696.71: same problem as Firefox...


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Migrating-a-ResourceStreamRequestTarget-to-a-ResourceStreamRequestHandler-tp3998969p4017378.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: Migrating a ResourceStreamRequestTarget to a ResourceStreamRequestHandler

2011-11-08 Thread hfriederichs
I will try these suggestions, but I't is quite frustrating that migrating
such a simple function causes so much problems.
In the meanwhile, I read the improvements in the caching mechanisms of
Wicket 1.5 on 
https://cwiki.apache.org/WICKET/caching-in-wicket-15.html

It says:
/Caching is uniformly disabled now by sending the following HTTP response
headers:/
So I tried:

HttpServletResponse response  =
(HttpServletResponse)getResponse().getContainerResponse();
response.addHeader("Pragma", "no-cache");
response.addHeader("Cache-Control", "no-cache, no-store");
response.addHeader("Expires", "Thu, 01 Jan 1970 00:00:00 GMT");

at various places.

I also put
((WebResponse) getResponse()).disableCaching(); 
in the body of the onClick,

But Firefox is still caching like a madman!!



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Migrating-a-ResourceStreamRequestTarget-to-a-ResourceStreamRequestHandler-tp3998969p4017233.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: Migrating a ResourceStreamRequestTarget to a ResourceStreamRequestHandler

2011-11-07 Thread hfriederichs
Can anyone explain to me why an onClick() is executed only once after two
refreshes and then never again?
What blocks the firing of this event? Maybe that gives me a clue so that I
can figure it out.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Migrating-a-ResourceStreamRequestTarget-to-a-ResourceStreamRequestHandler-tp3998969p4013453.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: Migrating a ResourceStreamRequestTarget to a ResourceStreamRequestHandler

2011-11-07 Thread hfriederichs
I added this to my Page:

@Override
protected void setHeaders(WebResponse response) {
response.setHeader("Pragma", "no-cache");
response.setHeader("Cache-Control", "no-cache, max-age=0,
must-revalidate, no-store"); 
}

It doesn't help.
The onClick is still only executed once after two refreshes. Isn't that an
issue that should be solved first?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Migrating-a-ResourceStreamRequestTarget-to-a-ResourceStreamRequestHandler-tp3998969p4003868.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: Migrating a ResourceStreamRequestTarget to a ResourceStreamRequestHandler

2011-11-07 Thread hfriederichs
Hi Martin,

I forgot to mention: I tried that, but to no avail.
As the onClick isn't executed, the disableCaching isn't either.
Even when the onClick executes after two refreshes, it doesn't after that
single occasion.


Hans

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Migrating-a-ResourceStreamRequestTarget-to-a-ResourceStreamRequestHandler-tp3998969p4001432.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



Migrating a ResourceStreamRequestTarget to a ResourceStreamRequestHandler

2011-11-07 Thread hfriederichs
I'm experiencing strange behaviour in migrating a ResourceStreamRequestTarget
to a ResourceStreamRequestHandler.

It worked fine in Wicket 1.4.x

I have a button for downloading an installation manual. Which manual should
be downloaded
depends on the user's input. In some cases there isn't a manual, and so I
couldn't use a
WebRecource, because I wanted to show an infomessage in that case. The
solution was a Link with 
an onClick. in pseudocode:

Link downloadInstallationmanualButton = new
Link("downloadinstallationmanual", new Model()) {

@Override
public void onClick() {
   if (user didn't supply any data) {
info("Please supply this and that");
return;
}
//create an implementation of IResourcestream called
InstallationManualResourceStream
IResourcestream theInstallationManualResourceStream = new
InstallationManualResourceStream();
if (theInstallationManualResourceStream.manualNotfound) {
info("No manual found for your input");
return;
}
ResourceStreamRequestTarget resourceStreamRequestTarget = new
ResourceStreamRequestTarget(
theInstallationManualResourceStream,
theFileName);
RequestCycle.get().setRequestTarget(resourceStreamRequestTarget);
}

As I mentioned, this worked perfect.
As part of the migration to Wicket 1.5.(2), I replaced the last two
statements by:

ResourceStreamRequestHandler resourceStreamRequestHandler = new  
ResourceStreamRequestHandler(
theInstallationManualResourceStream,
theFileName);
RequestCycle.get().scheduleRequestHandlerAfterCurrent(resourceStreamRequestHandler);
 

When I click on the button after a server restart and opening of a fresh
browser, the onClick isn't
executed. Instead, the browser's (FireFox) save or open popup occurs, with
download-data of the
Session before the server restart, a sort of browser caching?
Only when I have pressed the browser's refresh (F5) twice, the onclick is
executed. 
After that, it never executes again, and so the IResource isn't updated.
Shouldn't the onClick always be executed?

What am I doing wrong? 

Thanks in advance, Hans Friederichs

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Migrating-a-ResourceStreamRequestTarget-to-a-ResourceStreamRequestHandler-tp3998969p3998969.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: MIgration to 1.5.2 seems a disaster

2011-11-05 Thread hfriederichs
I'm sorry, but my initial question was how to debug my migrated application.

No matter what I do - for example I commented vast amounts of code, to
reduce the scope of the problem - nothing works. One click: 

[ERROR] 2011-11-05 20:07:10 org.apache.wicket.request.cycle.RequestCycle:314
- Error during processing error message
java.lang.IllegalStateException: Header was already written to response!

The same stacktrace then occurs between 17 and 22 times.

No clue whatsoever.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/MIgration-to-1-5-2-seems-a-disaster-tp3993637p3994190.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



MIgration to 1.5.2 seems a disaster

2011-11-05 Thread hfriederichs
Hello,

I am trying to migrate from 1.4.18 to 1.5.2. I followed the suggestions on
https://cwiki.apache.org/WICKET/migration-to-wicket-15.html

I have a Wicket application with 6 tabs. After starting the server and a
browser-instance, I get:
[ WARN] 2011-11-05 17:00:26
org.apache.wicket.request.handler.render.WebPageRenderer:162 - The
Buffered response should be handled by BufferedResponseRequestHandler.

Just that.

Then, on every action I try (click something, check a radiobutton),  I get:

[ERROR] 2011-11-05 16:51:51 org.apache.wicket.DefaultExceptionMapper:114
- Unexpected error occurred
java.lang.IllegalStateException: Header was already written to response!
at
org.apache.wicket.protocol.http.HeaderBufferingWebResponse.checkHeader(HeaderBufferingWebResponse.java:64)
at
org.apache.wicket.protocol.http.HeaderBufferingWebResponse.sendRedirect(HeaderBufferingWebResponse.java:112)
at
org.apache.wicket.request.handler.render.WebPageRenderer.redirectTo(WebPageRenderer.java:136)
at
org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:266)

And it keeps spawning these stacktraces...
Furthermore, as might be expected form an 'Unexpected Error', there's no
clue to the origin of this Exception in my application. Using development
mode doesn't add information.

When I don't try to do something on the opening tab, and choose another tab,
I get:

org.apache.wicket.request.handler.ComponentNotFoundException: Could not find
component etcetera

Everything worked perfect with Wicket 1.4.18, and now nothing does.

Please, where do I start?

Many thanks in advance



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/MIgration-to-1-5-2-seems-a-disaster-tp3993637p3993637.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: I just want the entered value of a WIcket DateTimeField...

2011-10-30 Thread hfriederichs
For your convenience, I present only the most essential code. To avoid
misunderstandings, by "popup" I don't mean a self created Popup panel, but
the browser's save or open panel:

import java.io.IOException;
import java.io.InputStream;
import java.util.Date;

import org.apache.wicket.RequestCycle;
import org.apache.wicket.extensions.yui.calendar.DateTimeField;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.link.Link;
import org.apache.wicket.model.Model;
import
org.apache.wicket.request.target.resource.ResourceStreamRequestTarget;
import org.apache.wicket.util.resource.AbstractResourceStream;
import org.apache.wicket.util.resource.IResourceStream;
import org.apache.wicket.util.resource.ResourceStreamNotFoundException;

public class DownloadForm extends Form {   

public DownloadForm(String id) {
super(id);
final DateTimeField fromDateTimePicker = new
DateTimeField("fromDateTime", new Model());
fromDateTimePicker.setOutputMarkupId(true);
fromDateTimePicker.setModelObject(new Date());
add(fromDateTimePicker);

Link  downloadSpreadsheetButton = new
Link("download_spreadsheetbutton", new Model()) {
@Override
public void onClick() {
try {
Date pickedDate = fromDateTimePicker.getModelObject();
final InputStream is = null;
// Follows code that contructs an ExcelFile as an
InputStream, using the pickedDate,
// any other InputStream would do
// 
IResourceStream resourceStream = new
AbstractResourceStream() {
@Override
public void close() throws IOException {
is.close();
}
@Override
public InputStream getInputStream() throws
ResourceStreamNotFoundException {
return is;
}
};
String fileName = "DeployView.xls";
ResourceStreamRequestTarget resourceStreamRequestTarget
= new ResourceStreamRequestTarget(resourceStream, fileName);
   
RequestCycle.get().setRequestTarget(resourceStreamRequestTarget);   
 
} catch (Exception e) {
e.printStackTrace();
}
}
};
downloadSpreadsheetButton.setOutputMarkupId(true);
add(downloadSpreadsheetButton);
}
}


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/I-just-want-the-entered-value-of-a-WIcket-DateTimeField-tp3953280p3953524.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: I just want the entered value of a WIcket DateTimeField...

2011-10-30 Thread hfriederichs
I'm not sure what you mean by the popup being a separate issue, it is what my
usecase is all about, a download of a dynamically created excel-file, for
which I need a fromDate...

Anyways, it surprise me that this is so complex, that there isn't a
straightforward solution. I spend many hours trying to solve this. Thank you
for your advice, but please could you - or anybody else - be more specific
in providing a way to go?

Thanks in advance


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/I-just-want-the-entered-value-of-a-WIcket-DateTimeField-tp3953280p3953400.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: I just want the entered value of a WIcket DateTimeField...

2011-10-30 Thread hfriederichs
Hello Martin,

I tried that, but at the end of the link's onClick there's the code to
download the excel-file:

IResourceStream resourceStream = new AbstractResourceStream() {
(all the necessary stuff here
   
};
String fileName = "DeployView.xls";
ResourceStreamRequestTarget resourceStreamRequestTarget
= new ResourceStreamRequestTarget(resourceStream, fileName);
   
RequestCycle.get().setRequestTarget(resourceStreamRequestTarget);

When I use an (ajax)button, the browser's download-screen (save or open)
doesn't pop up...

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/I-just-want-the-entered-value-of-a-WIcket-DateTimeField-tp3953280p3953326.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



I just want the entered value of a WIcket DateTimeField...

2011-10-30 Thread hfriederichs
Goodday,

I'm working on an Panel that has one function: downloading an excelsheet
that is a view to a database.
IN constructing the excel-sheet, I need a fromdate for a whereclause. There
are other clauses, but for simplicity's sake:
In a Wicket Form I have one DateTimeField fromDateTimePicker, 
and one Link downloadSpreadsheetButton:

fromDateTimePicker = new DateTimeField("vanafdatumtijd", new Model());
fromDateTimePicker.setOutputMarkupId(true);
fromDateTimePicker.setModelObject(new Date());
add(fromDateTimePicker);

downloadSpreadsheetButton = new Link("download_spreadsheetbutton",
new Model()) {
private static final long serialVersionUID =
9179702662683794429L; 
@Override
public void onClick() {
Date picked = fromDateTimePicker.getModelObject();
SimpleDateFormat sdf = new SimpleDateFormat("dd-MM-
HH:mm");
System.out.println(sdf.format(picked));
}
};
downloadSpreadsheetButton.setOutputMarkupId(true);
add(downloadSpreadsheetButton);

No matter what I try, I never get the entered date, always the initial date.

I suspect that the datetime-model isn't updated because there is no
form-submit (?).
Please help. 

Regards, Hans


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/I-just-want-the-entered-value-of-a-WIcket-DateTimeField-tp3953280p3953280.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: How to Handle ResourceStreamNotFoundException

2011-08-19 Thread hfriederichs
Hi Dan,

This is /exactly/ what I was looking for! A simple solution for a simple
problem. I used a (subclass) of a WebResource before for another use case,
and that worked fine, so I got blinded by wanting to reuse the same
solution, at least that is what I think has happened. Whatever.

Thank you very much for your interest and help.

Regards, Hans

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-Handle-ResourceStreamNotFoundException-tp3749331p3754846.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: How to Handle ResourceStreamNotFoundException

2011-08-18 Thread hfriederichs
Firstly, thank you very much for your advice, it helps to a certain extend,
but it also raises new questions.

Unfortunately, there's only one way to determine whether a zip-file contains
an installation manual. Since the zip-file is on another server (where the
nexus repository resides), I have to read it from an InputStream. If there
isn't an installation manual, this reading can take up to 10 seconds.
Initially - when there's not a user entry yet, I can disable the
download-button. But once an application code is entered, I only render meta
information from all the zip-file versions, so the user can pick a desired
version (usually the most recent build). Only when the form is submitted, or
the new download button pressed, the corresponding zip-file is read, and
only then I can determine whether it contains an installation manual. But I
have to enable the button if there is a user entry. That can be a very
disapointing user experience. He/she starts the appication, the button is
disabled. He/she then enters an application code, en presses the now enabled
button, only to find out that there isn't an installation manual...

One question that comes to mind is: is my use case so exceptional? A button
for a resource is pressed, all I want is a nice feedback in case a resource
isn't available...
Personally, I'm not a great fan of disabling or 'invisibling' buttons. I
adhere to the five-year-old-boy-philosophy concerning buttons: you should
/allways/ be able to press them, that's what buttons are for.

Your alternative (using the RestartResponseException) solves the 'white
screen-problem', but there are a few drawbacks:
- The URL of my application after pressing the button changes from
http://localhost:9081/deploy/ to
http://localhost:9081/deploy/?wicket:interface=:3:deploytabs:panel:deployForm:downloadinstallationmanual::IResourceListener::.
I really like Wicket, but this is so annoying. Who wants this? I just want
my original url back - and yes, I read all the posts on mount strategies.
- What's worse, the user has entered an application code that generates
other field values (like a dropdownlists for the versions). When the page is
reloaded after a RestartResponseException, I want to initialize it with the
afore entered data. I managed to do that using PageParameters (or the
Session), but in that case the refresh button will always generate a
'prefilled' page, with the values of the lat entered application code.

Regards, Hans Friederichs

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-Handle-ResourceStreamNotFoundException-tp3749331p3752826.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



How to Handle ResourceStreamNotFoundException

2011-08-17 Thread hfriederichs
Hello to you all,

First of all, I apologise for submitting this post for the second time, but
the first didn't use the correct user group. 

I'm adding a new feature to a Wicket application that manages
JEE-applications (I'm using 1.4.18). For example, it's possible to install
and configure a JEE-appliation on an Application server. If a user chooses
to do so, he enters a unique application code and submits: a zipfile
containing the application, it's documentation and configuration is
downloaded via http from a Nexus repository, and installed with
soap/jmx/mbeans on the application server.

What I have added, is a button that - once clicked - opens an installation
manual in msword that is part of the aforementioned zipfile. The general
idea is: take a zipinputstream, read it until the installation manual is
found, then hand the inputstream over to a wicket IResourceStream that
provides the getInputStream for a Wicket WebResource. I think it's a quite
elegant solution; it's all streaming, no temporary files etcetera.
And it works marvelously, that is, if the zipfile actually containes a
installation manual. My problem is twofold:
When pressing the button without entering an application code (so there is
no inputstream and no installation manual) wicket produces:
org.apache.wicket.WicketRuntimeException: Could not get resource stream
at org.apache.wicket.Resource.init(Resource.java:217)
at org.apache.wicket.Resource.onResourceRequested(Resource.java:117)
at
org.apache.wicket.markup.html.link.ResourceLink.onResourceRequested(ResourceLink.java:108)
... 36 more
That's to be expected, but the user is confronted with a white screen, and I
can't catch this Exception.
Secondly, if there is a zipinputstream, but no installation manual found in
it, all I can do is throw a ResourceStreamNotFoundException (see my code
below), but then again,  I can't catch it, and again there is a white screen
for the user.

What is need, I think, is to override onResourceRequested() in Resource, but
that is a final method... And the onclick happens after
onResourceRequested()...

So what I want, is to handle the ResourceStreamNotFoundException in a
user-friendly way, by showing an info or error message in the wicket
feedbackpanel.

The code:
(So the user enters an application code an presses the new button:)



The button is counterparted by a ResourceLink in a Wicket-Form:

private Link downloadInstallationmanualButton = null;

...

final InstallationManualWebResource installationManualWebResource = new
InstallationManualWebResource(this);
installationManualWebResource.setCacheable(false);
downloadInstallationmanualButton = new
ResourceLink("downloadinstallationmanual",
installationManualWebResource);
downloadInstallationmanualButton.setOutputMarkupId(true);
add(downloadInstallationmanualButton);

The above mentioned
InstallationManualWebResource is a subclass of WebResource, and overrides
the usual methods:

@Override
public IResourceStream getResourceStream() {
   installationManualResourceStream = new
InstallationManualResourceStream(getZipInputStream());
   return installationManualResourceStream;
}

@Override
protected void setHeaders(WebResponse response) {
super.setHeaders(response);
if (installationManualResourceStream.getInstallatieHandleidingName()
!= null)   
response.setAttachmentHeader(installationManualResourceStream.getInstallatieHandleidingName());
}

At it's turn InstallationManualResourceStream implements IResourceStream:

In it's constructor, the zipinputstream is read until an installation manual
is found. If so, a boolean installationManualFound is set to true, and
file-attributes are set (name, size, time). The implementation is
straightforward:

@Override
public void close() throws IOException {
   
zipFile.close();
   
}

@Override
public String getContentType() {
return "application/msword";
}

@Override
public InputStream getInputStream() throws
ResourceStreamNotFoundException {
if (!installationManualFound) throw new
ResourceStreamNotFoundException("No installation manual in zipfile");
return zipFile;
}

@Override
public Locale getLocale() {
return new Locale("nl", "NL");
}

@Override
public long length() {
return size;
}

@Override
public void setLocale(Locale locale) {

}

@Override
public Time lastModifiedTime() {
return Time.milliseconds(time);
}





--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-Handle-ResourceStreamNotFoundException-tp3749331p3749331.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