uPortal IRC Logs-2011-03-15
[10:44:30 CDT(-0500)] <rickard> <select name="instance">
[10:44:30 CDT(-0500)] <rickard> <option value="1">First option</option>
[10:44:30 CDT(-0500)] <rickard> <option value="2">Second option</option>
[10:44:30 CDT(-0500)] <rickard> </select>
[10:45:01 CDT(-0500)] <rickard> How can I access the value from Java code? I've tried request.getParameter(), but that returns "First option" rather than "1".
[11:40:20 CDT(-0500)] <EricDalquist> rickard: I think request.getParameter("instance") should be returning 1 or 2
[11:40:38 CDT(-0500)] <EricDalquist> this is just in a plain <form> submit?
[12:04:01 CDT(-0500)] <rickard> EricDalquist: My mistake. I had <option id="1">, not value="1"
[12:04:24 CDT(-0500)] <EricDalquist> ah glad you got it figured out
[15:15:12 CDT(-0500)] <athena> EricDalquist: any pointers for figuring out how to get portlet definition parameters into the structure/theme?
[15:30:31 CDT(-0500)] <EricDalquist> what version?
[15:32:45 CDT(-0500)] <DrewWills> athena what sort of params? ssup and tsup just seem to appear in the XML
[15:32:59 CDT(-0500)] <EricDalquist> well if she's asking about trunk it may be different right now
[15:33:09 CDT(-0500)] <athena> trunk, yes
[15:33:17 CDT(-0500)] <athena> particularly looking for our iconUrl parameter
[15:33:38 CDT(-0500)] <EricDalquist> yeah that may be missing until I get my ssup/tsup changes in
[15:33:39 CDT(-0500)] <athena> it seems like those might not be coming through to the structure transformation right now
[15:33:42 CDT(-0500)] <athena> oh ok
[15:33:46 CDT(-0500)] <athena> so that's already on the way?
[15:34:01 CDT(-0500)] <EricDalquist> yeah, I just have to get the import/export working and do the testing
[15:34:07 CDT(-0500)] <athena> oh awesome
[15:34:10 CDT(-0500)] <athena> great to hear
[15:34:10 CDT(-0500)] <EricDalquist> I'll add a note to double check the incorperation of those values
[15:34:26 CDT(-0500)] <athena> thanks!
[15:34:35 CDT(-0500)] <EricDalquist> I'll have to look up what they looked like in 3.2
[15:34:41 CDT(-0500)] <athena> playing with trying to output the JSON we need via the theme transform rather than a REST service
[15:34:55 CDT(-0500)] <athena> found that we can't really output REST
[15:35:03 CDT(-0500)] <athena> er, output JSON
[15:35:20 CDT(-0500)] <athena> seems like the pipeline expects at least a top-level XML-ish element
[15:35:38 CDT(-0500)] <EricDalquist> I'm assuming we need something like <portlet id="1"><parameter name="iconUrl">http://example.com</parameter></portlet>
[15:35:49 CDT(-0500)] <EricDalquist> well you'd have to write a custom serializing component
[15:35:56 CDT(-0500)] <EricDalquist> to convert from the XMLEvents to CharacterEvents
[15:36:00 CDT(-0500)] <athena> gotcha
[15:36:14 CDT(-0500)] <EricDalquist> right now that uses a StAX serializer to go from XML to character data
[15:36:19 CDT(-0500)] <athena> for now it looks like i can just put a fake elemnt at the top and then parse it's contents as the JSON
[15:36:27 CDT(-0500)] <EricDalquist> neat
[15:36:59 CDT(-0500)] <athena> so we'll get around it if we have to
[15:36:59 CDT(-0500)] <EricDalquist> are you creating essentially a parallel pipeline (or partially parallel with a fork at one of the steps)?
[15:37:13 CDT(-0500)] <athena> at the moment i just put it in the mobile theme
[15:37:18 CDT(-0500)] <EricDalquist> ah ok
[15:37:38 CDT(-0500)] <athena> with if-else logic to output if that if we're both on a native app and in focus mode
[15:37:57 CDT(-0500)] <EricDalquist> got it'
[15:38:38 CDT(-0500)] <athena> might be a better way to do that i suppose
[15:38:42 CDT(-0500)] <athena> but it does seem to work
[15:39:27 CDT(-0500)] <EricDalquist> yeah the other thing that should be possible is a fork in the rendering pipeline: https://wiki.jasig.org/display/UPC/Rendering+Pipeline
[15:39:37 CDT(-0500)] <EricDalquist> since it is just a chain of components
[15:40:28 CDT(-0500)] <EricDalquist> you could have the first few items (DLM, structure attribute incorperation, structure transform) be shared but have a different top level component that a REST API talks to
[15:40:47 CDT(-0500)] <EricDalquist> so like if you just wanted a JSON representation of the structure transform
[15:40:54 CDT(-0500)] <athena> interesting
[15:41:11 CDT(-0500)] <athena> in the long term that seems like it might be a good strategy
[15:41:49 CDT(-0500)] <EricDalquist> you could add a StAX->JSON serializer component that is sits on top of the structure transform output cache component
[15:42:08 CDT(-0500)] <EricDalquist> then all the cached data below that point gets shared by both pipelines (if the keys match of course)
[15:42:27 CDT(-0500)] <EricDalquist> and you only need to add the additional components you actually need to get your JSON view of the layout
[15:42:40 CDT(-0500)] <athena> yeah that's actually really cool
[15:42:50 CDT(-0500)] <EricDalquist> you could even skip the portlet rendering initialization and portlet rendering incorperation components completely if you wanted
[15:43:02 CDT(-0500)] <athena> i guess i'll probably keep what i have now since it has a lot better chance of being backported to 3.2.x
[15:43:08 CDT(-0500)] <EricDalquist> yeah, I'm hoping that it lets us do some neat things in the future
[15:43:09 CDT(-0500)] <EricDalquist> yup
[15:43:11 CDT(-0500)] <athena> but that strategy would really be much cleaner going forward
[15:43:11 CDT(-0500)] <EricDalquist> it would
[15:43:12 CDT(-0500)] <athena> yeah
[15:43:29 CDT(-0500)] <EricDalquist> if there is a free time slot I'm going to do a rendering pipeline bof at the conference
[15:43:40 CDT(-0500)] <EricDalquist> to do a pretty technical review of it
[15:43:54 CDT(-0500)] <athena> oh that'd be terrific
[15:44:14 CDT(-0500)] <athena> i know you did a bit at the last conference, but i think it was all so new my brain wasn't quite prepared to absorb it
[15:44:33 CDT(-0500)] <EricDalquist> right
[15:44:41 CDT(-0500)] <EricDalquist> and now it actually exists and is functional and stuff
[16:12:34 CDT(-0500)] <rickard> Is there some sample markup/CSS classes that I should use for portlets in order for them to appear correctly in uPortal? I'm particularly interested in how to style a form with a bunch of <textarea>s.
[16:12:59 CDT(-0500)] <rickard> Template markup rather.
[16:50:01 CDT(-0500)] <Bananobot> In the WebProxy portlet, is there any way to tell it not to rewrite any of the URLs in the HTML? For example, if the HTML it fetches has <a href="/foo">Foo</a>, I don't want that to be rewritten to http://contentsite.example.com/foo, I want it to be http://uportalsite.example.com/foo.
[16:50:58 CDT(-0500)] <EricDalquist> in the config you have to specify regex patterns to tell the portlet which urls to proxy and which to just send directly to the site
[16:51:11 CDT(-0500)] <EricDalquist> I can't remember the name of the config option off the top of my head
[16:51:22 CDT(-0500)] <athena> rickard: we're working on a portlet CSS template and working to donate the CSS classes back to fluid, so hopefully there will be something useful soon
[16:51:31 CDT(-0500)] <athena> not sure we really have a lot of styling by defualt for textareas
[16:52:07 CDT(-0500)] <Bananobot> EricDalquist: Is it the "Portlet URL" / "Portlet URL List Type(Include or Exclude)" thing?
[18:10:54 CDT(-0500)] <rickard> Just noticed something odd. Portlet preferences are saved to the database including doublequotes. Both the preference name in up_portlet_pref and the value in up_portlet_pref_values. Any idea why?
[18:36:57 CDT(-0500)] <Bananobot> Just a guess, but maybe non-string values aren't stored with double quotes?