IRC Archive for channel #xwiki on 26 July 2016

Last modified by Vincent Massol on 2016/07/26 23:54

<mbuschman> has quit
03:04 <mbuschman> has joined #xwiki
03:05 <jonesmeier> has quit
03:07 <jonesmeier> has joined #xwiki
04:09 <woshilapin> has quit
04:17 <woshilapin> has joined #xwiki
06:03 <woshilapin> has quit
06:25 <evalica> has joined #xwiki
07:00 <mflorea> has joined #xwiki
08:14 <acotiuga> has joined #xwiki
08:37 <evalica> has quit
08:44 <mflorea> has quit
08:51 <lkrejci> has joined #xwiki
08:51 <lkrejci> has joined #xwiki
08:55 <tmortagne> has joined #xwiki
09:16 <vmassol1> good morning
09:16 <vmassol1> is now known as <vmassol>
09:21 <Pbas> Hi, about my hashmap sorting problem on velocity, someone know how can I sort my hashmap with case insensitive?
09:21 <Pbas> because with xcontext.put("address", address); I obtain this result {AAAKey=ValueAAA, BBBB=Valuebb, aaaaaMyKey=Valueaaa}   :-(
09:22 <Pbas> (i want to sort by key name my map with velocity)
09:22 <mflorea> has joined #xwiki
09:22 <msmeria> has joined #xwiki
09:23 <Pbas> I'm feeling like an idiot: I didn't found a way to simply sorting a map with velocity
09:23 <lkrejci> has quit
09:24 <lkrejci> has joined #xwiki
09:24 <vmassol> Pbas: hi, it's not related to velocity
09:24 <vmassol> this is just java actually
09:24 <vmassol> well
09:24 <vmassol> actually not fully correct
09:25 <Pbas> with java it seem simple like: final Map<String, ...> map = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);
09:25 <vmassol> you'd need to pass a custom comparator andwe don't offer an api for that from velocity
09:25 <Pbas> ok then
09:25 <Pbas> which way I can use with velocity to sort case insensitive my map?
09:26 <Pbas> I can modify my map
09:26 <vmassol> I don't even know if it's possible
09:26 <vmassol> use groovy :)
09:26 <Pbas> groovy need PR
09:26 <vmassol> but you have it right?
09:27 <vmassol> velocity cannot do anything
09:27 <vmassol> *everything
09:27 <Pbas> ok I can launch my script in a batch
09:27 <vmassol> so if you need more power you'll need to use something else
09:27 <vmassol> (like groovy or write in java and offer a script service)
09:28 <Pbas> with grrovy I can use this piece of code I suppose: map.sort { it.value.toLowerCase() }
09:28 <vmassol> probably
09:29 <Pbas> http://velocity.apache.org/tools/devel/apidocs/org/apache/velocity/tools/generic/SortTool.html diden't propose case insensitive neither
09:31 <Pbas> s/neither/either
09:33 <Pbas> anyway I will inserted an  temporaly piece of {{groovy}} between my velocity code :-/ Thxs for your help
09:33 <Pbas> :-)
09:42 <gdelhumeau> has joined #xwiki
09:44 <lkrejci> has quit
09:45 <lkrejci> has joined #xwiki
10:17 <msmeria1> has joined #xwiki
10:18 <msmeria2> has joined #xwiki
10:20 <msmeria> has quit
10:22 <msmeria2> is now known as <msmeria>
10:22 <msmeria1> has quit
10:29 <evalica> has joined #xwiki
10:29 <Slashman> has joined #xwiki
10:29 <Enygma`> has joined #xwiki
11:13 <Pbas> ok I think I found:  on velocity: #set($map = {"BBB":"trois","AAA":"un","aaBBB":"deux"}), I give my hashmap to groovy with xcontext and under groovy, I use:  NewSortedMap=map.sort { it.key.toLowerCase() };
11:13 <Pbas> (i know I must rewriting all code on grooxy)
11:14 <mbuschman> has quit
11:19 <Pbas> If my page contain groovy code, user need PR right? that it?
11:20 <Pbas> user need PR right to open my page (and launch my code)
11:23 <Pbas> ha no it seem ok. I checked (page recorder need PR only)
11:24 <Pbas> sorry for the noise
11:24 <lkrejci_> has joined #xwiki
12:01 <vmassol> "If my page contain groovy code, user need PR right? that it?"
12:01 <vmassol> no
12:01 <vmassol> the person who saves the page needs PR
12:01 <vmassol> yep
12:02 <Pbas> ok thxs, now I deserve to eat :-)
12:02 <vmassol> bon app!
12:03 <Pbas> k U2
12:03 <Pbas> ty
12:04 <lkrejci_> has quit
12:04 <lkrejci> has quit
12:47 <tmortagne> has quit
12:53 <lkrejci> has joined #xwiki
12:53 <lkrejci> has quit
12:54 <lkrejci_> has joined #xwiki
12:54 <lkrejci_> has joined #xwiki
12:54 <lkrejci_> has quit
12:54 <lkrejci> has quit
12:54 <lkrejci> has joined #xwiki
12:54 <lkrejci> has quit
13:12 <Chris[m]> has quit
13:12 <M-jsimard> has quit
13:12 <blabla2[m]> has quit
13:21 <msmeria1> has joined #xwiki
13:22 <msmeria> has quit
13:38 <tmortagne> has joined #xwiki
13:43 <Chris[m]> has joined #xwiki
14:01 <tmortagne> has quit
14:18 <tmortagne> has joined #xwiki
14:25 <M-jsimard> has joined #xwiki
14:25 <M-cjd> has joined #xwiki
14:25 <M-yflory> has joined #xwiki
14:25 <M-mouhb> has joined #xwiki
14:25 <blabla2[m]> has joined #xwiki
14:26 <M-vmassol> has joined #xwiki
14:53 <lkrejci> has quit
14:53 <lkrejci> has joined #xwiki
15:11 <woshilapin> has joined #xwiki
15:23 <lkrejci> has quit
15:23 <lkrejci> has joined #xwiki
16:43 <lkrejci_> has quit
16:53 <lkrejci> has quit
16:53 <lkrejci> has joined #xwiki
17:02 <evalica> has quit
17:05 <acotiuga> has quit
17:11 <msmeria1> has quit
17:23 <lkrejci> has quit
17:23 <lkrejci> has joined #xwiki
17:52 <mflorea> has quit
17:53 <lkrejci> has quit
17:53 <lkrejci> has joined #xwiki
17:56 <tmortagne> has quit
17:56 <tmortagne1> has joined #xwiki
18:11 <tmortagne1> has quit
18:23 <lkrejci> has quit
18:23 <lkrejci> has joined #xwiki
19:06 <gdelhumeau> has quit
19:13 <Aranjedeath> has joined #xwiki
19:42 <Slashman> has quit
19:47 <cjd> has quit
19:48 <lkrejci-brb> has joined #xwiki
19:49 <lkrejci-brb> has quit
19:50 <lkrejci-brb> has joined #xwiki
19:50 <lkrejci-brb> has quit
19:50 <lkrejci_> has quit
19:50 <lkrejci> has joined #xwiki
19:50 <cjd> has joined #xwiki
20:18 <Enygma`> has quit
20:27 <Raghawendra> has joined #xwiki
20:28 <Raghawendra> #join
20:28 <Raghawendra> has left #xwiki
20:31 <Ragh> has joined #xwiki
21:03 <Ragh> has quit
21:37 <jonesmeier> has quit
21:44 <jonesmeier> has joined #xwiki
22:34 <jonesmeier> has quit
23:27 <jonesmeier> has joined #xwiki
23:31 <vmassol> has quit
23:37 <lkrejci> has quit
23:54 <cjd> has quit
Tags:
   

Get Connected