target.prependJavaScript and JQuery-Animation in IE8

2013-10-28 Thread Hans Lesmeister 2
Hi Everybody,

To enable animation with JQuery on replacing a component with Ajax, we have
followed the construct with the |-Symbol (pipe) in the Javascript that is
added with target.prependJavaScript (see
http://wicketinaction.com/2013/02/replace-components-with-animation = Thank
you, Martin)

This does not seem to work in IE8. I pass a function like this:
prependJavaScript(notify|myfunction(notify, ' + container.getMarkupId() +
'));

The Function looks like this:
function myfunction(notify, id) {
  Wicket.Log.info(this is not reached in IE8);
  JQuery(# + id).slideUp(500, notify);
}

In IE8, myfunction is not called at all. On FF and other Browsers everything
works okay.

Before I create a JIRA-Ticket with a Quick-Start, I wanted to ask here if
the problem is known already (and hopefully there is even a
solution/work-around for it)

Thanks in advance



-
-- 
Regards, 
Hans 

http://cantaa.de 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/target-prependJavaScript-and-JQuery-Animation-in-IE8-tp4662008.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: target.prependJavaScript and JQuery-Animation in IE8

2013-10-28 Thread Hans Lesmeister 2
Hi Martin,


Martin Grigorov-4 wrote
 AFAIK it is not known.
 The code looks pretty simple for IE8 to break.
 Which version of jQuery do you use ?

It is 1.8.3., the one that is shipped with Wicket 6.8.
I will try with Wicket 6.11 which is shipped with jQuery 1.10.1




-
-- 
Regards, 
Hans 

http://cantaa.de 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/target-prependJavaScript-and-JQuery-Animation-in-IE8-tp4662008p4662010.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: target.prependJavaScript and JQuery-Animation in IE8

2013-10-28 Thread Hans Lesmeister 2
Hans Lesmeister 2 wrote
 Same behavior with jQuery 1.10.1. Okay, then I will create a ticket with a
 quick start then.
 Thanks for helping so far.


https://issues.apache.org/jira/browse/WICKET-5397




-
-- 
Regards, 
Hans 

http://cantaa.de 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/target-prependJavaScript-and-JQuery-Animation-in-IE8-tp4662008p4662012.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: target.prependJavaScript and JQuery-Animation in IE8

2013-10-28 Thread Hans Lesmeister 2
Martin Grigorov-4 wrote
 AFAIK it is not known.
 The code looks pretty simple for IE8 to break.
 Which version of jQuery do you use ?


Hans Lesmeister 2 wrote
 It is 1.8.3., the one that is shipped with Wicket 6.8.
 I will try with Wicket 6.11 which is shipped with jQuery 1.10.1

Same behavior with jQuery 1.10.1. Okay, then I will create a ticket with a
quick start then.
Thanks for helping so far.




-
-- 
Regards, 
Hans 

http://cantaa.de 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/target-prependJavaScript-and-JQuery-Animation-in-IE8-tp4662008p4662011.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



Mounted Dynamic Resource: IllegalStateException

2013-08-16 Thread Hans Lesmeister 2
Hi all,

To deliver resources (mainly images) dynamically, we have created a custom
ResourceReference and mounted that to a path:



As long as the image is there and an inputstream can be retrieved from our
service, everything works fine. However if a stream is not available, we
throw an AbortException 404. In that case later on there is this stacktrace
on the console:



This again leads to Wicket trying to deliver the ErrorPage which is not
wanted.
So my question is: what do we do wrong? I guess I should not throw an
AbortException here, but what do I do instead to get a 404 to the browser?

Thank you in advance for any help.




-
-- 
Regards, 
Hans 

http://cantaa.de 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Mounted-Dynamic-Resource-IllegalStateException-tp4660927.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: Mounted Dynamic Resource: IllegalStateException

2013-08-16 Thread Hans Lesmeister 2
Hi Martin,


Martin Grigorov-4 wrote
 Please create a ticket with a quickstart and we will take a look.
 Thanks!

Quickstart attached
https://issues.apache.org/jira/browse/WICKET-5318

Thanks a lot



-
-- 
Regards, 
Hans 

http://cantaa.de 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Mounted-Dynamic-Resource-IllegalStateException-tp4660927p4660930.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



html5-validation and Ajax Form Submit

2013-07-25 Thread Hans Lesmeister 2
Hi everybody,

with HTML5 we now have this nice browser built in validation showing a
bubble and a colored outline if a validation on a field does not pass.

However if I add an AjaxSubmitLink to the form, then the html5-validation is
no longer working. I have tried all kind of tricky things with
pre-conditions and other javascript, calling form.checkValidity() manually,
but I am stuck. Either the bubble doesn't show up or the form is
non-ajax-submitted with a full page reload as the consequence.

Does anybody of you got the html5-validation working with an Ajax-Form?

Any help is highly appreciated




-
-- 
Regards, 
Hans 

http://cantaa.de 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/html5-validation-and-Ajax-Form-Submit-tp4660476.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: html5-validation and Ajax Form Submit

2013-07-25 Thread Hans Lesmeister 2
Hi Martin,

thank you for the feedback.

What I really mean is the nativ html5-validation. If an input-field has the
required-attribute set and the user leaves the field blank, then the
browser places an outline around the field and on submit a little balloon
appears with a text like Please fill in this field. Similar happens on
email- and other field-types.

If I put an AjaxSubmitLink on the submit-button, then a click on that button
is catched by Wicket and the form is serialized and send to the
Wicket-Listener directly, short-cutting the html5-validation.

What I want to achieve is that the normal html5-validation is processed and
if failed, then the click-trigger should be stopped and no submit should
take place.

Like I said, this problem only occurs on Ajax-Forms, not on regular forms
where a normal submit is followed by a page-reload.



Martin Grigorov-4 wrote
 I'm not sure what problem you face but you can take a look at
 http://wicketinaction.com/2013/04/server-and-client-side-validation/ (may
 be broken for few more days until Martijn fix Wordpress). Its code is
 https://github.com/martin-g/blogs/tree/master/wicket-parsley-validation.
 And the improved version at:
 https://github.com/code-troopers/wicket-jsr303-parsley
 
 
 On Thu, Jul 25, 2013 at 10:22 AM, Hans Lesmeister 2 

 hans.lesmeister@

 wrote:
 
 Hi everybody,

 with HTML5 we now have this nice browser built in validation showing a
 bubble and a colored outline if a validation on a field does not pass.

 However if I add an AjaxSubmitLink to the form, then the html5-validation
 is
 no longer working. I have tried all kind of tricky things with
 pre-conditions and other javascript, calling form.checkValidity()
 manually,
 but I am stuck. Either the bubble doesn't show up or the form is
 non-ajax-submitted with a full page reload as the consequence.

 Does anybody of you got the html5-validation working with an Ajax-Form?

 Any help is highly appreciated




 -
 --
 Regards,
 Hans

 http://cantaa.de

 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/html5-validation-and-Ajax-Form-Submit-tp4660476.html
 Sent from the Users forum mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: 

 users-unsubscribe@.apache

 For additional commands, e-mail: 

 users-help@.apache








-
-- 
Regards, 
Hans 

http://cantaa.de 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/html5-validation-and-Ajax-Form-Submit-tp4660476p4660484.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 free guide updated!

2013-05-31 Thread Hans Lesmeister 2
Hi Andrea,

great job. Thank you very much!



-
-- 
Regards, 
Hans 

http://cantaa.de 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-free-guide-updated-tp4659158p4659179.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: Browser Back Button Question

2013-05-31 Thread Hans Lesmeister 2
Hi,


dhongyt wrote
 I'm wondering if its because of hibernate? Its trying to get the query of
 the page to display but the query has been closed?

You have serialized an object which contains properties proxied by
Hibernate. On deserializing, the proxy  tries to resolve with the now closed
embedded Hibernate Session.




-
-- 
Regards, 
Hans 

http://cantaa.de 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Browser-Back-Button-Question-tp4658397p4659180.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: Get the selected item in the DropDownChoice using Scala

2013-05-06 Thread Hans Lesmeister 2
Hi,

you can pass a IModelCustomer to the constructor as well. This model will
receive the currently selected Customer.



-
-- 
Regards, 
Hans 

http://cantaa.de 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Get-the-selected-item-in-the-DropDownChoice-using-Scala-tp4658555p4658559.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: anything like AjaxEditableCheck?

2013-04-04 Thread Hans Lesmeister 2
Hi,

you can put the checkbox in a panel and add the panel to the Column.




-
-- 
Regards, 
Hans 

http://cantaa.de 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/anything-like-AjaxEditableCheck-tp4657730p4657732.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 create a new Session

2013-03-27 Thread Hans Lesmeister 2
you might be looking for Session.replaceSession()



-
-- 
Regards, 
Hans 

http://cantaa.de 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/how-to-create-a-new-Session-tp4657553p4657574.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: Free Wicket guide now available!

2013-03-22 Thread Hans Lesmeister 2
Hi Andrea,

fantastic work! Thank you very much for sharing this.



-
-- 
Regards, 
Hans 

http://cantaa.de 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Free-Wicket-guide-now-available-tp4657407p4657435.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: Sending Data via Javascript and AJAX

2013-03-07 Thread Hans Lesmeister 2
https://cwiki.apache.org/WICKET/calling-wicket-from-javascript.html



-
-- 
Regards, 
Hans 

http://cantaa.de 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Sending-Data-via-Javascript-and-AJAX-tp4657008p4657065.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: Fundamental forms/models issue

2013-02-18 Thread Hans Lesmeister 2
Hi Michael,


Michael Chandler wrote
 To conclude, my issues stemmed from not properly linking from page to
 page.  I did a lot of this:
 
 BookmarkablePageLink
 String
 (link, MyClass.class);
 
 Instead of this:
 
 Link
 String
 (link) {
   public void onClick() {
   setResponsePage(new MyClass());
   }
 }
 
 Oopsy!

Oopsy is not necessary :-)  Depending on the Use Case, both ways are fully
okay.
If you pass MyClass.class then, as stated before, Wicket creates a fresh
page for you. If you pass an instance, then wicket uses that instance. The
2nd approach can for instance be used if you have state (i.e. a model or
something else) to pass to the new page, but not necessarily.




-
-- 
Regards, 
Hans 

http://cantaa.de 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Fundamental-forms-models-issue-tp4656511p4656537.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: Applying jQuery Effects (fadeIn, fadeOut) to Wicket 6 components issue.

2013-01-08 Thread Hans Lesmeister 2

 Hans, like Martin said, this doesn't work, and I already tried it. When
 you
 use those options, it just renders the element tag with no contents.

Yes, I realised that too. I am sorry if my answer caused you effort.


 Thank you very much, guys! When you come to Brazil, the beer is on me :)

 Second round is on me, okay?  :-)





-
-- 
Regards, 
Hans 

http://cantaa.de 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Applying-jQuery-Effects-fadeIn-fadeOut-to-Wicket-6-components-issue-tp4655187p4655207.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: Applying jQuery Effects (fadeIn, fadeOut) to Wicket 6 components issue.

2013-01-07 Thread Hans Lesmeister 2
Martin Grigorov-4 wrote
 I.e. at the server side add style='display:none' to the Panel. Wicket JS
 will replace
 the old with the new one and then your fadeIn effect will show it.

And with:
panel.setVisible(false);
panel.setOutputMarkupPlaceholderTag(true);
the style-attribute is added for you by Wicket




-
-- 
Regards, 
Hans 

http://cantaa.de 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Applying-jQuery-Effects-fadeIn-fadeOut-to-Wicket-6-components-issue-tp4655187p4655189.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: 1.5 Stared blind patterndateconverter

2012-04-16 Thread Hans Lesmeister 2
Hi,

if I run your test, the result is just a space.
If I change the Date-Pattern to HH:mm, the test goes green
May be you are in the wrong time-zone... :-)

-
-- 
Regards, 
Hans 

http://cantaa.de 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/1-5-Stared-blind-patterndateconverter-tp4561565p4561641.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 want update value in second textfield when i type something in second Textfield

2012-03-12 Thread Hans Lesmeister 2
Hi,

showCalculatorModel.setTxtIntrinsicValueCE(txtLtpPriceCE.getInput());
txtIntrinsicValueCE.modelChanged();  // 
target.addComponent(txtIntrinsicValueCE); 


-
-- 
Regards, 
Hans 

http://cantaa.de 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/I-want-update-value-in-second-textfield-when-i-type-something-in-first-Textfield-tp4465876p4466129.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: Package Not Found

2012-03-12 Thread Hans Lesmeister 2
Hi,

seems to me that some of the classes moved to
org.apache.wicket.request.resource

-
-- 
Regards, 
Hans 

http://cantaa.de 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Package-Not-Found-tp4466108p4466328.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 on Google App Engine

2012-01-04 Thread Hans Lesmeister 2
Hi Daniel,


Daniel Watrous-2 wrote
 
 I tried putting in this:
 getResourceSettings().setResourcePollFrequency(Duration.ONE_SECOND);
 

GAE does not allow you to start additional threads and that's what
setResourcePollFrequency(...) does I think

-
-- 
Regards, 
Hans 

http://cantaa.de 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-on-Google-App-Engine-tp4259205p4264458.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 Hans Lesmeister 2
Hi, 


hfriederichs wrote
 
 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.
 

Inside an Ajax-Request you can do AjaxRequestTarget.get() at any time

-
-- 
Regards, 
Hans 

http://cantaa.de 

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

2011-11-29 Thread Hans Lesmeister 2
Hi, 


Thomas Götz wrote
 
 final TextField textField = new TextField(textField, new Model());
 textField.setVisible(false);
 add(textField);
 ...
 

Because textField is initially invisible, Don't forget to
textField.setOutputMarkupPlaceholderTag(true);


-
-- 
Regards, 
Hans 

http://cantaa.de 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Dynamically-choosing-component-to-add-tp3955869p4118782.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: IAjaxIndicatorAware/Busy Indicator Problems

2011-11-10 Thread Hans Lesmeister 2
Hi,

you can add Javascript to the current AjaxRequestTarget in the
onClose-Method of your Modal Window, i.e. like:  

AjaxRequestTarget.get().appendJavaScript(...)


-
-- 
Regards, 
Hans 

http://cantaa.de 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/IAjaxIndicatorAware-Busy-Indicator-Problems-tp4029525p4030568.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: AjaxFormComponentUpdatingBehavior broken after invalid submit

2011-10-27 Thread Hans Lesmeister 2
Hi, 

did you already try a call to form.modelChanged() in onUpdate?

-
-- 
Regards, 
Hans 

http://cantaa.de 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AjaxFormComponentUpdatingBehavior-broken-after-invalid-submit-tp3945964p3946955.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: Jump to specific page of AjaxFallbackDefaultDataTable

2011-10-06 Thread Hans Lesmeister 2
DataTable.setCurrentPage(int)

-
-- 
Regards, 
Hans 

http://cantaa.de 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Jump-to-specific-page-of-AjaxFallbackDefaultDataTable-tp3878357p3878396.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 errors in RequestCycle.onEndRequest

2011-09-26 Thread Hans Lesmeister 2
Hi,

maybe you can override WebRequestCycleProcessor.respond:

but I did not try if that's too late as well


-
-- 
Regards, 
Hans 

http://cantaa.de 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-handle-errors-in-RequestCycle-onEndRequest-tp3824649p3846249.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: Loading items in repeater the facebook/twiiter way

2011-08-31 Thread Hans Lesmeister 2
Hi,

Maybe this http://code.google.com/p/jquery-images-ondemand/
and this http://api.jquery.com/scroll/  help


-
-- 
Regards, 
Hans 

http://cantaa.de 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Loading-items-in-repeater-the-facebook-twiiter-way-tp3780809p3780975.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: Drop

2011-06-21 Thread Hans Lesmeister 2
Hi, 


FeanorsCurse wrote:
 
 Instead of using the getName()-method it's using toString, despite of what
 is set in the property model. As far as I understand, this is because
 getName() returns a String and not a UserAccountEntity itself.
 ...
 Any advice?
 

You can use a IChoiceRenderer and pass that to the DropDownChoice along with
your Model and the List. The renderer is used to get the String to be
displayed.


-
-- 
Regards, 
Hans 

http://cantaa.de 

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

2011-06-21 Thread Hans Lesmeister 2

FeanorsCurse wrote:
 
 However, I still feel like that is an unnecessary step; I don't see any
 reason why the PropertyModel should not be enough on its own.
 

Please correct me if I am wrong: The model passed in tells the dropdown
which object from the list should be the active one shown. If you don't
apply a renderer then some default is used to render the options and that is
obviously toString() on each object in the list. Ergo: The result object
from evaluating the model should be the same type as the objects in the
list.

-
-- 
Regards, 
Hans 

http://cantaa.de 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Drop-tp3613805p3616016.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: fter 1 minute the Pagemap null is still locked by: Thread[[ACTIVE]

2011-04-05 Thread Hans Lesmeister 2
You can take a look at DataTable.onPageChanged()

-
-- 
Regards, 
Hans 

http://cantaa.de 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/fter-1-minute-the-Pagemap-null-is-still-locked-by-Thread-ACTIVE-tp3423610p3428429.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: update label using (Ajax)Link

2011-03-15 Thread Hans Lesmeister 2

Ernesto Reinaldo Barreiro-4 wrote:
 
 final Label vorname = new Label( Vorname, new
 PropertyModel(selectedEintrag, vorname));
 

This option will not work because:


 selectedEintrag = item.getModelObject();
 

The reference selectedEintrag is overwritten.


-
-- 
Regards, 
Hans 

http://cantaa.de 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/update-label-using-Ajax-Link-tp3356575p3356751.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: update label using (Ajax)Link

2011-03-15 Thread Hans Lesmeister 2

Ernesto Reinaldo Barreiro-4 wrote:
 
 Yes you are right... but I think new PropertyModel(this,
 selectedEintrag.vorname) will work I guess.
 

I guess you are right. That will work, but it is not very elegant to put a
reference to the page or panel into the model. He probably should not
overwrite the reference on selectedEintrag or use the readonly model you
suggested.

I think I would put a new Model() into the label and then, instead of
overwriting the variable selectedEintrag, call
label.setModelObject(item.getModelObject().getVorname())


-
-- 
Regards, 
Hans 

http://cantaa.de 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/update-label-using-Ajax-Link-tp3356575p3357001.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: [VOTE] WICKET-3218 - Component#onInitialize is broken for Pages

2011-03-08 Thread Hans Lesmeister 2
+1 for making Page.onInitialize() non-final. Since 1.4.12 we have migrated a
lot of code moving construction of the component hierarchies to
onInitialize. We are really very happy with the way it is now in 1.4. 

+1 for clear documentation/Javadoc explaining proper use of onInitialize.
(Developers who don't want to follow that explanation do also not have to be
protected agains themselves)

-1 for throwing an exception if add(..) is called from within a constructor
(but maybe logging a warning instead?)

I would also not have a problem with an alternative onInitialize()-method
for the Pages.


-
-- 
Regards, 
Hans 

http://cantaa.de 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/VOTE-WICKET-3218-Component-onInitialize-is-broken-for-Pages-tp3341090p3341741.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: Attribute Inheritance or Copying?

2011-03-03 Thread Hans Lesmeister 2


 I've to access the ComponentTag of my Panel but dont know how, except
 iam in onComponentTag. 
 

Yes, in onComponentTag of the surrounding WebmarkupContainer, you can get
and preserve the desired attributes and then remove them.

In onComponentTag of the TextArea you add the previously preserved
attributes.


-
-- 
Regards, 
Hans 

http://cantaa.de 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Attribute-Inheritance-or-Copying-tp3332828p014.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: Integrating jquery scripts with wicket

2011-03-03 Thread Hans Lesmeister 2
Maybe you can find something here: 
http://www.google.de/#q=wicket+jquery+integrationfp=1


-
-- 
Regards, 
Hans 

http://cantaa.de 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Integrating-jquery-scripts-with-wicket-tp3332998p234.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: German umlauts in Wicket-Message Tag

2011-03-02 Thread Hans Lesmeister 2

MattyDE wrote:
 
 But we now realize that its not the umlauts which create problems. its
 the 
 
 We was using  but wicket interprets the first  inside the key-Attribute
 as closing tag. This is a bug right?
 

Hi,

I think it is generally good practice to not use special characters like
Umlauts inside technical aspects.
Why not just  or something similar?


-
-- 
Regards, 
Hans 

http://cantaa.de 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/German-umlauts-in-Wicket-Message-Tag-tp3331297p3331395.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: IHeaderContributor problem - How to render the page css after all css styles from components

2011-03-02 Thread Hans Lesmeister 2

Poko Booth wrote:
 
 Can't you just use !important at page CSS definition to override what
 the component defines as default?
 

!important is not recognized by all browsers (IE6 for instance)


-
-- 
Regards, 
Hans 

http://cantaa.de 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/IHeaderContributor-problem-How-to-render-the-page-css-after-all-css-styles-from-components-tp3331401p3331534.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: IHeaderContributor problem - How to render the page css after all css styles from components

2011-03-02 Thread Hans Lesmeister 2

Ernesto Reinaldo Barreiro-4 wrote:
 
 Is that really a stopper?
 

Well, that depends on the demands of the OP. IE6 is still used in many big
companies (and because IE6 is buggy concerning !important, it can be
(mis)used for nice CSS-hacks)

But what if the !important-directive is already used somewhere and the user
wants to override it? The result will be unpredictable:


file1.css:
  width: 200px; !important;

userfile.css:
  width: 150px; !important;

file2.css
  width: 100px;

What will be the result? And what happens if the order changes?




-
-- 
Regards, 
Hans 

http://cantaa.de 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/IHeaderContributor-problem-How-to-render-the-page-css-after-all-css-styles-from-components-tp3331401p3331677.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 access component values within a dynamic table?

2011-02-22 Thread Hans Lesmeister 2

Not tested, but this is the way it should work (more or less...)


public class MyBean {
  String question;
  String answer;
  // plus Getters and Setters...
}

public class Test extends WebPage {

  public Test() {
add( new TestForm( TestForm ) );
  }

  @SuppressWarnings(serial)
  public final class TestForm extends FormMyBean {

public TestForm( final String id ) {
  super(id);

  final ArrayListMyBean list = new ArrayListMyBean();
  list.add(new MyBean(Frage 1);
  list.add(new MyBean(Frage 2);

  add( new ListViewMyBean( ListFragen, list ) {
 protected void populateItem(ListItemMyBean item) {
   item.add(new Label(Frage, new PropertyModel(item.getModel(),
question));
   item.add(new Input_Panel(Input, new PropertyModel(item.getModel(),
answer)));
 }
  });

  public final void onSubmit() {
for (MyBean bean : list) {
  log.debug(bean);  // See what the user entered
}
  }
}
  }
}




-
-- 

Regards,

Hans


http://www.cantaa.de http://cantaa.de 

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/how-to-access-component-values-within-a-dynamic-table-tp3310939p3318961.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 access component values within a dynamic table?

2011-02-18 Thread Hans Lesmeister 2


hrbaer wrote:
 
 In a fit of despair I tried to replace my ListView component with a
 RepeatingView component to access either my ListFragen or
 Frage/Input - unfortunatelly without success :(
 

If you use a RepeatingView you can add any Component to it (I think) so
erzeugeEingabeFeld(..) could then create the appropriate component.

Alternatively you could create a panel for each possible component and let
erzeugeEingabeFeld(..) return one of those panels (CheckboxPanel,
TextInputPanel, etc). This is an approach we followed ourselves. Initially a
lot of work, I know...



 I'm still wondering why I can't get the RepeatingView/ListView within the
 onSubmit method!? This component is defined the same way as e.g. the
 Textfield Vorname. But once I use getModelObject() within the onSubmit
 method I only see Vorname, Nachname and Email?!
 

Why do you want to have access to that component? You have access to your
katalog.getFragen() don't you? And that is where the entered data should be
landed after the user pressed Submit. That is, if you use your components
with the appropriate Models of course. PropertyModel is still your friend in
my opinion.

Instead of:
String htmlCodeInputfield = erzeugeEingabefeld( q );
you get something like:

FormComponent inputField = erzeugeEingabefeld(wicketId, q);
item.add(inputField);

private FormComponent erzeugeEingabefeld(id, Question q) {
  if (inputFieldNeeded()) {
 return new TextField(id, new PropertyModel(q, input));
  }

  if (checkboxNeede()) {
return new Checkbox(id, new PropertyModel(q, flag));
  }

  ... etc
}


-
-- 

Regards,

Hans


http://www.cantaa.de http://cantaa.de 

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/how-to-access-component-values-within-a-dynamic-table-tp3310939p3312281.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 access component values within a dynamic table?

2011-02-17 Thread Hans Lesmeister 2



 
 String htmlCodeInputfield = erzeugeEingabefeld( q );  
   Label label = new Label( Input, htmlCodeInputfield );
   label.setEscapeModelStrings( false );
   item.add( label );
 
 

Use a textfield instead of plain html. Bind it to a dynamic model like
PropertyModel and the leave the rest to Wicket. In onSubmit the beans in
your Katalog will contain the entered values. Something like:
item.add(new TextItem(Input, new PropertyModel(q, antwort)));



 Apart from that how can I tell the components apart within my onSubmit
 method?
 Because of the fact that all have the same wicket:id (Frage or Input)
 how can I access each of them separate?
 

I think there is no need for that if you use Models the right way. You are
interested in what the user enters aren't you? You don't need to care about
the components and getting/putting data from/to them. That's Wicket's
concern.

In onSubmit, just iterate through your FragenKatalog and you will see that
every instance of Question has the entered answer filled in.

-
--nbsp;

Regards,

Hans


http://www.cantaa.de http://cantaa.de 

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/how-to-access-component-values-within-a-dynamic-table-tp3310939p3311134.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 do I get the selected entity of a table

2011-02-16 Thread Hans Lesmeister 2


hrbaer wrote:
 
 
...
 protected void populateItem( ListItemEntity item ) {
 
 final Entity e = item.getModelObject();
 item.add( new Label( text, e.getName() ) ); e not null?
 item.add( new Link( Details_Link ) {
 
 @Override public void onClick() {
 label.setVisible( true );
 selectedEntity = e; // but e is null How
 is that possible if e not null before?
 selectedEntity = item.getModelObject();
 (though I doubt if this is good practice.
 I prefer to use Models where possible) 
 }

 });
 
 }
});
 
 }
 --- 
 


-
--nbsp;

Regards,

Hans


http://www.cantaa.de http://cantaa.de 

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/how-do-I-get-the-selected-entity-of-a-table-tp3306749p3308481.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 do I get the selected entity of a table

2011-02-15 Thread Hans Lesmeister 2


hrbaer wrote:
 
 I'm trying to get the entity of the choosen row. 
 Can someone provide me how do achieve that? Thanks in advance!
 


protected void populateItem( ListItemEntity item ) {

final Entity entity = item.getModelObject();  // cast 
not needed
item.add( new Label( text, e.getName() ) );
item.add( new Link( Details_Link ) {

@Override public void onClick() {
label.setVisible( true );

// how do I get the selected entity?
  // selectedEntity = ???
entity.doSomethingWithMe(); //
Use it here
}   

});


-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/how-do-I-get-the-selected-entity-of-a-table-tp3306749p3306816.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 do I get the selected entity of a table

2011-02-15 Thread Hans Lesmeister 2

Hi,


James Carman wrote:
 
 For safety, you probably want to get the entity from the item again,
 right?
 

Why would that be safer? You mean in case the item's ModelObject has been
replaced somewhere?

Cheers
Hans

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/how-do-I-get-the-selected-entity-of-a-table-tp3306749p3306995.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 do I get the selected entity of a table

2011-02-15 Thread Hans Lesmeister 2


James Carman wrote:
 
 No, I mean in case the model is a LDM and they would be getting a
 fresh copy of the entity from the database, as opposed to a detached
 one.
 

Thanks James, that's a good hint

-
-- 
Regards,
Hans
http://cantaa.de

Voetbal is heel erg simpel. Het moeilijkste aan voetbal is, simpel te
spelen (J.Cruyff)

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/how-do-I-get-the-selected-entity-of-a-table-tp3306749p3307102.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: cleanup form values and feedback messages

2011-02-09 Thread Hans Lesmeister 2

Hi, 


hrbaer wrote:
 
 
 ...
   try {
 pm.makePersistent( ent );
 modal.show( target );
 target.add(feedback);   === I guess this was missing
   } 
 
 -
 

You need to add the feedback to the target on success as well 

Cheers
Hans

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/cleanup-form-values-and-feedback-messages-tp3275588p3297033.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: setResponsePage weirdness

2011-02-02 Thread Hans Lesmeister 2


syg6 wrote:
 
 ...
 setResponsePage(SecondPage.class) in FirstPage's constructor is called the
 url remains:
 
 http://localhost:8080/myapp/first
 
 when I am actually now on SecondPage? But when I call
 setResponsePage(ThirdPage.class) from SecondPageForm's onSubmit()
 (SecondPage contains SecondPageForm), the url is:
 
 http://localhost:8080/myapp/third
 
 I've tried sticking setRedirect(true) in a few places but that seems to
 mess up my custom session; my custom session is constantly reset, previous
 info stored in the session is wiped out.
 
 I've also tried using setResponsePage(new SecondPage()) but it doesn't
 seem to change the url and SecondPage.html breaks, it's telling me none of
 my form components are present!
 

throw a RestartResponseException or a
RestartResponseAtInterceptPageException (I always forget which is the right
one) instead of setResponsePage

Cheers
Hans

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/setResponsePage-weirdness-tp3248650p3253687.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