Re: Wicket localization in stateful pages

2013-11-11 Thread Sven Meier
The back-button brings you back to the previous state of the component tree. If your page is depending on external state (e.g. session or database content) for rendering, it will of course show the most recent data wherever you have told it so (by using a model). Regards Sven On 11/10/2013

Re: Release Cycle for wicket-socket

2013-11-11 Thread Martin Grigorov
Hi, On Sun, Nov 10, 2013 at 4:31 AM, Jan Moxter jan.mox...@innobix.com wrote: Hi Martin, - thank you for pointing me to the version 0.14 I will check out if the problem still exists. - We do use Jetty 9.0.x so the version seems to be appropriate, but thanks for explaining the differences

Re: Wicket localization in stateful pages

2013-11-11 Thread Martin Grigorov
Hi, As Sven explained 2. new Label(contentNoModel, resolveLocalizedContent()); doesn't use dynamic model (a model that will re-calculate its object/value on each request). It initializes the value of the label at construction time and from there on this value doesn't change. See

Re: Handler after jqXhR success et before ajax response proccess

2013-11-11 Thread Martin Grigorov
Hi, On Sat, Nov 9, 2013 at 12:16 AM, Olivier Dutrieux olivier.dutri...@pasteur.fr wrote: Is there a aim to execute processAjaxResponse (javascript method to handled the ajax response by wicket-ajax.js) in IAjaxCallListener's success handler if I set wr ajaxAttribute to false ? Yes, this

Re: Efficient pagination with MongoDB and Wicket

2013-11-11 Thread Martin Grigorov
Hi, You can create MongoDataProvider that will implement #iterator(start, count) but will ignore the passed parameters. You will need additionally to create your own PagingNavigator with custom links which when clicked would do something like: mongoDataProvider.setFirst(someObjectId) and

Table row visibility

2013-11-11 Thread Tron Walseth
Hi, I have a table with legends explaining map (OpenLayers) layers. I want to turn visibility on/off on the entire row based on the visibility of these map layers using JS. I can easily turn on/off the visibility of the legend image itself using JavaScript/JQuery, but I want to toggle

Link

2013-11-11 Thread Christoph.Manig
Hello, there are 4 links at the top of my page. Every link should forward to another page. But the User couldn't see on which page he is. I want to change the color of the links depending on the page which the user has chosen. How can I realize this? I implemented the links like this: Link

Re: Table row visibility

2013-11-11 Thread Martin Grigorov
Hi, What is your question ? I guess how to get the markup id of the row?. I'd suggest you to add a JS event listener on the table that filters for clicks on 'tr' (i.e. event delegation). On Mon, Nov 11, 2013 at 12:17 PM, Tron Walseth t...@telespor.no wrote: Hi, I have a table with legends

Re: Link

2013-11-11 Thread Martin Grigorov
Hi, See org.apache.wicket.markup.html.link.Link#setAutoEnable(true). This will automatically render disabled link for links which link to the current page. On Mon, Nov 11, 2013 at 12:23 PM, christoph.ma...@t-systems.com wrote: Hello, there are 4 links at the top of my page. Every link

Re: Link

2013-11-11 Thread Ernesto Reinaldo Barreiro
Maybe use CSS? Add a class attribute with the name of the page? On Mon, Nov 11, 2013 at 11:23 AM, christoph.ma...@t-systems.com wrote: Hello, there are 4 links at the top of my page. Every link should forward to another page. But the User couldn’t see on which page he is. I want to

AW: Link

2013-11-11 Thread Christoph.Manig
Hello, I was already trying this. But it didn't works. Here is HTML: a wicket:id=faultLinkESB Fehler/a | a wicket:id=protokollierungLinkProtokollierung/a | a wicket:id=userManagementLinkBenutzerverwaltung/a | a wicket:id=changePasswordLinkPasswort auml;ndern/a And here the Java: Link

Re: Handler after jqXhR success et before ajax response proccess

2013-11-11 Thread Olivier Dutrieux
thx for your response Martin, Maybe a handler in the IAjaxCallListener (between jqXHR.success and Ajax response is process) will be very nice feature in the future version of wicket :) Duto - Duto -- View this message in context:

Re: Link

2013-11-11 Thread Martin Grigorov
On Mon, Nov 11, 2013 at 12:41 PM, christoph.ma...@t-systems.com wrote: Hello, I was already trying this. But it didn't works. Here is HTML: a wicket:id=faultLinkESB Fehler/a | a wicket:id=protokollierungLinkProtokollierung/a | a wicket:id=userManagementLinkBenutzerverwaltung/a | a

SV: Table row visibility

2013-11-11 Thread Tron Walseth
Hi again I wanted to turn on/off row visibility, and in doing that, I wanted to set row id on the row. I found out how this should be done, in overriding the newRowItem on the DefaultDataTable class, and adding an AttributeModifier to the rowItem. Sorry for any inconvenience. Yours, Tron

AW: Link

2013-11-11 Thread Christoph.Manig
Can you give an example? Mit freundlichen Grüßen Christoph Manig Systems Engineer T-Systems International GmbH Systems Integration - SC Travel, Transport Logistics Hoyerswerdaer Str. 18 01099 Dresden tel.: +49 (0) 351 / 8152 - 188 fax:+49 (0) 351 / 8152 - 209 email:

Re: Link

2013-11-11 Thread Martin Grigorov
BookmarkablePageLink faultLink = new BookmarkablePageLink(faultLink, Fault.class); faultLink.setAutoEnable(true); On Mon, Nov 11, 2013 at 1:37 PM, christoph.ma...@t-systems.com wrote: Can you give an example? Mit freundlichen Grüßen Christoph Manig Systems Engineer T-Systems

AW: Link

2013-11-11 Thread Christoph.Manig
I mean an example for the CSS Solution Mit freundlichen Grüßen Christoph Manig Systems Engineer T-Systems International GmbH Systems Integration - SC Travel, Transport Logistics Hoyerswerdaer Str. 18 01099 Dresden tel.: +49 (0) 351 / 8152 - 188 fax:+49 (0) 351 / 8152 – 209 email:

Get return value of ajax event in Wicket 6.9.1

2013-11-11 Thread Daniela L
Hi, this is my first question, so i hope I get everything right. I am trying to catch the event of the user closing the browser window in wicket. I followed this example: http://stackoverflow.com/questions/16527463/call-java-component-from-javascript-and-retreive-value and I managed to get the

Re: Get return value of ajax event in Wicket 6.9.1

2013-11-11 Thread Martin Grigorov
Hi, You need to make an Ajax call to the server. On Mon, Nov 11, 2013 at 2:10 PM, Daniela L danigal...@gmail.com wrote: Hi, this is my first question, so i hope I get everything right. I am trying to catch the event of the user closing the browser window in wicket. I followed this

Re: Get return value of ajax event in Wicket 6.9.1

2013-11-11 Thread Daniela L
Hi, as far as I have understood this can only be achieved, if I subclass AbstractDefaultAjaxBehavior like this? public class PageExitWarningBehavior extends AbstractDefaultAjaxBehavior { @Override protected void respond(AjaxRequestTarget target) {

Re: Get return value of ajax event in Wicket 6.9.1

2013-11-11 Thread Daniela L
Hi, I have tryed to change to AbstractDefaultAjaxBehavior like I described below, but respond is never called. What am I doing wrong? Hi, as far as I have understood this can only be achieved, if I subclass AbstractDefaultAjaxBehavior like this? public class PageExitWarningBehavior extends

Re: Get return value of ajax event in Wicket 6.9.1

2013-11-11 Thread Martin Grigorov
Did you do what I suggested you ? On Mon, Nov 11, 2013 at 3:49 PM, Daniela L danigal...@gmail.com wrote: Hi, I have tryed to change to AbstractDefaultAjaxBehavior like I described below, but respond is never called. What am I doing wrong? Hi, as far as I have understood this can only

Re: Link

2013-11-11 Thread Ernesto Reinaldo Barreiro
You want to give a different CSS for links in different pages? public class ClassModifier extends AttributeModifier { /** * @param attribute * @param replaceModel */ public ClassModifier(IModel? replaceModel) { super(class, replaceModel); } /** * @param attribute * @param value */ public

AW: Link

2013-11-11 Thread Christoph.Manig
Ok thanks. I did the same like this: Link faultLink = new Link(faultLink) { @Override public void onClick() { setResponsePage(Fault.class); } @Override protected void onComponentTag(ComponentTag tag) {

Re: Get return value of ajax event in Wicket 6.9.1

2013-11-11 Thread Daniela L
I thought adding respond was the ajax call to the server, am I wrong? I didn't work much with ajax, i am sorry 2013/11/11 Martin Grigorov mgrigo...@apache.org Did you do what I suggested you ? On Mon, Nov 11, 2013 at 3:49 PM, Daniela L danigal...@gmail.com wrote: Hi, I have tryed to

Re: Get return value of ajax event in Wicket 6.9.1

2013-11-11 Thread Martin Grigorov
respond() is the callback method that Wicket will notify. But you need to trigger an Ajax call first. This is done with the Wicket Ajax API: Wicket.Ajax.get(...). Just try with the line I've added in your JS code On Mon, Nov 11, 2013 at 4:04 PM, Daniela L danigal...@gmail.com wrote: I thought

Re: Wicket localization in stateful pages

2013-11-11 Thread meduolis
Hi Martin, so, if I want browser back action to show the same result, I have to choose between components with static models or components with dynamic models only? Because if I use different types I will get different results when backing to older page version? I am really not getting the thing

Re: Get return value of ajax event in Wicket 6.9.1

2013-11-11 Thread Cedric Gatay
AFAIK the browser won't issue a new server call (or will not process the response) once the onunload event has been called so I doubt this will work (using the web inspector of your browser will allow you to check whether or not the call has been done) I second what Martin said, you need to add

Re: Wicket localization in stateful pages

2013-11-11 Thread Martin Grigorov
Hi meduolis, I hope you know what http session is. It doesn't matter how you get to a page (via a normal (forward) link or via back button), when you read an attribute value from the session it will be the same. In your case the dynamic models use the session's locale to decide which i18n

Re: Get return value of ajax event in Wicket 6.9.1

2013-11-11 Thread Martin Grigorov
There is a difference between onunload and onbeforeunload. You can cancel the latter. You can make Ajax call only in onbeforeunload. And it has to be synchronous. On Mon, Nov 11, 2013 at 4:55 PM, Cedric Gatay gata...@gmail.com wrote: AFAIK the browser won't issue a new server call (or will not

Re: Wicket localization in stateful pages

2013-11-11 Thread meduolis
So, back button does not restore locale value in session? Ok, I will be more specific: *action 1.* I click link switchLanguageToEN; (VERSION 1) (both labels (with static and dynamic models) updates to english); *action 2.* I click link switchLanguageToDE; (VERSION 2)(... updates to german);

Re: Wicket localization in stateful pages

2013-11-11 Thread Sven Meier
Is there a way to restore locale for dynamic models when navigating between page versions? Whenever the locale is changed, put it in the session and store it in the page too. Override #getLocale() and return whatever is stored as the page's locale. Sven On 11/11/2013 04:24 PM, meduolis

AW: Link

2013-11-11 Thread Christian Schröter
Hey, For a simple solution just overwrite onComponentTag(). But I think there a already complete components addressing this issue. @Override protected void onComponentTag(ComponentTag tag) { super.onComponentTag(tag); if

Re: Wicket localization in stateful pages

2013-11-11 Thread meduolis
Storing it in page will not work as it will reset each time I call setResponsePage. Storing it in data base will not work also, because locale will became global for all visitors. So I tried to pass it using page parameters. Also, I have updated dynamic label model to LoadableDetachableModel.

[ANNOUNCE] Wicket jQuery UI 6.12.0 is released

2013-11-11 Thread Sebastien
Hi, wicket-jquery-ui 6.12.0 based on Apache Wicket 6.12.0 is released and will shortly be available in Maven Central. The changelog can be found at the wiki page: https://github.com/sebfz1/wicket-jquery-ui/wiki/%5Bchangelog%5D-wicket-jquery-ui-6.12.0 Maven dependency dependency

Re: Get return value of ajax event in Wicket 6.9.1

2013-11-11 Thread Cedric Gatay
I was on my phone and didn't read that well the provided snippet, it should work fine then ;) __ Cedric Gatay (@Cedric_Gatay http://twitter.com/Cedric_Gatay) http://code-troopers.com | http://www.bloggure.info | http://cedric.gatay.fr On Mon, Nov 11, 2013 at 4:05 PM, Martin Grigorov

Re: Struggling with ContextRelativeResource, RenderedDynamicImageResource and SharedResources

2013-11-11 Thread Dirk Forchel
Did anybody try to run my attached quickstart application and can explain why the additional LocaleMapper changes the path? -- View this message in context:

Re: Struggling with ContextRelativeResource, RenderedDynamicImageResource and SharedResources

2013-11-11 Thread Ernesto Reinaldo Barreiro
Did not have time to look at it. I will try today. On Tue, Nov 12, 2013 at 7:44 AM, Dirk Forchel dirk.forc...@exedio.comwrote: Did anybody try to run my attached quickstart application and can explain why the additional LocaleMapper changes the path? -- View this message in context: