StatelessAjaxFallbackLink questions

2018-05-26 Thread trlt
I have a very simple program: list of links which prints a message when the
selected link is clicked. It works fine when I use AjaxLink or
StatelessLink, but I am having issues when I changed it to
StatelessAjaxFallbackLink (from wicketstuff-stateless package).  Instead of
printing that's selected, it prints the list of all the links when the FIRST
link is selected.  It works as expected for other links:

ListView links = new ListView("links", LIST) {

@Override
protected void populateItem(final ListItem item) {
final Label linkLabel = new Label("linkLabel", 
new
Model(item.getDefaultModelObjectAsString()));


StatelessAjaxFallbackLink link = new 
StatelessAjaxFallbackLink("link") {

@Override
public void onClick(AjaxRequestTarget 
target) {
System.out.println("selected: " 
+
linkLabel.getDefaultModelObjectAsString());
}
};
item.add(link.add(linkLabel));
}
};
add(links);



myproject.gz
  

--
Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html

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



Re: jQuery version 3.*

2018-05-26 Thread Maxim Solodovnik
Add this to your Application init()

getJavaScriptLibrarySettings().setJQueryReference(org.apache.wicket.resource.JQueryResourceReference.getV3());

On Sat, May 26, 2018 at 11:01 PM, ShengChe Hsiao  wrote:
> Dear All
>
> How do I assign/force jQuery version in Wicket Project?
>
>
> 
> --->
> To boldly go where no man has gone before.
> 
> --->
> We do this not because it is easy. We do this because it is hard.
> -
> -->
> If I have seen further it is by standing on the shoulders of giants.
> --
> ->
> front...@gmail.com
> ->



-- 
WBR
Maxim aka solomax

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



Re: Just handle java properties files with Apache Wicket

2018-05-26 Thread kyrindorx

Hi,

The goal of the programm is the handling of properties files with excel 
and languages. The programm will create a config property file and 
database files into .locapp in your user home directory.


* scan your project for *.properties files (cmd: f DIR)
* import properties into the database (cmd: ip)
* get excel with a column for each language (cmd: ee DIR)
* (re)import excel file (cmd: ei path-to-file)
* write it back to properties files (cmd: ep DIR)
* ask for integrity between properties files (SRC) vs. excel data (XLS): 
(cmd: ci [LANGUAGE])

* count entries for analysing your differences between languages (cmd: pc)
* find empty entries for all languages or one language with the empty 
flag ("1")
* get single language and optional only empty values (cmd: ee DIR en 1) 
-> en=language; 1=empty strings


- You can export all entries with all languages
- You can export single language with all entries or only with empty values
- You can merge entries from SRC (properties files) or XLS with versions
    Example: "mp XLS" will merge XLS entries with version 1 and version 
2 - the higher version will win.


- write back into properties with "ep DIR". The programm exports the 
last version of XLS entries into the know files (cmd f). If your last 
excel-import(ei) was a fullset or subset of entries, so you can export 
only this and not all known properties.


Greets
Kyrindor


Am 26.05.2018 um 13:43 schrieb Martin Grigorov:

Hi,

 From the project's README it is not very clear to me what your application
does but it reminds me of
https://github.com/pingunaut/wicketmessages-maven-plugin

On Fri, May 25, 2018 at 8:13 PM, kyrindorx  wrote:


Hey all,

I have a idea to handle java properties files in Apache Wicket. We use
this little helper in our projects, too :)
So check it out and test it: https://t.co/7RNgdC6VlD

Bye
Kyrindor

PS: It's open source (MIT License)


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





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



jQuery version 3.*

2018-05-26 Thread ShengChe Hsiao
Dear All

How do I assign/force jQuery version in Wicket Project?



--->
To boldly go where no man has gone before.

--->
We do this not because it is easy. We do this because it is hard.
-
-->
If I have seen further it is by standing on the shoulders of giants.
--
->
front...@gmail.com
->


Re: Just handle java properties files with Apache Wicket

2018-05-26 Thread Martin Grigorov
Hi,

>From the project's README it is not very clear to me what your application
does but it reminds me of
https://github.com/pingunaut/wicketmessages-maven-plugin

On Fri, May 25, 2018 at 8:13 PM, kyrindorx  wrote:

> Hey all,
>
> I have a idea to handle java properties files in Apache Wicket. We use
> this little helper in our projects, too :)
> So check it out and test it: https://t.co/7RNgdC6VlD
>
> Bye
> Kyrindor
>
> PS: It's open source (MIT License)
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: How to use language/locale from url without creating a session?

2018-05-26 Thread Martin Grigorov
Hi,

Here is another solution:
- put the locale in RequestCycle's metadata
- override Session#getLocale() and if Session#isTemporary() then use the
metadata, otherwise use the session's locale

On Fri, May 25, 2018 at 7:20 PM, Bas Gooren  wrote:

> Hi!
>
> We build mainly e-commerce websites on wicket, which means most pages are
> publicly visible and indexable.
> Since our websites are multi-language we have a custom
> CompoundRequestMapper which checks if the url contains a valid locale, and
> updates the session locale accordingly.
>
> This works great! With one small issue we would ideally like to fix: wicket
> binds the session once you call setLocale on it. As a result, every
> (stateless) public url that is requested leads to a session being created,
> and a cookie being sent to the requester.
>
> Since every component (effectively) depends on Session.get().getLocale() to
> get the current locale, we see no other way to handle this cleanly.
>
> Writing this now and having another look at the wicket source code, I
> reckon we could wrap the wicket request and override its getLocale()
> method. I probably hesitated to do so before because wicket expects a
> ServletWebRequest in some places, so the wrapper cannot simply extend the
> base Request class.
> Anyone here that has a good solution for this? Otherwise we have to check
> for implementations and decide on the wrapper based on that, but that’s
> rather ugly code.
>
> Also, I realize that we don’t just want to wrap the request for request
> mapping purposes (in our compound mapper). We need to wrap the request
> earlier, since we need to ensure the actual request passed in to the
> session constructor returns a locale that matches with the url.
>
> Would appreciate any thoughts you have on this.
>
> Thanks!
>
> Met vriendelijke groet,
> Kind regards,
>
> Bas Gooren
>