Liferay, Portlet deployment end development: Basic questions

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Liferay, Portlet deployment end development: Basic questions

Sebastian Kraus/INPLUS/DE

Hi,


atm I try to understand OPS (a nightly built of 03.01.2007) in combination with liferay portal.
Liferay works well and I implemented some demo jsp portlets and deployed them successfully.

I also were able to run some of the orbeon examples as portlet, but not all. I think I did not understand the deployment mechanism completly.



So here some questions (I know this are a lot. So please tell me, if I should open several threads)



1. Deployment

        After installing liferay I had several folders in the webapps folder. I think "ROOT" is the important one.
        I deployed the ops.war so ops runs as normal (localhost:8080/ops)

        To deploy an ops portlet I defined it in the portlet.xml and web.xml of ops and added
        <portlet>
              <portlet-name>OrbeonTestPortlet</portlet-name>
        </portlet> in  liferay-portlet-ext. xml

        Is this the common way of deployment or should I deploy the ops.war with hot deploy functionality of liferay (which did not work when I tried)?



2. Defining and using Orbeon applications as portlets

        As mentioned above easy deployment of existing ops applications were only possible with some.

        - Examples where "path-info" is set to"*" or "/" in the pageflow.xml works fine (f.e. <page path-info="*" view="calc.xhtml"/> of calculator application)

        - In the TODO example I had to change
                <page path-info="/xforms-todo/" view="view.xhtml"/>
                to
                <page path-info="/" view="view.xhtml"/>

                The page info <page path-info="/xforms-todo/format-instance" view="format-instance.xpl"/> I did not touch.

                Otherwise a "Condition failed for every branch of choose" error occurs.
                But the gif's, defined in the view.xhtm I can not see. Seems to me that a path like src="../apps/xforms-todo/images/edit.gif" does not work.

        - the "forms" example did not run at all. Changing the path-info to "/" or "*" did not help. I even do not know, which path-info I should change there.


        How does the path-info mechanism works? Did I specify something wrong? The only place where a reference to the pageflow.xml is set is inside the portlet tag in portlet.xml

         <init-param>
                    <name>oxf.main-processor.input.controller</name>
                    <value>oxf:/apps/forms/page-flow.xml</value>
         </init-param>




4. How can I achive the following?

        I want to write a portlet with following functionality.
        My portlet should appear in the main portal window holding informations of the latest tasks a user has to do next. When the user clicks on a task, a full sized window appears, where he can insert         some comments etc..
        There should be also a  redirect button to the main portal page.

        What is the best way to achieve this? I have two ways in mind but dont know which one works or which is the best.

        1. I write two portlets. One for the tasklist, one for the details. The problem is, how the portlets can communicate. I read that jsr-168 can not communicate between each other. I this right? Is it also not                 possible that one portlet leads to another?

        2. I write one Portlet and deploy it inside the main window. I click on a task opens just a new window. Sounds pretty easy but I dont know how navigate back to the main portal window?



Many thanks for all answers

Best regards

Sebastian Kraus







--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Liferay, Portlet deployment end development: Basic questions

Erik Bruchez
Administrator
Sebastian,

 > 1. Deployment
 >
 > After installing liferay I had several folders in the webapps
 > folder. I think "ROOT" is the important one.  I deployed the ops.war
 > so ops runs as normal (localhost:8080/ops)
 >
 > To deploy an ops portlet I defined it in the portlet.xml and web.xml
 > of ops and added
 > <portlet>
 >       <portlet-name>OrbeonTestPortlet</portlet-name>
 > </portlet> in  liferay-portlet-ext. xml
 >
 > Is this the common way of deployment or should I deploy the ops.war
 > with hot deploy functionality of liferay (which did not work when I
 > tried)?

This is probably a question for the Liferay mailing-list ;-) But yes,
I think you have to use their tools to deploy portlets, you can't just
drop a regular WAR and expect the contained portlets to work (which is
a real shame IMO).

 > 2. Defining and using Orbeon applications as portlets
 >
 > As mentioned above easy deployment of existing ops applications were
 > only possible with some.
 >
 > - Examples where "path-info" is set to"*" or "/" in the
 > pageflow.xml works fine (f.e. <page path-info="*" view="calc.xhtml"/> of
 > calculator application)
 >
 > - In the TODO example I had to change
 >         <page path-info="/xforms-todo/" view="view.xhtml"/>
 >         to
 >         <page path-info="/" view="view.xhtml"/>
 >
 >         The page info <page
 > path-info="/xforms-todo/format-instance" view="format-instance.xpl"/> I
 > did not touch.
 >
 >         Otherwise a "Condition failed for every branch of
 > choose" error occurs.
 >         But the gif's, defined in the view.xhtm I can not see.
 > Seems to me that a path like src="../apps/xforms-todo/images/edit.gif"
 > does not work.

Such paths are recent changes, but a bug was fixed recently that
should allow us to use absolute paths again. Those should work within
portlets again, because they are rewritten as "resource URLs".

 > - the "forms" example did not run at all. Changing the path-info to
 > "/" or "*" did not help. I even do not know, which path-info I
 > should change there.

Something to investigate.

 > How does the path-info mechanism works? Did I specify something
 > wrong? The only place where a reference to the pageflow.xml is set
 > is inside the portlet tag in portlet.xml
 >
 >  <init-param>
 >             <name>oxf.main-processor.input.controller</name>
 >             <value>oxf:/apps/forms/page-flow.xml</value>
 >  </init-param>

Portlets don't have the concept of a path. So Orbeon Forms creates a
portlet request parameter called oxf.path, which simulates one. It
starts by default at "/", which means that your application should
respond to that path. What you should probably do is have a home page
in your portlet that responds to "/", and from there link to other
applications, like "/forms/".

 > 4. How can I achive the following?
 >
 > I want to write a portlet with following functionality.
 > My portlet should appear in the main portal window holding
 > informations of the latest tasks a user has to do next. When the user
 > clicks on a task, a full sized window appears, where he can insert
 >   some comments etc..
 > There should be also a  redirect button to the main portal page.
 >
 > What is the best way to achieve this? I have two ways in mind
 > but dont know which one works or which is the best.
 >
 > 1. I write two portlets. One for the tasklist, one for the
 > details. The problem is, how the portlets can communicate. I read
 > that jsr-168 can not communicate between each other. I this right?
 > Is it also not possible that one portlet leads to another?

Not with stock JSR-168. JSR-286 is meant to fix this:

   http://jcp.org/en/jsr/detail?id=286

You should check whether Liferay supports such extensions, and see how
they could be implemented in Orbeon Forms.

 > 2. I write one Portlet and deploy it inside the main window. I click
 > on a task opens just a new window. Sounds pretty easy but I dont
 > know how navigate back to the main portal window?

The user will probably have to go back to the first window on his own.

But couldn't you simply maximize the original portlet when the user
selects a task?

-Erik

--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws