uPortal IRC Logs-2009-09-14

[04:40:00 EDT(-0400)] * ChanServ (ChanServ@services.) has joined ##uportal
[08:38:26 EDT(-0400)] * athena (n=athena@adsl-75-58-127-15.dsl.wlfrct.sbcglobal.net) has joined ##uportal
[08:59:33 EDT(-0400)] * EricDalquist (n=dalquist@bohemia.doit.wisc.edu) has joined ##uportal
[09:24:53 EDT(-0400)] * lennard1 (n=sparhk@ip68-98-56-21.ph.ph.cox.net) has joined ##uportal
[10:10:09 EDT(-0400)] * michelled (n=team@142.150.154.193) has joined ##uportal
[11:12:09 EDT(-0400)] * jessm (n=Jess@c-71-232-1-65.hsd1.ma.comcast.net) has joined ##uportal
[11:25:27 EDT(-0400)] * jessm (n=Jess@c-71-232-1-65.hsd1.ma.comcast.net) has joined ##uportal
[11:41:14 EDT(-0400)] <EricDalquist> any here ever had problems with IE appearing to cache the results of a form POST
[11:41:26 EDT(-0400)] <athena> yeah
[11:41:30 EDT(-0400)] <EricDalquist> we have a page that has a form that does a POST which results in a 302 to a GET
[11:41:40 EDT(-0400)] <EricDalquist> and IE seems to only run the POST once
[11:41:45 EDT(-0400)] <EricDalquist> then just submits the GET in its place
[11:41:50 EDT(-0400)] <athena> (sad)
[11:41:59 EDT(-0400)] <EricDalquist> did you figure out what the cause was?
[11:42:06 EDT(-0400)] <athena> try appending date=blahblahblah as a param on the end?
[11:42:11 EDT(-0400)] <EricDalquist> yeah
[11:42:20 EDT(-0400)] <athena> IE is the source of all evil and was created in mordor?
[11:42:23 EDT(-0400)] <athena> that's generally my assumption
[11:42:29 EDT(-0400)] <EricDalquist> (smile)
[11:43:03 EDT(-0400)] <EricDalquist> our form tag looks like:
[11:43:04 EDT(-0400)] <EricDalquist> <form id="manageFavoritesForm_Pluto_tp_3081_" method="post" action="/portal/render.u1821l1n8.target.u1821l1n8.uP?pltc_target=tp.3081&pltc_type=ACTION&pltc_state=detached&pltc_mode=view&pltp_action=favoriteManage&pltp_nameInMillis1252941779602=randomValue1252941779602" name="manageFavoritesForm_Pluto_tp_3081_">
[11:43:14 EDT(-0400)] <EricDalquist> and still no luck
[11:44:27 EDT(-0400)] <athena> that's really weird
[11:44:32 EDT(-0400)] <athena> i don't think i've seen that
[11:44:34 EDT(-0400)] <EricDalquist> yeah
[11:44:42 EDT(-0400)] <EricDalquist> I'm trying to track it down and it is driving me crazy
[11:44:46 EDT(-0400)] <athena> wonder if that happens to any of the code i've written
[11:44:50 EDT(-0400)] <EricDalquist> works like a charm everywhere except IE
[11:45:28 EDT(-0400)] <athena> (sad)
[11:45:33 EDT(-0400)] <athena> evil
[11:48:30 EDT(-0400)] <EricDalquist> oi
[11:50:12 EDT(-0400)] <EricDalquist> so the 302 response to the POST doesn't have any cache control headers
[11:50:25 EDT(-0400)] <EricDalquist> maybe IE decides it should cache it without being explicitly told not to?
[11:50:28 EDT(-0400)] <EricDalquist> uhg
[11:53:05 EDT(-0400)] <EricDalquist> the other question is why does this only happen on this page?
[11:53:43 EDT(-0400)] <EricDalquist> the only 'interesting' thing happening is there is some JS that prompts you for the value of a form field before allowing the form submit to continue
[11:54:03 EDT(-0400)] <athena> that really is kinda weird
[11:55:26 EDT(-0400)] <EricDalquist> yeah so it looks like they add a click() handler to the form submit button
[11:55:35 EDT(-0400)] <EricDalquist> the handler uses prompt() to get some data from the user
[11:55:48 EDT(-0400)] <EricDalquist> then adds 3 hidden fields to the form
[11:56:02 EDT(-0400)] <EricDalquist> then returns true to allow the submit to continue
[12:01:35 EDT(-0400)] <athena> odd
[12:02:17 EDT(-0400)] <athena> what happens if it returns false and submits the form itself?
[12:54:02 EDT(-0400)] * Sememmon (n=Sememmon@wsip-72-215-204-133.ph.ph.cox.net) has joined ##uportal
[13:32:14 EDT(-0400)] * colinclark (n=colin@209.117.69.2) has joined ##uportal
[13:40:47 EDT(-0400)] <lennard1> eric?
[13:41:00 EDT(-0400)] <lennard1> do you mess with displayTag much?
[13:41:03 EDT(-0400)] <EricDalquist> hello
[13:41:08 EDT(-0400)] <EricDalquist> the JSP library?
[13:41:13 EDT(-0400)] <lennard1> yeah
[13:41:16 EDT(-0400)] <EricDalquist> I did
[13:41:17 EDT(-0400)] <EricDalquist> long ago
[13:41:23 EDT(-0400)] <EricDalquist> added basic portlet support to it for them
[13:41:34 EDT(-0400)] <EricDalquist> haven't touched it really since shortly after that though{color}
[13:41:37 EDT(-0400)] <lennard1> we had a quick and dirty portlet to write and they wanted to be able to export a table to csv or excel

[13:41:45 EDT(-0400)] <EricDalquist> ah
[13:41:46 EDT(-0400)] <EricDalquist> yeah
[13:41:50 EDT(-0400)] <EricDalquist> the export stuff never worked right
[13:41:56 EDT(-0400)] * lennard1 winces
[13:41:58 EDT(-0400)] <lennard1> (smile)
[13:42:10 EDT(-0400)] <lennard1> saw your name on it for the integration, so I gave it a shot.
[13:42:14 EDT(-0400)] <EricDalquist> so that was before I know what I know now ...
[13:42:17 EDT(-0400)] <lennard1> you weren't on to ask though(smile)
[13:42:32 EDT(-0400)] <EricDalquist> the best way to do binary content from a portlet I have found to date
[13:42:35 EDT(-0400)] <EricDalquist> that works everywhere
[13:42:37 EDT(-0400)] <lennard1> makes some decent tables, but can't get the exports to work
[13:42:45 EDT(-0400)] <EricDalquist> is the action/redirect w/token trick
[13:42:58 EDT(-0400)] <lennard1> ?
[13:43:16 EDT(-0400)] <EricDalquist> so you need to get the code to write out an export URL is that is a portlet action with the correct parameters to identify the content
[13:43:17 EDT(-0400)] * lennard1 has typically used a servlet to handle that sort of stuff
[13:43:25 EDT(-0400)] <lennard1> k
[13:43:35 EDT(-0400)] <EricDalquist> then there are two approaches
[13:43:37 EDT(-0400)] <EricDalquist> the first is:
[13:43:50 EDT(-0400)] <EricDalquist> the handleAction code generates the entire object/data structure to return
[13:43:54 EDT(-0400)] <EricDalquist> generates a random key
[13:44:04 EDT(-0400)] <EricDalquist> shoves the object in the session with the key as the name
[13:44:19 EDT(-0400)] <EricDalquist> sends a 302 with the key as a request parameter
[13:44:34 EDT(-0400)] <EricDalquist> then a servlet reads the key from the parameter, grabs the data, sends it out
[13:44:43 EDT(-0400)] <EricDalquist> the other approach is:
[13:45:15 EDT(-0400)] <EricDalquist> the handleAction code sticks whatever IDs needed to get at the object/data in a POJO
[13:45:19 EDT(-0400)] <EricDalquist> generates a random key
[13:45:31 EDT(-0400)] <EricDalquist> shoves that POJO in the session with the key as the name
[13:45:40 EDT(-0400)] <EricDalquist> 302 to a servlet with the key as a parameter
[13:45:52 EDT(-0400)] <EricDalquist> servlet gets the key, gets the POJO, uses the IDs to get the data and returns that
[13:45:56 EDT(-0400)] <EricDalquist> now
[13:46:03 EDT(-0400)] <EricDalquist> there is a functional example of doing this
[13:46:22 EDT(-0400)] <EricDalquist> https://www.ja-sig.org/svn/sandbox/AjaxPortletSupport/trunk/
[13:46:34 EDT(-0400)] <EricDalquist> this is specific to returning JSON
[13:46:43 EDT(-0400)] <EricDalquist> but some of the code is very much reusable for this approach
[13:47:01 EDT(-0400)] <EricDalquist> primarily all the stuff in: https://www.ja-sig.org/svn/sandbox/AjaxPortletSupport/trunk/src/main/java/org/jasig/web/util/
[13:47:02 EDT(-0400)] <athena> the jasig calendar portlet actually uses that jar and just uses a non-JSON view
[13:47:07 EDT(-0400)] <EricDalquist> yup
[13:47:08 EDT(-0400)] <lennard1> we use some bouncy castle goodies and do something similar
[13:47:14 EDT(-0400)] <athena> the jasig widget portlets use that library pertty heavily as well
[13:47:32 EDT(-0400)] <EricDalquist> really the core of it are the two interfaces/classes in the util package
[13:47:42 EDT(-0400)] <EricDalquist> that take care of the key generation is a safe way
[13:47:52 EDT(-0400)] <EricDalquist> and hide the session object passing tricks
[13:48:07 EDT(-0400)] <EricDalquist> it works well since a browser will never re-request the URL returned by a 302
[13:48:16 EDT(-0400)] <EricDalquist> at least for images/ajax/downloads
[13:48:43 EDT(-0400)] <EricDalquist> I bet that approach could be figured into displaytag
[13:50:17 EDT(-0400)] <athena> but using the fluid pager is so much more fun and shiny (smile)
[13:50:44 EDT(-0400)] <EricDalquist> but doesn't export to csv/xls
[13:50:47 EDT(-0400)] <lennard1> well... I only wanted to use displayTag for the csv and excel export stuff. I really did not want to have the table generated on the server side.
[13:50:53 EDT(-0400)] <EricDalquist> which is what the need was
[13:51:34 EDT(-0400)] <lennard1> With the sort of load that pearson experiences, finding more ways to make the server work harder seems counterproductive(smile)
[13:51:42 EDT(-0400)] <EricDalquist> lol
[13:51:59 EDT(-0400)] <lennard1> this particular view is only to be used by one person and just serves up the results of a report once a month or so.
[13:53:35 EDT(-0400)] <lennard1> So... bottom line. I don't see us using displayTag much in the future, it just seemed like an easy answer for a problem we had. It is not worth the additional effort to get export working at this point though. I only have about three hours and it isn't worth introducing any additional risk.
[13:53:57 EDT(-0400)] <lennard1> lame....
[14:34:02 EDT(-0400)] * colinclark (n=colin@209.117.69.2) has joined ##uportal
[15:26:38 EDT(-0400)] * colinclark (n=colin@209.117.68.2) has joined ##uportal
[16:14:48 EDT(-0400)] * michelled (n=michelle@CPE001310472ade-CM0011aefd3ca8.cpe.net.cable.rogers.com) has joined ##uportal
[16:18:52 EDT(-0400)] * colinclark (n=colin@209.117.69.2) has joined ##uportal
[16:19:31 EDT(-0400)] * colinclark (n=colin@209.117.69.2) has joined ##uportal
[17:11:42 EDT(-0400)] * colinclark (n=colin@209.117.68.2) has joined ##uportal
[17:34:58 EDT(-0400)] * michelled (n=michelle@CPE001310472ade-CM0011aefd3ca8.cpe.net.cable.rogers.com) has left ##uportal
[18:08:06 EDT(-0400)] * colinclark (n=colin@209.117.68.2) has joined ##uportal
[18:34:37 EDT(-0400)] * colinclark (n=colin@209.117.68.2) has joined ##uportal