See the following sources:

http://cvs.apache.org/viewcvs.cgi/jakarta-jetspeed/src/java/org/apache/jetspeed/portal/portlets/


Use the customizer to edit the PSML file.  You can use the PSMLBrowser portlet to view 
your PSML. Try the following:

Login as admin.
Pick Customize HTML and view the portlets available.  
Add the PSML Browser portlet as the admin user.
Check out the PSML browser and find the user and the respective PSML file you want 
change.

The other thing you can try is login as admin
try the following URL   portal/user/youuserid/page/news.psml 
When the page comes up you should be able to customize it. 

The id of the portlet is specific to each PSML file. In Jetspeed version 1.4 and later
their is a new feature referred to as peid which could stand for Portlet Entry ID.  
The peid values are assigned automatically by Jetspeed.

r,
Hugh



-----Original Message-----
From: Danh Hoai [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 16, 2002 12:45 PM
To: Hugh Brien
Subject: Re: Questions from a novice


thanks for your help.

You refer to: "Create a new portlet that extends AbstractPortlet and do
whatever you want.  This is where you can link to your transformation
engine.  Parameters are passed to your Portlets PortletConfig object.  Check
out the examples in the source tree.  They actually very simple."

1.  where are the examples?  Sorry to bother you about it, but I can't find
it.
    I wrote a small portlet and able to get the parameters using
aRunData.getParameters()  instead of using PortletConfig

2.    Also, can you explain how the .psml works?     I followed your
direction to create a new.psml and invoke it from the html page (through a
click button).
However,  the new.psml has only one portlet, so I see only one page coming
back.     What I want is to display old portlets (in default.psml) and the
portlet defined in the new.psml after clicking on the button.

3.  Can you also elaborate on the id attribute of  <portlets>  (like
<portlets id="02"> ) in the default.psml?   Can I define any portlets
elements?

Thanks again.






----- Original Message -----
From: "Hugh Brien" <[EMAIL PROTECTED]>
To: "Jetspeed Users List" <[EMAIL PROTECTED]>; "Danh Hoai"
<[EMAIL PROTECTED]>
Sent: Wednesday, October 16, 2002 10:52 AM
Subject: RE: Questions from a novice




-----Original Message-----
From: Danh Hoai [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 15, 2002 6:38 PM
To: [EMAIL PROTECTED]
Subject: Questions from a novice


General questions:

1.  Trying to understand this URL in the databasetest example:
http://localhost:8080/jetspeed/portal/user/turbine/page/default.psml
we have a vague idea of what is going on:  /portal is like /servlet, there
is directory user/turbine, but where is page, we see html directory

/portal is a servlet, the Turbine servlet. Here is the jist of how it works:

init() method initializes the properties in the ResourceService.

After initialization the Servlet waits for a HTTPRequest from the Servlet
engine.

HTTP Request is handed to the Servlet from the servlet engine. doGet/doPost
is called

The request is used to create a RunData object.  The RunData object is just
a big context object with references to all sorts of useful stuff.
Rundata data = RunDataFactory.getRunData(req, res, getServletConfig()

Service initialization takes place next and is invoked with init(RunData
rd).  This method calls initializes the services in
 TurbineServices specified in the TR.props file.

The following parameters are checked and stored in the RunData object.
Parameters can be specified either way:

/portal/action/Login or /portal?action=Login, the DefaultParameterParser
class(ParameterParser interface) that is built into the RunData will handle
either format.

data.setScreen(data.getParameters().getString("screen"));
data.setAction(data.getParameters().getString("action"));

There is some Login action checks.  This allows for the Login action to
specficied in a the TR.props file.

Next the ActionLoader is loaded with actions and executed. The RunData
object is passed into the exed method

The next couple of methods are  called.

// This is where the validation of the Session information
            // is performed if the user has not logged in yet, then
            // the screen is set to be Login. This also handles the
            // case of not having a screen defined by also setting the
            // screen to Login. If you want people to go to another
            // screen other than Login, you need to change that within
            // TurbineResources.properties...screen.homepage; or, you
            // can specify your own SessionValidator action.
            ActionLoader.getInstance().exec(
                data,
TurbineResources.getString("action.sessionvalidator"));

            // Put the Access Control List into the RunData object, so
            // it is easily available to modules.  It is also placed
            // into the session for serialization.  Modules can null
            // out the ACL to force it to be rebuilt based on more
            // information.
            ActionLoader.getInstance().exec(
                data,
TurbineResources.getString("action.accesscontroller"));

            // Start the execution phase. DefaultPage will execute the
            // appropriate action as well as get the Layout from the
            // Screen and then execute that. The Layout is then
            // responsible for executing the Navigation and Screen
            // modules.
            //
            // Note that by default, this cannot be overridden from
            // parameters passed in via post/query data. This is for
            // security purposes.  You should really never need more
            // than just the default page.  If you do, add logic to
            // DefaultPage to do what you want.

      String defaultPage = TurbineTemplate.getDefaultPageName(data);


Finally the some redirection code and then RunData object is put back into
the RunDataFactory.


2.  Logic for default.psml:  Again our vague understanding is that, when a
page is submitted, URL above is submitted with parameters like js_pid.  And
the class specified in default.psml corresponding to this id is then called
with specified parameters.  the js_pid is dynamic--changes when the pane is
registered, so this dynamic js_pid is inserted into the jsp page everytime
it is sent to the browser.

For clarification I am assuming when you say "when a page is submitted" you
are referring to a browser making an HTTP REQUEST to your Servlet engine.
The above URL refers to the turbine user and their respective PSML file
stored either in the file system or in the database.  You can change the
page/default.psml to
page/news.psml if that file exists.  You could also specify it with
/user/turbine?page=news.psml

3.  If I submit a HTML page and do not want js_pid to be dynamic, can I have
a static one defined in default.psml?  Guess not because default.psml is
generated everytime the pane is configured
If you want specific information on URL building checkout $jslink which
refers to

tool.request.jslink=org.apache.jetspeed.util.template.BaseJetspeedLink  <<==
TR.props

4.  We are trying to add portlet functionality to a servlet based
transformation engine.  Look like if we implement HttpSession,
HttpServletRequest and HttpServletResponse in the portlet environment we
should be able to use our transformation engine.  Let us know if there are
items we have missed

Create a new portlet that extends AbstractPortlet and do whatever you want.
This is where you can link to your transformation engine.  Parameters are
passed to your Portlets PortletConfig object.  Check out the examples in the
source tree.  They actually very simple.

5.  Please point us to any tutorial type links or overall architecture of
jetspeed if there are any.
See the Jakarta web site.

r,
hugh

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to