IRC Chat : 2012-01-15 - OpenMRS

00:28:12 *** rafa has quit IRC
01:48:07 *** morristic has joined #openmrs
02:47:03 *** mathiaslin has joined #openmrs
03:08:39 *** morristic has joined #openmrs
04:36:34 *** mathiaslin has quit IRC
04:58:29 *** morristic has quit IRC
05:03:48 *** morristic has joined #openmrs
05:05:49 *** morristic has quit IRC
07:15:17 *** morristic has joined #openmrs
08:56:20 *** morristic has quit IRC
09:24:20 *** bryq has joined #openmrs
09:24:20 *** ChanServ sets mode: +v bryq
12:13:50 *** dkayiwa has joined #openmrs
13:39:41 *** mathiaslin has joined #openmrs
13:48:05 *** bryq has quit IRC
14:04:03 *** dkayiwa has left #openmrs
15:37:41 *** mathiasl_ has joined #openmrs
15:38:04 *** mathiaslin has quit IRC
16:19:32 *** bryq has joined #openmrs
16:19:32 *** ChanServ sets mode: +v bryq
16:29:44 *** bryq has quit IRC
16:49:45 *** morristic has joined #openmrs
17:18:21 *** sunbiz has joined #openmrs
17:18:21 *** ChanServ sets mode: +v sunbiz
17:20:25 *** deadpool_ has joined #openmrs
17:24:13 <deadpool_> anyone have any advise on mixing javascript and jstl
17:40:16 *** morristic has quit IRC
17:53:55 *** bwolfe has joined #openmrs
17:53:55 *** ChanServ sets mode: +o bwolfe
17:56:06 *** mathiasl_ has quit IRC
18:11:22 *** bryq has joined #openmrs
18:11:22 *** ChanServ sets mode: +v bryq
18:26:08 *** bwolfe_ has joined #openmrs
18:26:08 *** ChanServ sets mode: +o bwolfe_
18:29:29 *** bwolfe has quit IRC
18:46:54 <deadpool_> bwolfe_: how do you set a jstl list to a javascript variable
18:47:07 <deadpool_> i was able to do it for strings and ints
18:47:20 <deadpool_> the javascript function could not execute the foreach
18:47:27 *** bwolfe_ is now known as bwolfe
18:47:44 <bwolfe> deadpool_, you'll probably have to build it by hand
18:48:04 <bwolfe> doing: var x = ${mylistvar} will probably output whatever the mylistvar.toString() method returns
18:48:17 <bwolfe> so you'll have to loop over mylistvar and add each element to the list
18:48:23 <bwolfe> var x = new Array();
18:49:37 *** bwolfe_ has joined #openmrs
18:49:37 *** ChanServ sets mode: +o bwolfe_
18:49:49 *** bwolfe has quit IRC
18:49:52 *** bwolfe_ is now known as bwolfe
18:50:07 <bwolfe> deadpool_, how much did you see of what I wrote?
18:52:34 <deadpool_> uh i saw most
18:53:11 <bwolfe> deadpool_, but what was the last thing before I was disconnected?
18:53:13 <deadpool_> bwolfe: what if i want to iterate through a list should do i have to send the list length from the controller?
18:53:14 *** dkayiwa has joined #openmrs
18:53:22 <deadpool_> var x= new Array();
18:53:53 <bwolfe> <c:forEachvar="item"items="${mylistvar}"> x.push(${item}); </c:forEach>
18:53:59 <bwolfe> ${item} might need to be in quotes depending on what type of objects are in your list.
18:54:03 <bwolfe> deadpool_, that was the rest
18:54:40 <deadpool_> so bwolfe tried that the javacript function doesn't see the <c:foreach
18:57:02 <deadpool_> so bwolfe originally i tried this
18:57:04 <deadpool_> http://pastebin.com/70yfpxDz
18:57:06 <bwolfe> deadpool_, are you in a .js file?
18:57:13 <deadpool_> no in the jsp page
18:57:31 <deadpool_> so the mon variable and the y variable work
18:57:46 <deadpool_> but not the foreach
18:58:59 <bwolfe> line 16 is missing a dollar sign near in the last date
18:59:59 <bwolfe> define "doesn't work". can you pastebin the page source code?
19:17:40 <deadpool_> bwolfe: sure one sec
19:18:07 <deadpool_> what i mean doesn't work means that it doesn't show up
19:19:56 <deadpool_> so bwolfe this is what shows up http://pastebin.com/2dJv2K16
19:22:39 <bwolfe> deadpool_, are you sure ${cal} has anything in it?
19:22:54 <bwolfe> just do --${cal}-- in the jsp somewhere (outside the for loop)
19:22:55 <deadpool_> yeah it prints out to the term
19:23:02 <deadpool_> ok
19:45:08 *** dkayiwa has quit IRC
19:53:08 *** dkayiwa has joined #openmrs
20:01:24 *** dkayiwa has quit IRC
20:04:03 *** dkayiwa has joined #openmrs
20:23:44 *** rafa has joined #openmrs
20:23:44 *** ChanServ sets mode: +v rafa
20:25:56 *** dkayiwa has quit IRC
20:38:56 *** dkayiwa has joined #openmrs
21:11:13 *** bryq has quit IRC
21:27:20 *** dkayiwa has left #openmrs
22:09:19 *** djazayeri has joined #openmrs
22:09:19 *** ChanServ sets mode: +o djazayeri
22:10:30 *** sunbiz has quit IRC