[Laszlo-dev] Attempting to use OpenLaszlo apps in portlets.

Alexander Wallace aw at rwmotloc.com
Sat Apr 5 20:04:56 PDT 2008


Hi all.

I am attempting to effectively use OpenLaszlo (LZ) apps in portlets.

In portlets, the portlet has certain knowledge that I want the LZ app  
to also have, such as the layout (page) where the portlet is running,  
an instance id for the portlet itself and other things.

I'm also trying to pair this with communication with the portal in a  
portlet instance specific way.

For this, i thought that I could use LZ JavaRPC. Since sevaral  
instances of the same portlet can be running on a session on the same  
or different pages, and also, since all running LZ apps use the zame  
__lzobj session attribute, I thought of differentiating JavaRPC  
objcets using different key names, based on the portlet ID and other  
information. I'm passing the portlet id and related information as  
parameters to the LZ app and intend to use a signature based method to  
prevent parameter tampering.

My intention was to create a Java class that would place certain  
objects in the __lzobj map using a different key for each LZ app  
(portlet).

In summary:

1. I'm trying to preset __lzobj in the session before the LZ app starts
2. I'm trying to put some objects in the __lzobj map using a key  
defined programatically before the LZ app starts, and passed to the LZ  
app as parameters.

I have come to two roadblocks so far:

1- It seems that if I set the __lzobj map in the session before the LZ  
app does it (ie: from a jsp to place some objects there ready to be  
used when LZ app starts), LZ app will not read or write to/from it.
2- I'm trying to use the parameter passed to the LZ app as the  
attributename of the javarpc tag (ie: attributename="$ 
{canvas.pskey}config") and the LZ app, instead of using the value of  
pskey, it uses the var name (including the ${}) literally.

Now, i'm not an expert at all in OpenLaszlo, so, i hope someone here  
can shed some light here and tell me if what I'm trying to do is  
possible, and how...

Of course other suggestions on how to effectively use an LZ app in a  
portlet environment are quite welcome.

Thanks a bunch!



More information about the Laszlo-dev mailing list