Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 57 Next »

[10:01:34 CDT(-0500)] <athena> looks like deleting portlets fails
[10:02:37 CDT(-0500)] <athena> err, actually better than failing - breaks the portal until a re-login (smile)
[10:02:58 CDT(-0500)] <EricDalquist> neat
[10:03:04 CDT(-0500)] <EricDalquist> have you tried the latest update from this morning?
[10:03:12 CDT(-0500)] <EricDalquist> I finally got adding working
[10:03:50 CDT(-0500)] <athena> haven't
[10:03:54 CDT(-0500)] <athena> adding? layout modification?
[10:04:06 CDT(-0500)] <athena> i'll have to pull that in (smile)
[10:04:14 CDT(-0500)] <EricDalquist> yeah
[10:04:22 CDT(-0500)] <EricDalquist> there was a bug in calculating the next struct id
[10:04:29 CDT(-0500)] <athena> trying to coerce the web proxy portlet into actually doing clipping at the moment
[10:04:40 CDT(-0500)] <EricDalquist> heh
[10:04:42 CDT(-0500)] <athena> ahh, right
[10:05:08 CDT(-0500)] <athena> so ultimately i think umobile is going to need the ability to have things show up on the main nav page that are actually external links
[10:05:24 CDT(-0500)] <athena> but that get maybe arranged / administered like portlets
[10:05:24 CDT(-0500)] <EricDalquist> yeah
[10:05:30 CDT(-0500)] <EricDalquist> hrm
[10:06:15 CDT(-0500)] <athena> wondering if we can somehow handle that as some sort of new portlet
[10:06:31 CDT(-0500)] <EricDalquist> yeah
[10:06:33 CDT(-0500)] <athena> maybe we could set an "external url" render parameter that the mobile theme could look for?
[10:06:40 CDT(-0500)] <EricDalquist> YEAH
[10:06:42 CDT(-0500)] <EricDalquist> oops
[10:06:44 CDT(-0500)] <EricDalquist> yeah,
[10:06:46 CDT(-0500)] <athena> lol
[10:06:49 CDT(-0500)] <athena> and in the desktop view we could just render a link that uses that
[10:06:49 CDT(-0500)] <athena> YEAH MAN
[10:06:59 CDT(-0500)] <EricDalquist> just do that with some sort of placeholder-ish portlet
[10:07:43 CDT(-0500)] <athena> i guess an advantage of using the request prop is that that gives us a way to still render something sane in the desktop view, so that you can have a good way to administer the fragment
[10:07:58 CDT(-0500)] <athena> and maybe some day that portlet could even grow up to be a new SSO portlet, who knows.
[10:08:21 CDT(-0500)] <EricDalquist> yeah
[10:08:35 CDT(-0500)] <athena> you haven't actually used clippin gin the web proxy portlet lately have you?
[10:08:45 CDT(-0500)] <EricDalquist> we've never used it
[10:08:53 CDT(-0500)] <EricDalquist> it was a requested feature by UW when it was first written
[10:09:00 CDT(-0500)] <EricDalquist> but I don't think we've ever actually used it
[10:09:05 CDT(-0500)] <athena> gotcha
[10:17:56 CDT(-0500)] <athena> gonna run to lunch
[10:17:59 CDT(-0500)] <athena> bbiab
[12:09:56 CDT(-0500)] <EricDalquist> athena:
[12:10:09 CDT(-0500)] <EricDalquist> what code should I look at to use antisamy to extract text?
[12:10:21 CDT(-0500)] <athena> news reader portlet - hang on a second
[12:10:53 CDT(-0500)] <athena> https://source.jasig.org/portlets/NewsReaderPortlet/trunk/src/main/java/org/jasig/portlet/newsreader/processor/RomeNewsProcessorImpl.java
[12:11:01 CDT(-0500)] <athena> take a look at the stuff that extracts the description/content
[12:11:04 CDT(-0500)] <athena> pretty simple
[12:11:33 CDT(-0500)] <athena> then take a look at this config file: https://source.jasig.org/portlets/NewsReaderPortlet/trunk/src/main/resources/antisamy/antisamy-textonly.xml
[12:11:40 CDT(-0500)] <athena> that's probably the config we want, or very close to it
[12:12:33 CDT(-0500)] <EricDalquist> ok thanks (smile)
[12:13:28 CDT(-0500)] <athena> yep!
[12:13:37 CDT(-0500)] <athena> by the way, i'm having issues importing portlet files from the command line
[12:13:49 CDT(-0500)] <athena> is it still -Ddir= -Dpattern=?
[12:13:51 CDT(-0500)] <EricDalquist> hrm
[12:13:56 CDT(-0500)] <athena> and should a portlet name work as the pattern?
[12:13:59 CDT(-0500)] <EricDalquist> can you give me an example command you'reusing?
[12:14:46 CDT(-0500)] <athena> ant data-import -Ddir=uportal-war/src/main/data/default_entities/portlet -Dpattern=google-proxy.portlet.xml
[12:18:03 CDT(-0500)] <EricDalquist> thanks
[12:18:07 CDT(-0500)] <EricDalquist> I'll take a look in a minute
[12:18:25 CDT(-0500)] <athena> ok (smile)
[12:33:51 CDT(-0500)] <athena> hrm
[12:34:19 CDT(-0500)] <athena> so for this potential alternate external link thing
[12:34:31 CDT(-0500)] <athena> that's not actually available until later, when the portlets render, right?
[12:34:50 CDT(-0500)] <athena> so we'd need some way to print out that link, but if there's no value, print out the default portlet link instead
[12:35:03 CDT(-0500)] <athena> is there a way to specify a default?
[12:35:05 CDT(-0500)] <EricDalquist> what do you mean later?
[12:36:30 CDT(-0500)] <athena> so the request properties aren't available yet when the theme transform runs, right?
[12:36:45 CDT(-0500)] <EricDalquist> not unless you added some code to wait for that portlet
[12:37:26 CDT(-0500)] <athena> so we don't have a great way to know whether we should print out the link generated by the portlet (the external one), or a normal link to the portlet's maximized/whatever mode
[12:38:46 CDT(-0500)] <athena> guess we could have the properties manager set the value to a portlet link if the request property is null, though that would require us to also decide there whether to render a detached or maximized link
[12:39:15 CDT(-0500)] <EricDalquist> you could render both
[12:39:37 CDT(-0500)] <EricDalquist> and add a component to remove the portlet content event from the stream if there is an externalUrl event right before it
[12:40:08 CDT(-0500)] <athena> and then vice versa also, i guess?
[12:40:15 CDT(-0500)] <EricDalquist> yeah
[12:41:15 CDT(-0500)] <athena> hmm, will have to think about what makes most sense
[13:39:56 CDT(-0500)] <EricDalquist> ok athena import should be fixed
[13:40:04 CDT(-0500)] <EricDalquist> also you can use -Dfile= now
[13:40:07 CDT(-0500)] <EricDalquist> instead of dir+pattern
[13:40:10 CDT(-0500)] <EricDalquist> for single file imports
[13:40:53 CDT(-0500)] <athena> awesome (smile)
[13:40:54 CDT(-0500)] <athena> thanks
[13:41:00 CDT(-0500)] <athena> i think i tried file before and it complained at me
[13:41:05 CDT(-0500)] <athena> will try it out again
[13:41:21 CDT(-0500)] <athena> i think my problem w/ the web proxy portlet is that it supports clipping via xpath, but only for element names
[13:41:21 CDT(-0500)] <EricDalquist> yeah
[13:41:27 CDT(-0500)] <EricDalquist> oh yeah
[13:41:31 CDT(-0500)] <athena> adding in attribute tests seems to make it angry
[13:41:32 CDT(-0500)] <EricDalquist> well it isn't really XPath
[13:41:37 CDT(-0500)] <EricDalquist> since the portlet doesn't really parse XML
[13:41:42 CDT(-0500)] <athena> gotcha
[13:42:00 CDT(-0500)] <athena> any way to match a single div if there are multiple ones at the same level?
[13:42:21 CDT(-0500)] <EricDalquist> maybe [1] worked?
[13:42:28 CDT(-0500)] <EricDalquist> like /
[13:42:32 CDT(-0500)] <EricDalquist> ack
[13:42:37 CDT(-0500)] <EricDalquist> /html/body/div[3]/p
[13:42:44 CDT(-0500)] <athena> oh cool i'll try that out
[13:42:49 CDT(-0500)] <athena> think the first one is 1?
[13:43:05 CDT(-0500)] <EricDalquist> I think so
[13:43:10 CDT(-0500)] <EricDalquist> but again this isn't real xpath
[13:43:20 CDT(-0500)] <EricDalquist> its some hand-written code in the clipping filter (tongue)
[13:43:21 CDT(-0500)] <athena> (smile)
[13:43:31 CDT(-0500)] <athena> yeah, figured that out when i looked at the code
[13:43:36 CDT(-0500)] <EricDalquist> that tries to use a stack to keep track of where it is in the document
[13:43:42 CDT(-0500)] <EricDalquist> if I remember correctly
[13:43:49 CDT(-0500)] <athena> would it be worth using actual xpath in the future?
[14:35:36 CDT(-0500)] <athena> hey EricDalquist - so for now, just implemented that to have logic that checks the link property and sets it to a default portlet link if the portlet hasn't set it
[14:35:49 CDT(-0500)] <EricDalquist> sounds good
[14:35:51 CDT(-0500)] <athena> seems like that's the most straightforward approach, though don't know how that sounds to you
[14:36:23 CDT(-0500)] <athena> do you want me to put it in the up trunk or keep it in the umobile branch to start off with?
[14:36:37 CDT(-0500)] <EricDalquist> I think that it is fine going into trunk
[14:36:47 CDT(-0500)] <athena> ok
[14:37:00 CDT(-0500)] <athena> any thoughts on what the request property should be named? (i know this is your favorite question too (tongue))
[14:37:08 CDT(-0500)] <athena> portletLink? externalPortletLink?
[14:37:48 CDT(-0500)] <EricDalquist> I like externalPortletLink
[14:38:04 CDT(-0500)] <athena> ok, cool
[14:38:07 CDT(-0500)] <athena> i think that makes sense
[14:38:16 CDT(-0500)] <athena> and i think there's not really a strong reason to make the name mobile-specific
[14:39:44 CDT(-0500)] <athena> would it be possible/reasonable to set the default link's window state as a stylesheet descriptor in the theme, then use that value when generating the default link?
[14:40:14 CDT(-0500)] <EricDalquist> sure, I think the state/mode gets added to the channel element in the user's layout
[14:41:10 CDT(-0500)] <athena> well, this is for that use case where where we're building links to maximized portlets from the main nav
[14:41:22 CDT(-0500)] <athena> so i think we can't really use the current state?
[14:41:49 CDT(-0500)] <athena> but for the mobile theme we want maximized, and for the json layout doc we want detached
[14:42:19 CDT(-0500)] <EricDalquist> I guess I'm not clear on what you're looking for then
[14:42:28 CDT(-0500)] <athena> yeah, sorry
[14:42:47 CDT(-0500)] <athena> ok, so right now i have PortletExecutionManager set up to get the "externalPortletLink" request property
[14:43:04 CDT(-0500)] <athena> then if it's null, go ahead and generate a link to the portlet's maximized mode and use that instead
[14:43:27 CDT(-0500)] <athena> though really what we want is to be able to indicate some way whether that link should be maximized or detached
[14:44:10 CDT(-0500)]

<athena> i assume there isn't a way to pass in any extra parameters as part of that placeholder? like we can't do

Unknown macro: {up-external-portlet-link(id, 'detached')}

can we?


[14:44:31 CDT(-0500)] <EricDalquist> hrm
[14:44:35 CDT(-0500)] <EricDalquist> I don't think there was
[14:44:40 CDT(-0500)] <EricDalquist> but maybe ...
[14:44:58 CDT(-0500)] <EricDalquist> depends on how many crazy use cases I was thinking of when I wrote it (tongue)
[14:45:06 CDT(-0500)] <athena> lol
[14:45:20 CDT(-0500)] <athena> i'll look around
[14:45:23 CDT(-0500)] <EricDalquist> ahh
[14:45:24 CDT(-0500)] <EricDalquist> so yes
[14:45:31 CDT(-0500)] <EricDalquist> you have a lot of options actually
[14:45:32 CDT(-0500)] <athena> my alternate thought was that we could probably determine the current theme from the request/session, then maybe look for a theme parameter that indicates whether default links should be maximized or detached
[14:46:01 CDT(-0500)] <EricDalquist> in the rendering pipeline context you just specify a regex: {up-portlet-title(([^)]+))}
[14:46:17 CDT(-0500)] <EricDalquist> the base interface for the handler for that regex is CharacterEventSource
[14:46:22 CDT(-0500)] <athena> oooh
[14:46:25 CDT(-0500)] <EricDalquist> which calls:
[14:46:26 CDT(-0500)] <EricDalquist> public List<CharacterEvent> getCharacterEvents(HttpServletRequest servletRequest, MatchResult matchResult);
[14:46:37 CDT(-0500)] <EricDalquist> so you get access to the raw RegEx MatchResult object
[14:47:04 CDT(-0500)] <athena> oh, interesting
[14:47:14 CDT(-0500)] <athena> so if i had the right regex, i could pass in extra info and make use of it?
[14:47:27 CDT(-0500)] <athena> if that works, we might even want to just pass in the URL, rather than passing in a mode
[14:47:29 CDT(-0500)] <EricDalquist> yes
[14:47:35 CDT(-0500)] <athena> since that gives the theme the most control
[14:47:37 CDT(-0500)] <EricDalquist> and actually PortletPlaceholderEventSource should support this as well
[14:47:38 CDT(-0500)] <athena> very nice (smile)
[14:47:45 CDT(-0500)] <athena> any current examples of using those regexes?
[14:47:49 CDT(-0500)] <EricDalquist> it has a portletIdGroup property
[14:48:10 CDT(-0500)] <EricDalquist> which you can specify the match group that contains the portlet window id
[14:48:23 CDT(-0500)] <EricDalquist> well there are all the regexs in the renderingPipelineContext
[14:48:34 CDT(-0500)] <EricDalquist> for what you want this might work:
[14:49:18 CDT(-0500)] <EricDalquist> {up-external-portlet-link(([),]),([)]))}
[14:49:35 CDT(-0500)] <EricDalquist> {up-external-portlet-link(([,]),([)]))}
[14:49:37 CDT(-0500)] <EricDalquist> there
[14:49:39 CDT(-0500)] <athena> and then just look for the second match group?
[14:49:43 CDT(-0500)] <EricDalquist> the second one requires a 2 param import
[14:49:48 CDT(-0500)] <EricDalquist> input*
[14:49:49 CDT(-0500)] <EricDalquist> yeah
[14:49:56 CDT(-0500)] <athena> awesome
[14:49:59 CDT(-0500)] <EricDalquist> and in your subclass of PortletPlaceholderEventSource
[14:50:13 CDT(-0500)] <EricDalquist> you'd override
[14:50:13 CDT(-0500)] <EricDalquist> protected List<CharacterEvent> getCharacterEvents(IPortletWindowId portletWindowId, MatchResult matchResult)
[14:50:24 CDT(-0500)] <EricDalquist> and call: matchResult.group(2)
[14:51:20 CDT(-0500)] <athena> yeah, that makes sense
[14:51:22 CDT(-0500)] <athena> awesome, thanks (smile)
[14:51:28 CDT(-0500)] <EricDalquist> yeah
[14:51:35 CDT(-0500)] <EricDalquist> glad that the code is already there!
[14:51:41 CDT(-0500)] <athena> me too!
[14:51:44 CDT(-0500)] <athena> uportal is cool.
[14:51:45 CDT(-0500)] <athena> (smile)
[14:51:54 CDT(-0500)] <EricDalquist> that it is
[14:51:55 CDT(-0500)] <athena> ok, so we'll use "externalPortletUrl" for the request prop
[14:52:10 CDT(-0500)]

<athena> wonder if we want to use

Unknown macro: {up-external-portlet-link}

or

Unknown macro: {up-portlet-link}

[14:52:20 CDT(-0500)] <athena> since most of the time the url that gets into that block will be internal?
[14:52:24 CDT(-0500)] <EricDalquist> yeah
[14:52:27 CDT(-0500)]

<EricDalquist>

Unknown macro: {up-portlet-link}

[14:52:43 CDT(-0500)] <EricDalquist> I've been meaning to do the work to allow for dynamic help URLs too
[14:52:54 CDT(-0500)] <EricDalquist> where you can specify a help URL as a portlet parameter at publish time
[14:53:03 CDT(-0500)] <EricDalquist> and then the portlet can specify a helpUrl property when rendering
[14:53:11 CDT(-0500)] <EricDalquist> that would replace the publish time URL
[14:53:28 CDT(-0500)] <EricDalquist> then you could have a portlet displaying context-sensative help links
[14:53:35 CDT(-0500)] <athena> yeah you know i was thinking the same thing (smile)
[14:53:44 CDT(-0500)] <athena> seems like that use case is really similar to this one
[14:53:48 CDT(-0500)] <EricDalquist> yup
[14:54:01 CDT(-0500)] <EricDalquist> I really love that the new rendering code is actually working out so well
[14:54:17 CDT(-0500)] <EricDalquist> hopefully we'll see lots of neat customizations and extensions
[14:54:33 CDT(-0500)] <athena> yeah (smile)
[14:54:38 CDT(-0500)] <athena> so much potential for coolness
[15:06:09 CDT(-0500)] <EricDalquist> athena: that antisamy config works pretty well
[15:06:13 CDT(-0500)] <EricDalquist> it doesn't remove CSS though
[15:06:25 CDT(-0500)] <EricDalquist> it just removes the <style> tags so that the actual CSS text shows up (tongue)
[15:10:35 CDT(-0500)] <athena> oh, ok
[15:10:41 CDT(-0500)] <athena> that should be configurable, i think
[15:11:16 CDT(-0500)] <athena> probably something like <tag name="style" action="remove"/>
[15:11:32 CDT(-0500)] <EricDalquist> ah ok
[15:11:47 CDT(-0500)] <athena> maybe the default if something isn't listed is to escape it? not sure
[15:12:03 CDT(-0500)] <EricDalquist> it appears to just strip it out
[15:12:03 CDT(-0500)] <athena> but you can either remove tags completely, or remove the tag elements and keep the content
[15:12:32 CDT(-0500)] <EricDalquist> http://pastebin.com/X7wvERYM
[15:12:45 CDT(-0500)] <EricDalquist> that is the text-only result of the Welcome portlet
[15:14:53 CDT(-0500)] <athena> lol ok yeah, not exactly what we want
[15:14:58 CDT(-0500)] <athena> ok, i'll be back online soonish
[15:15:00 CDT(-0500)] <EricDalquist> its pretty close though
[15:15:02 CDT(-0500)] <athena> heading back to the hotel
[15:15:04 CDT(-0500)] <EricDalquist> k
[15:15:09 CDT(-0500)] <athena> the link stuff completely works now (big grin)
[15:15:13 CDT(-0500)] <EricDalquist> yay!
[15:15:13 CDT(-0500)] <athena> will check that in when i get back
[15:15:15 CDT(-0500)] <athena> ya (smile)
[15:15:16 CDT(-0500)] <athena> cya soon

  • No labels