| [00:03:07] |
*** |
nribeka has quit IRC |
| [00:03:08] |
<jmiranda> |
huntp, |
| [00:03:28] |
<huntp> |
hey - sorry for the lack of response ...... |
| [00:03:37] |
<jmiranda> |
in our web application, we have a servlet filter that gets called at the beginning and end of a request |
| [00:03:41] |
<huntp> |
i'm discussing here with a coleague too |
| [00:03:48] |
<huntp> |
ok ... |
| [00:03:54] |
<jmiranda> |
that filter will handle adding the user context back into the Context |
| [00:04:31] |
<huntp> |
i've seen references to "org.openmrs.web" ... but, that's not part of the standard API right? |
| [00:05:02] |
<jmiranda> |
exactly |
| [00:05:17] |
<jmiranda> |
so you need to maintain the user information in the session |
| [00:06:13] |
<jmiranda> |
and set the UserContext of the Context before each request |
| [00:06:29] |
<jmiranda> |
if that's not possible, then i think you might need to have a single Context object per user |
| [00:06:49] |
<jmiranda> |
(maintain that in the session) |
| [00:07:06] |
<jmiranda> |
which is what openmrs did in the beginning |
| [00:07:26] |
<r0bby> |
jmiranda: how long have you been w/ openmrs? |
| [00:07:39] |
<jmiranda> |
late 2005 |
| [00:07:39] |
* |
r0bby has been lurking here for like a year or 2 |
| [00:08:07] |
<jmiranda> |
what's the interface between CF and java? |
| [00:08:29] |
<jmiranda> |
is that something new? |
| [00:08:53] |
<huntp> |
CF runs directly on the JRE |
| [00:09:07] |
<r0bby> |
s/on the JRE/in the JVM/ |
| [00:09:10] |
<huntp> |
so, I can do something like this to reference the OpenMRS API ... |
| [00:09:13] |
<huntp> |
application.openmrs.obj.context = createobject("java", "org.openmrs.api.context.Context"); |
| [00:09:37] |
<r0bby> |
http://papernapkin.org/pastebin/view/1867/ |
| [00:09:39] |
<r0bby> |
ick |
| [00:10:17] |
<jmiranda> |
huntp, that might not do what you want it to though |
| [00:11:39] |
<jmiranda> |
in our web application, the Context is instantiated by Spring (web framework) |
| [00:11:54] |
<huntp> |
my subsequent calls are as follows: |
| [00:12:01] |
<huntp> |
application.openmrs.obj.context.startup(); |
| [00:12:07] |
<huntp> |
application.openmrs.obj.context.authenticate('admin','test'); |
| [00:12:17] |
<r0bby> |
jmiranda: Spring isn't exactly a web framework :P |
| [00:12:31] |
<huntp> |
and then - i can do something like this: |
| [00:12:32] |
<huntp> |
application.openmrs.obj.context.getPatientService(); |
| [00:12:33] |
<jmiranda> |
ahhh, nevermind ... ben's got that bootstrap stuff in there so he can restart the app when modules are loaded |
| [00:12:33] |
<r0bby> |
it's an IoC/DI framework w/ about a zillion other projects under the spring name :P |
| [00:12:46] |
<jmiranda> |
right right |
| [00:13:04] |
<r0bby> |
:P |
| [00:13:30] |
<r0bby> |
god groovyConsole is an invaluable tool for rapidly testing code |
| [00:13:36] |
<jmiranda> |
r0bby, thanks for the correction :) |
| [00:13:40] |
<jmiranda> |
huntp, got it |
| [00:13:57] |
<r0bby> |
it was a small error but an error nonetheless |
| [00:14:04] |
<r0bby> |
we *DO* use spring mvc |
| [00:14:28] |
<jmiranda> |
that's what i was referring to, but you are right it's more about the dependency injection than mvc |
| [00:14:35] |
<r0bby> |
which is probably one of the hurdles we face w/ integrating grails :S |
| [00:14:45] |
<jmiranda> |
since the mvc side is kind of crappy compared to other frameworks |
| [00:14:58] |
<jmiranda> |
huntp, so you make a call to the patient service .. |
| [00:15:05] |
<r0bby> |
spring mvc doesn't do the DI, spring's ioc/di container does |
| [00:15:26] |
<jmiranda> |
nevermind |
| [00:15:30] |
<r0bby> |
what little i understand about that thing that looks like black magic :) |
| [00:15:38] |
<r0bby> |
I think Rod Johnson is a witch |
| [00:15:48] |
<r0bby> |
oh kickass |
| [00:16:00] |
<r0bby> |
if i declare one variable -- i don't need a return statement :D |
| [00:16:11] |
<r0bby> |
ie 'ta' or whatever :D |
| [00:16:15] |
* |
r0bby humps groovy |
| [00:16:25] |
<r0bby> |
jmiranda: look into groovy and join the cult |
| [00:16:35] |
<jmiranda> |
can you stick a java object in a cold fusion managed http session? |
| [00:16:35] |
<r0bby> |
drink the kool-aid it won't kill you |
| [00:16:48] |
<huntp> |
jmiranda: yes you can |
| [00:17:18] |
<jmiranda> |
so you can create an OpenMRS UserContext object on a user's first request |
| [00:18:04] |
<huntp> |
yes, exactly what i want to do - but not sure how ... |
| [00:18:09] |
<jmiranda> |
add that to the session |
| [00:18:31] |
<jmiranda> |
then call Context.setUserContext(userContext) |
| [00:19:43] |
<jmiranda> |
when the thread is done processing that request, you need to clear the UserContext |
| [00:19:58] |
<jmiranda> |
and add it back to the session |
| [00:20:22] |
<jmiranda> |
when the second request comes in, you get the UserContext from the session and follow the same process |
| [00:20:25] |
<jmiranda> |
here's the tricky part |
| [00:20:35] |
<jmiranda> |
does cold fusion have anything like a servlet filter |
| [00:20:49] |
<jmiranda> |
something that can be invoked by the container before/after a request |
| [00:21:18] |
<jmiranda> |
... before/after a request is processed |
| [00:21:39] |
<r0bby> |
br />/me dances |
| [00:21:40] |
<r0bby> |
er |
| [00:22:05] |
<huntp> |
yes - we have 2 files with reserved filenames available for that sort of thing .... "onrequeststart.cfm" and "onrequestend.cfm" |
| [00:22:19] |
<jmiranda> |
ok |
| [00:23:09] |
<jmiranda> |
here's the logic again (you can check the OpenmrsFilter for more details) |
| [00:23:36] |
<jmiranda> |
1. Request comes in from browser |
| [00:23:46] |
<jmiranda> |
2. OpenmrsFilter handles request |
| [00:23:52] |
<jmiranda> |
3. Checks for UserContext in session |
| [00:24:13] |
<jmiranda> |
4. UserContext does not exist for this user |
| [00:24:31] |
<jmiranda> |
5. Create new UserContext and add it to session |
| [00:24:49] |
<jmiranda> |
6. Context.setUserContext() |
| [00:25:38] |
<jmiranda> |
7. OpenmrsFilter delegates request to main servlet |
| [00:26:05] |
<jmiranda> |
8. Servlet handles request (in our case it delegates to a Controller which will call the appropriate service) |
| [00:26:25] |
<jmiranda> |
9. OpenmrsFilter catches the request/response on the way out |
| [00:27:05] |
<jmiranda> |
10. OpenmrsFilter calls Context.clearUserContext() so we don't leave the user on the thread that just processed this request |
| [00:27:31] |
<jmiranda> |
huntp, does that make sense? |
| [00:28:51] |
<huntp> |
yes, it does .... so ... the setUserContext() method has an argument of type "UserContext" .... do i need to do a getUserContext() first, and then pass the result of that to setUserContext() ?? |
| [00:30:35] |
<jmiranda> |
you need to create a new UserContext yourself |
| [00:31:00] |
<jmiranda> |
(on the first request from a user) |
| [00:32:52] |
<jmiranda> |
a call to Context.authenticate() will populate the UserContext object |
| [00:33:28] |
<jmiranda> |
so you'll need to handle whether the user is logged into your app |
| [00:33:42] |
<jmiranda> |
if not, then you forward them to login screen |
| [00:34:03] |
<jmiranda> |
(and because you've set up the before/after filter) |
| [00:34:24] |
<jmiranda> |
the Context.UserContext variable should be populated with the object in that user's session |
| [00:34:55] |
<jmiranda> |
the user then posts their username/password which you handle with a login controller |
| [00:35:10] |
<jmiranda> |
call Context.authenticate(username, password) |
| [00:35:57] |
<jmiranda> |
and that UserContext object in Context now contains the current user |
| [00:38:08] |
<jmiranda> |
at the end of each request (in onrequestend.cfm) you might need to repopulate the session with the object returned by Context.getUserContext() |
| [00:39:07] |
<jmiranda> |
(do that before you call Context.clearUserContext()) |
| [00:39:35] |
<huntp> |
ok, this is all really helping me ... just flicking between windows atm - trying to get this going ... |
| [00:39:56] |
* |
r0bby actually provides access to the userservice :) |
| [00:40:04] |
<r0bby> |
in the groovyforms module :) |
| [00:42:59] |
<jmiranda> |
huntp, cool |
| [00:43:45] |
<jmiranda> |
and when r0bby is done with groovyforms you should look into cf-groovy integration |
| [00:44:08] |
<jmiranda> |
or hopefully we'll have a web services framework available not long after that |
| [00:44:17] |
<r0bby> |
jmiranda: njero(sp?) wants to clone it |
| [00:44:27] |
<r0bby> |
I've offered my assistance |
| [00:44:32] |
<r0bby> |
I still need to blog |
| [00:45:00] |
<jmiranda> |
r0bby, clone it as in port it to ruby? |
| [00:45:08] |
<r0bby> |
I spent the evening scrubbing a bathroom (no joke; brother got a new house and the whole family (his inlaws and all) |
| [00:45:12] |
<r0bby> |
yup |
| [00:45:28] |
<jmiranda> |
r0bby, that sounds ... fun-ish |
| [00:45:42] |
<r0bby> |
jmiranda: oh yeh |
| [00:45:49] |
<r0bby> |
so fun |
| [00:46:10] |
<jmiranda> |
huntp, keep working on that and i'll check in tomorrow |
| [00:46:19] |
<r0bby> |
his toilet doesn't flush you have to stick your hand in the tank and pull the stopper up manually |
| [00:46:23] |
<jmiranda> |
r0bby, keep on ... keeping on |
| [00:46:30] |
<r0bby> |
yeh |
| [00:46:34] |
<r0bby> |
this weekend is gonna be... fun |
| [00:46:50] |
<r0bby> |
between wqorking nights coding and helping him move in |
| [00:47:12] |
<jmiranda> |
r0bby, have some real fun |
| [00:47:34] |
<r0bby> |
damn it i missed the call *AGAIN* |
| [00:47:36] |
<r0bby> |
oh wait no id idnt |
| [00:47:43] |
<jmiranda> |
what call? |
| [00:47:47] |
<r0bby> |
dev call :p |
| [00:47:53] |
* |
r0bby wants to listen in |
| [00:47:57] |
<r0bby> |
I missed Tor's presentation |
| [00:48:06] |
<r0bby> |
I find his project extremely interesting |
| [00:48:37] |
<jmiranda> |
oh you mean from last week |
| [00:48:53] |
<r0bby> |
yes |
| [00:49:06] |
<r0bby> |
this week if i can drag myself out of bed i'll jump in |
| [00:49:41] |
<jmiranda> |
r0bby, jump on tomorrow ... if you need to be hosted just skype me and i'll add you to my "conference call" into the indiana conference call number |
| [00:50:25] |
<r0bby> |
same code |
| [00:50:32] |
<r0bby> |
as last time? |
| [00:50:37] |
<r0bby> |
I'm not gonna talk just listen in |
| [00:50:45] |
<jmiranda> |
yes, same number same code |
| [00:51:03] |
<r0bby> |
okies |
| [00:51:23] |
<jmiranda> |
and yeah, it's usually a listening affair |
| [00:51:25] |
* |
r0bby growls |
| [00:51:48] |
<jmiranda> |
but don't worry about asking questions |
| [00:51:49] |
<r0bby> |
I'm all for groovy's dynamic typing and all -- but sometimes it's annoying |
| [00:52:05] |
<r0bby> |
can I act like a misfit? |
| [00:52:10] |
<r0bby> |
Like i do on IRC!?!?! |
| [00:52:26] |
<jmiranda> |
like danzig? |
| [00:53:06] |
<r0bby> |
? |
| [00:53:07] |
* |
jmiranda prays that someone knows what he's talking about |
| [00:53:12] |
<r0bby> |
I don't :< |
| [00:53:19] |
<r0bby> |
I've only been active since soc :P |
| [00:53:28] |
<r0bby> |
and paul/burke pushed for mew to apply for soc |
| [00:53:31] |
<r0bby> |
im glad i did |
| [00:53:36] |
<jmiranda> |
the misfits were a punk band from the 80's |
| [00:53:57] |
<jmiranda> |
who are, unfortunately, probably still around ... sans their lead singer, danzig |
| [00:54:05] |
<r0bby> |
I've learned to have a deep deep appreciation for the Grails team |
| [00:54:11] |
<jmiranda> |
:_ |
| [00:54:13] |
<jmiranda> |
:) |
| [00:54:17] |
<jmiranda> |
alright, well i'm off |
| [00:54:23] |
<jmiranda> |
have a great night/day everyone |
| [00:54:26] |
<r0bby> |
yeh yeh |
| [00:54:31] |
<jmiranda> |
hugs |
| [00:54:32] |
<r0bby> |
I have a bit of work i wanna get done |
| [00:54:44] |
<r0bby> |
get my cleaned up servlet code in working shape |
| [01:12:01] |
*** |
upul has quit IRC |
| [01:19:01] |
*** |
upul has joined #openmrs |
| [01:50:51] |
*** |
yanokwa has joined #openmrs |
| [01:50:52] |
*** |
ChanServ sets mode: +v yanokwa |
| [01:51:02] |
<yanokwa> |
of course r0bby would be here. |
| [01:51:06] |
<yanokwa> |
dont you have a life!? |
| [02:05:25] |
<r0bby> |
yanokwa: I idle |
| [02:05:32] |
<r0bby> |
and no :P |
| [02:05:36] |
<r0bby> |
mmm |
| [02:05:56] |
<r0bby> |
elvis operator++ |
| [02:05:56] |
<r0bby> |
${value ?: "foo"} :D |
| [02:07:37] |
*** |
njero has joined #openmrs |
| [02:07:43] |
*** |
ChanServ sets mode: +v njero |
| [02:13:18] |
*** |
yanokwa has quit IRC |
| [02:17:34] |
*** |
[mharrison] has quit IRC |
| [02:17:34] |
*** |
huntp has quit IRC |
| [02:17:34] |
*** |
Phantal- has quit IRC |
| [02:17:49] |
*** |
Phantal- has joined #openmrs |
| [02:18:11] |
*** |
[mharrison] has joined #openmrs |
| [02:18:11] |
*** |
huntp has joined #openmrs |
| [02:18:33] |
*** |
[mharrison] has quit IRC |
| [02:18:52] |
*** |
[mharrison] has joined #openmrs |
| [02:27:00] |
*** |
yanokwa has joined #openmrs |
| [02:27:00] |
*** |
ChanServ sets mode: +v yanokwa |
| [02:27:06] |
*** |
yanokwa has quit IRC |
| [03:17:07] |
*** |
sioraiocht has quit IRC |
| [03:31:20] |
*** |
jmiranda_ has joined #openmrs |
| [03:31:21] |
*** |
jmiranda has quit IRC |
| [06:17:22] |
*** |
_jmiranda_ has joined #openmrs |
| [06:22:13] |
*** |
upul has quit IRC |
| [06:35:18] |
*** |
jmiranda_ has quit IRC |
| [06:50:37] |
*** |
bwolfe has joined #openmrs |
| [06:50:37] |
*** |
ChanServ sets mode: +o bwolfe |
| [06:55:35] |
*** |
huntp has quit IRC |
| [06:57:36] |
*** |
huntp has joined #openmrs |
| [07:01:23] |
*** |
bmckown has joined #openmrs |
| [07:01:23] |
*** |
ChanServ sets mode: +o bmckown |
| [08:06:46] |
* |
njero does lots with prescriptions and drugs... goes crazy |
| [08:43:18] |
*** |
jbrown has joined #openmrs |
| [09:00:08] |
<OpenMRSBot> |
Recent updates in the world of openmrs: OpenMRS Tickets: Ticket #937 (task created): Upgrade RestrictByRole Module to 1.3 <http://dev.openmrs.org/ticket/937> |
| [09:12:15] |
*** |
bwolfe_ has joined #openmrs |
| [09:12:15] |
*** |
ChanServ sets mode: +o bwolfe_ |
| [09:12:26] |
*** |
bmckown has quit IRC |
| [09:12:27] |
*** |
bmckown_ has joined #openmrs |
| [09:12:38] |
* |
r0bby just woke up |
| [09:13:30] |
<bmckown_> |
good morning r0bby |
| [09:13:54] |
*** |
bmckown_ is now known as bmckown |
| [09:14:05] |
*** |
ChanServ sets mode: +o bmckown |
| [09:14:14] |
<r0bby> |
wait wait another rob |
| [09:14:15] |
*** |
bwolfe has quit IRC |
| [09:14:21] |
<r0bby> |
im confused |
| [09:17:36] |
<r0bby> |
i wake up to hear intern reports |
| [09:17:48] |
<r0bby> |
and nobody shows |
| [09:23:31] |
*** |
njero has left #openmrs |
| [09:24:00] |
*** |
sgrannis has joined #openmrs |
| [09:25:47] |
*** |
atomicturtle has quit IRC |
| [09:30:14] |
<OpenMRSBot> |
Recent updates in the world of openmrs: OpenMRS Forum: Re: Problem with RemoteFormEntry Module Implementation <http://forum.openmrs.org/viewtopic.php?f=9&t=391#p1315> || OpenMRS Forum: Re: Problem with RemoteFormEntry Module Implementation <http://forum.openmrs.org/viewtopic.php?f=9&t=391#p1314> || OpenMRS Forum: Re: Problem with RemoteFormEntry Module Implementation <http://forum.openmrs.org/viewtopic.php?f=9&t=391#p1313> || OpenMRS Forum: Re: Problem with RemoteFormEntry Module Implementation <http://forum.openmrs.org/viewtopic.php?f=9&t=391#p1312> |
| [09:33:02] |
*** |
nribeka has joined #openmrs |
| [09:48:08] |
*** |
_jmiranda_ is now known as jmiranda |
| [09:48:17] |
*** |
ChanServ sets mode: +o jmiranda |
| [09:49:42] |
*** |
upul has joined #openmrs |
| [09:51:18] |
*** |
sgrannis_ has joined #openmrs |
| [09:51:39] |
*** |
sgrannis_ has quit IRC |
| [10:00:29] |
*** |
sgrannis has quit IRC |
| [10:02:20] |
*** |
atomicturtle has joined #openmrs |
| [10:08:45] |
*** |
TorLye_ has joined #openmrs |
| [10:09:07] |
<r0bby> |
i woke up this week \o/ |
| [10:09:56] |
*** |
pombreda has quit IRC |
| [10:17:37] |
*** |
upul has quit IRC |
| [10:27:03] |
*** |
TorLye has quit IRC |
| [10:32:23] |
<r0bby> |
feh |
| [10:57:20] |
<nribeka> |
woke up really late :( |
| [11:01:15] |
<jmiranda> |
nribeka, it doesn't help when you go to bed at 2am :) |
| [11:02:07] |
<nribeka> |
jmiranda, true :( |
| [11:04:32] |
*** |
upul has joined #openmrs |
| [11:16:19] |
*** |
pombreda has joined #openmrs |
| [11:16:19] |
*** |
ChanServ sets mode: +v pombreda |
| [11:17:34] |
*** |
upul has quit IRC |
| [11:18:42] |
*** |
sprasanna has joined #openmrs |
| [11:20:24] |
<r0bby> |
jmiranda: wuss |
| [11:20:28] |
<r0bby> |
I went to bed @ 430 |
| [11:20:34] |
<r0bby> |
and came onto the call groggy |
| [11:20:49] |
*** |
bmckown has quit IRC |
| [11:21:00] |
*** |
bwolfe_ has quit IRC |
| [11:21:00] |
<r0bby> |
meh |
| [11:21:07] |
<r0bby> |
you wuss! :) |
| [11:21:15] |
<jmiranda> |
r0bby, wow |
| [11:21:41] |
<r0bby> |
that's the way the cookie crumbles |
| [11:21:51] |
<r0bby> |
and the way I kill chickens too |
| [11:21:59] |
*** |
bmckown has joined #openmrs |
| [11:21:59] |
*** |
ChanServ sets mode: +o bmckown |
| [11:22:04] |
<r0bby> |
hey bmckown |
| [11:22:08] |
<r0bby> |
welcome to crazy-ville |
| [11:22:11] |
<r0bby> |
I'm the mayor |
| [11:22:13] |
<r0bby> |
:> |
| [11:22:19] |
* |
r0bby runs around |
| [11:23:27] |
*** |
bwolfe_ has joined #openmrs |
| [11:23:27] |
*** |
ChanServ sets mode: +o bwolfe_ |
| [11:23:46] |
<r0bby> |
bwolfe_: o/ |
| [11:24:25] |
<jmiranda> |
huntp, any luck? |
| [11:25:06] |
* |
r0bby throws his shoe at huntp |
| [11:25:07] |
<r0bby> |
wake up |
| [11:25:18] |
<r0bby> |
and gimme my shoe back please? |
| [11:26:20] |
<r0bby> |
am I the only student w/ a mentor who's AWOL 90% of the time? |
| [11:26:36] |
<r0bby> |
(w/ openmrs) |
| [11:27:29] |
*** |
pombreda has quit IRC |
| [11:32:50] |
<OpenMRSBot> |
Recent updates in the world of openmrs: OpenMRS Tickets: Ticket #938 (defect created): Cannot add new person in person relationship search widget. <http://dev.openmrs.org/ticket/938> |
| [12:08:59] |
<r0bby> |
bwolfe_: ping |
| [12:09:07] |
<r0bby> |
this is a JSP question more than a groovy |
| [12:09:20] |
<r0bby> |
did you see my email I wrote? |
| [12:14:38] |
*** |
jbrown has left #openmrs |
| [12:17:58] |
<r0bby> |
http://eugeneciurana.com/pastebin/pastebin.php?show=30509 |
| [12:17:59] |
<OpenMRSBot> |
<http://ln-s.net/2525> (at eugeneciurana.com) |
| [12:18:02] |
* |
r0bby can't contain himself |
| [12:28:29] |
*** |
sprasanna has quit IRC |
| [12:29:18] |
*** |
sprasanna has joined #openmrs |
| [12:29:41] |
*** |
sprasanna has left #openmrs |
| [12:47:38] |
<bwolfe_> |
r0bby: why are you setting $concept to $name ? that probably is doing a $concept.toString(). why not just do <openmrs_tag:conceptAnswerField formFIeldName=\"$name\" concept=$concept /> ? |
| [12:48:34] |
<r0bby> |
bwolfe_: because then toString() gets called. |
| [12:48:43] |
<r0bby> |
this a String |
| [12:48:54] |
<r0bby> |
$concept is parsed out. |
| [12:49:03] |
<r0bby> |
I got it |
| [12:49:11] |
<r0bby> |
this accomplishes what I want :) |
| [12:49:39] |
<r0bby> |
this actually the only place aside from the dateField |
| [12:49:53] |
<r0bby> |
that relies on an instance other than an int or String |
| [12:50:05] |
<r0bby> |
Integer rather (need to be specific) |
| [12:50:35] |
<r0bby> |
bwolfe_: and no $name is passed in as the variable's name |
| [12:50:49] |
<r0bby> |
i store a lot of metadata |
| [12:51:15] |
<r0bby> |
well ~3 or 4 pieces |
| [12:52:12] |
<bwolfe_> |
r0bby: odd. ConceptAnswerFieldTag takes in a concept _object_ in the concept argument...not a string. is that working for you ? |
| [12:52:31] |
<r0bby> |
no |
| [12:52:38] |
<r0bby> |
i'm trying to figure out how to best do it |
| [12:53:00] |
<r0bby> |
this is a problem i've been facing for weeks and it's a showstopper |
| [12:53:09] |
<r0bby> |
I need to return the template |
| [12:53:34] |
<r0bby> |
and Concept is an object :P |
| [12:53:40] |
<r0bby> |
you wanna see where I pass it all in |
| [12:53:42] |
<r0bby> |
hold |
| [12:54:46] |
<r0bby> |
http://papernapkin.org/pastebin/view/1879/ |
| [12:55:27] |
* |
r0bby checks |
| [12:56:13] |
<bwolfe_> |
r0bby: why are you passing around c.name? why not just pass around c ? |
| [12:56:38] |
<r0bby> |
because hrm |
| [12:56:50] |
<r0bby> |
this is what burke gets for being awol i have no f'en clue what im doing |
| [12:57:03] |
<bwolfe_> |
burke is not the only one you can ask |
| [12:57:11] |
<r0bby> |
im passing the VARIABLES name |
| [12:57:14] |
<r0bby> |
pay closer attention |
| [12:57:16] |
<r0bby> |
m.name |
| [12:57:20] |
<r0bby> |
m being the field. |
| [12:57:22] |
<bwolfe_> |
there are a lot of people in here...there are a lot of people on the dev list. you just need to parse out your question from the groovyforms stuff and ask just that :-) |
| [12:57:53] |
<r0bby> |
I'm passing the variable's name |
| [12:58:10] |
<bwolfe_> |
ah, I see |
| [12:58:26] |
<bwolfe_> |
so you are passing the concept to the conceptAnswerSelector |
| [12:58:29] |
<r0bby> |
I have a container class i created for this very reasion |
| [12:58:30] |
*** |
bwolfe_ is now known as bwolfe |
| [12:58:32] |
<r0bby> |
yup |
| [12:58:39] |
<r0bby> |
that's the problem i'm hitting |
| [12:58:55] |
<r0bby> |
how do I best do this in a way that it retains the reference after i display ti |
| [12:59:01] |
<bwolfe> |
so <jsp:setProperty name=\"$name\" property=\"$concept\" /> is not needed in http://eugeneciurana.com/pastebin/pastebin.php?show=30509 |
| [12:59:02] |
<r0bby> |
and pass it back |
| [12:59:02] |
<OpenMRSBot> |
<http://ln-s.net/2525> (at eugeneciurana.com) |
| [12:59:10] |
<bwolfe> |
just do <openmrs_tag:conceptAnswerField formFIeldName=\"$name\" concept=$name/> |
| [12:59:17] |
<bwolfe> |
and change $name to $concept |
| [12:59:24] |
*** |
pombreda has joined #openmrs |
| [12:59:30] |
*** |
ChanServ sets mode: +v pombreda |
| [12:59:31] |
<bwolfe> |
and fix the formFIeldName to have the right case |
| [13:00:06] |
<r0bby> |
and as far as the abstract class; it's needed to be able to do groovy magic :) |
| [13:00:31] |
<r0bby> |
thanks for helpin ben :) |
| [13:01:17] |
<r0bby> |
what i was thinking of doing was querying the model to get the value? |
| [13:01:34] |
<r0bby> |
but we still face the same problem |
| [13:01:37] |
<r0bby> |
how do we do that |
| [13:01:48] |
<r0bby> |
hence <jsp:useBean> |
| [13:02:52] |
<r0bby> |
do you have a better solution? |
| [13:03:13] |
<r0bby> |
we're actually VERY close to finishing |
| [13:03:32] |
* |
r0bby grrr |
| [13:04:44] |
<bwolfe> |
where do you need the value ? |
| [13:05:17] |
<r0bby> |
conceptAnswerField |
| [13:05:18] |
<bwolfe> |
oh |
| [13:05:19] |
<bwolfe> |
I see |
| [13:05:39] |
<bwolfe> |
you're not in jsp there, you're in groovy returning a string that will be jsp |
| [13:05:47] |
<bwolfe> |
there is another tag that will help you |
| [13:05:52] |
<bwolfe> |
<openmrs:concept or something |
| [13:05:58] |
<r0bby> |
oh? |
| [13:06:32] |
<r0bby> |
so just get the concept id? |
| [13:06:34] |
<bwolfe> |
use <openmrs:concept conceptId="${concept.conceptId}" var="myConcept" /> instead of the jsp:useBean thing |
| [13:06:59] |
<r0bby> |
okay we still face the problem... |
| [13:07:05] |
<bwolfe> |
then at line 16 use ${myConcept} to pass to openmrs_tag:cocneptAnswerField |
| [13:07:41] |
<r0bby> |
problem still exists |
| [13:07:51] |
<r0bby> |
but since i use one instance of the generation class |
| [13:08:17] |
<r0bby> |
i *COULD* store it as a field |
| [13:08:57] |
<r0bby> |
OH |
| [13:09:02] |
<r0bby> |
that gets the concept id!!!! |
| [13:09:06] |
<r0bby> |
right?> |
| [13:09:30] |
<r0bby> |
the concept by concept id? |
| [13:14:40] |
<r0bby> |
!bwolfe++ |
| [13:15:39] |
<bwolfe> |
r0bby: yes, that gets the concept by conceptId in jsp...and stores it (in jsp) in the myConcept variable |
| [13:15:50] |
<bwolfe> |
r0bby: :-( |
| [13:16:03] |
<bwolfe> |
why does !bwolfe get karma and I don't? ;-) |
| [13:16:09] |
<bwolfe> |
!karma |
| [13:16:09] |
<OpenMRSBot> |
bwolfe: Highest karma: "bwolfe" (18), "burke" (12), and "groovy" (9). Lowest karma: "r0bby" (-6), "scriptlets" (-1), and "--- demo.openmrs.org ping statistics -" (-1). You (bwolfe) are ranked 1 out of 61. |
| [13:16:21] |
<bwolfe> |
!karma !bwolfe |
| [13:16:22] |
<OpenMRSBot> |
bwolfe: !bwolfe has neutral karma. |
| [13:16:33] |
<r0bby> |
bwolfe++ |
| [13:16:33] |
<r0bby> |
bwolfe++ |
| [13:16:34] |
<r0bby> |
bwolfe++ |
| [13:16:34] |
<r0bby> |
bwolfe++ |
| [13:16:35] |
<r0bby> |
bwolfe++ |
| [13:16:35] |
<bwolfe> |
!karma bwolfe |
| [13:16:35] |
<r0bby> |
bwolfe++ |
| [13:16:35] |
<OpenMRSBot> |
bwolfe: Karma for "bwolfe" has been increased 35 times and decreased 12 times for a total karma of 23. |
| [13:16:36] |
<r0bby> |
bwolfe++ |
| [13:16:37] |
<r0bby> |
bwolfe++ |
| [13:16:38] |
<r0bby> |
bwolfe++ |
| [13:16:41] |
<r0bby> |
bwolfe++ |
| [13:16:43] |
<r0bby> |
bwolfe++ |
| [13:16:46] |
<bwolfe> |
calm yourself...I'm karma diabetic :-p |
| [13:16:46] |
<r0bby> |
bwolfe++ |
| [13:16:48] |
<r0bby> |
done. |
| [13:16:55] |
<bwolfe> |
heh, thanks |
| [13:19:18] |
<r0bby> |
bwolfe: I'll let groovy parse it out and store it as an int |
| [13:19:20] |
<r0bby> |
:X |
| [13:19:38] |
<bwolfe> |
parse what where? |
| [13:21:52] |
<r0bby> |
http://papernapkin.org/pastebin/view/1902/ |
| [13:22:31] |
<r0bby> |
groovy++ |
| [13:22:32] |
<r0bby> |
groovy++ |
| [13:22:32] |
<r0bby> |
groovy++ |
| [13:22:32] |
<r0bby> |
groovy++ |
| [13:22:33] |
<r0bby> |
groovy++ |
| [13:22:35] |
<r0bby> |
groovy++ |
| [13:22:38] |
<r0bby> |
groovy++ |
| [13:22:40] |
<r0bby> |
groovy++ |
| [13:22:43] |
<r0bby> |
groovy++ |
| [13:22:45] |
<r0bby> |
groovy++ |
| [13:22:48] |
<r0bby> |
groovy++ |
| [13:22:50] |
<r0bby> |
groovy++ |
| [13:22:53] |
<r0bby> |
groovy++ |
| [13:22:55] |
<r0bby> |
groovy++ |
| [13:23:05] |
<r0bby> |
groovy++ |
| [13:23:12] |
<r0bby> |
groovy++ |
| [13:23:19] |
<r0bby> |
groovy++ |
| [13:23:20] |
<r0bby> |
!karma groovy |
| [13:23:20] |
<r0bby> |
!karma |
| [13:23:20] |
<OpenMRSBot> |
r0bby: Karma for "groovy" has been increased 29 times and decreased 3 times for a total karma of 26. |
| [13:23:21] |
<OpenMRSBot> |
r0bby: Highest karma: "bwolfe" (30), "groovy" (26), and "burke" (12). Lowest karma: "r0bby" (-6), "scriptlets" (-1), and "--- demo.openmrs.org ping statistics -" (-1). You (r0bby) are ranked 61 out of 61. |
| [13:23:22] |
<r0bby> |
bwolfe: I parse it as a GString (which is what the $name is called. |
| [13:23:39] |
<r0bby> |
hold on one moment |
| [13:23:45] |
<r0bby> |
groovy++ |
| [13:23:47] |
<r0bby> |
groovy++ |
| [13:23:48] |
<r0bby> |
groovy++ |
| [13:23:49] |
<r0bby> |
groovy++ |
| [13:23:50] |
<r0bby> |
groovy++ |
| [13:23:53] |
<r0bby> |
!karma groovy |
| [13:23:53] |
<OpenMRSBot> |
r0bby: Karma for "groovy" has been increased 34 times and decreased 3 times for a total karma of 31. |
| [13:23:58] |
<r0bby> |
!karma |
| [13:23:58] |
<OpenMRSBot> |
r0bby: Highest karma: "groovy" (31), "bwolfe" (30), and "burke" (12). Lowest karma: "r0bby" (-6), "scriptlets" (-1), and "--- demo.openmrs.org ping statistics -" (-1). You (r0bby) are ranked 61 out of 61. |
| [13:24:00] |
<bwolfe> |
whats the silence command ? |
| [13:24:08] |
<r0bby> |
now it's good |
| [13:24:10] |
<r0bby> |
im done :) |
| [13:24:11] |
<bwolfe> |
or maybe just kick |
| [13:24:12] |
<r0bby> |
sorry |
| [13:24:15] |
<bwolfe> |
either would do here |
| [13:24:17] |
<bwolfe> |
:-p |
| [13:24:24] |
<r0bby> |
all is right in the world |
| [13:24:26] |
<bwolfe> |
!silence r0bby |
| [13:24:26] |
<OpenMRSBot> |
bwolfe: Error: "silence" is not a valid command. |
| [13:24:29] |
<bwolfe> |
bummer |
| [13:25:32] |
<bwolfe> |
r0bby: yeah, that jsp looks right |
| [13:25:43] |
<bwolfe> |
r0bby: you may or may not need quotes around $myConcept |
| [13:25:49] |
<bwolfe> |
${myConcept} |
| [13:26:03] |
<r0bby> |
i added that |
| [13:26:27] |
<r0bby> |
burke and I need to figure out just how it's gonna work generation-wise |
| [13:26:48] |
<r0bby> |
generate once or do it dynamically |
| [13:26:58] |
<r0bby> |
for the first pass, i'll do it once |
| [13:27:09] |
<r0bby> |
I hate being this far behind |
| [13:27:59] |
<r0bby> |
I lovew how IDEA is seeing the copyright header as an unused import |
| [13:28:12] |
<r0bby> |
IDEA has the best groovy support right now |
| [13:28:19] |
<r0bby> |
the rest are too young |
| [13:28:38] |
<r0bby> |
ben, sorry for not pinging you earlier on this :/ |
| [13:28:46] |
* |
r0bby has MAJOR adhd |
| [13:28:59] |
<bwolfe> |
r0bby: now you know. :-) |
| [13:29:37] |
<r0bby> |
is there something similar for date |
| [13:29:50] |
<r0bby> |
groovy will do .toString |
| [13:29:53] |
<r0bby> |
() |
| [13:30:32] |
<r0bby> |
wait fieldgen |
| [13:32:13] |
<r0bby> |
meh wait, this is slightly different |
| [13:32:48] |
* |
r0bby thinks he'll use the jquery date picker |
| [13:32:52] |
<bwolfe> |
there isn't an openmrs taglib for date |
| [13:32:56] |
<r0bby> |
and ditch the jsp |
| [13:33:03] |
<r0bby> |
dateField |
| [13:33:14] |
<bwolfe> |
there is a date picker that will take a mm/dd/yyyy string |
| [13:33:44] |
* |
r0bby goes to sighs |
| [13:33:47] |
<r0bby> |
er |
| [13:34:57] |
<r0bby> |
OMG Estelle getty died :<<<< |
| [13:35:24] |
<bwolfe> |
should we know who that is ? |
| [13:37:03] |
<r0bby> |
Golden Girls |
| [13:37:10] |
* |
r0bby ducks |
| [13:38:21] |
<r0bby> |
hrm I may use a DWR util method |
| [13:38:35] |
<r0bby> |
meh i can't |
| [13:39:07] |
<r0bby> |
can't unless I store it statically..bad idea |
| [13:39:41] |
<r0bby> |
somebody needs to upgrade DWR |
| [13:39:41] |
<bwolfe> |
isn't dwrutil all in javascript ? |
| [13:39:52] |
<r0bby> |
bwolfe: I need to remote. |
| [13:40:04] |
<r0bby> |
hence why i'm using DWR |
| [13:40:50] |
<r0bby> |
I want to go from JS to a Java Date object |
| [13:41:11] |
*** |
TorLye_ has quit IRC |
| [13:41:28] |
<r0bby> |
although, technically, i can |
| [13:48:26] |
<r0bby> |
oh god |
| [13:48:36] |
<r0bby> |
you shoulda seen me at my cousin's wedding :X |
| [13:48:41] |
<r0bby> |
I saw the video -- it's bad |
| [13:48:47] |
<r0bby> |
I'm never gonna live that thing down |
| [13:48:51] |
<r0bby> |
NEVER |
| [13:49:06] |
<r0bby> |
I had my cousin's friends one on each side of me :) |
| [13:53:03] |
<bwolfe> |
r0bby: what was bad? too much alcohol? too much dancing? too much of both ? |
| [13:54:36] |
<r0bby> |
not so much of too much |
| [13:54:37] |
<r0bby> |
but how |