uPortal IRC Logs-2008-01-23
[08:33:38 EST(-0500)] * esm (n=esm@207-53-192-2.dynamic-dsl.qis.net) has joined ##uportal <EiNZTEiN> line 1251 should read " <arg value="$ "/>" and not " <arg value="../$ /.."/>
[09:18:47 EST(-0500)] * athena7 (n=athena7@lumina.its.yale.edu) has joined ##uportal
[09:30:34 EST(-0500)] * jayshao (n=jayshao@jayshao.oirt.rutgers.edu) has joined ##uportal
[09:33:33 EST(-0500)] * EricDalquist (n=dalquist@bohemia.doit.wisc.edu) has joined ##uportal
[10:32:33 EST(-0500)] * clown (n=clown@142.150.154.101) has joined ##uportal
[11:41:06 EST(-0500)] * deuce (n=deuce@uni1.unicon.net) has joined ##uportal
[11:57:18 EST(-0500)] <deuce> eric?
[11:57:30 EST(-0500)] <EricDalquist> hey
[11:57:54 EST(-0500)] <deuce> i wanted to chat a little about channel titles in attributes
[11:58:04 EST(-0500)] <EricDalquist> ok
[11:58:49 EST(-0500)] <deuce> now you make mention to it in the post on the dev list, but it wasn't really to address the titles in attributes, right?
[12:00:26 EST(-0500)] <EricDalquist> well the second half of the email where I was talking about inserting a random string for the title and doing string replacement before sending the content to the printwriter was an idea on how to get channel titles working in attributes
[12:01:27 EST(-0500)] <deuce> right ok.. then i made a comment that they should be partitioned like we do system characters, title elements and channel content
[12:02:12 EST(-0500)] <EricDalquist> ah yeah
[12:02:20 EST(-0500)] <EricDalquist> the problem is how do we partition attributes?
[12:02:33 EST(-0500)] <EricDalquist> the channel incorporation filter just passes SAX events onto the serializer
[12:02:38 EST(-0500)] <EricDalquist> and gets character chunks from it
[12:02:46 EST(-0500)] <deuce> yeah i think that problem is really difficult when the way the CIF partitions the cache blocks
[12:02:48 EST(-0500)] <EricDalquist> I don't know of a way to pass a partial element
[12:03:00 EST(-0500)] <deuce> right elements are atomic
[12:03:09 EST(-0500)] <EricDalquist> yeah
[12:03:18 EST(-0500)] <EricDalquist> one option would be to include a random string for the title in the CIF
[12:03:30 EST(-0500)] <EricDalquist> then do a split() on the character block that the serializer hands back
[12:04:05 EST(-0500)] <EricDalquist> I have a short meeting to get to
[12:04:07 EST(-0500)] <EricDalquist> back in 10
[12:04:45 EST(-0500)] <deuce> i follow what you're saying.. but i think we can do it with a writer that wraps the response's PrintWriter
[12:20:40 EST(-0500)] <EricDalquist> ok
[12:20:42 EST(-0500)] <EricDalquist> I'm back
[12:21:23 EST(-0500)] <EricDalquist> so would the wrapping writer do more chunking up the blocks and adding them to the cache List?
[12:21:30 EST(-0500)] <EricDalquist> Or would it simply by doing string replacement?
[12:21:55 EST(-0500)] <EricDalquist> 2.X is already doing string replacement for the random tags (which btw are completely pointless from 2.4 onwards)
[13:00:24 EST(-0500)] * athena7_ (n=athena7@tp-wireless.its.yale.edu) has joined ##uportal
[13:04:03 EST(-0500)] * athena7__ (n=athena7@130.132.168.163) has joined ##uportal
[13:19:13 EST(-0500)] * clown_ (n=chatzill@142.150.154.101) has joined ##uportal
[13:19:29 EST(-0500)] * clown_ (n=chatzill@142.150.154.101) has left ##uportal
[14:25:48 EST(-0500)] <deuce> hey eric .. the writer would just do replacements, but it wouldn't have to keep the entire content in memory .. just on the fly. it would of course need to be buffered tho
[14:26:00 EST(-0500)] <EricDalquist> yup
[14:26:21 EST(-0500)] <deuce> i have both working at this point
[14:26:30 EST(-0500)] <EricDalquist> how does the buffer get told which random strings map to which channel ids?
[14:26:38 EST(-0500)] <EricDalquist> and get the ChannelManager reference?
[14:26:41 EST(-0500)] <EricDalquist> wow
[14:26:42 EST(-0500)] <EricDalquist> cool
[14:27:24 EST(-0500)] <deuce> well just prototyping .. i used a string like this in the xsl "UP:CHANNEL_TITLE-@ID"
[14:27:33 EST(-0500)] <EricDalquist> ah
[14:27:43 EST(-0500)] <EricDalquist> that works
[14:27:57 EST(-0500)] <EricDalquist> the random string bit is probably overkill
[14:27:59 EST(-0500)] <deuce> then looked for instances of UP:CHANNEL_TITLE-, parsed out the channelId, and replaced
[14:28:11 EST(-0500)] <EricDalquist> cool
[14:28:19 EST(-0500)] <deuce> i'm open to the token format
[14:28:31 EST(-0500)] <EricDalquist> how does it deal with default title values?
[14:28:54 EST(-0500)] <deuce> i don't think i dealt with that yet .. let me look
[14:29:33 EST(-0500)] <EricDalquist> the existing code looked for a token like <channel-title id="" default=""/>
[14:29:46 EST(-0500)] <EricDalquist> to deal with the channel not returning a dynamic title
[14:30:03 EST(-0500)] <deuce> oh .. i pass in a user layout manager to the writer, then i could get the channel description, then the published channel title
[14:30:28 EST(-0500)] <EricDalquist> ah
[14:30:46 EST(-0500)] <deuce> not sure how that translates to up3 tho
[14:31:16 EST(-0500)] <EricDalquist> it probably will be very close
[14:31:23 EST(-0500)] <deuce> ok
[14:31:30 EST(-0500)] <EricDalquist> with the advantage of new classes could be injected into the rendering pipeline if needed
[14:31:54 EST(-0500)] <EricDalquist> and UserInstance is now described by an interface which is passed into the pipeline to initiate rendering
[14:32:52 EST(-0500)] <deuce> is the pipeline a series of connectors from layout manager to response PrintWriter?
[14:33:06 EST(-0500)] <deuce> similar to sandbox
[14:33:32 EST(-0500)] <deuce> sorry .. i just haven't had a chance to look at it yet
[14:33:43 EST(-0500)] <EricDalquist> no
[14:33:47 EST(-0500)] <EricDalquist> none of that has made it over
[14:34:02 EST(-0500)] <EricDalquist> it is pretty much the exact code from the UserInstance render method
[14:34:25 EST(-0500)] <deuce> and UserInstance just got interfaced?
[14:34:53 EST(-0500)] <EricDalquist> the big change is instead of using instance variables to get the needed data it is all passed in the render method arguments: public void renderState(HttpServletRequest req, HttpServletResponse res, IUserInstance userInstance) throws PortalException {
[14:35:23 EST(-0500)] <deuce> ok.. gotcha
[14:35:38 EST(-0500)] <EricDalquist> UserInstance got interfaced into IUserInstance to support the seperation of UserInstance and GuestUserInstance
[14:37:09 EST(-0500)] <deuce> alright .. i have to run out for a bit. I'll start looking at porting to up3 when i get back
[14:37:27 EST(-0500)] <EricDalquist> sounds good
[14:37:34 EST(-0500)] <EricDalquist> I'll be around until 4:30 central time
[15:20:36 EST(-0500)] <EricDalquist> hey deuce, can you read the comments on: http://www.ja-sig.org/issues/browse/UP-1261 and let me know what you think of doing this for 3?
[15:26:42 EST(-0500)] <deuce> ok
[15:26:52 EST(-0500)] <EricDalquist> thanks
[15:27:32 EST(-0500)] <EricDalquist> it sounds like a reasonable fix to add into the up3 code but I just want another (more familiar with caching) set of eyes before I go and break something
[15:28:54 EST(-0500)] <deuce> well i can say that this is exactly what academus did prior to open sourcing
[15:29:02 EST(-0500)] <deuce> and it worked pretty well
[15:29:21 EST(-0500)] <EricDalquist> cool
[15:29:28 EST(-0500)] <EricDalquist> I'll look at getting that fixed then
[15:30:05 EST(-0500)] <deuce> some of those links are broken tho
[15:30:13 EST(-0500)] <EricDalquist> hrm
[15:30:28 EST(-0500)] <EricDalquist> yeah, looks like I'll have to dig through fisheye for the changes
[15:31:10 EST(-0500)] <deuce> this is a big win for institutions that lock down their layouts
[15:31:18 EST(-0500)] <EricDalquist> I bet
[15:31:43 EST(-0500)] <EricDalquist> it sounds like that would let users with the same layout share the XSLT caches
[15:36:17 EST(-0500)] <deuce> exactly
[15:36:34 EST(-0500)] <deuce> as well as the character caches
[15:50:53 EST(-0500)] * agherna (n=argherna@ras194.admin.uillinois.edu) has joined ##uportal
[15:52:44 EST(-0500)] <agherna> good afternoon everyone
[15:52:55 EST(-0500)] <EricDalquist> hello
[15:53:21 EST(-0500)] <agherna> i'd like to throw a question out about the dlm processing pipe.
[15:53:39 EST(-0500)] <EricDalquist> ok
[15:54:11 EST(-0500)] <agherna> we're wanting to inject elements in to the layout as it is being processed. is there a way to do that?
[15:54:44 EST(-0500)] <agherna> basically, we've been struggling with the fact that it appears SAX is read-only
[15:55:10 EST(-0500)] <agherna> we're not sure where or how to inject elements in to the stream.
[15:55:13 EST(-0500)] <EricDalquist> where in the processing do you want to do this?
[15:55:19 EST(-0500)] <EricDalquist> during layout loading?
[15:55:30 EST(-0500)] <EricDalquist> or somwhere in the layout to structure to theme to characters pipe
[15:56:24 EST(-0500)] <agherna> well, er i was unprepared for that question. we want to put it in to an IParameterProcessor.
[15:56:29 EST(-0500)] <agherna>
[15:57:11 EST(-0500)] <agherna> Sorry, ISaxProcessor
[15:57:17 EST(-0500)] <agherna> not IParameterProcessor
[15:57:18 EST(-0500)] <EricDalquist> ah
[15:57:19 EST(-0500)] <EricDalquist> ok
[15:58:20 EST(-0500)] <EricDalquist> and you want to add some XML element into the layout
[15:58:32 EST(-0500)] <agherna> correct. a sub element to say <layout>
[15:58:41 EST(-0500)] <EricDalquist> so the example ExampleBookmarksRemover shows how to remove elements
[15:58:47 EST(-0500)] <agherna> right
[15:58:57 EST(-0500)] <EricDalquist> it overrides startElement, characters and endElement
[15:59:09 EST(-0500)] <agherna> we started there but have been having a hard time figuring out how to add stuff in to the stream
[15:59:10 EST(-0500)] <EricDalquist> and just doesn't pass on events that it wants to remove
[15:59:14 EST(-0500)] <EricDalquist> so to add stuff
[15:59:20 EST(-0500)] <EricDalquist> you create new events
[15:59:30 EST(-0500)] <EricDalquist> say you want to add a new element as the first child under <layout>
[15:59:35 EST(-0500)] <agherna> yes
[15:59:53 EST(-0500)] <EricDalquist> extend and implement the same classes as the example
[15:59:55 EST(-0500)] <EricDalquist> override startElement
[16:00:05 EST(-0500)] <agherna> ok
[16:00:07 EST(-0500)] <EricDalquist> if (qName.equals("layout"))
[16:00:17 EST(-0500)] <agherna> yes
[16:00:29 EST(-0500)] <EricDalquist> do the super.startElement(uri, localName, qName, atts); call to start the layout element
[16:00:43 EST(-0500)] <agherna> yes
[16:00:47 EST(-0500)] <EricDalquist> then just call some combination of startElement/characters/endElement with parameters you create to generate the XML
[16:00:56 EST(-0500)] <EricDalquist> lets say I want to add <foo>bar</foo>
[16:00:59 EST(-0500)] <EricDalquist> I would call:
[16:01:42 EST(-0500)] <EricDalquist> super.startElement("", "", "foo", new AttributesImpl());
[16:01:53 EST(-0500)] <EricDalquist> String bar = "bar";
[16:02:03 EST(-0500)] <EricDalquist> super.characters(bar, 0, bar.length);
[16:02:12 EST(-0500)] <EricDalquist> super.endElement("", "", "foo");
[16:02:36 EST(-0500)] <EricDalquist> I've just injected a new element with some characters in it into the XML stream
[16:02:38 EST(-0500)] <agherna> I see. This is what we were missing: To add elements you simply pretend they're being read in by dishing off calls to events in the super class.
[16:02:44 EST(-0500)] <EricDalquist> yup
[16:03:09 EST(-0500)] <EricDalquist> SAX is an event based XML representation so to remove things you swallow events, to add things you make up events
[16:03:31 EST(-0500)] <EricDalquist> it is quite powerful because of that since it lends itself to chains of filters
[16:04:07 EST(-0500)] <EricDalquist> the uri/localName parameters are used if you're processing namespaced xml elements
[16:04:21 EST(-0500)] <agherna> And by "make up events" you really mean call methods in XMLFilterImpl to simulate reading them from the stream.
[16:04:26 EST(-0500)] <EricDalquist> so an event for <foo> looks like startElement("", "", "foo", attrs)
[16:04:48 EST(-0500)] <EricDalquist> and an event for <up:bar> looks like startElement("up", "bar", "up:bar", attrs)
[16:04:54 EST(-0500)] <EricDalquist> yeah
[16:05:09 EST(-0500)] <agherna> ok
[16:05:09 EST(-0500)] <EricDalquist> so your filter is adding events to the stream that were not there before
[16:05:25 EST(-0500)] <agherna> i see
[16:06:34 EST(-0500)] <EricDalquist> that is the same concept that uPortal uses for channel renderinging and incorperation
[16:07:03 EST(-0500)] <EricDalquist> there are some sax filters that look for <channel> elements and either start the rendering for the channel or wait for it to finish rendering and write out its content to that location
[16:09:17 EST(-0500)] <agherna> ok
[16:09:41 EST(-0500)] <EricDalquist> all set for injecting stuff into the layout?
[16:10:09 EST(-0500)] <agherna> yes. thank you!
[16:10:26 EST(-0500)] <EricDalquist>
[16:11:29 EST(-0500)] <agherna> The example you gave was exactly what I needed to know. For reference, can you point me to where I could find simiar examples in the uportal codebase?
[16:11:54 EST(-0500)] <EricDalquist> of injecting things into a SAX stream?
[16:12:04 EST(-0500)] <agherna> yes
[16:12:35 EST(-0500)] <EricDalquist> CharacterCachingChannelIncorporationFilter is one
[16:12:54 EST(-0500)] <EricDalquist> it starts channel rendering and replaces the <channel> and <channel-title> elements with their real values post theme transform
[16:14:07 EST(-0500)] * deuce (n=deuce@uni1.unicon.net) has joined ##uportal
[16:14:39 EST(-0500)] <agherna> Ok
[16:14:42 EST(-0500)] <agherna> thanks!
[16:14:46 EST(-0500)] <EricDalquist> yup
[16:41:03 EST(-0500)] * clown (n=clown@142.150.154.101) has left ##uportal
[17:07:28 EST(-0500)] * EiNZTEiN (n=einztein@205.241.143.4) has joined ##uportal
[17:12:55 EST(-0500)] <EiNZTEiN> anyone here?
[17:14:48 EST(-0500)] <EiNZTEiN> http://uportal.pastebin.com/m29635473
[17:14:55 EST(-0500)] <EiNZTEiN> help
[17:16:42 EST(-0500)] * agherna (n=argherna@ras194.admin.uillinois.edu) has left ##uportal
[17:24:21 EST(-0500)] <EiNZTEiN> okay
[17:24:31 EST(-0500)] <EiNZTEiN> there is a bug in the QuickStart
[17:24:42 EST(-0500)] <EiNZTEiN> on build.xml
[17:25:16 EST(-0500)]
[17:29:54 EST(-0500)] <EiNZTEiN> this channel is sooo dead :|
[18:00:24 EST(-0500)] * awills (n=awills@ums.cusys.edu) has joined ##uportal
[18:00:37 EST(-0500)] <awills> esm are you still on?{color}
[19:05:22 EST(-0500)] * awills (n=awills@ums.cusys.edu) has left ##uportal
[23:07:52 EST(-0500)] * deuce (n=deuce@ip68-3-31-85.ph.ph.cox.net) has joined ##uportal