>>>Hi, >>> >>>Is there any way to display a portlet in the decorator built part of >>>the page (the portlet is not included in a psml file)? >>> >>>This is what I do in my decorator file : >>>--- >>>PageImpl searchPage = (PageImpl) rootFolder.getPage("search.psml"); >>> >>>FragmentImpl searchFragment = (FragmentImpl) >>>searchPage.getFragmentById("simple-search-1"); >>> >>>jetspeed.include(searchFragment); >> >> >> (This is all Velocity code, I suppose.) >> >> You should first check all the obtained objects to see, which is NULL. >> Obviously at one point (maybe the PSML representation, maybe the fragment >> "simple-search-1") you do not get the defined object, for whatever reasons. >> >> I was succesfull, including Portlets the way you did, but they were defined >> in the same PSML file from the Decorator I use. So basically this approach >> should work. >> >> >> Sven.
>Thank you for your reply. > >I have been already thinking about the solution you mentioned. Correct >me if I am wrong but.. do you mean that I should include <fragment> with >my search portlet definition in every psml file? (I want to have on >every page in my portal.) Well, that is my solution right now. Alas, it is not very elegant. But your suggestion in the first place: "PageImpl searchPage = (PageImpl) rootFolder.getPage("search.psml");" could do the job. Is this code getting the fragment you want? Can't you access fragments from other PSML files? >Then take the definition of it from this psml, >put it in the right place, and finally ignore this fragment during >regular psml rendering phase (I don't what to have my search portlet to >be put among the others using MultiColumn or any other layout portlet). Yes, exactly. I wrote my own "PortletLayout" implementation, where I control, which fragments get put into which request parameters. So my decorator accesses the request parameters it expects (I have a navigation portlet, just on top of my page, not included in the normal MultiPortlet-Table-Grid). Here one could try to get fragments (-> Portlets) from other PSML pages; in fact - Jetspeed knows about all its portlets which were deployed. So if you could access the portlet you want this way, you don't even have to define it in a PSML file. But I am not sure how and if that's possible. >Is this your point? Is this the only (working) solution? I don't think so, other (better) solutions must be possible. Greetz, Sven. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]