How to add tooltips to dropdown choices

2017-09-26 Thread Lorne Malvo
Is there a simple way to insert a "title" HTML attribute into each option of a DropDownChoice, in order to display a different tool tip with each choice? I tried doing it simply by adding HTML in a ChoiceRenderer, but could not get Wicket to not escape the HTML (can't call

Re: "Wicket way" to show a "Are you sure you want to navigate away" page?

2016-04-20 Thread Lorne Malvo
In this case yes, I do have to execute some logic server side anyway... Thanks again. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-way-to-show-a-Are-you-sure-you-want-to-navigate-away-page-tp4674323p4674339.html Sent from the Users forum mailing list

Re: "Wicket way" to show a "Are you sure you want to navigate away" page?

2016-04-20 Thread Lorne Malvo
Ernesto thanks for the help. I made it work by using an AjaxEventBehavior and adding it directly to the page, like so: AjaxEventBehavior event = new AjaxEventBehavior("beforeunload") { @Override protected void onEvent(final AjaxRequestTarget target) { // do stuff here

Re: "Wicket way" to show a "Are you sure you want to navigate away" page?

2016-04-20 Thread Lorne Malvo
Hi Ernesto, thanks - but that didn't quite work. Wicket Ajax Debug tells me "window" is not in the DOM. Any other ideas? Thanks! -- View this message in context:

Re: "Wicket way" to show a "Are you sure you want to navigate away" page?

2016-04-20 Thread Lorne Malvo
Thanks Ernesto. I tried using OnEventHeaderItem but can't quite get it to work. What would I use as a target? Thanks! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-way-to-show-a-Are-you-sure-you-want-to-navigate-away-page-tp4674323p4674326.html Sent from

"Wicket way" to show a "Are you sure you want to navigate away" page?

2016-04-20 Thread Lorne Malvo
Does Wicket have any built in support for showing a "Are you sure you want to navigate away from this page" message when the user navigates away from the page? What would be the simplest way to detect when a user is trying to navigate away from a page, execute some Java code, and then show a "Are

Re: How to refer to a validator message for a textfield with a certain type

2016-02-12 Thread Lorne Malvo
Thanks Martin! So is a validator for, say a textfield with a certain type always referred to as "IConverter" in properties files? So, if I used the properties file next to my example class, say com.MyExample.properties, would my path look like:

How to get rid off Feedback Messages?

2016-02-12 Thread Lorne Malvo
I have a form with a large number of textfields I want to validate for numerical input. However, if multiple fields fail validation, I want to display only a single error message. I'm using an AjaxSubmitLink to submit my form. To avoid displaying multiple error messages when multiple

Re: How to refer to a validator message for a textfield with a certain type

2016-02-12 Thread Lorne Malvo
Thank you! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-refer-to-a-validator-message-for-a-textfield-with-a-certain-type-tp4673555p4673578.html Sent from the Users forum mailing list archive at Nabble.com.

Re: How to get rid off Feedback Messages?

2016-02-12 Thread Lorne Malvo
How would I use that to delete FeedbackMessages if clear() and markRendered() don't work? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-get-rid-off-Feedback-Messages-tp4673577p4673580.html Sent from the Users forum mailing list archive at Nabble.com.

How to refer to a validator message for a textfield with a certain type

2016-02-11 Thread Lorne Malvo
Say I have a TextField like so: TextField amountField = new TextField("someTextField", someModel); amountField.setType(Integer.class); Where can I customize the error message when the user enters a value other than an integer? I generate the id for this text field on the fly, so I can't specify

Re: Getting intermittent ListenerInvocationNotAllowedException with AjaxEventBehavior

2014-07-30 Thread Lorne Malvo
Hmmm I tried to figure out how to do that but I don't get it. I know to override updateAjaxAttributes() but I'm not sure how of the meaning/function of the childSelector filter string. The selector string that filters the descendants doesn't make too much sense, and I can't find any other

Getting intermittent ListenerInvocationNotAllowedException with AjaxEventBehavior

2014-07-29 Thread Lorne Malvo
I'm getting an intermittent ListenerInvocationNotAllowedException when using an AjaxEventBehaviors. (stacktrace below) This is my code: WebMarkupContainer con = new WebMarkupContainer( container ) { @Override protected void onConfigure() {

Re: Problem adding CSS resources in Wicket 6

2014-07-27 Thread Lorne Malvo
Thank you, Sven, very helpful! However, unfortunately, the read and your suggestion didn't solve my problem. I'm upgrading a site from Wicket 4 to Wicket 6, and I thought that the version numbers in the links to the CSS resources where the reason for browsers not finding my CSS resources. But it

Problem adding CSS resources in Wicket 6

2014-07-25 Thread Lorne Malvo
I have a problem adding CSS resources to Wicket pages in Wicket 6. In my page class, I override renderHead() like this: @Override public void renderHead(IHeaderResponse response) { response.render( CssHeaderItem.forReference( new CssResourceReference( MyFantasticPage.class,