Re: AW: Displaying portlet in decorator

2005-04-14 Thread zaza
Sven Thiergen wrote:
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.) 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).

Is this your point? Is this the only (working) solution?
Best regards,
Tomasz.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Read a psml file

2005-02-09 Thread zaza
David Sean Taylor wrote:
angeloimm wrote:
Hi all; if i know the psml name... how could i have a parameter in 
this psml file?

Not sure if I understand the question, but I'll try.
To change the parameters on a portlet instance, you can edit the psml 
file  by hand, for example the StockQuote portlet, override the default 
init parameters on a portlet instance:

entry id=P-f570871a5a-10008 parent=StockQuote
layout position=-1 size=-1
property name=column value=0/
property name=row value=1/
/layout
parameter name=symbols value=MSFT,IBM,ORCL,SUNW,ITGW/
/entry
or change them from the running portlet. For example the StockQuote 
portlet provides an edit mode to edit the parameters

For example let's suppose i have in the file a.psml a parameter called 
text. well in a portlet called b how can i have this parameter?
Thanks

Programatically a Jetspeed-1 portlet can access its PSML parameters by 
via the portlet instance

http://portals.apache.org/jetspeed-1/apidocs/org/apache/jetspeed/portal/PortletInstance.html 

The are a few variations on this, see the example portlets that come 
with the distribution
Hi,
What about J2? Can you configure fragments responsible for portlets in 
similar way? Can you add a paramater tag to the psml file? And finally 
can you access those parameters programatically later?

Thank you for any help.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]