From willem at wwwilpower.nl Mon Aug 4 16:26:08 2008 From: willem at wwwilpower.nl (Willem Vermeer) Date: Mon Aug 4 16:26:11 2008 Subject: [Hippoportal-dev] portlet to portlet communication Message-ID: <18812287.post@talk.nabble.com> Hello, Does Hippo offer an out of the box solution for portlet to portlet communication? I want to pass some (form)-parameters from portlet A on page 1 to portlet B on page 2. What solutions are possible to support this scenario? I suppose I could submit a form on portlet A to portlet A but then how to pass control on to portlet B on page 2 sending the form parameters? Thanks, Willem -- View this message in context: http://www.nabble.com/portlet-to-portlet-communication-tp18812287p18812287.html Sent from the Hippo Portal development public mailinglist mailing list archive at Nabble.com. From dtaylor at onehippo.com Mon Aug 4 17:38:24 2008 From: dtaylor at onehippo.com (David Sean Taylor) Date: Mon Aug 4 17:38:26 2008 Subject: [Hippoportal-dev] portlet to portlet communication In-Reply-To: <18812287.post@talk.nabble.com> References: <18812287.post@talk.nabble.com> Message-ID: <58F9C52A-FF35-4F58-AD26-2B39F13FB10E@onehippo.com> On Aug 4, 2008, at 7:26 AM, Willem Vermeer wrote: > > Hello, > > Does Hippo offer an out of the box solution for portlet to portlet > communication? I want to pass some (form)-parameters from portlet A > on page > 1 to portlet B on page 2. What solutions are possible to support this > scenario? I suppose I could submit a form on portlet A to portlet A > but then > how to pass control on to portlet B on page 2 sending the form > parameters? > > Thanks, > Willem One solution, using "servlet" post parameters and making them available to all other portlets: Turn on this setting in your override.properties (or jetspeed.properties): #---------------------------------------------------------------------------------- # Until version 2.1, Jetspeed merged portal request parameters with portlet specific # parameters, effectively allowing "shared" parameters. # This is not compliant with the JSR-168 PLT.11, so by default this is now disabled. # # By setting merge.portal.parameters.with.portlet.parameters=true this feature can # be "restored". # In the situation of portal and portlet parameters with the same name, by default # the portlet parameters will be provided first in the values array, but this too # can be overridden by setting merge.portal.parameters.before.portlet.parameters=true # # Setting both these properties to true will deliver the "old" pre-2.1 behavior. # Note: for individual portlets, these global settings can be overridden by setting # these properties as metadata in jetspeed-portlet.xml #---------------------------------------------------------------------------------- merge.portal.parameters.with.portlet.parameters=false merge.portal.parameters.before.portlet.parameters=false Another solution is to try the PortletMessaging classes available in Bridges Note this solution just wrappers the webapp's session, and you cannot share session state across web apps dtaylor@onehippo.com www.onehippo.com San Francisco - Hippo USA Inc. 101 H Street, Suite Q Petaluma CA 94952-3329 +1 (877) 41-HIPPO Amsterdam - Hippo B.V. Oosteinde 11 1017 WT Amsterdam +31(0)20-5224466 From nicklist at planet.nl Tue Aug 5 09:07:25 2008 From: nicklist at planet.nl (nicklist@planet.nl) Date: Tue Aug 5 09:07:30 2008 Subject: [Hippoportal-dev] Help with the FormPortlet and FormHandlers Message-ID: <09584178D434304885A073316C800D0C052836B2@CPEXBE-EML13.kpnsp.local> Hi, Can anyone give me some pointers on how to use the FormPortlet? A few questions I can think of: - What does a FormHandler need to do and how to register it with the portal? - What init-param does it support and what does each param do? And a more general question: - Are there more examples available than the ones under the demo portal? [1] Hope someone can give me some pointers, With regards, [1] http://svn.hippoforge.org/repos/hippo/hippo-portal/trunk/demo-portal Nick Stolwijk ~Java Developer~ Iprofs BV. Claus Sluterweg 125 2012 WS Haarlem www.iprofs.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.hippo.nl/pipermail/hippoportal-dev/attachments/20080805/c3061629/attachment.htm From wessel.louwris at gmail.com Wed Aug 6 10:47:37 2008 From: wessel.louwris at gmail.com (Wessel Louwris) Date: Wed Aug 6 10:47:41 2008 Subject: [Hippoportal-dev] parameter to layout.vm file Message-ID: Hello, How can I pass a parameter from the .psml layout definition to the layout.vm file? So psml fragment definition is something like: test/div test1 And I would like to retrieve the class parameter in the layout.vm file: #set($myFragment = $jetspeed.currentFragment) #set($rootId = $myFragment.getId()) #set($myClass = $myFragment.getPreference("class")) (where the last on does not work apparantly) Thanks. Wessel From dtaylor at onehippo.com Wed Aug 6 19:47:58 2008 From: dtaylor at onehippo.com (David Sean Taylor) Date: Wed Aug 6 19:48:02 2008 Subject: [Hippoportal-dev] parameter to layout.vm file In-Reply-To: References: Message-ID: <4EA80E1A-4613-4277-ADA7-57FDAEC2EAF8@onehippo.com> On Aug 6, 2008, at 1:47 AM, Wessel Louwris wrote: > Hello, > > How can I pass a parameter from the .psml layout definition to the > layout.vm file? > > So psml fragment definition is something like: > > > > test/div > > > test1 > > > > And I would like to retrieve the class parameter in the layout.vm > file: > > #set($myFragment = $jetspeed.currentFragment) > #set($rootId = $myFragment.getId()) > #set($myClass = $myFragment.getPreference("class")) > > (where the last on does not work apparantly) > Given that $f is a fragment in your layout, this piece of code will display the preference name plus all preference values for a given preference #foreach($fp in $f.Preferences) $fp.Name #foreach($value in $fp.ValueList) $value #end #end dtaylor@onehippo.com www.onehippo.com San Francisco - Hippo USA Inc. 101 H Street, Suite Q Petaluma CA 94952-3329 +1 (877) 41-HIPPO Amsterdam - Hippo B.V. Oosteinde 11 1017 WT Amsterdam +31(0)20-5224466 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.hippo.nl/pipermail/hippoportal-dev/attachments/20080806/2c6e6e39/attachment.htm From nicklist at planet.nl Thu Aug 7 15:31:26 2008 From: nicklist at planet.nl (nicklist@planet.nl) Date: Thu Aug 7 15:31:27 2008 Subject: [Hippoportal-dev] Retrieving the WebdavService from a portlet Message-ID: <09584178D434304885A073316C800D0C052836B7@CPEXBE-EML13.kpnsp.local> Hi, We are trying to retrieve the WebdavService from our portlet. This service is used by the CMSService instances (default, resource and no-cache) you can retrieve from the CMSRequestContext. Is there a possibility to get the WebdavService? We need this service to call the repository and retrieve the xml result of a dasl query, which is not possible through the CMSRequest. Can someone help us? With regards, Nick Stolwijk ~Java Developer~ Iprofs BV. Claus Sluterweg 125 2012 WS Haarlem www.iprofs.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.hippo.nl/pipermail/hippoportal-dev/attachments/20080807/7a0f7527/attachment.htm From wessel.louwris at gmail.com Mon Aug 11 15:34:55 2008 From: wessel.louwris at gmail.com (Wessel) Date: Mon Aug 11 15:35:06 2008 Subject: [Hippoportal-dev] IncludeStylesheets macro Message-ID: <48A03FFF.907@gmail.com> Hello, I've been trying to find how to add Stylesheets to the IncludeStylesheets macro (jetspeed_macros.vm) from a .psml file or from the layout file I found that in the .psml changes the /decorations/layout/default/css/styles.css to /decorations/layout/vervolg-e/css/styles.css But how can I add more stylesheets? And where do come from? Thanks for any help. Wessel From helpdesk at hippo.nl Tue Aug 12 12:05:58 2008 From: helpdesk at hippo.nl (JIRA (Ate Douma)) Date: Tue Aug 12 12:05:59 2008 Subject: [Hippoportal-dev] [JIRA] Resolved: (PORTAL-72) hp:build-portal resets the jetspeed version to 2.1.3 while a certain revision was set in build files In-Reply-To: <25410369.1217506376099.JavaMail.jira@hat01> Message-ID: <7209074.1218535558015.JavaMail.jira@hat01> [ http://issues.hippo.nl/browse/PORTAL-72?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ate Douma resolved PORTAL-72. ----------------------------- Resolution: Won't Fix This behavior is not a bug but a feature! A specific version of the hippo-portal-maven-plugin is build against and supposed to be used for a specific version of the jetspeed portal (e.g. 2.1.3) The purpose of the rewriting of the maven project files (and thereby "resetting" the dependency versions) is to allow automatic upgrading to a newer jetspeed version when a newer version of the hippo-portal-maven-plugin is utilized. > hp:build-portal resets the jetspeed version to 2.1.3 while a certain revision was set in build files > ---------------------------------------------------------------------------------------------------- > > Key: PORTAL-72 > URL: http://issues.hippo.nl/browse/PORTAL-72 > Project: Hippo Portal > Issue Type: Bug > Components: hippo-portal-maven-plugin > Reporter: Jeroen Hoffman > Priority: Normal > > In build files full-portal.xml and jetspeed-component.xml, dependencies to jetspeed were set to a certain revision of jetspeed. When building with the hippoportal maven 1 plugin, these dependencies are reset to 2.1.3, resulting in the wrong jars to be included in the war build. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.hippo.nl/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From a.douma at onehippo.com Tue Aug 12 12:33:52 2008 From: a.douma at onehippo.com (Ate Douma) Date: Tue Aug 12 12:34:02 2008 Subject: [Hippoportal-dev] Help with the FormPortlet and FormHandlers In-Reply-To: <09584178D434304885A073316C800D0C052836B2@CPEXBE-EML13.kpnsp.local> References: <09584178D434304885A073316C800D0C052836B2@CPEXBE-EML13.kpnsp.local> Message-ID: <48A16710.8020403@onehippo.com> nicklist@planet.nl wrote: > Hi, > > Can anyone give me some pointers on how to use the FormPortlet? > > A few questions I can think of: > > - What does a FormHandler need to do and how to register it with the portal? A FormHandler is very generic interface for a bean which can process request (form) parameters (view & action). Although this interface doesn't bind to the Form interface, the general purpose is to use a dedicated FormHandler for a specific Form bean. Take a look at the AbstractFormHandler which provides a lot of default/generic behavior out-of-the-box (e.g. mail template processing, fileupload handling, storage and management of a specific Form state between action and view request, etc.). > - What init-param does it support and what does each param do? The basic FormPortlet doesn't handle additional init params beyond those already handled by its parent class (BaseContentPortlet). If you need specific params, simply extend FormPortlet to suit your needs. What FormPortlet does expect though is a Spring configured map of FormHandler beans registered with bean id "formhandlers". Additionally, for the current CMSRequestContext it will lookup and use a formHandler from this map with a id matching the current siteMapItem Id. For the doView processing, it will delegate processing the request to a matched formHandler and if that returns a (String) viewPage, render it as result, otherwise fall back to rendering the current CMSRequestContext content src (using XSLT template). For doAction processing, it will also (and only) delegate to the matched formHandler for processing the request and finally redirect back to the current portal view page (if not handled by the formHandler itself already). HTH, Ate > > And a more general question: > > - Are there more examples available than the ones under the demo portal? [1] > > Hope someone can give me some pointers, > > With regards, > > [1] http://svn.hippoforge.org/repos/hippo/hippo-portal/trunk/demo-portal > > Nick Stolwijk > ~Java Developer~ > > Iprofs BV. > Claus Sluterweg 125 > 2012 WS Haarlem > www.iprofs.nl > > > ------------------------------------------------------------------------ > > _______________________________________________ > Hippoportal-dev mailing list > Hippoportal-dev@lists.hippo.nl > http://lists.hippo.nl/mailman/listinfo/hippoportal-dev -- a.douma@onehippo.com www.onehippo.com Amsterdam - Hippo B.V. Oosteinde 11 1017 WT Amsterdam +31(0)20-5224466 San Francisco - Hippo USA Inc. 101 H Street, suite Q Petaluma CA 94952-3329 +1(877) 41-HIPPO From a.douma at onehippo.com Tue Aug 12 12:41:58 2008 From: a.douma at onehippo.com (Ate Douma) Date: Tue Aug 12 12:42:01 2008 Subject: [Hippoportal-dev] Retrieving the WebdavService from a portlet In-Reply-To: <09584178D434304885A073316C800D0C052836B7@CPEXBE-EML13.kpnsp.local> References: <09584178D434304885A073316C800D0C052836B7@CPEXBE-EML13.kpnsp.local> Message-ID: <48A168F6.70604@onehippo.com> nicklist@planet.nl wrote: > Hi, > > We are trying to retrieve the WebdavService from our portlet. This > service is used by the CMSService instances (default, resource and > no-cache) you can retrieve from the CMSRequestContext. Is there a > possibility to get the WebdavService? We need this service to call the > repository and retrieve the xml result of a dasl query, which is not > possible through the CMSRequest. > > Can someone help us? The current implementation of the CMSService hides the WebdavService, so right now this is not possible. What method of WebdavService do you need to access which isn't covered by CMSService (yet), I suppose executeSearch()? > > With regards, > > Nick Stolwijk > ~Java Developer~ > > Iprofs BV. > Claus Sluterweg 125 > 2012 WS Haarlem > www.iprofs.nl > > > ------------------------------------------------------------------------ > > _______________________________________________ > Hippoportal-dev mailing list > Hippoportal-dev@lists.hippo.nl > http://lists.hippo.nl/mailman/listinfo/hippoportal-dev -- a.douma@onehippo.com www.onehippo.com Amsterdam - Hippo B.V. Oosteinde 11 1017 WT Amsterdam +31(0)20-5224466 San Francisco - Hippo USA Inc. 101 H Street, suite Q Petaluma CA 94952-3329 +1(877) 41-HIPPO From a.douma at onehippo.com Wed Aug 13 12:09:59 2008 From: a.douma at onehippo.com (Ate Douma) Date: Wed Aug 13 12:10:01 2008 Subject: [Hippoportal-dev] IncludeStylesheets macro In-Reply-To: <48A03FFF.907@gmail.com> References: <48A03FFF.907@gmail.com> Message-ID: <48A2B2F7.7080105@onehippo.com> Wessel wrote: > Hello, > > I've been trying to find how to add Stylesheets to the > IncludeStylesheets macro (jetspeed_macros.vm) from a .psml file or from > the layout file > > I found that in the .psml > changes the > > /decorations/layout/default/css/styles.css > > to > /decorations/layout/vervolg-e/css/styles.css You can also (and probably better if this concerns a overriding default for all .psml files in a certain folder) define the *default* layout-decorator in a folder.metadata file (same syntax) so you won't have to define this on each .psml file individually. The IncludeStylesheets macro adds all the stylesheets (uniquely) identified by the Jetspeed-2 Theme engine as needed for a particular .psml page. For each fragment (either layout or portlet type) in the .psml, the decorator needed is determined and its corresponding stylesheet (e.g. /decorations/[decoration-type]/[decoration-name]/css/styles.css) is added to the set of stylesheets to be included on the page. When a specific decorator supports *both* the (default) portal as well as the desktop front end, the Theme engine will in addition add either a css/portal.css or css/desktop.css to the list, depending on which front end is currently rendered. That explains why you are seeing /decorations/portlet/clear/css/portal.css being included because that (default) decorator provides a decoratordesktop.properties file. If you remove that properties file (if you don't use/need the desktop front end) and/or define property desktop.supported=false in decorator.properties you'll notice the css/portal.css no longer will be included either. > > But how can I add more stylesheets? If you need more additional stylesheets which are not (directly) related to the (set of) decorators used for a .psml file, you can add them directly through the used layout/decorator velocity templates or even use a dedicated (non-visible) portlet to render (part of) the head section of the page. HTH, Ate > > And where do > href="/decorations/portlet/clear/css/styles.css" /> > href="/decorations/portlet/clear/css/portal.css" /> > > come from? > > Thanks for any help. > > Wessel > > > > _______________________________________________ > Hippoportal-dev mailing list > Hippoportal-dev@lists.hippo.nl > http://lists.hippo.nl/mailman/listinfo/hippoportal-dev -- a.douma@onehippo.com www.onehippo.com Amsterdam - Hippo B.V. Oosteinde 11 1017 WT Amsterdam +31(0)20-5224466 San Francisco - Hippo USA Inc. 101 H Street, suite Q Petaluma CA 94952-3329 +1(877) 41-HIPPO From nico.tromp at gmail.com Wed Aug 20 21:38:33 2008 From: nico.tromp at gmail.com (Nico Tromp) Date: Wed Aug 20 21:38:33 2008 Subject: [Hippoportal-dev] Using FreemarkerListContenPortlet to display content from repository files Message-ID: <439bd37e0808201238y34742b06yec82042492686486@mail.gmail.com> Hi all, can somebody giv me a pointer on displaying content from a repository file using the FreemarkerListContentPortlet? I have a DASL query that returns files from the repository. I have a freemarker template for displaying the content from the repository files. I'am able to do the easy stuff like: 1: ${searchResults.size()} 2: <#list searchResults.iterator() as singleFile> 3: <#assign xmlContent = singleFile.responseAsDom> 4: ${xmlContent.getElementsByTagName("name").length} Lines 1 and 4 are just to ensure that my DASL query is returning anything at all. Once I get the 'name' element I need the value. I tried things like: 5: ${xmlContent.getElementsByTagName("name").item(0).getNodeValue() 6: ${xmlContent.name} But nothing seems to work. I get all kinds of exceptions. Kind regards Nico -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.hippo.nl/pipermail/hippoportal-dev/attachments/20080820/a5611d1e/attachment.htm From wessel.louwris at gmail.com Wed Aug 20 23:20:35 2008 From: wessel.louwris at gmail.com (Wessel Louwris) Date: Wed Aug 20 23:20:47 2008 Subject: [Hippoportal-dev] Using FreemarkerListContenPortlet to display content from repository files In-Reply-To: <439bd37e0808201238y34742b06yec82042492686486@mail.gmail.com> References: <439bd37e0808201238y34742b06yec82042492686486@mail.gmail.com> Message-ID: Hello, I guess you can also use the XSLTListContentPortlet for this. With an xslt template it is much easier to do these kind of xml operations. I see the demo-pa does not contain an example for the XSLTListContentPortlet but it does for the XSLTContentPortlet The portlet.xml for a XSLTListContentPortlet would contain preferences like this: xslt /WEB-INF/xslt/banner.xslt dasl_query WEB-INF/dasl/overview.ftl pagingLimit 1 Wessel On Wed, Aug 20, 2008 at 9:38 PM, Nico Tromp wrote: > Hi all, > > can somebody giv me a pointer on displaying content from a repository file > using the FreemarkerListContentPortlet? > > I have a DASL query that returns files from the repository. I have a > freemarker template for displaying the content from the repository files. > I'am able to do the easy stuff like: > > 1: ${searchResults.size()} > 2: <#list searchResults.iterator() as singleFile> > 3: <#assign xmlContent = singleFile.responseAsDom> > 4: ${xmlContent.getElementsByTagName("name").length} > > Lines 1 and 4 are just to ensure that my DASL query is returning anything > at all. > > Once I get the 'name' element I need the value. I tried things like: > > 5: ${xmlContent.getElementsByTagName("name").item(0).getNodeValue() > 6: ${xmlContent.name} > > But nothing seems to work. I get all kinds of exceptions. > > > Kind regards > > Nico > > _______________________________________________ > Hippoportal-dev mailing list > Hippoportal-dev@lists.hippo.nl > http://lists.hippo.nl/mailman/listinfo/hippoportal-dev > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.hippo.nl/pipermail/hippoportal-dev/attachments/20080820/e519b9d9/attachment.htm From nico.tromp at gmail.com Thu Aug 21 10:01:20 2008 From: nico.tromp at gmail.com (Nico Tromp) Date: Thu Aug 21 10:01:27 2008 Subject: [Hippoportal-dev] Using FreemarkerListContenPortlet to display content from repository files In-Reply-To: References: <439bd37e0808201238y34742b06yec82042492686486@mail.gmail.com> Message-ID: <439bd37e0808210101n5f379df4q93fa14f7586e0d87@mail.gmail.com> Wessel, I'am familiar with the XSLT(List)ContentPortlets. I prefer the Freemarker portlets because they are more readable. Using the Freemarker porlets makes life a whole lot easier for our frontend guys. What is the point of having a FreemarkerListContentPortlet if it is not able to display content from the repository? For displaying content is t useless unless you can get to the actual content. Kind regards Nico On Wed, Aug 20, 2008 at 11:20 PM, Wessel Louwris wrote: > Hello, > > I guess you can also use the XSLTListContentPortlet for this. With an xslt > template it is much easier to do these kind of xml operations. I see the > demo-pa does not contain an example for the XSLTListContentPortlet but it > does for the XSLTContentPortlet > > The portlet.xml for a XSLTListContentPortlet would contain preferences like > this: > > > > xslt > /WEB-INF/xslt/banner.xslt > > > dasl_query > WEB-INF/dasl/overview.ftl > > > pagingLimit > 1 > > > > Wessel > > On Wed, Aug 20, 2008 at 9:38 PM, Nico Tromp wrote: > >> Hi all, >> >> can somebody giv me a pointer on displaying content from a repository file >> using the FreemarkerListContentPortlet? >> >> I have a DASL query that returns files from the repository. I have a >> freemarker template for displaying the content from the repository files. >> I'am able to do the easy stuff like: >> >> 1: ${searchResults.size()} >> 2: <#list searchResults.iterator() as singleFile> >> 3: <#assign xmlContent = singleFile.responseAsDom> >> 4: ${xmlContent.getElementsByTagName("name").length} >> >> Lines 1 and 4 are just to ensure that my DASL query is returning anything >> at all. >> >> Once I get the 'name' element I need the value. I tried things like: >> >> 5: ${xmlContent.getElementsByTagName("name").item(0).getNodeValue() >> 6: ${xmlContent.name} >> >> But nothing seems to work. I get all kinds of exceptions. >> >> >> Kind regards >> >> Nico >> >> _______________________________________________ >> Hippoportal-dev mailing list >> Hippoportal-dev@lists.hippo.nl >> http://lists.hippo.nl/mailman/listinfo/hippoportal-dev >> >> > > _______________________________________________ > Hippoportal-dev mailing list > Hippoportal-dev@lists.hippo.nl > http://lists.hippo.nl/mailman/listinfo/hippoportal-dev > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.hippo.nl/pipermail/hippoportal-dev/attachments/20080821/eb80cb2f/attachment.htm From wouter.zelle at gmail.com Fri Aug 22 14:28:53 2008 From: wouter.zelle at gmail.com (Wouter Zelle) Date: Fri Aug 22 14:28:56 2008 Subject: [Hippoportal-dev] Sitemap path delimiter cannot be configured Message-ID: <52cb4dc10808220528k1fa59793xf4bfd649c7af786@mail.gmail.com> Hi, The default seperator between the sitemap and repository paths of an url is a comma, like so: http://site/sitemap/path,repository/file. In the CMS this seperator can be changed (by setting the uriSeperator of the SitemenuModule component-instance). However, in the portal the seperator is hardcoded in JetspeedCMSPortalURL. Can this be changed so the seperator can be configured for the portal as well (using hippo-portal.properties?). Regards, Wouter Zelle -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.hippo.nl/pipermail/hippoportal-dev/attachments/20080822/2c226c17/attachment.htm From d.dam at onehippo.com Mon Aug 25 11:52:58 2008 From: d.dam at onehippo.com (Dennis Dam) Date: Mon Aug 25 11:53:00 2008 Subject: [Hippoportal-dev] Using FreemarkerListContenPortlet to display content from repository files In-Reply-To: <439bd37e0808201238y34742b06yec82042492686486@mail.gmail.com> References: <439bd37e0808201238y34742b06yec82042492686486@mail.gmail.com> Message-ID: <48B280FA.7030908@onehippo.com> Hi Nico, you shouldn't use FreeMarkerListContentPortlet for presenting XML from repository files. The word "list" in this portlet names means that is meant to be used for showing the results of a DASL search operation. The portlet that can be best used for presenting repository XML files is XSLTContentPortlet. An example configuration of this portlet is available in demo-portal [1]. Let me know if you have further questions. Dennis [1] https://svn.hippocms.org/repos/hippo/hippo-portal/trunk/demo-portal/src/webapp/WEB-INF/pages/__demo-site/news-detail.psml Nico Tromp wrote: > Hi all, > > can somebody giv me a pointer on displaying content from a repository > file using the FreemarkerListContentPortlet? > > I have a DASL query that returns files from the repository. I have a > freemarker template for displaying the content from the repository > files. I'am able to do the easy stuff like: > > 1: ${searchResults.size()} > 2: <#list searchResults.iterator() as singleFile> > 3: <#assign xmlContent = singleFile.responseAsDom> > 4: ${xmlContent.getElementsByTagName("name").length} > > Lines 1 and 4 are just to ensure that my DASL query is returning > anything at all. > > Once I get the 'name' element I need the value. I tried things like: > > 5: ${xmlContent.getElementsByTagName("name").item(0).getNodeValue() > 6: ${xmlContent.name} > > But nothing seems to work. I get all kinds of exceptions. > > > Kind regards > > Nico > ------------------------------------------------------------------------ > > _______________________________________________ > Hippoportal-dev mailing list > Hippoportal-dev@lists.hippo.nl > http://lists.hippo.nl/mailman/listinfo/hippoportal-dev > From helpdesk at hippo.nl Mon Aug 25 12:23:00 2008 From: helpdesk at hippo.nl (JIRA (Dennis Dam)) Date: Mon Aug 25 12:23:07 2008 Subject: [Hippoportal-dev] [JIRA] Created: (PORTAL-73) Configurable path delimiter tokens Message-ID: <30746391.1219659780560.JavaMail.jira@hat01> Configurable path delimiter tokens ---------------------------------- Key: PORTAL-73 URL: http://issues.hippo.nl/browse/PORTAL-73 Project: Hippo Portal Issue Type: Improvement Components: hippo-portal-j2 Affects Versions: 1.07.00 Reporter: Dennis Dam Assignee: Dennis Dam Fix For: 1.07.00 Add ability to configure the characters which are used in parsing an Hippo Portal url. See question on the mailinglist from Wouter Zelle on Aug 22, 2008 (http://www.nabble.com/Sitemap-path-delimiter-cannot-be-configured-to19106230.html). Delimter tokens are now configured using static fields, this could be made configurable via Spring. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.hippo.nl/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From d.dam at onehippo.com Mon Aug 25 12:23:27 2008 From: d.dam at onehippo.com (Dennis Dam) Date: Mon Aug 25 12:23:31 2008 Subject: [Hippoportal-dev] Sitemap path delimiter cannot be configured In-Reply-To: <52cb4dc10808220528k1fa59793xf4bfd649c7af786@mail.gmail.com> References: <52cb4dc10808220528k1fa59793xf4bfd649c7af786@mail.gmail.com> Message-ID: <48B2881F.90103@onehippo.com> Hi Wouter, Sounds like a useful improvement of JetspeedCMSPortalURL. I added an issue for it in the Hippo Portal JIRA [1]. Thanks for pointing this out! Dennis [1] http://issues.hippo.nl/browse/PORTAL-73 Wouter Zelle wrote: > Hi, > > The default seperator between the sitemap and repository paths of an > url is a comma, like so: http://site/sitemap/path,repository/file. In > the CMS this seperator can be changed (by setting the uriSeperator of > the SitemenuModule component-instance). However, in the portal the > seperator is hardcoded in JetspeedCMSPortalURL. Can this be changed so > the seperator can be configured for the portal as well (using > hippo-portal.properties?). > > Regards, > > Wouter Zelle > ------------------------------------------------------------------------ > > _______________________________________________ > Hippoportal-dev mailing list > Hippoportal-dev@lists.hippo.nl > http://lists.hippo.nl/mailman/listinfo/hippoportal-dev > From nico.tromp at gmail.com Mon Aug 25 16:03:56 2008 From: nico.tromp at gmail.com (Nico Tromp) Date: Mon Aug 25 16:03:58 2008 Subject: [Hippoportal-dev] Using FreemarkerListContenPortlet to display content from repository files In-Reply-To: <48B280FA.7030908@onehippo.com> References: <439bd37e0808201238y34742b06yec82042492686486@mail.gmail.com> <48B280FA.7030908@onehippo.com> Message-ID: <439bd37e0808250703i4d077dc9he0fec105d8f6907e@mail.gmail.com> Dennis, I am actualy interested in the content from a bunch of XML files that reside in our repository, that's why I use a ListContentPortlet. I like the FreemarkerListContentPortlet because of it simplicity. If I'm correct the demo app uses meta-data. The meta-data can be retreived by using some usefull methods like getPropertyValue() or something like that. Getting data from the content is a whole other story. I didn't find any examples. At this moment we're unmarshalling the XML content into a simple Java object structure and are using that for showing are list with content. I don't like this because of the overhead it generates. I think it should be possible to use the XML content within the FreemarkerListContentPortlet. Kind regards Nico On Mon, Aug 25, 2008 at 11:52 AM, Dennis Dam wrote: > Hi Nico, > > you shouldn't use FreeMarkerListContentPortlet for presenting XML from > repository files. The word "list" in this portlet names means that is meant > to be used for showing the results of a DASL search operation. The portlet > that can be best used for presenting repository XML files is > XSLTContentPortlet. An example configuration of this portlet is available in > demo-portal [1]. Let me know if you have further questions. > > Dennis > > [1] > https://svn.hippocms.org/repos/hippo/hippo-portal/trunk/demo-portal/src/webapp/WEB-INF/pages/__demo-site/news-detail.psml > > Nico Tromp wrote: > >> Hi all, >> >> can somebody giv me a pointer on displaying content from a repository file >> using the FreemarkerListContentPortlet? >> >> I have a DASL query that returns files from the repository. I have a >> freemarker template for displaying the content from the repository files. >> I'am able to do the easy stuff like: >> >> 1: ${searchResults.size()} >> 2: <#list searchResults.iterator() as singleFile> >> 3: <#assign xmlContent = singleFile.responseAsDom> >> 4: ${xmlContent.getElementsByTagName("name").length} >> >> Lines 1 and 4 are just to ensure that my DASL query is returning anything >> at all. >> >> Once I get the 'name' element I need the value. I tried things like: >> >> 5: ${xmlContent.getElementsByTagName("name").item(0).getNodeValue() >> 6: ${xmlContent.name} >> >> But nothing seems to work. I get all kinds of exceptions. >> >> >> Kind regards >> >> Nico >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Hippoportal-dev mailing list >> Hippoportal-dev@lists.hippo.nl >> http://lists.hippo.nl/mailman/listinfo/hippoportal-dev >> >> > > _______________________________________________ > Hippoportal-dev mailing list > Hippoportal-dev@lists.hippo.nl > http://lists.hippo.nl/mailman/listinfo/hippoportal-dev > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.hippo.nl/pipermail/hippoportal-dev/attachments/20080825/93eef148/attachment.htm From michiel at trimpe.nl Mon Aug 25 21:53:51 2008 From: michiel at trimpe.nl (Michiel Trimpe) Date: Mon Aug 25 21:54:00 2008 Subject: [Hippoportal-dev] Getting at CMSSite before the ProfilerValve Message-ID: <990c65350808251253u7b10175ajaf65eeb8c99bffc4@mail.gmail.com> Hey everyone, I ran into an issue with the way the Valves are structured at the moment, specifically that the CMSSite (and thus the CMSService) is not available until after the URL has been resolved to a specific SiteMapItem in the ProfilerValve. In our portal implementation we have a redirects XML file which contains all URL's that we need to redirect (e.g. from the old CMS to the new Hippo CMS). When we wait for the ProfilerValve before doing the redirects however, most of these URL's result in a 404 which stops any further request processing. We thus need to have access to the CMSSite before executing the ProfilerValve. I have a working solution which copies some code and uses reflection heavily to get at the CMSSite before the ProfilerValve, but it would be a lot nicer if a proper solution would be found for this. AFAIK there are two possible solutions. The first is offering a utility class/method that will resolve the CMSSite. The seconds and in my opinion better approach is to add a SiteResolverValve which resolves the CMSSite and places it in the RequestContext to later be used by the CMSContextResolver in the ProfilerValve (or some variation on that theme). Regards, Michiel Trimpe P.S. You can see my current "utility method" at http://pastebin.com/f11939fad -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.hippo.nl/pipermail/hippoportal-dev/attachments/20080825/ff3d80bc/attachment.htm From michiel at trimpe.nl Mon Aug 25 22:11:00 2008 From: michiel at trimpe.nl (Michiel Trimpe) Date: Mon Aug 25 22:11:07 2008 Subject: [Hippoportal-dev] Child Sitemap Diff Message-ID: <990c65350808251311h791da071m4c1394d8fc709447@mail.gmail.com> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: hippo-portal-child-sitemap.diff Type: text/x-diff Size: 7590 bytes Desc: not available Url : http://lists.hippo.nl/pipermail/hippoportal-dev/attachments/20080825/2abd4384/hippo-portal-child-sitemap.bin From d.dam at onehippo.com Tue Aug 26 10:01:16 2008 From: d.dam at onehippo.com (Dennis Dam) Date: Tue Aug 26 10:01:18 2008 Subject: [Hippoportal-dev] Using FreemarkerListContenPortlet to display content from repository files In-Reply-To: <439bd37e0808250703i4d077dc9he0fec105d8f6907e@mail.gmail.com> References: <439bd37e0808201238y34742b06yec82042492686486@mail.gmail.com> <48B280FA.7030908@onehippo.com> <439bd37e0808250703i4d077dc9he0fec105d8f6907e@mail.gmail.com> Message-ID: <48B3B84C.4020200@onehippo.com> Ah ok, I see what you're trying to do now.. if you want to show the full content of a bunch of XML files (the result of a dasl query) , I would recommend using XSLTListContentPortlet instead of FreeMarkerListContentPortlet. The latter one is more suitable for showing metadata (webdav properties) of XML documents, while the first one is very simple to use for showing the *full* content of XML documents. See also the reply from Wessel. Dennis Nico Tromp wrote: > Dennis, > > I am actualy interested in the content from a bunch of XML files that > reside in our repository, that's why I use a ListContentPortlet. I > like the FreemarkerListContentPortlet because of it simplicity. If I'm > correct the demo app uses meta-data. The meta-data can be retreived by > using some usefull methods like getPropertyValue() or something like > that. Getting data from the content is a whole other story. I didn't > find any examples. > > At this moment we're unmarshalling the XML content into a simple Java > object structure and are using that for showing are list with content. > I don't like this because of the overhead it generates. I think it > should be possible to use the XML content within the > FreemarkerListContentPortlet. > > > Kind regards > > Nico > > > On Mon, Aug 25, 2008 at 11:52 AM, Dennis Dam > wrote: > > Hi Nico, > > you shouldn't use FreeMarkerListContentPortlet for presenting XML > from repository files. The word "list" in this portlet names means > that is meant to be used for showing the results of a DASL search > operation. The portlet that can be best used for presenting > repository XML files is XSLTContentPortlet. An example > configuration of this portlet is available in demo-portal [1]. Let > me know if you have further questions. > > Dennis > > [1] > https://svn.hippocms.org/repos/hippo/hippo-portal/trunk/demo-portal/src/webapp/WEB-INF/pages/__demo-site/news-detail.psml > > Nico Tromp wrote: > > Hi all, > > can somebody giv me a pointer on displaying content from a > repository file using the FreemarkerListContentPortlet? > > I have a DASL query that returns files from the repository. I > have a freemarker template for displaying the content from the > repository files. I'am able to do the easy stuff like: > > 1: ${searchResults.size()} > 2: <#list searchResults.iterator() as singleFile> > 3: <#assign xmlContent = singleFile.responseAsDom> > 4: ${xmlContent.getElementsByTagName("name").length} > > Lines 1 and 4 are just to ensure that my DASL query is > returning anything at all. > > Once I get the 'name' element I need the value. I tried things > like: > > 5: > ${xmlContent.getElementsByTagName("name").item(0).getNodeValue() > 6: ${xmlContent.name} > > But nothing seems to work. I get all kinds of exceptions. > > > Kind regards > > Nico > ------------------------------------------------------------------------ > > > > _______________________________________________ > Hippoportal-dev mailing list > Hippoportal-dev@lists.hippo.nl > > http://lists.hippo.nl/mailman/listinfo/hippoportal-dev > > > > _______________________________________________ > Hippoportal-dev mailing list > Hippoportal-dev@lists.hippo.nl > http://lists.hippo.nl/mailman/listinfo/hippoportal-dev > > > ------------------------------------------------------------------------ > > _______________________________________________ > Hippoportal-dev mailing list > Hippoportal-dev@lists.hippo.nl > http://lists.hippo.nl/mailman/listinfo/hippoportal-dev > -- Hippo d.dam@onehippo.com Amsterdam - Hippo B.V. Oosteinde 11 1017 WT Amsterdam +31(0)20-5224466 San Francisco - Hippo USA Inc. 101 H Street, suite Q Petaluma CA 94952-3329 +1 (707) 773-4646 www.onehippo.com info@onehippo.com From d.dam at onehippo.com Tue Aug 26 11:54:02 2008 From: d.dam at onehippo.com (Dennis Dam) Date: Tue Aug 26 11:54:22 2008 Subject: [Hippoportal-dev] Getting at CMSSite before the ProfilerValve In-Reply-To: <990c65350808251253u7b10175ajaf65eeb8c99bffc4@mail.gmail.com> References: <990c65350808251253u7b10175ajaf65eeb8c99bffc4@mail.gmail.com> Message-ID: <48B3D2BA.9010706@onehippo.com> Hi Michiel, there is a third approach which might work for you: you can also wrap CMSApplicationRegistryImpl with your custom extension class, which overrides the resolve() method. In the overridden method you can rewrite the portalurl you got and pass it on to the inherited CMSApplicationRegistryImpl.resolve(). Nevertheless, some modifications to CMSApplicationRegistryImpl might be handy, like getSite(CMSPortalURL portalURL) and getDomain(CMSPortalURL portalURL) methods, which you can use in your extension class. One more thing, you will need to change the Spring bean defintion nl.hippo.portal.cms.CMSApplicationRegistry in hippo-portal.xml to plugin your custom class. Is the rewrite of the portal url ( just before the CMSRequestContext is created ) suitable for you, or do you need a browser redirect ? regards, Dennis Michiel Trimpe wrote: > Hey everyone, > > I ran into an issue with the way the Valves are structured at the > moment, specifically that the CMSSite (and thus the CMSService) is not > available until after the URL has been resolved to a specific > SiteMapItem in the ProfilerValve. > > In our portal implementation we have a redirects XML file which > contains all URL's that we need to redirect (e.g. from the old CMS to > the new Hippo CMS). When we wait for the ProfilerValve before doing > the redirects however, most of these URL's result in a 404 which stops > any further request processing. > > We thus need to have access to the CMSSite before executing the > ProfilerValve. I have a working solution which copies some code and > uses reflection heavily to get at the CMSSite before the > ProfilerValve, but it would be a lot nicer if a proper solution would > be found for this. > > AFAIK there are two possible solutions. The first is offering a > utility class/method that will resolve the CMSSite. The seconds and in > my opinion better approach is to add a SiteResolverValve which > resolves the CMSSite and places it in the RequestContext to later be > used by the CMSContextResolver in the ProfilerValve (or some variation > on that theme). > > Regards, > > Michiel Trimpe > > P.S. You can see my current "utility method" at > http://pastebin.com/f11939fad > ------------------------------------------------------------------------ > > _______________________________________________ > Hippoportal-dev mailing list > Hippoportal-dev@lists.hippo.nl > http://lists.hippo.nl/mailman/listinfo/hippoportal-dev > -- Hippo d.dam@onehippo.com Amsterdam - Hippo B.V. Oosteinde 11 1017 WT Amsterdam +31(0)20-5224466 San Francisco - Hippo USA Inc. 101 H Street, suite Q Petaluma CA 94952-3329 +1 (707) 773-4646 www.onehippo.com info@onehippo.com From d.dam at onehippo.com Tue Aug 26 11:58:07 2008 From: d.dam at onehippo.com (Dennis Dam) Date: Tue Aug 26 11:58:08 2008 Subject: [Hippoportal-dev] Child Sitemap Diff In-Reply-To: <990c65350808251311h791da071m4c1394d8fc709447@mail.gmail.com> References: <990c65350808251311h791da071m4c1394d8fc709447@mail.gmail.com> Message-ID: <48B3D3AF.10509@onehippo.com> Hi Michiel, that feature might be useful. I will create a Jira issue for it and attach your diff so we can have a look at it. thanks, Dennis Michiel Trimpe wrote: > Hey there, > > Something else tangentially related to the last post. > > Due to what ended up being miscommunication I developed some > functionality for the SiteMapLoader to include another SiteMap at some > point in it's tree by adding a 'child-sitemap' attribute on a > SiteMapItem. We won't be using it in our implementation but perhaps > you might still want to use it in Hippo Portal. > > The diff is attached to the email. > > Regards, > > Michiel Trimpe > ------------------------------------------------------------------------ > > _______________________________________________ > Hippoportal-dev mailing list > Hippoportal-dev@lists.hippo.nl > http://lists.hippo.nl/mailman/listinfo/hippoportal-dev -- Hippo d.dam@onehippo.com Amsterdam - Hippo B.V. Oosteinde 11 1017 WT Amsterdam +31(0)20-5224466 San Francisco - Hippo USA Inc. 101 H Street, suite Q Petaluma CA 94952-3329 +1 (707) 773-4646 www.onehippo.com info@onehippo.com From helpdesk at hippo.nl Tue Aug 26 12:02:00 2008 From: helpdesk at hippo.nl (JIRA (Dennis Dam)) Date: Tue Aug 26 12:02:01 2008 Subject: [Hippoportal-dev] [JIRA] Created: (PORTAL-74) Nested sitemap support Message-ID: <15867008.1219744920599.JavaMail.jira@hat01> Nested sitemap support ---------------------- Key: PORTAL-74 URL: http://issues.hippo.nl/browse/PORTAL-74 Project: Hippo Portal Issue Type: New Feature Components: hippo-portal Affects Versions: 1.10.00m01 Reporter: Dennis Dam Assignee: Dennis Dam Fix For: 1.10.00m01 Attachments: hippo-portal-child-sitemap.diff A contribution of Michiel Trimpe from Aug 25, 2008 on the Hippo Portal dev list. His mail: --- Hey there, Something else tangentially related to the last post. Due to what ended up being miscommunication I developed some functionality for the SiteMapLoader to include another SiteMap at some point in it's tree by adding a 'child-sitemap' attribute on a SiteMapItem. We won't be using it in our implementation but perhaps you might still want to use it in Hippo Portal. The diff is attached to the email. Regards, Michiel Trimpe --- -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.hippo.nl/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From helpdesk at hippo.nl Tue Aug 26 12:02:00 2008 From: helpdesk at hippo.nl (JIRA (Dennis Dam)) Date: Tue Aug 26 12:02:02 2008 Subject: [Hippoportal-dev] [JIRA] Updated: (PORTAL-74) Nested sitemap support In-Reply-To: <15867008.1219744920599.JavaMail.jira@hat01> Message-ID: <13746790.1219744920681.JavaMail.jira@hat01> [ http://issues.hippo.nl/browse/PORTAL-74?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Dennis Dam updated PORTAL-74: ----------------------------- Attachment: hippo-portal-child-sitemap.diff Attach patch from Michiel Trimpe. Thanks Michiel! > Nested sitemap support > ---------------------- > > Key: PORTAL-74 > URL: http://issues.hippo.nl/browse/PORTAL-74 > Project: Hippo Portal > Issue Type: New Feature > Components: hippo-portal > Affects Versions: 1.10.00m01 > Reporter: Dennis Dam > Assignee: Dennis Dam > Fix For: 1.10.00m01 > > Attachments: hippo-portal-child-sitemap.diff > > > A contribution of Michiel Trimpe from Aug 25, 2008 on the Hippo Portal dev list. His mail: > --- > Hey there, > Something else tangentially related to the last post. > Due to what ended up being miscommunication I developed some functionality for the SiteMapLoader to include another SiteMap at some point in it's tree by adding a 'child-sitemap' attribute on a SiteMapItem. We won't be using it in our implementation but perhaps you might still want to use it in Hippo Portal. > The diff is attached to the email. > Regards, > Michiel Trimpe > --- -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.hippo.nl/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira From vdweij at hotmail.com Wed Aug 27 16:04:37 2008 From: vdweij at hotmail.com (=?iso-8859-1?Q?=C6de_van_der_Weij?=) Date: Wed Aug 27 16:04:40 2008 Subject: [Hippoportal-dev] Examples of how obtain reference to repository and writting to it Message-ID: Hi All, First a brief break down of my 'problem'. I need to some Ajax calls to change content in the respository. Based on ajaxapi I managed to setup some code that recieves requests and serves a response. So far so good. The java code needs to be in the Portal itself since Spring wires the ajaxapi pipeline from there. The next step is to change one property on a resource in the repository. I expects a resource id and a new value for the parameter. I browsed through the sources and looked for some sample code to no avail. I someone could provide me with an axample or some pointers I would be very pleased. Regards, ?de van der Weij _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.hippo.nl/pipermail/hippoportal-dev/attachments/20080827/94b78093/attachment.htm From michiel at trimpe.nl Thu Aug 28 16:23:15 2008 From: michiel at trimpe.nl (Michiel Trimpe) Date: Thu Aug 28 16:23:24 2008 Subject: [Hippoportal-dev] Getting at CMSSite before the ProfilerValve In-Reply-To: <48B3D2BA.9010706@onehippo.com> References: <990c65350808251253u7b10175ajaf65eeb8c99bffc4@mail.gmail.com> <48B3D2BA.9010706@onehippo.com> Message-ID: <990c65350808280723l21b77760r8438b8f62308f283@mail.gmail.com> Hi Dennis, Thanks for the advice; your explanation is useful for one of the redirect types. We do however need an actual browser redirect, since we are redirecting to external domains as well. Adding getSite(CMSPortalURL) and getDomain(...) would do the job AFAICT. Regards, Michiel P.S. Another option might be to not do a redirect immediately when a document is not found, but set some "Request To Be Redirected" attribute instead and handle this just before you enter the render/aggregation phases. This option is quite useful for us in our project; but I'm not sure it makes sense to include this in the Hippo Portal sources. On Tue, Aug 26, 2008 at 11:54 AM, Dennis Dam wrote: > Hi Michiel, > > there is a third approach which might work for you: you can also wrap > CMSApplicationRegistryImpl with your custom extension class, which overrides > the resolve() method. In the overridden method you can rewrite the portalurl > you got and pass it on to the inherited > CMSApplicationRegistryImpl.resolve(). Nevertheless, some modifications to > CMSApplicationRegistryImpl might be handy, like getSite(CMSPortalURL > portalURL) and getDomain(CMSPortalURL portalURL) methods, which you can use > in your extension class. One more thing, you will need to change the Spring > bean defintion nl.hippo.portal.cms.CMSApplicationRegistry in > hippo-portal.xml to plugin your custom class. Is the rewrite of the portal > url ( just before the CMSRequestContext is created ) suitable for you, or do > you need a browser redirect ? > > regards, > Dennis > > Michiel Trimpe wrote: > >> Hey everyone, >> >> I ran into an issue with the way the Valves are structured at the moment, >> specifically that the CMSSite (and thus the CMSService) is not available >> until after the URL has been resolved to a specific SiteMapItem in the >> ProfilerValve. >> >> In our portal implementation we have a redirects XML file which contains >> all URL's that we need to redirect (e.g. from the old CMS to the new Hippo >> CMS). When we wait for the ProfilerValve before doing the redirects however, >> most of these URL's result in a 404 which stops any further request >> processing. >> >> We thus need to have access to the CMSSite before executing the >> ProfilerValve. I have a working solution which copies some code and uses >> reflection heavily to get at the CMSSite before the ProfilerValve, but it >> would be a lot nicer if a proper solution would be found for this. >> >> AFAIK there are two possible solutions. The first is offering a utility >> class/method that will resolve the CMSSite. The seconds and in my opinion >> better approach is to add a SiteResolverValve which resolves the CMSSite and >> places it in the RequestContext to later be used by the CMSContextResolver >> in the ProfilerValve (or some variation on that theme). >> >> Regards, >> >> Michiel Trimpe >> >> P.S. You can see my current "utility method" at >> http://pastebin.com/f11939fad >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Hippoportal-dev mailing list >> Hippoportal-dev@lists.hippo.nl >> http://lists.hippo.nl/mailman/listinfo/hippoportal-dev >> >> > > > -- > Hippo > d.dam@onehippo.com > > Amsterdam - Hippo B.V. Oosteinde 11 1017 WT Amsterdam +31(0)20-5224466 San > Francisco - Hippo USA Inc. 101 H Street, suite Q Petaluma CA 94952-3329 +1 > (707) 773-4646 > > www.onehippo.com info@onehippo.com > > _______________________________________________ > Hippoportal-dev mailing list > Hippoportal-dev@lists.hippo.nl > http://lists.hippo.nl/mailman/listinfo/hippoportal-dev > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.hippo.nl/pipermail/hippoportal-dev/attachments/20080828/c683de82/attachment.htm From a.douma at onehippo.com Thu Aug 28 23:48:17 2008 From: a.douma at onehippo.com (Ate Douma) Date: Thu Aug 28 23:48:18 2008 Subject: [Hippoportal-dev] Examples of how obtain reference to repository and writting to it In-Reply-To: References: Message-ID: <48B71D21.8080503@onehippo.com> Hi ?de, Although there are ways to get access to the Hippo Repository (using the Hippo Portal API) from within the portal (as Hippo Portal does so itself as well to resolve the incoming request url), I'm not so sure you should run *portlet* app specific logic from with the portal. Using the jetspeed ajaxapi for this more or less forces you to do so as its only available with the portal, and I don't think its a good choice (for this). The jetspeed ajaxapi is primarily used for interactions with the portal. There are alternative solutions you can levarage from within the portlet app though, one of which could be using the Apache Portals Bridges PortletResourceURLFactory, see: http://issues.apache.org/jira/browse/PB-65 and http://svn.apache.org/viewvc/portals/bridges/trunk/common/src/java/org/apache/portals/bridges/common/PortletResourceURLFactory.java?view=markup This "pre" Portlet API 2.0 feature is implemented and available on Jetspeed out of the box and for example used to implement and support Ajax usage in Wicket (http://wicket.apache.org) from within a portlet. It would be going in too much detail to explain how to use this API right now, especially as I'm not familiar with the Ajax requirements and usage you're trying to implement. If you'd need more directions or explanations please let me know. Regards, Ate ?de van der Weij wrote: > Hi All, > > First a brief break down of my 'problem'. I need to some Ajax calls to > change content in the respository. Based on ajaxapi I managed to setup > some code that recieves requests and serves a response. So far so good. > The java code needs to be in the Portal itself since Spring wires the > ajaxapi pipeline from there. > > The next step is to change one property on a resource in the repository. > I expects a resource id and a new value for the parameter. I browsed > through the sources and looked for some sample code to no avail. > > I someone could provide me with an axample or some pointers I would be > very pleased. > > Regards, > ?de van der Weij > > ------------------------------------------------------------------------ > Express yourself instantly with MSN Messenger! MSN Messenger > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Hippoportal-dev mailing list > Hippoportal-dev@lists.hippo.nl > http://lists.hippo.nl/mailman/listinfo/hippoportal-dev -- a.douma@onehippo.com www.onehippo.com Amsterdam - Hippo B.V. Oosteinde 11 1017 WT Amsterdam +31(0)20-5224466 San Francisco - Hippo USA Inc. 101 H Street, suite Q Petaluma CA 94952-3329 +1(877) 41-HIPPO From a.douma at onehippo.com Thu Aug 28 23:48:17 2008 From: a.douma at onehippo.com (Ate Douma) Date: Thu Aug 28 23:48:20 2008 Subject: [Hippoportal-dev] Examples of how obtain reference to repository and writting to it In-Reply-To: References: Message-ID: <48B71D21.8080503@onehippo.com> Hi ?de, Although there are ways to get access to the Hippo Repository (using the Hippo Portal API) from within the portal (as Hippo Portal does so itself as well to resolve the incoming request url), I'm not so sure you should run *portlet* app specific logic from with the portal. Using the jetspeed ajaxapi for this more or less forces you to do so as its only available with the portal, and I don't think its a good choice (for this). The jetspeed ajaxapi is primarily used for interactions with the portal. There are alternative solutions you can levarage from within the portlet app though, one of which could be using the Apache Portals Bridges PortletResourceURLFactory, see: http://issues.apache.org/jira/browse/PB-65 and http://svn.apache.org/viewvc/portals/bridges/trunk/common/src/java/org/apache/portals/bridges/common/PortletResourceURLFactory.java?view=markup This "pre" Portlet API 2.0 feature is implemented and available on Jetspeed out of the box and for example used to implement and support Ajax usage in Wicket (http://wicket.apache.org) from within a portlet. It would be going in too much detail to explain how to use this API right now, especially as I'm not familiar with the Ajax requirements and usage you're trying to implement. If you'd need more directions or explanations please let me know. Regards, Ate ?de van der Weij wrote: > Hi All, > > First a brief break down of my 'problem'. I need to some Ajax calls to > change content in the respository. Based on ajaxapi I managed to setup > some code that recieves requests and serves a response. So far so good. > The java code needs to be in the Portal itself since Spring wires the > ajaxapi pipeline from there. > > The next step is to change one property on a resource in the repository. > I expects a resource id and a new value for the parameter. I browsed > through the sources and looked for some sample code to no avail. > > I someone could provide me with an axample or some pointers I would be > very pleased. > > Regards, > ?de van der Weij > > ------------------------------------------------------------------------ > Express yourself instantly with MSN Messenger! MSN Messenger > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Hippoportal-dev mailing list > Hippoportal-dev@lists.hippo.nl > http://lists.hippo.nl/mailman/listinfo/hippoportal-dev -- a.douma@onehippo.com www.onehippo.com Amsterdam - Hippo B.V. Oosteinde 11 1017 WT Amsterdam +31(0)20-5224466 San Francisco - Hippo USA Inc. 101 H Street, suite Q Petaluma CA 94952-3329 +1(877) 41-HIPPO From vdweij at hotmail.com Fri Aug 29 08:25:01 2008 From: vdweij at hotmail.com (=?iso-8859-1?Q?=C6de_van_der_Weij?=) Date: Fri Aug 29 08:25:07 2008 Subject: [Hippoportal-dev] Examples of how obtain reference to repository and writting to it In-Reply-To: <48B71D21.8080503@onehippo.com> References: <48B71D21.8080503@onehippo.com> Message-ID: Ate, Thanks for your reply. I share your opinion concerning the Portal being not the preferred place to run logic from. However, I managed to get it working just now. Getting hold of a CMSService instance was kind of difficult. In the portal you can inject the HippoPortalRegistration bean, from which I was able to retrieve this service. Below you can find how I did this. I'm not too pleased with it since it looks kind of a detour. But hey, it works. private CMSService getCMSService(RequestContext requestContext) { try { CMSApplicationRegistry cmsApplicationRegistry = hippoPortalRegistration.getCMSApplicationRegistry(); Principal p = requestContext.getRequest().getUserPrincipal(); //we don't seem to need the principle CMSUser cmsUser = new JetspeedCMSUser(p, null); CMSPortalURL cmsPortalURL = new JetspeedCMSPortalURL(requestContext.getRequest(), requestContext.getResponse(), null, null, false, false, true); CMSRequestContext cmsRequestContext = cmsApplicationRegistry.resolve(cmsUser, cmsPortalURL, Locale.getDefault()); return cmsRequestContext.getDefaultService(); } catch (Exception e) { //TODO: perhaps log something?! return null; } } I will definitly follow up on the pointers you gave me and see if I can port the already created AJAX logic from the Portal to a Portlet. If time permits I'll change it. Ragards, ?de > Date: Thu, 28 Aug 2008 23:48:17 +0200 > From: a.douma@onehippo.com > To: hippoportal-dev@lists.hippo.nl > Subject: Re: [Hippoportal-dev] Examples of how obtain reference to repository and writting to it > CC: hippoportal-dev@lists.hippocms.org > > Hi ?de, > > Although there are ways to get access to the Hippo Repository (using the Hippo Portal API) from within the portal (as > Hippo Portal does so itself as well to resolve the incoming request url), I'm not so sure you should run *portlet* app > specific logic from with the portal. > Using the jetspeed ajaxapi for this more or less forces you to do so as its only available with the portal, and I don't > think its a good choice (for this). The jetspeed ajaxapi is primarily used for interactions with the portal. > > There are alternative solutions you can levarage from within the portlet app though, one of which could be using the > Apache Portals Bridges PortletResourceURLFactory, see: > > http://issues.apache.org/jira/browse/PB-65 > > and > > http://svn.apache.org/viewvc/portals/bridges/trunk/common/src/java/org/apache/portals/bridges/common/PortletResourceURLFactory.java?view=markup > > This "pre" Portlet API 2.0 feature is implemented and available on Jetspeed out of the box and for example used to > implement and support Ajax usage in Wicket (http://wicket.apache.org) from within a portlet. > > It would be going in too much detail to explain how to use this API right now, especially as I'm not familiar with the > Ajax requirements and usage you're trying to implement. > > If you'd need more directions or explanations please let me know. > > Regards, > > Ate > > ?de van der Weij wrote: > > Hi All, > > > > First a brief break down of my 'problem'. I need to some Ajax calls to > > change content in the respository. Based on ajaxapi I managed to setup > > some code that recieves requests and serves a response. So far so good. > > The java code needs to be in the Portal itself since Spring wires the > > ajaxapi pipeline from there. > > > > The next step is to change one property on a resource in the repository. > > I expects a resource id and a new value for the parameter. I browsed > > through the sources and looked for some sample code to no avail. > > > > I someone could provide me with an axample or some pointers I would be > > very pleased. > > > > Regards, > > ?de van der Weij > > > > ------------------------------------------------------------------------ > > Express yourself instantly with MSN Messenger! MSN Messenger > > > > > > > > ------------------------------------------------------------------------ > > > > _______________________________________________ > > Hippoportal-dev mailing list > > Hippoportal-dev@lists.hippo.nl > > http://lists.hippo.nl/mailman/listinfo/hippoportal-dev > > > -- > a.douma@onehippo.com www.onehippo.com > > Amsterdam - Hippo B.V. Oosteinde 11 1017 WT Amsterdam +31(0)20-5224466 > San Francisco - Hippo USA Inc. 101 H Street, suite Q Petaluma CA 94952-3329 +1(877) 41-HIPPO > > > _______________________________________________ > Hippoportal-dev mailing list > Hippoportal-dev@lists.hippo.nl > http://lists.hippo.nl/mailman/listinfo/hippoportal-dev _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.hippo.nl/pipermail/hippoportal-dev/attachments/20080829/93954dd9/attachment.htm